@wordpress/editor 14.3.0 → 14.5.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 (537) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -1
  3. package/build/bindings/api.js +65 -0
  4. package/build/bindings/api.js.map +1 -0
  5. package/build/bindings/pattern-overrides.js +23 -13
  6. package/build/bindings/pattern-overrides.js.map +1 -1
  7. package/build/bindings/post-meta.js +35 -12
  8. package/build/bindings/post-meta.js.map +1 -1
  9. package/build/components/block-settings-menu/content-only-settings-menu.js +4 -1
  10. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  11. package/build/components/blog-title/index.js +7 -3
  12. package/build/components/blog-title/index.js.map +1 -1
  13. package/build/components/collapsible-block-toolbar/index.js +2 -3
  14. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  15. package/build/components/commands/index.js +8 -2
  16. package/build/components/commands/index.js.map +1 -1
  17. package/build/components/document-bar/index.js +1 -1
  18. package/build/components/document-bar/index.js.map +1 -1
  19. package/build/components/global-styles-provider/index.js +15 -3
  20. package/build/components/global-styles-provider/index.js.map +1 -1
  21. package/build/components/header/back-button.js +7 -8
  22. package/build/components/header/back-button.js.map +1 -1
  23. package/build/components/header/index.js +21 -20
  24. package/build/components/header/index.js.map +1 -1
  25. package/build/components/page-attributes/order.js +1 -67
  26. package/build/components/page-attributes/order.js.map +1 -1
  27. package/build/components/page-attributes/panel.js +1 -4
  28. package/build/components/page-attributes/panel.js.map +1 -1
  29. package/build/components/page-attributes/parent.js +6 -2
  30. package/build/components/page-attributes/parent.js.map +1 -1
  31. package/build/components/post-actions/actions.js +131 -344
  32. package/build/components/post-actions/actions.js.map +1 -1
  33. package/build/components/post-actions/index.js +16 -6
  34. package/build/components/post-actions/index.js.map +1 -1
  35. package/build/components/post-author/hook.js +10 -3
  36. package/build/components/post-author/hook.js.map +1 -1
  37. package/build/components/post-author/panel.js +2 -1
  38. package/build/components/post-author/panel.js.map +1 -1
  39. package/build/components/post-card-panel/index.js +9 -3
  40. package/build/components/post-card-panel/index.js.map +1 -1
  41. package/build/components/post-comments/index.js +6 -20
  42. package/build/components/post-comments/index.js.map +1 -1
  43. package/build/components/post-content-information/index.js +7 -1
  44. package/build/components/post-content-information/index.js.map +1 -1
  45. package/build/components/post-discussion/panel.js +2 -2
  46. package/build/components/post-discussion/panel.js.map +1 -1
  47. package/build/components/post-excerpt/panel.js +1 -1
  48. package/build/components/post-excerpt/panel.js.map +1 -1
  49. package/build/components/post-featured-image/index.js +3 -1
  50. package/build/components/post-featured-image/index.js.map +1 -1
  51. package/build/components/post-last-revision/index.js +2 -1
  52. package/build/components/post-last-revision/index.js.map +1 -1
  53. package/build/components/post-publish-button/index.js +4 -11
  54. package/build/components/post-publish-button/index.js.map +1 -1
  55. package/build/components/post-publish-panel/maybe-category-panel.js +4 -1
  56. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  57. package/build/components/post-publish-panel/maybe-tags-panel.js +2 -1
  58. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  59. package/build/components/post-status/index.js +47 -51
  60. package/build/components/post-status/index.js.map +1 -1
  61. package/build/components/post-taxonomies/flat-term-selector.js +17 -6
  62. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  63. package/build/components/post-taxonomies/index.js +7 -1
  64. package/build/components/post-taxonomies/index.js.map +1 -1
  65. package/build/components/post-template/block-theme.js +4 -4
  66. package/build/components/post-template/block-theme.js.map +1 -1
  67. package/build/components/post-template/classic-theme.js +8 -2
  68. package/build/components/post-template/classic-theme.js.map +1 -1
  69. package/build/components/post-template/create-new-template-modal.js +3 -0
  70. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  71. package/build/components/post-template/create-new-template.js +4 -1
  72. package/build/components/post-template/create-new-template.js.map +1 -1
  73. package/build/components/post-template/hooks.js +5 -1
  74. package/build/components/post-template/hooks.js.map +1 -1
  75. package/build/components/post-template/panel.js +8 -2
  76. package/build/components/post-template/panel.js.map +1 -1
  77. package/build/components/post-trash/check.js +6 -4
  78. package/build/components/post-trash/check.js.map +1 -1
  79. package/build/components/post-url/panel.js +9 -4
  80. package/build/components/post-url/panel.js.map +1 -1
  81. package/build/components/posts-per-page/index.js +6 -2
  82. package/build/components/posts-per-page/index.js.map +1 -1
  83. package/build/components/preview-dropdown/index.js +82 -17
  84. package/build/components/preview-dropdown/index.js.map +1 -1
  85. package/build/components/provider/disable-non-page-content-blocks.js +14 -18
  86. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  87. package/build/components/provider/use-block-editor-settings.js +15 -6
  88. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  89. package/build/components/save-publish-panels/index.js +1 -2
  90. package/build/components/save-publish-panels/index.js.map +1 -1
  91. package/build/components/sidebar/index.js +3 -9
  92. package/build/components/sidebar/index.js.map +1 -1
  93. package/build/components/site-discussion/index.js +12 -22
  94. package/build/components/site-discussion/index.js.map +1 -1
  95. package/build/components/template-content-panel/index.js +17 -15
  96. package/build/components/template-content-panel/index.js.map +1 -1
  97. package/build/components/visual-editor/edit-template-blocks-notification.js +4 -4
  98. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  99. package/build/components/visual-editor/index.js +7 -3
  100. package/build/components/visual-editor/index.js.map +1 -1
  101. package/build/{hooks → components/visual-editor}/use-select-nearest-editable-block.js +1 -1
  102. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -0
  103. package/build/dataviews/actions/delete-post.js +2 -0
  104. package/build/dataviews/actions/delete-post.js.map +1 -1
  105. package/build/dataviews/actions/export-pattern.native.js +9 -0
  106. package/build/dataviews/actions/export-pattern.native.js.map +1 -0
  107. package/build/dataviews/actions/permanently-delete-post.js +107 -0
  108. package/build/dataviews/actions/permanently-delete-post.js.map +1 -0
  109. package/build/dataviews/actions/restore-post.js +112 -0
  110. package/build/dataviews/actions/restore-post.js.map +1 -0
  111. package/build/dataviews/actions/trash-post.js +142 -0
  112. package/build/dataviews/actions/trash-post.js.map +1 -0
  113. package/build/dataviews/store/private-actions.js +45 -0
  114. package/build/dataviews/store/private-actions.js.map +1 -1
  115. package/build/dataviews/store/private-selectors.js +10 -10
  116. package/build/dataviews/store/private-selectors.js.map +1 -1
  117. package/build/dataviews/store/reducer.js +15 -1
  118. package/build/dataviews/store/reducer.js.map +1 -1
  119. package/build/dataviews/types.js.map +1 -1
  120. package/build/hooks/pattern-overrides.js +1 -1
  121. package/build/hooks/pattern-overrides.js.map +1 -1
  122. package/build/index.js +0 -1
  123. package/build/index.js.map +1 -1
  124. package/build/private-apis.js +3 -2
  125. package/build/private-apis.js.map +1 -1
  126. package/build/store/actions.js +16 -2
  127. package/build/store/actions.js.map +1 -1
  128. package/build/store/private-actions.js +8 -1
  129. package/build/store/private-actions.js.map +1 -1
  130. package/build/store/private-selectors.js +33 -2
  131. package/build/store/private-selectors.js.map +1 -1
  132. package/build/utils/media-upload/index.js +35 -2
  133. package/build/utils/media-upload/index.js.map +1 -1
  134. package/build-module/bindings/api.js +57 -0
  135. package/build-module/bindings/api.js.map +1 -0
  136. package/build-module/bindings/pattern-overrides.js +23 -13
  137. package/build-module/bindings/pattern-overrides.js.map +1 -1
  138. package/build-module/bindings/post-meta.js +35 -12
  139. package/build-module/bindings/post-meta.js.map +1 -1
  140. package/build-module/components/block-settings-menu/content-only-settings-menu.js +4 -1
  141. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  142. package/build-module/components/blog-title/index.js +7 -3
  143. package/build-module/components/blog-title/index.js.map +1 -1
  144. package/build-module/components/collapsible-block-toolbar/index.js +1 -2
  145. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  146. package/build-module/components/commands/index.js +8 -2
  147. package/build-module/components/commands/index.js.map +1 -1
  148. package/build-module/components/document-bar/index.js +1 -1
  149. package/build-module/components/document-bar/index.js.map +1 -1
  150. package/build-module/components/global-styles-provider/index.js +15 -3
  151. package/build-module/components/global-styles-provider/index.js.map +1 -1
  152. package/build-module/components/header/back-button.js +5 -7
  153. package/build-module/components/header/back-button.js.map +1 -1
  154. package/build-module/components/header/index.js +21 -22
  155. package/build-module/components/header/index.js.map +1 -1
  156. package/build-module/components/page-attributes/order.js +4 -70
  157. package/build-module/components/page-attributes/order.js.map +1 -1
  158. package/build-module/components/page-attributes/panel.js +1 -6
  159. package/build-module/components/page-attributes/panel.js.map +1 -1
  160. package/build-module/components/page-attributes/parent.js +7 -3
  161. package/build-module/components/page-attributes/parent.js.map +1 -1
  162. package/build-module/components/post-actions/actions.js +137 -350
  163. package/build-module/components/post-actions/actions.js.map +1 -1
  164. package/build-module/components/post-actions/index.js +16 -6
  165. package/build-module/components/post-actions/index.js.map +1 -1
  166. package/build-module/components/post-author/hook.js +10 -3
  167. package/build-module/components/post-author/hook.js.map +1 -1
  168. package/build-module/components/post-author/panel.js +2 -1
  169. package/build-module/components/post-author/panel.js.map +1 -1
  170. package/build-module/components/post-card-panel/index.js +9 -3
  171. package/build-module/components/post-card-panel/index.js.map +1 -1
  172. package/build-module/components/post-comments/index.js +8 -24
  173. package/build-module/components/post-comments/index.js.map +1 -1
  174. package/build-module/components/post-content-information/index.js +7 -1
  175. package/build-module/components/post-content-information/index.js.map +1 -1
  176. package/build-module/components/post-discussion/panel.js +3 -3
  177. package/build-module/components/post-discussion/panel.js.map +1 -1
  178. package/build-module/components/post-excerpt/panel.js +1 -1
  179. package/build-module/components/post-excerpt/panel.js.map +1 -1
  180. package/build-module/components/post-featured-image/index.js +3 -1
  181. package/build-module/components/post-featured-image/index.js.map +1 -1
  182. package/build-module/components/post-last-revision/index.js +2 -1
  183. package/build-module/components/post-last-revision/index.js.map +1 -1
  184. package/build-module/components/post-publish-button/index.js +4 -11
  185. package/build-module/components/post-publish-button/index.js.map +1 -1
  186. package/build-module/components/post-publish-panel/maybe-category-panel.js +4 -1
  187. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  188. package/build-module/components/post-publish-panel/maybe-tags-panel.js +2 -1
  189. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  190. package/build-module/components/post-status/index.js +49 -53
  191. package/build-module/components/post-status/index.js.map +1 -1
  192. package/build-module/components/post-taxonomies/flat-term-selector.js +17 -6
  193. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  194. package/build-module/components/post-taxonomies/index.js +7 -1
  195. package/build-module/components/post-taxonomies/index.js.map +1 -1
  196. package/build-module/components/post-template/block-theme.js +4 -4
  197. package/build-module/components/post-template/block-theme.js.map +1 -1
  198. package/build-module/components/post-template/classic-theme.js +8 -2
  199. package/build-module/components/post-template/classic-theme.js.map +1 -1
  200. package/build-module/components/post-template/create-new-template-modal.js +3 -0
  201. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  202. package/build-module/components/post-template/create-new-template.js +4 -1
  203. package/build-module/components/post-template/create-new-template.js.map +1 -1
  204. package/build-module/components/post-template/hooks.js +5 -1
  205. package/build-module/components/post-template/hooks.js.map +1 -1
  206. package/build-module/components/post-template/panel.js +8 -2
  207. package/build-module/components/post-template/panel.js.map +1 -1
  208. package/build-module/components/post-trash/check.js +6 -4
  209. package/build-module/components/post-trash/check.js.map +1 -1
  210. package/build-module/components/post-url/panel.js +10 -7
  211. package/build-module/components/post-url/panel.js.map +1 -1
  212. package/build-module/components/posts-per-page/index.js +6 -2
  213. package/build-module/components/posts-per-page/index.js.map +1 -1
  214. package/build-module/components/preview-dropdown/index.js +84 -19
  215. package/build-module/components/preview-dropdown/index.js.map +1 -1
  216. package/build-module/components/provider/disable-non-page-content-blocks.js +15 -19
  217. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  218. package/build-module/components/provider/use-block-editor-settings.js +15 -6
  219. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  220. package/build-module/components/save-publish-panels/index.js +1 -2
  221. package/build-module/components/save-publish-panels/index.js.map +1 -1
  222. package/build-module/components/sidebar/index.js +3 -9
  223. package/build-module/components/sidebar/index.js.map +1 -1
  224. package/build-module/components/site-discussion/index.js +14 -24
  225. package/build-module/components/site-discussion/index.js.map +1 -1
  226. package/build-module/components/template-content-panel/index.js +18 -16
  227. package/build-module/components/template-content-panel/index.js.map +1 -1
  228. package/build-module/components/visual-editor/edit-template-blocks-notification.js +4 -4
  229. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  230. package/build-module/components/visual-editor/index.js +7 -3
  231. package/build-module/components/visual-editor/index.js.map +1 -1
  232. package/build-module/{hooks → components/visual-editor}/use-select-nearest-editable-block.js +1 -1
  233. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -0
  234. package/build-module/dataviews/actions/delete-post.js +2 -0
  235. package/build-module/dataviews/actions/delete-post.js.map +1 -1
  236. package/build-module/dataviews/actions/export-pattern.native.js +3 -0
  237. package/build-module/dataviews/actions/export-pattern.native.js.map +1 -0
  238. package/build-module/dataviews/actions/permanently-delete-post.js +99 -0
  239. package/build-module/dataviews/actions/permanently-delete-post.js.map +1 -0
  240. package/build-module/dataviews/actions/restore-post.js +104 -0
  241. package/build-module/dataviews/actions/restore-post.js.map +1 -0
  242. package/build-module/dataviews/actions/trash-post.js +135 -0
  243. package/build-module/dataviews/actions/trash-post.js.map +1 -0
  244. package/build-module/dataviews/store/private-actions.js +40 -0
  245. package/build-module/dataviews/store/private-actions.js.map +1 -1
  246. package/build-module/dataviews/store/private-selectors.js +8 -9
  247. package/build-module/dataviews/store/private-selectors.js.map +1 -1
  248. package/build-module/dataviews/store/reducer.js +15 -1
  249. package/build-module/dataviews/store/reducer.js.map +1 -1
  250. package/build-module/dataviews/types.js.map +1 -1
  251. package/build-module/hooks/pattern-overrides.js +1 -1
  252. package/build-module/hooks/pattern-overrides.js.map +1 -1
  253. package/build-module/index.js +0 -1
  254. package/build-module/index.js.map +1 -1
  255. package/build-module/private-apis.js +3 -2
  256. package/build-module/private-apis.js.map +1 -1
  257. package/build-module/store/actions.js +16 -2
  258. package/build-module/store/actions.js.map +1 -1
  259. package/build-module/store/private-actions.js +8 -1
  260. package/build-module/store/private-actions.js.map +1 -1
  261. package/build-module/store/private-selectors.js +32 -2
  262. package/build-module/store/private-selectors.js.map +1 -1
  263. package/build-module/utils/media-upload/index.js +36 -3
  264. package/build-module/utils/media-upload/index.js.map +1 -1
  265. package/build-style/style-rtl.css +97 -45
  266. package/build-style/style.css +97 -45
  267. package/build-types/bindings/api.d.ts +25 -0
  268. package/build-types/bindings/api.d.ts.map +1 -0
  269. package/build-types/bindings/pattern-overrides.d.ts +5 -6
  270. package/build-types/bindings/pattern-overrides.d.ts.map +1 -1
  271. package/build-types/bindings/post-meta.d.ts +11 -7
  272. package/build-types/bindings/post-meta.d.ts.map +1 -1
  273. package/build-types/components/autocompleters/user.d.ts +2 -2
  274. package/build-types/components/autocompleters/user.d.ts.map +1 -1
  275. package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts.map +1 -1
  276. package/build-types/components/blog-title/index.d.ts.map +1 -1
  277. package/build-types/components/collapsible-block-toolbar/index.d.ts +1 -2
  278. package/build-types/components/collapsible-block-toolbar/index.d.ts.map +1 -1
  279. package/build-types/components/commands/index.d.ts.map +1 -1
  280. package/build-types/components/document-bar/index.d.ts.map +1 -1
  281. package/build-types/components/document-outline/check.d.ts.map +1 -1
  282. package/build-types/components/document-outline/index.d.ts.map +1 -1
  283. package/build-types/components/editor-history/redo.d.ts +1 -1
  284. package/build-types/components/editor-history/undo.d.ts +1 -1
  285. package/build-types/components/editor-notices/index.d.ts.map +1 -1
  286. package/build-types/components/editor-snackbars/index.d.ts.map +1 -1
  287. package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
  288. package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
  289. package/build-types/components/header/back-button.d.ts +1 -0
  290. package/build-types/components/header/back-button.d.ts.map +1 -1
  291. package/build-types/components/header/index.d.ts.map +1 -1
  292. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -1
  293. package/build-types/components/media-categories/index.d.ts.map +1 -1
  294. package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -1
  295. package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -1
  296. package/build-types/components/page-attributes/check.d.ts.map +1 -1
  297. package/build-types/components/page-attributes/order.d.ts +1 -1
  298. package/build-types/components/page-attributes/order.d.ts.map +1 -1
  299. package/build-types/components/page-attributes/panel.d.ts.map +1 -1
  300. package/build-types/components/page-attributes/parent.d.ts.map +1 -1
  301. package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -1
  302. package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -1
  303. package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -1
  304. package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -1
  305. package/build-types/components/plugin-sidebar/index.d.ts.map +1 -1
  306. package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts.map +1 -1
  307. package/build-types/components/post-actions/actions.d.ts.map +1 -1
  308. package/build-types/components/post-actions/index.d.ts.map +1 -1
  309. package/build-types/components/post-author/check.d.ts.map +1 -1
  310. package/build-types/components/post-author/hook.d.ts +1 -1
  311. package/build-types/components/post-author/hook.d.ts.map +1 -1
  312. package/build-types/components/post-author/index.d.ts.map +1 -1
  313. package/build-types/components/post-author/panel.d.ts.map +1 -1
  314. package/build-types/components/post-card-panel/index.d.ts.map +1 -1
  315. package/build-types/components/post-comments/index.d.ts.map +1 -1
  316. package/build-types/components/post-content-information/index.d.ts.map +1 -1
  317. package/build-types/components/post-discussion/panel.d.ts.map +1 -1
  318. package/build-types/components/post-excerpt/check.d.ts.map +1 -1
  319. package/build-types/components/post-excerpt/index.d.ts.map +1 -1
  320. package/build-types/components/post-excerpt/panel.d.ts.map +1 -1
  321. package/build-types/components/post-excerpt/plugin.d.ts.map +1 -1
  322. package/build-types/components/post-featured-image/check.d.ts.map +1 -1
  323. package/build-types/components/post-featured-image/panel.d.ts.map +1 -1
  324. package/build-types/components/post-format/index.d.ts.map +1 -1
  325. package/build-types/components/post-format/panel.d.ts.map +1 -1
  326. package/build-types/components/post-last-revision/check.d.ts.map +1 -1
  327. package/build-types/components/post-last-revision/index.d.ts.map +1 -1
  328. package/build-types/components/post-last-revision/panel.d.ts.map +1 -1
  329. package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
  330. package/build-types/components/post-pending-status/check.d.ts.map +1 -1
  331. package/build-types/components/post-pending-status/index.d.ts.map +1 -1
  332. package/build-types/components/post-preview-button/index.d.ts.map +1 -1
  333. package/build-types/components/post-publish-button/index.d.ts.map +1 -1
  334. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts.map +1 -1
  335. package/build-types/components/post-saved-state/index.d.ts +1 -1
  336. package/build-types/components/post-saved-state/index.d.ts.map +1 -1
  337. package/build-types/components/post-schedule/check.d.ts.map +1 -1
  338. package/build-types/components/post-schedule/index.d.ts.map +1 -1
  339. package/build-types/components/post-schedule/label.d.ts.map +1 -1
  340. package/build-types/components/post-schedule/panel.d.ts.map +1 -1
  341. package/build-types/components/post-slug/check.d.ts.map +1 -1
  342. package/build-types/components/post-slug/index.d.ts.map +1 -1
  343. package/build-types/components/post-status/index.d.ts +2 -1
  344. package/build-types/components/post-status/index.d.ts.map +1 -1
  345. package/build-types/components/post-sticky/check.d.ts.map +1 -1
  346. package/build-types/components/post-sticky/index.d.ts.map +1 -1
  347. package/build-types/components/post-switch-to-draft-button/index.d.ts.map +1 -1
  348. package/build-types/components/post-sync-status/index.d.ts.map +1 -1
  349. package/build-types/components/post-taxonomies/check.d.ts.map +1 -1
  350. package/build-types/components/post-taxonomies/flat-term-selector.d.ts +9 -7
  351. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  352. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +13 -11
  353. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  354. package/build-types/components/post-taxonomies/index.d.ts.map +1 -1
  355. package/build-types/components/post-template/block-theme.d.ts.map +1 -1
  356. package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
  357. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
  358. package/build-types/components/post-template/create-new-template.d.ts.map +1 -1
  359. package/build-types/components/post-template/hooks.d.ts.map +1 -1
  360. package/build-types/components/post-template/panel.d.ts.map +1 -1
  361. package/build-types/components/post-text-editor/index.d.ts.map +1 -1
  362. package/build-types/components/post-trash/check.d.ts.map +1 -1
  363. package/build-types/components/post-trash/index.d.ts.map +1 -1
  364. package/build-types/components/post-type-support-check/index.d.ts.map +1 -1
  365. package/build-types/components/post-url/check.d.ts.map +1 -1
  366. package/build-types/components/post-url/index.d.ts.map +1 -1
  367. package/build-types/components/post-url/label.d.ts.map +1 -1
  368. package/build-types/components/post-url/panel.d.ts.map +1 -1
  369. package/build-types/components/post-visibility/check.d.ts.map +1 -1
  370. package/build-types/components/post-visibility/index.d.ts.map +1 -1
  371. package/build-types/components/posts-per-page/index.d.ts.map +1 -1
  372. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -1
  373. package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
  374. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
  375. package/build-types/components/provider/index.d.ts.map +1 -1
  376. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
  377. package/build-types/components/save-publish-panels/index.d.ts.map +1 -1
  378. package/build-types/components/sidebar/index.d.ts.map +1 -1
  379. package/build-types/components/site-discussion/index.d.ts.map +1 -1
  380. package/build-types/components/template-content-panel/index.d.ts +1 -3
  381. package/build-types/components/template-content-panel/index.d.ts.map +1 -1
  382. package/build-types/components/theme-support-check/index.d.ts.map +1 -1
  383. package/build-types/components/time-to-read/index.d.ts.map +1 -1
  384. package/build-types/components/unsaved-changes-warning/index.d.ts.map +1 -1
  385. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts +1 -1
  386. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -1
  387. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  388. package/build-types/components/visual-editor/use-select-nearest-editable-block.d.ts.map +1 -0
  389. package/build-types/components/word-count/index.d.ts.map +1 -1
  390. package/build-types/dataviews/actions/delete-post.d.ts.map +1 -1
  391. package/build-types/dataviews/actions/export-pattern.native.d.ts +3 -0
  392. package/build-types/dataviews/actions/export-pattern.native.d.ts.map +1 -0
  393. package/build-types/dataviews/actions/permanently-delete-post.d.ts +5 -0
  394. package/build-types/dataviews/actions/permanently-delete-post.d.ts.map +1 -0
  395. package/build-types/dataviews/actions/restore-post.d.ts +5 -0
  396. package/build-types/dataviews/actions/restore-post.d.ts.map +1 -0
  397. package/build-types/dataviews/actions/trash-post.d.ts +5 -0
  398. package/build-types/dataviews/actions/trash-post.d.ts.map +1 -0
  399. package/build-types/dataviews/api.d.ts +1 -1
  400. package/build-types/dataviews/api.d.ts.map +1 -1
  401. package/build-types/dataviews/store/private-actions.d.ts +8 -3
  402. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  403. package/build-types/dataviews/store/private-selectors.d.ts +2 -2
  404. package/build-types/dataviews/store/private-selectors.d.ts.map +1 -1
  405. package/build-types/dataviews/store/reducer.d.ts +4 -1
  406. package/build-types/dataviews/store/reducer.d.ts.map +1 -1
  407. package/build-types/dataviews/types.d.ts +9 -0
  408. package/build-types/dataviews/types.d.ts.map +1 -1
  409. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts +1 -1
  410. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts.map +1 -1
  411. package/build-types/hooks/pattern-overrides.d.ts.map +1 -1
  412. package/build-types/private-apis.d.ts.map +1 -1
  413. package/build-types/store/actions.d.ts.map +1 -1
  414. package/build-types/store/private-actions.d.ts.map +1 -1
  415. package/build-types/store/private-selectors.d.ts +11 -0
  416. package/build-types/store/private-selectors.d.ts.map +1 -1
  417. package/build-types/store/reducer.d.ts +1 -0
  418. package/build-types/store/reducer.d.ts.map +1 -1
  419. package/build-types/store/selectors.d.ts +0 -1
  420. package/build-types/store/selectors.d.ts.map +1 -1
  421. package/build-types/utils/media-upload/index.d.ts.map +1 -1
  422. package/package.json +38 -37
  423. package/src/bindings/api.js +57 -0
  424. package/src/bindings/pattern-overrides.js +28 -17
  425. package/src/bindings/post-meta.js +39 -14
  426. package/src/components/block-settings-menu/content-only-settings-menu.js +4 -4
  427. package/src/components/blog-title/index.js +8 -3
  428. package/src/components/collapsible-block-toolbar/index.js +1 -3
  429. package/src/components/collapsible-block-toolbar/style.scss +0 -3
  430. package/src/components/commands/index.js +4 -2
  431. package/src/components/document-bar/index.js +1 -1
  432. package/src/components/document-bar/style.scss +2 -6
  433. package/src/components/document-tools/style.scss +4 -4
  434. package/src/components/editor-interface/style.scss +9 -0
  435. package/src/components/global-styles-provider/index.js +22 -11
  436. package/src/components/header/back-button.js +6 -6
  437. package/src/components/header/index.js +27 -27
  438. package/src/components/header/style.scss +64 -21
  439. package/src/components/inserter-sidebar/style.scss +1 -6
  440. package/src/components/list-view-sidebar/style.scss +4 -0
  441. package/src/components/page-attributes/order.js +3 -77
  442. package/src/components/page-attributes/panel.js +1 -7
  443. package/src/components/page-attributes/parent.js +25 -7
  444. package/src/components/post-actions/actions.js +158 -463
  445. package/src/components/post-actions/index.js +19 -7
  446. package/src/components/post-author/hook.js +11 -3
  447. package/src/components/post-author/panel.js +3 -1
  448. package/src/components/post-card-panel/index.js +9 -3
  449. package/src/components/post-comments/index.js +8 -21
  450. package/src/components/post-content-information/index.js +7 -1
  451. package/src/components/post-discussion/panel.js +5 -3
  452. package/src/components/post-excerpt/panel.js +2 -1
  453. package/src/components/post-featured-image/index.js +5 -1
  454. package/src/components/post-last-revision/index.js +1 -0
  455. package/src/components/post-panel-row/style.scss +0 -1
  456. package/src/components/post-publish-button/index.js +4 -17
  457. package/src/components/post-publish-panel/maybe-category-panel.js +4 -1
  458. package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
  459. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +2 -2
  460. package/src/components/post-status/index.js +29 -51
  461. package/src/components/post-taxonomies/flat-term-selector.js +19 -5
  462. package/src/components/post-taxonomies/index.js +8 -1
  463. package/src/components/post-template/block-theme.js +5 -1
  464. package/src/components/post-template/classic-theme.js +8 -3
  465. package/src/components/post-template/create-new-template-modal.js +7 -1
  466. package/src/components/post-template/create-new-template.js +4 -1
  467. package/src/components/post-template/hooks.js +8 -2
  468. package/src/components/post-template/panel.js +10 -2
  469. package/src/components/post-trash/check.js +9 -5
  470. package/src/components/post-url/panel.js +15 -4
  471. package/src/components/posts-per-page/index.js +7 -2
  472. package/src/components/preview-dropdown/index.js +113 -35
  473. package/src/components/preview-dropdown/style.scss +5 -0
  474. package/src/components/provider/disable-non-page-content-blocks.js +27 -24
  475. package/src/components/provider/use-block-editor-settings.js +15 -6
  476. package/src/components/save-publish-panels/index.js +1 -4
  477. package/src/components/sidebar/index.js +2 -5
  478. package/src/components/site-discussion/index.js +15 -22
  479. package/src/components/template-content-panel/index.js +37 -21
  480. package/src/components/visual-editor/edit-template-blocks-notification.js +5 -1
  481. package/src/components/visual-editor/index.js +13 -8
  482. package/src/components/visual-editor/style.scss +1 -4
  483. package/src/{hooks → components/visual-editor}/use-select-nearest-editable-block.js +1 -1
  484. package/src/dataviews/actions/delete-post.tsx +2 -0
  485. package/src/dataviews/actions/export-pattern.native.tsx +3 -0
  486. package/src/dataviews/actions/permanently-delete-post.tsx +116 -0
  487. package/src/dataviews/actions/restore-post.tsx +134 -0
  488. package/src/dataviews/actions/trash-post.tsx +196 -0
  489. package/src/dataviews/store/private-actions.ts +68 -0
  490. package/src/dataviews/store/private-selectors.ts +9 -17
  491. package/src/dataviews/store/reducer.ts +20 -1
  492. package/src/dataviews/types.ts +11 -0
  493. package/src/hooks/pattern-overrides.js +1 -1
  494. package/src/index.js +0 -1
  495. package/src/private-apis.js +6 -2
  496. package/src/store/actions.js +36 -13
  497. package/src/store/private-actions.js +8 -4
  498. package/src/store/private-selectors.js +45 -2
  499. package/src/store/test/actions.js +9 -3
  500. package/src/store/test/private-selectors.js +78 -0
  501. package/src/utils/media-upload/index.js +38 -3
  502. package/tsconfig.tsbuildinfo +1 -1
  503. package/build/bindings/index.js +0 -22
  504. package/build/bindings/index.js.map +0 -1
  505. package/build/dataviews/actions/index.js +0 -32
  506. package/build/dataviews/actions/index.js.map +0 -1
  507. package/build/hooks/use-select-nearest-editable-block.js.map +0 -1
  508. package/build/store/utils/get-filtered-template-parts.js +0 -71
  509. package/build/store/utils/get-filtered-template-parts.js.map +0 -1
  510. package/build/utils/set-nested-value.js +0 -44
  511. package/build/utils/set-nested-value.js.map +0 -1
  512. package/build-module/bindings/index.js +0 -17
  513. package/build-module/bindings/index.js.map +0 -1
  514. package/build-module/dataviews/actions/index.js +0 -24
  515. package/build-module/dataviews/actions/index.js.map +0 -1
  516. package/build-module/hooks/use-select-nearest-editable-block.js.map +0 -1
  517. package/build-module/store/utils/get-filtered-template-parts.js +0 -64
  518. package/build-module/store/utils/get-filtered-template-parts.js.map +0 -1
  519. package/build-module/utils/set-nested-value.js +0 -38
  520. package/build-module/utils/set-nested-value.js.map +0 -1
  521. package/build-types/bindings/index.d.ts +0 -2
  522. package/build-types/bindings/index.d.ts.map +0 -1
  523. package/build-types/dataviews/actions/index.d.ts +0 -2
  524. package/build-types/dataviews/actions/index.d.ts.map +0 -1
  525. package/build-types/hooks/use-select-nearest-editable-block.d.ts.map +0 -1
  526. package/build-types/store/utils/get-filtered-template-parts.d.ts +0 -3
  527. package/build-types/store/utils/get-filtered-template-parts.d.ts.map +0 -1
  528. package/build-types/utils/set-nested-value.d.ts +0 -20
  529. package/build-types/utils/set-nested-value.d.ts.map +0 -1
  530. package/src/bindings/index.js +0 -15
  531. package/src/components/document-outline/test/__snapshots__/index.js.snap +0 -111
  532. package/src/components/document-outline/test/index.js +0 -185
  533. package/src/dataviews/actions/index.ts +0 -25
  534. package/src/store/utils/get-filtered-template-parts.js +0 -69
  535. package/src/store/utils/test/get-filtered-template-parts.js +0 -189
  536. package/src/utils/set-nested-value.js +0 -39
  537. /package/build-types/{hooks → components/visual-editor}/use-select-nearest-editable-block.d.ts +0 -0
@@ -24,7 +24,7 @@ import { unlock } from '../../lock-unlock';
24
24
 
25
25
  const { useHasBlockToolbar } = unlock( blockEditorPrivateApis );
26
26
 
27
- function CollapsableBlockToolbar( { isCollapsed, onToggle } ) {
27
+ export default function CollapsibleBlockToolbar( { isCollapsed, onToggle } ) {
28
28
  const { blockSelectionStart } = useSelect( ( select ) => {
29
29
  return {
30
30
  blockSelectionStart:
@@ -73,5 +73,3 @@ function CollapsableBlockToolbar( { isCollapsed, onToggle } ) {
73
73
  </>
74
74
  );
75
75
  }
76
-
77
- export default CollapsableBlockToolbar;
@@ -77,6 +77,3 @@
77
77
  }
78
78
  }
79
79
 
80
- .editor-collapsible-block-toolbar__toggle {
81
- margin-left: 2px; // Allow focus ring to be fully visible
82
- }
@@ -89,7 +89,8 @@ function useEditorCommandLoader() {
89
89
  name: 'core/open-shortcut-help',
90
90
  label: __( 'Keyboard shortcuts' ),
91
91
  icon: keyboard,
92
- callback: () => {
92
+ callback: ( { close } ) => {
93
+ close();
93
94
  openModal( 'editor/keyboard-shortcut-help' );
94
95
  },
95
96
  } );
@@ -108,7 +109,8 @@ function useEditorCommandLoader() {
108
109
  commands.push( {
109
110
  name: 'core/open-preferences',
110
111
  label: __( 'Editor preferences' ),
111
- callback: () => {
112
+ callback: ( { close } ) => {
113
+ close();
112
114
  openModal( 'editor/preferences' );
113
115
  },
114
116
  } );
@@ -200,7 +200,7 @@ export default function DocumentBar( props ) {
200
200
  >
201
201
  { title
202
202
  ? decodeEntities( title )
203
- : __( 'No Title' ) }
203
+ : __( 'No title' ) }
204
204
  </Text>
205
205
  </motion.div>
206
206
  <span className="editor-document-bar__shortcut">
@@ -10,7 +10,7 @@
10
10
  min-width: 0;
11
11
  background: $gray-100;
12
12
  border-radius: $grid-unit-05;
13
- width: min(100%, 416px);
13
+ width: min(100%, 450px);
14
14
 
15
15
  &:hover {
16
16
  background-color: $gray-200;
@@ -25,10 +25,6 @@
25
25
  background: $gray-200;
26
26
  }
27
27
  }
28
-
29
- @include break-large() {
30
- width: min(100%, 450px);
31
- }
32
28
  }
33
29
 
34
30
  .editor-document-bar__command {
@@ -38,7 +34,7 @@
38
34
  }
39
35
 
40
36
  .editor-document-bar__title {
41
- flex-grow: 1;
37
+ flex: 1;
42
38
  overflow: hidden;
43
39
  color: $gray-900;
44
40
  gap: $grid-unit-05;
@@ -65,12 +65,12 @@
65
65
  .editor-document-tools__left {
66
66
  display: inline-flex;
67
67
  align-items: center;
68
- padding-left: $grid-unit-20;
69
68
  gap: $grid-unit-10;
70
69
 
71
- // Some plugins add buttons here despite best practices.
72
- // Push them a bit rightwards to fit the top toolbar.
73
- margin-right: $grid-unit-10;
70
+ // Some plugins add buttons here despite best practices — accommodate them with a gap.
71
+ &:not(:last-child) {
72
+ margin-inline-end: $grid-unit-10;
73
+ }
74
74
  }
75
75
 
76
76
  .editor-document-tools .editor-document-tools__left > .editor-document-tools__inserter-toggle.has-icon {
@@ -1,3 +1,12 @@
1
1
  .editor-editor-interface .entities-saved-states__panel-header {
2
2
  height: $header-height + $border-width;
3
3
  }
4
+
5
+ .editor-editor-interface .interface-interface-skeleton__content {
6
+ // Make this a stacking context to contain the z-index of children elements.
7
+ isolation: isolate;
8
+ }
9
+
10
+ .editor-visual-editor {
11
+ flex: 1 0 auto;
12
+ }
@@ -33,17 +33,24 @@ export function mergeBaseAndUserConfigs( base, user ) {
33
33
  function useGlobalStylesUserConfig() {
34
34
  const { globalStylesId, isReady, settings, styles, _links } = useSelect(
35
35
  ( select ) => {
36
- const { getEditedEntityRecord, hasFinishedResolution } =
36
+ const { getEditedEntityRecord, hasFinishedResolution, canUser } =
37
37
  select( coreStore );
38
38
  const _globalStylesId =
39
39
  select( coreStore ).__experimentalGetCurrentGlobalStylesId();
40
- const record = _globalStylesId
41
- ? getEditedEntityRecord(
42
- 'root',
43
- 'globalStyles',
44
- _globalStylesId
45
- )
46
- : undefined;
40
+
41
+ const record =
42
+ _globalStylesId &&
43
+ canUser( 'read', {
44
+ kind: 'root',
45
+ name: 'globalStyles',
46
+ id: _globalStylesId,
47
+ } )
48
+ ? getEditedEntityRecord(
49
+ 'root',
50
+ 'globalStyles',
51
+ _globalStylesId
52
+ )
53
+ : undefined;
47
54
 
48
55
  let hasResolved = false;
49
56
  if (
@@ -126,9 +133,13 @@ function useGlobalStylesUserConfig() {
126
133
 
127
134
  function useGlobalStylesBaseConfig() {
128
135
  const baseConfig = useSelect( ( select ) => {
129
- return select(
130
- coreStore
131
- ).__experimentalGetCurrentThemeBaseGlobalStyles();
136
+ const { __experimentalGetCurrentThemeBaseGlobalStyles, canUser } =
137
+ select( coreStore );
138
+
139
+ return (
140
+ canUser( 'read', { kind: 'root', name: 'theme' } ) &&
141
+ __experimentalGetCurrentThemeBaseGlobalStyles()
142
+ );
132
143
  }, [] );
133
144
 
134
145
  return [ !! baseConfig, baseConfig ];
@@ -9,16 +9,16 @@ import {
9
9
  // Keeping an old name for backward compatibility.
10
10
  const slotName = '__experimentalMainDashboardButton';
11
11
 
12
+ export const useHasBackButton = () => {
13
+ const fills = useSlotFills( slotName );
14
+ return Boolean( fills && fills.length );
15
+ };
16
+
12
17
  const { Fill, Slot } = createSlotFill( slotName );
13
18
 
14
19
  const BackButton = Fill;
15
- const BackButtonSlot = ( { children } ) => {
20
+ const BackButtonSlot = () => {
16
21
  const fills = useSlotFills( slotName );
17
- const hasFills = Boolean( fills && fills.length );
18
-
19
- if ( ! hasFills ) {
20
- return children;
21
- }
22
22
 
23
23
  return (
24
24
  <Slot
@@ -1,13 +1,8 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
9
4
  import { useSelect } from '@wordpress/data';
10
- import { useViewportMatch } from '@wordpress/compose';
5
+ import { useMediaQuery, useViewportMatch } from '@wordpress/compose';
11
6
  import { __unstableMotion as motion } from '@wordpress/components';
12
7
  import { store as preferencesStore } from '@wordpress/preferences';
13
8
  import { useState } from '@wordpress/element';
@@ -17,8 +12,8 @@ import { store as blockEditorStore } from '@wordpress/block-editor';
17
12
  /**
18
13
  * Internal dependencies
19
14
  */
20
- import BackButton from './back-button';
21
- import CollapsableBlockToolbar from '../collapsible-block-toolbar';
15
+ import BackButton, { useHasBackButton } from './back-button';
16
+ import CollapsibleBlockToolbar from '../collapsible-block-toolbar';
22
17
  import DocumentBar from '../document-bar';
23
18
  import DocumentTools from '../document-tools';
24
19
  import MoreMenu from '../more-menu';
@@ -55,13 +50,13 @@ function Header( {
55
50
  } ) {
56
51
  const isWideViewport = useViewportMatch( 'large' );
57
52
  const isLargeViewport = useViewportMatch( 'medium' );
53
+ const isTooNarrowForDocumentBar = useMediaQuery( '(max-width: 403px)' );
58
54
  const {
59
55
  isTextEditor,
60
56
  isPublishSidebarOpened,
61
57
  showIconLabels,
62
58
  hasFixedToolbar,
63
59
  isNestedEntity,
64
- isZoomedOutView,
65
60
  } = useSelect( ( select ) => {
66
61
  const { get: getPreference } = select( preferencesStore );
67
62
  const {
@@ -82,21 +77,25 @@ function Header( {
82
77
  };
83
78
  }, [] );
84
79
 
85
- const hasTopToolbar = isLargeViewport && hasFixedToolbar;
86
-
87
80
  const [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =
88
81
  useState( true );
89
82
 
83
+ const hasCenter = isBlockToolsCollapsed && ! isTooNarrowForDocumentBar;
84
+ const hasBackButton = useHasBackButton();
85
+
90
86
  // The edit-post-header classname is only kept for backward compatibilty
91
87
  // as some plugins might be relying on its presence.
92
88
  return (
93
89
  <div className="editor-header edit-post-header">
94
- <motion.div
95
- variants={ backButtonVariations }
96
- transition={ { type: 'tween' } }
97
- >
98
- <BackButton.Slot />
99
- </motion.div>
90
+ { hasBackButton && (
91
+ <motion.div
92
+ className="editor-header__back-button"
93
+ variants={ backButtonVariations }
94
+ transition={ { type: 'tween' } }
95
+ >
96
+ <BackButton.Slot />
97
+ </motion.div>
98
+ ) }
100
99
  <motion.div
101
100
  variants={ toolbarVariations }
102
101
  className="editor-header__toolbar"
@@ -105,21 +104,22 @@ function Header( {
105
104
  <DocumentTools
106
105
  disableBlockTools={ forceDisableBlockTools || isTextEditor }
107
106
  />
108
- { hasTopToolbar && (
109
- <CollapsableBlockToolbar
107
+ { hasFixedToolbar && isLargeViewport && (
108
+ <CollapsibleBlockToolbar
110
109
  isCollapsed={ isBlockToolsCollapsed }
111
110
  onToggle={ setIsBlockToolsCollapsed }
112
111
  />
113
112
  ) }
114
- <div
115
- className={ clsx( 'editor-header__center', {
116
- 'is-collapsed':
117
- ! isBlockToolsCollapsed && hasTopToolbar,
118
- } ) }
113
+ </motion.div>
114
+ { hasCenter && (
115
+ <motion.div
116
+ className="editor-header__center"
117
+ variants={ toolbarVariations }
118
+ transition={ { type: 'tween' } }
119
119
  >
120
120
  <DocumentBar title={ title } icon={ icon } />
121
- </div>
122
- </motion.div>
121
+ </motion.div>
122
+ ) }
123
123
  <motion.div
124
124
  variants={ toolbarVariations }
125
125
  transition={ { type: 'tween' } }
@@ -135,7 +135,7 @@ function Header( {
135
135
  ) }
136
136
  <PreviewDropdown
137
137
  forceIsAutosaveable={ forceIsDirty }
138
- disabled={ isNestedEntity || isZoomedOutView }
138
+ disabled={ isNestedEntity }
139
139
  />
140
140
  <PostPreviewButton
141
141
  className="editor-header__post-preview-button"
@@ -1,8 +1,18 @@
1
1
  .editor-header {
2
2
  height: $header-height;
3
3
  background: $white;
4
- display: flex;
5
- flex-wrap: wrap;
4
+ display: grid;
5
+ grid-auto-flow: row;
6
+ grid-template: auto / $header-height minmax(0, max-content) minmax(min-content, 1fr) $header-height;
7
+ &:has(> .editor-header__center) {
8
+ grid-template: auto / $header-height min-content 1fr min-content $header-height;
9
+ @include break-medium {
10
+ grid-template: auto / $header-height minmax(min-content, 1fr) 2fr minmax(min-content, 1fr) $header-height;
11
+ }
12
+ }
13
+ @include break-mobile {
14
+ gap: $grid-unit-20;
15
+ }
6
16
  align-items: center;
7
17
  // The header should never be wider than the viewport, or buttons might be hidden. Especially relevant at high zoom levels. Related to https://core.trac.wordpress.org/ticket/47603#ticket.
8
18
  max-width: 100vw;
@@ -15,19 +25,32 @@
15
25
  }
16
26
 
17
27
  .editor-header__toolbar {
28
+ grid-column: 1 / 3;
29
+ // When there is no back button or the viewport is <= mobile the margin keeps the content off
30
+ // the starting edge.
31
+ > :first-child {
32
+ margin-inline: $grid-unit-20 0;
33
+ }
34
+
35
+ // This is the typical case, the back button takes up the first column.
36
+ .editor-header__back-button + & {
37
+ grid-column: 2 / 3;
38
+
39
+ @include break-mobile {
40
+ // Clears the margin; at this breakpoint the parent’s `gap` takes its place.
41
+ > :first-child {
42
+ margin-inline: 0;
43
+ }
44
+ }
45
+ }
18
46
  display: flex;
19
- // Allow this area to shrink to fit the toolbar buttons.
20
- flex-shrink: 8;
21
- // Take up the space of the toolbar so it can be justified to the left side of the toolbar.
22
- flex-grow: 3;
23
- // Hide the overflow so flex will limit its width. Block toolbar will allow scrolling on fixed toolbar.
24
- overflow: hidden;
25
- // Leave enough room for the focus ring to show.
26
- padding: 2px 0;
47
+ // Make narrowing to less than content width possible. Block toolbar will hide overflow and allow scrolling on fixed toolbar.
48
+ min-width: 0;
27
49
  align-items: center;
28
- // Allow focus ring to be fully visible on furthest right button.
29
- @include break-medium() {
30
- padding-right: var(--wp-admin-border-width-focus);
50
+ // Clip the box while leaving room for focus rings.
51
+ clip-path: inset(-2px);
52
+ @include break-mobile {
53
+ clip-path: none;
31
54
  }
32
55
 
33
56
  .table-of-contents {
@@ -37,20 +60,35 @@
37
60
  display: block;
38
61
  }
39
62
  }
63
+
64
+ // Add a gap before the block toolbar or its toggle button when collapsed.
65
+ .editor-collapsible-block-toolbar {
66
+ margin-inline: $grid-unit 0;
67
+
68
+ &.is-collapsed ~ .editor-collapsible-block-toolbar__toggle {
69
+ margin-inline: $grid-unit 0;
70
+ }
71
+ }
40
72
  }
41
73
 
42
74
  .editor-header__center {
43
- flex-grow: 1;
75
+ grid-column: 3 / 4;
44
76
  display: flex;
45
77
  justify-content: center;
46
- // Flex items will, by default, refuse to shrink below a minimum
47
- // intrinsic width. In order to shrink this flexbox item, and
48
- // subsequently truncate child text, we set an explicit min-width.
49
- // See https://dev.w3.org/csswg/css-flexbox/#min-size-auto
78
+ align-items: center;
79
+ // To enable shrinking and truncating of child text, apply an explicit min-width.
50
80
  min-width: 0;
51
-
52
- &.is-collapsed {
53
- display: none;
81
+ // Clip the box while leaving room for focus rings.
82
+ clip-path: inset(-2px);
83
+ // At less than mobile the header’s `gap` is zero so margins are added to create a smaller
84
+ // gap around the center’s contents.
85
+ @media (max-width: #{$break-mobile - 1}) {
86
+ > :first-child {
87
+ margin-inline-start: $grid-unit;
88
+ }
89
+ > :last-child {
90
+ margin-inline-end: $grid-unit;
91
+ }
54
92
  }
55
93
  }
56
94
 
@@ -59,6 +97,11 @@
59
97
  */
60
98
 
61
99
  .editor-header__settings {
100
+ grid-column: 3 / -1;
101
+ .editor-header:has(> .editor-header__center) & {
102
+ grid-column: 4 / -1;
103
+ }
104
+ justify-self: end;
62
105
  display: inline-flex;
63
106
  align-items: center;
64
107
  flex-wrap: nowrap;
@@ -7,10 +7,5 @@
7
7
  }
8
8
 
9
9
  .editor-inserter-sidebar__content {
10
- // Leave space for the close button
11
- height: calc(100% - #{$button-size} - #{$grid-unit-10});
12
-
13
- @include break-medium() {
14
- height: 100%;
15
- }
10
+ height: 100%;
16
11
  }
@@ -1,5 +1,9 @@
1
1
  .editor-list-view-sidebar {
2
2
  height: 100%;
3
+
4
+ @include break-medium {
5
+ width: $secondary-sidebar-width;
6
+ }
3
7
  }
4
8
 
5
9
  .editor-list-view-sidebar__list-view-panel-content,
@@ -1,22 +1,18 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { __, sprintf } from '@wordpress/i18n';
4
+ import { __ } from '@wordpress/i18n';
5
5
  import {
6
- Button,
7
- Dropdown,
8
6
  Flex,
9
7
  FlexBlock,
10
8
  __experimentalNumberControl as NumberControl,
11
9
  } from '@wordpress/components';
12
10
  import { useSelect, useDispatch } from '@wordpress/data';
13
- import { useState, useMemo } from '@wordpress/element';
14
- import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';
11
+ import { useState } from '@wordpress/element';
15
12
 
16
13
  /**
17
14
  * Internal dependencies
18
15
  */
19
- import PostPanelRow from '../post-panel-row';
20
16
  import PostTypeSupportCheck from '../post-type-support-check';
21
17
  import { store as editorStore } from '../../store';
22
18
 
@@ -61,6 +57,7 @@ function PageAttributesOrder() {
61
57
  /**
62
58
  * Renders the Page Attributes Order component. A number input in an editor interface
63
59
  * for setting the order of a given page.
60
+ * The component is now not used in core but was kept for backward compatibility.
64
61
  *
65
62
  * @return {Component} The component to be rendered.
66
63
  */
@@ -71,74 +68,3 @@ export default function PageAttributesOrderWithChecks() {
71
68
  </PostTypeSupportCheck>
72
69
  );
73
70
  }
74
-
75
- function PostOrderToggle( { isOpen, onClick } ) {
76
- const order = useSelect(
77
- ( select ) =>
78
- select( editorStore ).getEditedPostAttribute( 'menu_order' ) ?? 0,
79
- []
80
- );
81
- return (
82
- <Button
83
- size="compact"
84
- className="editor-post-order__panel-toggle"
85
- variant="tertiary"
86
- aria-expanded={ isOpen }
87
- // translators: %s: Current post parent.
88
- aria-label={ sprintf( __( 'Change order: %s' ), order ) }
89
- onClick={ onClick }
90
- >
91
- { order }
92
- </Button>
93
- );
94
- }
95
-
96
- export function OrderRow() {
97
- // Use internal state instead of a ref to make sure that the component
98
- // re-renders when the popover's anchor updates.
99
- const [ popoverAnchor, setPopoverAnchor ] = useState( null );
100
- // Memoize popoverProps to avoid returning a new object every time.
101
- const popoverProps = useMemo(
102
- () => ( {
103
- // Anchor the popover to the middle of the entire row so that it doesn't
104
- // move around when the label changes.
105
- anchor: popoverAnchor,
106
- placement: 'left-start',
107
- offset: 36,
108
- shift: true,
109
- } ),
110
- [ popoverAnchor ]
111
- );
112
- return (
113
- <PostPanelRow label={ __( 'Order' ) } ref={ setPopoverAnchor }>
114
- <Dropdown
115
- popoverProps={ popoverProps }
116
- className="editor-post-order__panel-dropdown"
117
- contentClassName="editor-post-order__panel-dialog"
118
- focusOnMount
119
- renderToggle={ ( { isOpen, onToggle } ) => (
120
- <PostOrderToggle isOpen={ isOpen } onClick={ onToggle } />
121
- ) }
122
- renderContent={ ( { onClose } ) => (
123
- <div className="editor-post-order">
124
- <InspectorPopoverHeader
125
- title={ __( 'Order' ) }
126
- onClose={ onClose }
127
- />
128
- <div>
129
- { __(
130
- 'This attribute determines the order of pages in the Pages List block.'
131
- ) }
132
- <p>
133
- { __(
134
- 'Pages with the same order value will sorted alphabetically. Negative order values are also supported.'
135
- ) }
136
- </p>
137
- </div>
138
- <PageAttributesOrder />
139
- </div>
140
- ) }
141
- />
142
- </PostPanelRow>
143
- );
144
- }
@@ -8,7 +8,6 @@ import { store as coreStore } from '@wordpress/core-data';
8
8
  */
9
9
  import { store as editorStore } from '../../store';
10
10
  import PageAttributesCheck from './check';
11
- import { OrderRow } from './order';
12
11
  import { ParentRow } from './parent';
13
12
 
14
13
  const PANEL_NAME = 'page-attributes';
@@ -28,12 +27,7 @@ function AttributesPanel() {
28
27
  return null;
29
28
  }
30
29
 
31
- return (
32
- <>
33
- <ParentRow />
34
- <OrderRow />
35
- </>
36
- );
30
+ return <ParentRow />;
37
31
  }
38
32
 
39
33
  /**
@@ -14,11 +14,16 @@ import {
14
14
  ExternalLink,
15
15
  } from '@wordpress/components';
16
16
  import { debounce } from '@wordpress/compose';
17
- import { useState, useMemo } from '@wordpress/element';
17
+ import {
18
+ createInterpolateElement,
19
+ useState,
20
+ useMemo,
21
+ } from '@wordpress/element';
18
22
  import { useSelect, useDispatch } from '@wordpress/data';
19
23
  import { decodeEntities } from '@wordpress/html-entities';
20
24
  import { store as coreStore } from '@wordpress/core-data';
21
25
  import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';
26
+ import { filterURLForDisplay } from '@wordpress/url';
22
27
 
23
28
  /**
24
29
  * Internal dependencies
@@ -217,6 +222,10 @@ function PostParentToggle( { isOpen, onClick } ) {
217
222
  }
218
223
 
219
224
  export function ParentRow() {
225
+ const homeUrl = useSelect(
226
+ ( select ) => select( coreStore ).getUnstableBase()?.home,
227
+ []
228
+ );
220
229
  // Use internal state instead of a ref to make sure that the component
221
230
  // re-renders when the popover's anchor updates.
222
231
  const [ popoverAnchor, setPopoverAnchor ] = useState( null );
@@ -249,12 +258,21 @@ export function ParentRow() {
249
258
  onClose={ onClose }
250
259
  />
251
260
  <div>
252
- {
253
- /* translators: The domain name should be a reserved domain name to prevent linking to third party sites outside the WordPress project's control. You may also wish to use wordpress.org or a wordpress.org sub-domain. */
254
- __(
255
- "Child pages inherit characteristics from their parent, such as URL structure. For instance, if 'Web Design' is a child of 'Services', its URL would be example.org/services/web-design."
256
- )
257
- }
261
+ { createInterpolateElement(
262
+ sprintf(
263
+ /* translators: %1$s The home URL of the WordPress installation without the scheme. */
264
+ __(
265
+ 'Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %1$s<wbr />/services<wbr />/pricing.'
266
+ ),
267
+ filterURLForDisplay( homeUrl ).replace(
268
+ /([/.])/g,
269
+ '<wbr />$1'
270
+ )
271
+ ),
272
+ {
273
+ wbr: <wbr />,
274
+ }
275
+ ) }
258
276
  <p>
259
277
  { __(
260
278
  'They also show up as sub-items in the default navigation menu. '