@wordpress/editor 14.9.0 → 14.11.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 (518) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/build/bindings/api.js +0 -29
  4. package/build/bindings/api.js.map +1 -1
  5. package/build/bindings/post-meta.js +2 -1
  6. package/build/bindings/post-meta.js.map +1 -1
  7. package/build/components/autocompleters/user.js.map +1 -1
  8. package/build/components/block-manager/index.js +2 -2
  9. package/build/components/block-manager/index.js.map +1 -1
  10. package/build/components/collab-sidebar/add-comment.js +120 -0
  11. package/build/components/collab-sidebar/add-comment.js.map +1 -0
  12. package/build/components/collab-sidebar/comment-button-toolbar.js +37 -0
  13. package/build/components/collab-sidebar/comment-button-toolbar.js.map +1 -0
  14. package/build/components/collab-sidebar/comment-button.js +37 -0
  15. package/build/components/collab-sidebar/comment-button.js.map +1 -0
  16. package/build/components/collab-sidebar/comments.js +321 -0
  17. package/build/components/collab-sidebar/comments.js.map +1 -0
  18. package/build/components/collab-sidebar/constants.js +8 -0
  19. package/build/components/collab-sidebar/constants.js.map +1 -0
  20. package/build/components/collab-sidebar/index.js +272 -0
  21. package/build/components/collab-sidebar/index.js.map +1 -0
  22. package/build/components/collab-sidebar/utils.js +16 -0
  23. package/build/components/collab-sidebar/utils.js.map +1 -0
  24. package/build/components/commands/index.js +6 -6
  25. package/build/components/commands/index.js.map +1 -1
  26. package/build/components/create-template-part-modal/index.js.map +1 -1
  27. package/build/components/create-template-part-modal/utils.js.map +1 -1
  28. package/build/components/document-bar/index.js +8 -7
  29. package/build/components/document-bar/index.js.map +1 -1
  30. package/build/components/document-outline/index.js.map +1 -1
  31. package/build/components/document-outline/item.js.map +1 -1
  32. package/build/components/document-tools/index.js +2 -6
  33. package/build/components/document-tools/index.js.map +1 -1
  34. package/build/components/editor-interface/index.js +4 -14
  35. package/build/components/editor-interface/index.js.map +1 -1
  36. package/build/components/entities-saved-states/index.js +2 -2
  37. package/build/components/entities-saved-states/index.js.map +1 -1
  38. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
  39. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  40. package/build/components/global-styles-provider/index.js +13 -3
  41. package/build/components/global-styles-provider/index.js.map +1 -1
  42. package/build/components/header/index.js +5 -2
  43. package/build/components/header/index.js.map +1 -1
  44. package/build/components/inserter-sidebar/index.js +2 -2
  45. package/build/components/inserter-sidebar/index.js.map +1 -1
  46. package/build/components/media-categories/index.js.map +1 -1
  47. package/build/components/page-attributes/parent.js +5 -5
  48. package/build/components/page-attributes/parent.js.map +1 -1
  49. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  50. package/build/components/plugin-more-menu-item/index.js +13 -11
  51. package/build/components/plugin-more-menu-item/index.js.map +1 -1
  52. package/build/components/plugin-preview-menu-item/index.js +15 -13
  53. package/build/components/plugin-preview-menu-item/index.js.map +1 -1
  54. package/build/components/plugin-sidebar/index.js +0 -15
  55. package/build/components/plugin-sidebar/index.js.map +1 -1
  56. package/build/components/post-actions/index.js +5 -5
  57. package/build/components/post-actions/index.js.map +1 -1
  58. package/build/components/post-author/panel.js +4 -4
  59. package/build/components/post-author/panel.js.map +1 -1
  60. package/build/components/post-card-panel/index.js +7 -36
  61. package/build/components/post-card-panel/index.js.map +1 -1
  62. package/build/components/post-content-information/index.js +2 -3
  63. package/build/components/post-content-information/index.js.map +1 -1
  64. package/build/components/post-featured-image/index.js +26 -7
  65. package/build/components/post-featured-image/index.js.map +1 -1
  66. package/build/components/post-format/index.js +1 -1
  67. package/build/components/post-format/index.js.map +1 -1
  68. package/build/components/post-last-revision/index.js +1 -1
  69. package/build/components/post-last-revision/index.js.map +1 -1
  70. package/build/components/post-locked-modal/index.js +2 -2
  71. package/build/components/post-locked-modal/index.js.map +1 -1
  72. package/build/components/post-preview-button/index.js +1 -1
  73. package/build/components/post-preview-button/index.js.map +1 -1
  74. package/build/components/post-publish-button/index.js.map +1 -1
  75. package/build/components/post-publish-panel/maybe-post-format-panel.js +1 -1
  76. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  77. package/build/components/post-publish-panel/maybe-upload-media.js +1 -0
  78. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  79. package/build/components/post-publish-panel/media-util.js +1 -0
  80. package/build/components/post-publish-panel/media-util.js.map +1 -1
  81. package/build/components/post-publish-panel/postpublish.js +1 -1
  82. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  83. package/build/components/post-schedule/label.js +1 -1
  84. package/build/components/post-schedule/label.js.map +1 -1
  85. package/build/components/post-taxonomies/flat-term-selector.js +13 -5
  86. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  87. package/build/components/post-taxonomies/hierarchical-term-selector.js +3 -2
  88. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  89. package/build/components/post-taxonomies/index.js +1 -1
  90. package/build/components/post-taxonomies/index.js.map +1 -1
  91. package/build/components/post-taxonomies/panel.js.map +1 -1
  92. package/build/components/post-template/classic-theme.js +2 -4
  93. package/build/components/post-template/classic-theme.js.map +1 -1
  94. package/build/components/post-text-editor/index.js.map +1 -1
  95. package/build/components/post-title/index.js +15 -19
  96. package/build/components/post-title/index.js.map +1 -1
  97. package/build/components/post-title/index.native.js +2 -2
  98. package/build/components/post-title/index.native.js.map +1 -1
  99. package/build/components/post-url/index.js +76 -63
  100. package/build/components/post-url/index.js.map +1 -1
  101. package/build/components/post-url/panel.js +49 -29
  102. package/build/components/post-url/panel.js.map +1 -1
  103. package/build/components/post-visibility/index.js.map +1 -1
  104. package/build/components/preferences-modal/index.js.map +1 -1
  105. package/build/components/preview-dropdown/index.js +0 -4
  106. package/build/components/preview-dropdown/index.js.map +1 -1
  107. package/build/components/provider/index.js +10 -12
  108. package/build/components/provider/index.js.map +1 -1
  109. package/build/components/provider/use-block-editor-settings.js +1 -1
  110. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  111. package/build/components/resizable-editor/resize-handle.js.map +1 -1
  112. package/build/components/sidebar/header.js +2 -1
  113. package/build/components/sidebar/header.js.map +1 -1
  114. package/build/components/sidebar/index.js +3 -3
  115. package/build/components/sidebar/index.js.map +1 -1
  116. package/build/components/time-to-read/index.js +2 -2
  117. package/build/components/time-to-read/index.js.map +1 -1
  118. package/build/components/visual-editor/edit-template-blocks-notification.js +4 -1
  119. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  120. package/build/components/visual-editor/index.js +24 -25
  121. package/build/components/visual-editor/index.js.map +1 -1
  122. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  123. package/build/components/visual-editor/use-zoom-out-mode-exit.js +52 -0
  124. package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -0
  125. package/build/components/zoom-out-toggle/index.js +37 -5
  126. package/build/components/zoom-out-toggle/index.js.map +1 -1
  127. package/build/dataviews/actions/duplicate-template-part.js +3 -3
  128. package/build/dataviews/actions/duplicate-template-part.js.map +1 -1
  129. package/build/private-apis.js +0 -1
  130. package/build/private-apis.js.map +1 -1
  131. package/build/store/actions.js +30 -4
  132. package/build/store/actions.js.map +1 -1
  133. package/build/store/constants.js +1 -0
  134. package/build/store/constants.js.map +1 -1
  135. package/build/store/local-autosave.js.map +1 -1
  136. package/build/store/private-actions.js +8 -7
  137. package/build/store/private-actions.js.map +1 -1
  138. package/build/store/selectors.js +24 -2
  139. package/build/store/selectors.js.map +1 -1
  140. package/build/utils/media-upload/index.js.map +1 -1
  141. package/build/utils/pageTypeBadge.js +51 -0
  142. package/build/utils/pageTypeBadge.js.map +1 -0
  143. package/build/utils/terms.js +2 -2
  144. package/build/utils/terms.js.map +1 -1
  145. package/build-module/bindings/api.js +1 -29
  146. package/build-module/bindings/api.js.map +1 -1
  147. package/build-module/bindings/post-meta.js +2 -1
  148. package/build-module/bindings/post-meta.js.map +1 -1
  149. package/build-module/components/autocompleters/user.js +1 -3
  150. package/build-module/components/autocompleters/user.js.map +1 -1
  151. package/build-module/components/block-manager/category.js +1 -2
  152. package/build-module/components/block-manager/category.js.map +1 -1
  153. package/build-module/components/block-manager/checklist.js +1 -2
  154. package/build-module/components/block-manager/checklist.js.map +1 -1
  155. package/build-module/components/block-manager/index.js +3 -4
  156. package/build-module/components/block-manager/index.js.map +1 -1
  157. package/build-module/components/block-settings-menu/content-only-settings-menu.js +1 -3
  158. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  159. package/build-module/components/blog-title/index.js +1 -3
  160. package/build-module/components/blog-title/index.js.map +1 -1
  161. package/build-module/components/collab-sidebar/add-comment.js +114 -0
  162. package/build-module/components/collab-sidebar/add-comment.js.map +1 -0
  163. package/build-module/components/collab-sidebar/comment-button-toolbar.js +30 -0
  164. package/build-module/components/collab-sidebar/comment-button-toolbar.js.map +1 -0
  165. package/build-module/components/collab-sidebar/comment-button.js +30 -0
  166. package/build-module/components/collab-sidebar/comment-button.js.map +1 -0
  167. package/build-module/components/collab-sidebar/comments.js +314 -0
  168. package/build-module/components/collab-sidebar/comments.js.map +1 -0
  169. package/build-module/components/collab-sidebar/constants.js +2 -0
  170. package/build-module/components/collab-sidebar/constants.js.map +1 -0
  171. package/build-module/components/collab-sidebar/index.js +264 -0
  172. package/build-module/components/collab-sidebar/index.js.map +1 -0
  173. package/build-module/components/collab-sidebar/utils.js +10 -0
  174. package/build-module/components/collab-sidebar/utils.js.map +1 -0
  175. package/build-module/components/collapsible-block-toolbar/index.js +1 -3
  176. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  177. package/build-module/components/commands/index.js +6 -6
  178. package/build-module/components/commands/index.js.map +1 -1
  179. package/build-module/components/create-template-part-modal/index.js +1 -2
  180. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  181. package/build-module/components/create-template-part-modal/utils.js.map +1 -1
  182. package/build-module/components/document-bar/index.js +10 -10
  183. package/build-module/components/document-bar/index.js.map +1 -1
  184. package/build-module/components/document-outline/index.js +1 -2
  185. package/build-module/components/document-outline/index.js.map +1 -1
  186. package/build-module/components/document-outline/item.js +1 -2
  187. package/build-module/components/document-outline/item.js.map +1 -1
  188. package/build-module/components/document-tools/index.js +4 -10
  189. package/build-module/components/document-tools/index.js.map +1 -1
  190. package/build-module/components/editor/index.js +1 -3
  191. package/build-module/components/editor/index.js.map +1 -1
  192. package/build-module/components/editor-help/add-blocks.native.js +1 -3
  193. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  194. package/build-module/components/editor-help/customize-blocks.native.js +1 -3
  195. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  196. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +1 -2
  197. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  198. package/build-module/components/editor-help/index.native.js +1 -3
  199. package/build-module/components/editor-help/index.native.js.map +1 -1
  200. package/build-module/components/editor-help/intro-to-blocks.native.js +1 -3
  201. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  202. package/build-module/components/editor-help/move-blocks.native.js +1 -3
  203. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  204. package/build-module/components/editor-help/remove-blocks.native.js +1 -3
  205. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  206. package/build-module/components/editor-help/view-sections.native.js +1 -2
  207. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  208. package/build-module/components/editor-interface/index.js +5 -17
  209. package/build-module/components/editor-interface/index.js.map +1 -1
  210. package/build-module/components/editor-notices/index.js +1 -3
  211. package/build-module/components/editor-notices/index.js.map +1 -1
  212. package/build-module/components/entities-saved-states/entity-record-item.js +1 -3
  213. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  214. package/build-module/components/entities-saved-states/entity-type-list.js +1 -2
  215. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  216. package/build-module/components/entities-saved-states/index.js +3 -4
  217. package/build-module/components/entities-saved-states/index.js.map +1 -1
  218. package/build-module/components/error-boundary/index.native.js +1 -2
  219. package/build-module/components/error-boundary/index.native.js.map +1 -1
  220. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
  221. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  222. package/build-module/components/global-styles-provider/index.js +13 -3
  223. package/build-module/components/global-styles-provider/index.js.map +1 -1
  224. package/build-module/components/header/index.js +6 -4
  225. package/build-module/components/header/index.js.map +1 -1
  226. package/build-module/components/inserter-sidebar/index.js +2 -2
  227. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  228. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -2
  229. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  230. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -3
  231. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  232. package/build-module/components/list-view-sidebar/list-view-outline.js +1 -3
  233. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  234. package/build-module/components/media-categories/index.js.map +1 -1
  235. package/build-module/components/more-menu/index.js +1 -3
  236. package/build-module/components/more-menu/index.js.map +1 -1
  237. package/build-module/components/offline-status/index.native.js +1 -2
  238. package/build-module/components/offline-status/index.native.js.map +1 -1
  239. package/build-module/components/page-attributes/parent.js +6 -7
  240. package/build-module/components/page-attributes/parent.js.map +1 -1
  241. package/build-module/components/plugin-document-setting-panel/index.js +1 -3
  242. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  243. package/build-module/components/plugin-more-menu-item/index.js +12 -10
  244. package/build-module/components/plugin-more-menu-item/index.js.map +1 -1
  245. package/build-module/components/plugin-preview-menu-item/index.js +14 -12
  246. package/build-module/components/plugin-preview-menu-item/index.js.map +1 -1
  247. package/build-module/components/plugin-sidebar/index.js +0 -15
  248. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  249. package/build-module/components/post-actions/index.js +6 -8
  250. package/build-module/components/post-actions/index.js.map +1 -1
  251. package/build-module/components/post-author/panel.js +5 -6
  252. package/build-module/components/post-author/panel.js.map +1 -1
  253. package/build-module/components/post-card-panel/index.js +9 -38
  254. package/build-module/components/post-card-panel/index.js.map +1 -1
  255. package/build-module/components/post-content-information/index.js +2 -3
  256. package/build-module/components/post-content-information/index.js.map +1 -1
  257. package/build-module/components/post-discussion/panel.js +1 -2
  258. package/build-module/components/post-discussion/panel.js.map +1 -1
  259. package/build-module/components/post-excerpt/panel.js +1 -3
  260. package/build-module/components/post-excerpt/panel.js.map +1 -1
  261. package/build-module/components/post-featured-image/index.js +27 -9
  262. package/build-module/components/post-featured-image/index.js.map +1 -1
  263. package/build-module/components/post-format/index.js +2 -3
  264. package/build-module/components/post-format/index.js.map +1 -1
  265. package/build-module/components/post-format/panel.js +1 -2
  266. package/build-module/components/post-format/panel.js.map +1 -1
  267. package/build-module/components/post-last-revision/index.js +1 -1
  268. package/build-module/components/post-last-revision/index.js.map +1 -1
  269. package/build-module/components/post-locked-modal/index.js +3 -5
  270. package/build-module/components/post-locked-modal/index.js.map +1 -1
  271. package/build-module/components/post-panel-row/index.js +1 -2
  272. package/build-module/components/post-panel-row/index.js.map +1 -1
  273. package/build-module/components/post-preview-button/index.js +2 -4
  274. package/build-module/components/post-preview-button/index.js.map +1 -1
  275. package/build-module/components/post-publish-button/index.js +1 -2
  276. package/build-module/components/post-publish-button/index.js.map +1 -1
  277. package/build-module/components/post-publish-panel/index.js +1 -3
  278. package/build-module/components/post-publish-panel/index.js.map +1 -1
  279. package/build-module/components/post-publish-panel/maybe-category-panel.js +1 -2
  280. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  281. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -3
  282. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  283. package/build-module/components/post-publish-panel/maybe-tags-panel.js +1 -2
  284. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  285. package/build-module/components/post-publish-panel/maybe-upload-media.js +2 -2
  286. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  287. package/build-module/components/post-publish-panel/media-util.js +1 -0
  288. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  289. package/build-module/components/post-publish-panel/postpublish.js +2 -4
  290. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  291. package/build-module/components/post-publish-panel/prepublish.js +1 -3
  292. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  293. package/build-module/components/post-saved-state/index.js +1 -2
  294. package/build-module/components/post-saved-state/index.js.map +1 -1
  295. package/build-module/components/post-schedule/label.js +1 -1
  296. package/build-module/components/post-schedule/label.js.map +1 -1
  297. package/build-module/components/post-status/index.js +1 -3
  298. package/build-module/components/post-status/index.js.map +1 -1
  299. package/build-module/components/post-switch-to-draft-button/index.js +1 -3
  300. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  301. package/build-module/components/post-taxonomies/flat-term-selector.js +16 -10
  302. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  303. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +4 -4
  304. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  305. package/build-module/components/post-taxonomies/index.js +1 -1
  306. package/build-module/components/post-taxonomies/index.js.map +1 -1
  307. package/build-module/components/post-taxonomies/most-used-terms.js +1 -2
  308. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  309. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  310. package/build-module/components/post-template/block-theme.js +1 -3
  311. package/build-module/components/post-template/block-theme.js.map +1 -1
  312. package/build-module/components/post-template/classic-theme.js +3 -6
  313. package/build-module/components/post-template/classic-theme.js.map +1 -1
  314. package/build-module/components/post-template/create-new-template-modal.js +1 -2
  315. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  316. package/build-module/components/post-template/create-new-template.js +1 -3
  317. package/build-module/components/post-template/create-new-template.js.map +1 -1
  318. package/build-module/components/post-template/swap-template-button.js +1 -3
  319. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  320. package/build-module/components/post-text-editor/index.js +1 -3
  321. package/build-module/components/post-text-editor/index.js.map +1 -1
  322. package/build-module/components/post-title/index.js +15 -19
  323. package/build-module/components/post-title/index.js.map +1 -1
  324. package/build-module/components/post-title/index.native.js +2 -2
  325. package/build-module/components/post-title/index.native.js.map +1 -1
  326. package/build-module/components/post-trash/index.js +1 -2
  327. package/build-module/components/post-trash/index.js.map +1 -1
  328. package/build-module/components/post-url/index.js +78 -66
  329. package/build-module/components/post-url/index.js.map +1 -1
  330. package/build-module/components/post-url/panel.js +51 -31
  331. package/build-module/components/post-url/panel.js.map +1 -1
  332. package/build-module/components/post-visibility/index.js +1 -2
  333. package/build-module/components/post-visibility/index.js.map +1 -1
  334. package/build-module/components/posts-per-page/index.js +1 -3
  335. package/build-module/components/posts-per-page/index.js.map +1 -1
  336. package/build-module/components/preferences-modal/index.js +1 -3
  337. package/build-module/components/preferences-modal/index.js.map +1 -1
  338. package/build-module/components/preview-dropdown/index.js +1 -7
  339. package/build-module/components/preview-dropdown/index.js.map +1 -1
  340. package/build-module/components/provider/index.js +11 -15
  341. package/build-module/components/provider/index.js.map +1 -1
  342. package/build-module/components/provider/index.native.js +1 -3
  343. package/build-module/components/provider/index.native.js.map +1 -1
  344. package/build-module/components/provider/use-block-editor-settings.js +1 -1
  345. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  346. package/build-module/components/resizable-editor/resize-handle.js +1 -3
  347. package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
  348. package/build-module/components/save-publish-panels/index.js +1 -3
  349. package/build-module/components/save-publish-panels/index.js.map +1 -1
  350. package/build-module/components/sidebar/header.js +3 -3
  351. package/build-module/components/sidebar/header.js.map +1 -1
  352. package/build-module/components/sidebar/index.js +5 -6
  353. package/build-module/components/sidebar/index.js.map +1 -1
  354. package/build-module/components/sidebar/post-summary.js +1 -3
  355. package/build-module/components/sidebar/post-summary.js.map +1 -1
  356. package/build-module/components/site-discussion/index.js +1 -3
  357. package/build-module/components/site-discussion/index.js.map +1 -1
  358. package/build-module/components/start-template-options/index.js +1 -2
  359. package/build-module/components/start-template-options/index.js.map +1 -1
  360. package/build-module/components/table-of-contents/panel.js +1 -3
  361. package/build-module/components/table-of-contents/panel.js.map +1 -1
  362. package/build-module/components/template-part-menu-items/convert-to-template-part.js +1 -3
  363. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  364. package/build-module/components/template-validation-notice/index.js +1 -3
  365. package/build-module/components/template-validation-notice/index.js.map +1 -1
  366. package/build-module/components/text-editor/index.js +1 -2
  367. package/build-module/components/text-editor/index.js.map +1 -1
  368. package/build-module/components/time-to-read/index.js +2 -2
  369. package/build-module/components/time-to-read/index.js.map +1 -1
  370. package/build-module/components/visual-editor/edit-template-blocks-notification.js +4 -1
  371. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  372. package/build-module/components/visual-editor/index.js +26 -29
  373. package/build-module/components/visual-editor/index.js.map +1 -1
  374. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  375. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +46 -0
  376. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -0
  377. package/build-module/components/zoom-out-toggle/index.js +37 -5
  378. package/build-module/components/zoom-out-toggle/index.js.map +1 -1
  379. package/build-module/dataviews/actions/duplicate-template-part.js +4 -4
  380. package/build-module/dataviews/actions/duplicate-template-part.js.map +1 -1
  381. package/build-module/hooks/pattern-overrides.js +1 -3
  382. package/build-module/hooks/pattern-overrides.js.map +1 -1
  383. package/build-module/private-apis.js +1 -2
  384. package/build-module/private-apis.js.map +1 -1
  385. package/build-module/store/actions.js +30 -4
  386. package/build-module/store/actions.js.map +1 -1
  387. package/build-module/store/constants.js +1 -0
  388. package/build-module/store/constants.js.map +1 -1
  389. package/build-module/store/local-autosave.js.map +1 -1
  390. package/build-module/store/private-actions.js +9 -8
  391. package/build-module/store/private-actions.js.map +1 -1
  392. package/build-module/store/selectors.js +24 -2
  393. package/build-module/store/selectors.js.map +1 -1
  394. package/build-module/utils/media-upload/index.js.map +1 -1
  395. package/build-module/utils/pageTypeBadge.js +45 -0
  396. package/build-module/utils/pageTypeBadge.js.map +1 -0
  397. package/build-module/utils/terms.js +2 -2
  398. package/build-module/utils/terms.js.map +1 -1
  399. package/build-style/style-rtl.css +116 -59
  400. package/build-style/style.css +116 -59
  401. package/build-types/bindings/api.d.ts +0 -13
  402. package/build-types/bindings/api.d.ts.map +1 -1
  403. package/build-types/bindings/post-meta.d.ts.map +1 -1
  404. package/build-types/components/collab-sidebar/add-comment.d.ts +15 -0
  405. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -0
  406. package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts +5 -0
  407. package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts.map +1 -0
  408. package/build-types/components/collab-sidebar/comment-button.d.ts +5 -0
  409. package/build-types/components/collab-sidebar/comment-button.d.ts.map +1 -0
  410. package/build-types/components/collab-sidebar/comments.d.ts +19 -0
  411. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -0
  412. package/build-types/components/collab-sidebar/constants.d.ts +2 -0
  413. package/build-types/components/collab-sidebar/constants.d.ts.map +1 -0
  414. package/build-types/components/collab-sidebar/index.d.ts +5 -0
  415. package/build-types/components/collab-sidebar/index.d.ts.map +1 -0
  416. package/build-types/components/collab-sidebar/utils.d.ts +8 -0
  417. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -0
  418. package/build-types/components/commands/index.d.ts.map +1 -1
  419. package/build-types/components/document-bar/index.d.ts.map +1 -1
  420. package/build-types/components/document-tools/index.d.ts.map +1 -1
  421. package/build-types/components/editor-interface/index.d.ts +1 -2
  422. package/build-types/components/editor-interface/index.d.ts.map +1 -1
  423. package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
  424. package/build-types/components/header/index.d.ts.map +1 -1
  425. package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
  426. package/build-types/components/page-attributes/parent.d.ts.map +1 -1
  427. package/build-types/components/plugin-more-menu-item/index.d.ts +62 -2
  428. package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -1
  429. package/build-types/components/plugin-preview-menu-item/index.d.ts +41 -2
  430. package/build-types/components/plugin-preview-menu-item/index.d.ts.map +1 -1
  431. package/build-types/components/plugin-sidebar/index.d.ts.map +1 -1
  432. package/build-types/components/post-author/panel.d.ts.map +1 -1
  433. package/build-types/components/post-card-panel/index.d.ts.map +1 -1
  434. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  435. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  436. package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
  437. package/build-types/components/post-url/index.d.ts.map +1 -1
  438. package/build-types/components/post-url/panel.d.ts.map +1 -1
  439. package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
  440. package/build-types/components/provider/index.d.ts.map +1 -1
  441. package/build-types/components/sidebar/index.d.ts.map +1 -1
  442. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -1
  443. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  444. package/build-types/components/visual-editor/use-zoom-out-mode-exit.d.ts +5 -0
  445. package/build-types/components/visual-editor/use-zoom-out-mode-exit.d.ts.map +1 -0
  446. package/build-types/components/zoom-out-toggle/index.d.ts +3 -1
  447. package/build-types/components/zoom-out-toggle/index.d.ts.map +1 -1
  448. package/build-types/private-apis.d.ts.map +1 -1
  449. package/build-types/store/actions.d.ts +1 -4
  450. package/build-types/store/actions.d.ts.map +1 -1
  451. package/build-types/store/selectors.d.ts +21 -0
  452. package/build-types/store/selectors.d.ts.map +1 -1
  453. package/build-types/utils/pageTypeBadge.d.ts +5 -0
  454. package/build-types/utils/pageTypeBadge.d.ts.map +1 -0
  455. package/build-types/utils/terms.d.ts.map +1 -1
  456. package/package.json +39 -38
  457. package/src/bindings/api.js +1 -32
  458. package/src/bindings/post-meta.js +1 -0
  459. package/src/components/collab-sidebar/add-comment.js +124 -0
  460. package/src/components/collab-sidebar/comment-button-toolbar.js +29 -0
  461. package/src/components/collab-sidebar/comment-button.js +31 -0
  462. package/src/components/collab-sidebar/comments.js +404 -0
  463. package/src/components/collab-sidebar/constants.js +1 -0
  464. package/src/components/collab-sidebar/index.js +307 -0
  465. package/src/components/collab-sidebar/style.scss +111 -0
  466. package/src/components/collab-sidebar/utils.js +9 -0
  467. package/src/components/commands/index.js +9 -7
  468. package/src/components/document-bar/index.js +15 -7
  469. package/src/components/document-bar/style.scss +0 -4
  470. package/src/components/document-tools/index.js +2 -8
  471. package/src/components/editor-interface/index.js +4 -18
  472. package/src/components/entities-saved-states/index.js +2 -2
  473. package/src/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
  474. package/src/components/global-styles-provider/index.js +20 -6
  475. package/src/components/header/index.js +3 -1
  476. package/src/components/header/style.scss +1 -0
  477. package/src/components/inserter-sidebar/index.js +3 -6
  478. package/src/components/page-attributes/parent.js +6 -4
  479. package/src/components/plugin-more-menu-item/index.js +12 -11
  480. package/src/components/plugin-preview-menu-item/index.js +14 -13
  481. package/src/components/plugin-sidebar/index.js +0 -13
  482. package/src/components/post-actions/index.js +8 -11
  483. package/src/components/post-author/panel.js +4 -2
  484. package/src/components/post-card-panel/index.js +9 -43
  485. package/src/components/post-card-panel/style.scss +1 -9
  486. package/src/components/post-content-information/index.js +1 -1
  487. package/src/components/post-featured-image/index.js +31 -16
  488. package/src/components/post-featured-image/style.scss +5 -2
  489. package/src/components/post-last-revision/index.js +1 -1
  490. package/src/components/post-saved-state/test/__snapshots__/index.js.snap +1 -1
  491. package/src/components/post-schedule/label.js +1 -1
  492. package/src/components/post-sticky/test/index.js +6 -6
  493. package/src/components/post-taxonomies/flat-term-selector.js +15 -4
  494. package/src/components/post-taxonomies/hierarchical-term-selector.js +3 -2
  495. package/src/components/post-template/classic-theme.js +1 -2
  496. package/src/components/post-url/index.js +67 -55
  497. package/src/components/post-url/panel.js +61 -35
  498. package/src/components/post-url/style.scss +21 -3
  499. package/src/components/preview-dropdown/index.js +0 -2
  500. package/src/components/provider/index.js +32 -24
  501. package/src/components/provider/use-block-editor-settings.js +1 -1
  502. package/src/components/sidebar/header.js +3 -2
  503. package/src/components/sidebar/index.js +5 -3
  504. package/src/components/time-to-read/index.js +3 -3
  505. package/src/components/visual-editor/edit-template-blocks-notification.js +5 -1
  506. package/src/components/visual-editor/index.js +32 -39
  507. package/src/components/visual-editor/use-zoom-out-mode-exit.js +49 -0
  508. package/src/components/zoom-out-toggle/index.js +39 -5
  509. package/src/dataviews/actions/duplicate-template-part.tsx +3 -3
  510. package/src/private-apis.js +1 -5
  511. package/src/store/actions.js +33 -4
  512. package/src/store/private-actions.js +3 -3
  513. package/src/store/selectors.js +24 -2
  514. package/src/style.scss +1 -0
  515. package/src/utils/pageTypeBadge.js +41 -0
  516. package/src/utils/terms.js +4 -2
  517. package/src/utils/test/terms.js +3 -3
  518. package/tsconfig.tsbuildinfo +1 -1
@@ -72,7 +72,7 @@ function EditorKeyboardShortcutsRegister() {
72
72
  registerShortcut( {
73
73
  name: 'core/editor/toggle-list-view',
74
74
  category: 'global',
75
- description: __( 'Open the List View.' ),
75
+ description: __( 'Show or hide the List View.' ),
76
76
  keyCombination: {
77
77
  modifier: 'access',
78
78
  character: 'o',
@@ -82,7 +82,7 @@ function EditorKeyboardShortcutsRegister() {
82
82
  registerShortcut( {
83
83
  name: 'core/editor/toggle-distraction-free',
84
84
  category: 'global',
85
- description: __( 'Toggle distraction free mode.' ),
85
+ description: __( 'Enter or exit distraction free mode.' ),
86
86
  keyCombination: {
87
87
  modifier: 'primaryShift',
88
88
  character: '\\',
@@ -92,7 +92,7 @@ function EditorKeyboardShortcutsRegister() {
92
92
  registerShortcut( {
93
93
  name: 'core/editor/toggle-sidebar',
94
94
  category: 'global',
95
- description: __( 'Show or hide the Settings sidebar.' ),
95
+ description: __( 'Show or hide the Settings panel.' ),
96
96
  keyCombination: {
97
97
  modifier: 'primaryShift',
98
98
  character: ',',
@@ -56,13 +56,27 @@ function useGlobalStylesUserConfig() {
56
56
  select( coreStore ).__experimentalGetCurrentGlobalStylesId();
57
57
 
58
58
  let record;
59
- const userCanEditGlobalStyles = canUser( 'update', {
60
- kind: 'root',
61
- name: 'globalStyles',
62
- id: _globalStylesId,
63
- } );
64
59
 
65
- if ( _globalStylesId ) {
60
+ // We want the global styles ID request to finish before triggering
61
+ // the OPTIONS request for user capabilities, otherwise it will
62
+ // fetch `/wp/v2/global-styles` instead of
63
+ // `/wp/v2/global-styles/{id}`!
64
+ // Please adjust the preloaded requests if this changes!
65
+ const userCanEditGlobalStyles = _globalStylesId
66
+ ? canUser( 'update', {
67
+ kind: 'root',
68
+ name: 'globalStyles',
69
+ id: _globalStylesId,
70
+ } )
71
+ : null;
72
+
73
+ if (
74
+ _globalStylesId &&
75
+ // We want the OPTIONS request for user capabilities to finish
76
+ // before getting the records, otherwise we'll fetch both!
77
+ typeof userCanEditGlobalStyles === 'boolean'
78
+ ) {
79
+ // Please adjust the preloaded requests if this changes!
66
80
  if ( userCanEditGlobalStyles ) {
67
81
  record = getEditedEntityRecord(
68
82
  'root',
@@ -12,6 +12,7 @@ import { PinnedItems } from '@wordpress/interface';
12
12
  /**
13
13
  * Internal dependencies
14
14
  */
15
+ import CollabSidebar from '../collab-sidebar';
15
16
  import BackButton, { useHasBackButton } from './back-button';
16
17
  import CollapsibleBlockToolbar from '../collapsible-block-toolbar';
17
18
  import DocumentBar from '../document-bar';
@@ -149,7 +150,7 @@ function Header( {
149
150
  ) }
150
151
 
151
152
  { canBeZoomedOut && isEditorIframed && isWideViewport && (
152
- <ZoomOutToggle />
153
+ <ZoomOutToggle disabled={ forceDisableBlockTools } />
153
154
  ) }
154
155
 
155
156
  <PreviewDropdown
@@ -174,6 +175,7 @@ function Header( {
174
175
  }
175
176
  />
176
177
  ) }
178
+ <CollabSidebar />
177
179
 
178
180
  { customSaveButton }
179
181
  <MoreMenu />
@@ -130,6 +130,7 @@
130
130
  // ... and display labels.
131
131
  &::after {
132
132
  content: attr(aria-label);
133
+ white-space: nowrap;
133
134
  }
134
135
  &[aria-disabled="true"] {
135
136
  background-color: transparent;
@@ -33,15 +33,12 @@ export default function InserterSidebar() {
33
33
  getInserter,
34
34
  isPublishSidebarOpened,
35
35
  } = unlock( select( editorStore ) );
36
- const {
37
- getBlockRootClientId,
38
- __unstableGetEditorMode,
39
- getSectionRootClientId,
40
- } = unlock( select( blockEditorStore ) );
36
+ const { getBlockRootClientId, isZoomOut, getSectionRootClientId } =
37
+ unlock( select( blockEditorStore ) );
41
38
  const { get } = select( preferencesStore );
42
39
  const { getActiveComplementaryArea } = select( interfaceStore );
43
40
  const getBlockSectionRootClientId = () => {
44
- if ( __unstableGetEditorMode() === 'zoom-out' ) {
41
+ if ( isZoomOut() ) {
45
42
  const sectionRootClientId = getSectionRootClientId();
46
43
 
47
44
  if ( sectionRootClientId ) {
@@ -212,8 +212,10 @@ function PostParentToggle( { isOpen, onClick } ) {
212
212
  className="editor-post-parent__panel-toggle"
213
213
  variant="tertiary"
214
214
  aria-expanded={ isOpen }
215
- // translators: %s: Current post parent.
216
- aria-label={ sprintf( __( 'Change parent: %s' ), parentTitle ) }
215
+ aria-label={
216
+ // translators: %s: Current post parent.
217
+ sprintf( __( 'Change parent: %s' ), parentTitle )
218
+ }
217
219
  onClick={ onClick }
218
220
  >
219
221
  { parentTitle }
@@ -261,9 +263,9 @@ export function ParentRow() {
261
263
  <div>
262
264
  { createInterpolateElement(
263
265
  sprintf(
264
- /* translators: %1$s The home URL of the WordPress installation without the scheme. */
266
+ /* translators: %s: The home URL of the WordPress installation without the scheme. */
265
267
  __(
266
- '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.'
268
+ 'Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'
267
269
  ),
268
270
  filterURLForDisplay( homeUrl ).replace(
269
271
  /([/.])/g,
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { compose } from '@wordpress/compose';
5
4
  import { MenuItem } from '@wordpress/components';
6
- import { withPluginContext } from '@wordpress/plugins';
5
+ import { usePluginContext } from '@wordpress/plugins';
7
6
  import { ActionItem } from '@wordpress/interface';
8
7
 
9
8
  /**
@@ -62,12 +61,14 @@ import { ActionItem } from '@wordpress/interface';
62
61
  *
63
62
  * @return {Component} The component to be rendered.
64
63
  */
65
- export default compose(
66
- withPluginContext( ( context, ownProps ) => {
67
- return {
68
- as: ownProps.as ?? MenuItem,
69
- icon: ownProps.icon || context.icon,
70
- name: 'core/plugin-more-menu',
71
- };
72
- } )
73
- )( ActionItem );
64
+ export default function PluginMoreMenuItem( props ) {
65
+ const context = usePluginContext();
66
+ return (
67
+ <ActionItem
68
+ name="core/plugin-more-menu"
69
+ as={ props.as ?? MenuItem }
70
+ icon={ props.icon || context.icon }
71
+ { ...props }
72
+ />
73
+ );
74
+ }
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { compose } from '@wordpress/compose';
5
4
  import { MenuItem } from '@wordpress/components';
6
- import { withPluginContext } from '@wordpress/plugins';
5
+ import { usePluginContext } from '@wordpress/plugins';
7
6
  import { ActionItem } from '@wordpress/interface';
8
7
 
9
8
  /**
@@ -27,12 +26,12 @@ import { ActionItem } from '@wordpress/interface';
27
26
  * }
28
27
  *
29
28
  * const ExternalPreviewMenuItem = () => (
30
- * <PreviewDropdownMenuItem
29
+ * <PluginPreviewMenuItem
31
30
  * icon={ external }
32
31
  * onClick={ onPreviewClick }
33
32
  * >
34
33
  * { __( 'Preview in new tab' ) }
35
- * </PreviewDropdownMenuItem>
34
+ * </PluginPreviewMenuItem>
36
35
  * );
37
36
  * registerPlugin( 'external-preview-menu-item', {
38
37
  * render: ExternalPreviewMenuItem,
@@ -41,12 +40,14 @@ import { ActionItem } from '@wordpress/interface';
41
40
  *
42
41
  * @return {Component} The rendered menu item component.
43
42
  */
44
- export default compose(
45
- withPluginContext( ( context, ownProps ) => {
46
- return {
47
- as: ownProps.as ?? MenuItem,
48
- icon: ownProps.icon || context.icon,
49
- name: 'core/plugin-preview-menu',
50
- };
51
- } )
52
- )( ActionItem );
43
+ export default function PluginPreviewMenuItem( props ) {
44
+ const context = usePluginContext();
45
+ return (
46
+ <ActionItem
47
+ name="core/plugin-preview-menu"
48
+ as={ props.as ?? MenuItem }
49
+ icon={ props.icon || context.icon }
50
+ { ...props }
51
+ />
52
+ );
53
+ }
@@ -1,15 +1,8 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { useSelect } from '@wordpress/data';
5
- import { __ } from '@wordpress/i18n';
6
4
  import { ComplementaryArea } from '@wordpress/interface';
7
5
 
8
- /**
9
- * Internal dependencies
10
- */
11
- import { store as editorStore } from '../../store';
12
-
13
6
  /**
14
7
  * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.
15
8
  * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.
@@ -76,16 +69,10 @@ import { store as editorStore } from '../../store';
76
69
  * ```
77
70
  */
78
71
  export default function PluginSidebar( { className, ...props } ) {
79
- const { postTitle } = useSelect( ( select ) => {
80
- return {
81
- postTitle: select( editorStore ).getEditedPostAttribute( 'title' ),
82
- };
83
- }, [] );
84
72
  return (
85
73
  <ComplementaryArea
86
74
  panelClassName={ className }
87
75
  className="editor-sidebar"
88
- smallScreenTitle={ postTitle || __( '(no title)' ) }
89
76
  scope="core"
90
77
  { ...props }
91
78
  />
@@ -18,7 +18,7 @@ import { store as coreStore } from '@wordpress/core-data';
18
18
  import { unlock } from '../../lock-unlock';
19
19
  import { usePostActions } from './actions';
20
20
 
21
- const { DropdownMenuV2, kebabCase } = unlock( componentsPrivateApis );
21
+ const { Menu, kebabCase } = unlock( componentsPrivateApis );
22
22
 
23
23
  export default function PostActions( { postType, postId, onActionPerformed } ) {
24
24
  const [ isActionsMenuOpen, setIsActionsMenuOpen ] = useState( false );
@@ -54,7 +54,7 @@ export default function PostActions( { postType, postId, onActionPerformed } ) {
54
54
  }, [ allActions, itemWithPermissions ] );
55
55
 
56
56
  return (
57
- <DropdownMenuV2
57
+ <Menu
58
58
  open={ isActionsMenuOpen }
59
59
  trigger={
60
60
  <Button
@@ -79,7 +79,7 @@ export default function PostActions( { postType, postId, onActionPerformed } ) {
79
79
  setIsActionsMenuOpen( false );
80
80
  } }
81
81
  />
82
- </DropdownMenuV2>
82
+ </Menu>
83
83
  );
84
84
  }
85
85
 
@@ -93,12 +93,9 @@ function DropdownMenuItemTrigger( { action, onClick, items } ) {
93
93
  const label =
94
94
  typeof action.label === 'string' ? action.label : action.label( items );
95
95
  return (
96
- <DropdownMenuV2.Item
97
- onClick={ onClick }
98
- hideOnClick={ ! action.RenderModal }
99
- >
100
- <DropdownMenuV2.ItemLabel>{ label }</DropdownMenuV2.ItemLabel>
101
- </DropdownMenuV2.Item>
96
+ <Menu.Item onClick={ onClick } hideOnClick={ ! action.RenderModal }>
97
+ <Menu.ItemLabel>{ label }</Menu.ItemLabel>
98
+ </Menu.Item>
102
99
  );
103
100
  }
104
101
 
@@ -145,7 +142,7 @@ function ActionWithModal( { action, item, ActionTrigger, onClose } ) {
145
142
  // With an added onClose prop.
146
143
  function ActionsDropdownMenuGroup( { actions, item, onClose } ) {
147
144
  return (
148
- <DropdownMenuV2.Group>
145
+ <Menu.Group>
149
146
  { actions.map( ( action ) => {
150
147
  if ( action.RenderModal ) {
151
148
  return (
@@ -167,6 +164,6 @@ function ActionsDropdownMenuGroup( { actions, item, onClose } ) {
167
164
  />
168
165
  );
169
166
  } ) }
170
- </DropdownMenuV2.Group>
167
+ </Menu.Group>
171
168
  );
172
169
  }
@@ -25,8 +25,10 @@ function PostAuthorToggle( { isOpen, onClick } ) {
25
25
  className="editor-post-author__panel-toggle"
26
26
  variant="tertiary"
27
27
  aria-expanded={ isOpen }
28
- // translators: %s: Current post link.
29
- aria-label={ sprintf( __( 'Change author: %s' ), authorName ) }
28
+ aria-label={
29
+ // translators: %s: Author name.
30
+ sprintf( __( 'Change author: %s' ), authorName )
31
+ }
30
32
  onClick={ onClick }
31
33
  >
32
34
  { authorName }
@@ -1,7 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
1
  /**
6
2
  * WordPress dependencies
7
3
  */
@@ -22,27 +18,20 @@ import { store as editorStore } from '../../store';
22
18
  import {
23
19
  TEMPLATE_POST_TYPE,
24
20
  TEMPLATE_PART_POST_TYPE,
25
- PATTERN_POST_TYPE,
26
- GLOBAL_POST_TYPES,
27
21
  } from '../../store/constants';
28
22
  import { unlock } from '../../lock-unlock';
29
23
  import PostActions from '../post-actions';
24
+ import usePageTypeBadge from '../../utils/pageTypeBadge';
30
25
 
31
26
  export default function PostCardPanel( {
32
27
  postType,
33
28
  postId,
34
29
  onActionPerformed,
35
30
  } ) {
36
- const { isFrontPage, isPostsPage, title, icon, isSync } = useSelect(
31
+ const { title, icon } = useSelect(
37
32
  ( select ) => {
38
33
  const { __experimentalGetTemplateInfo } = select( editorStore );
39
- const { canUser, getEditedEntityRecord } = select( coreStore );
40
- const siteSettings = canUser( 'read', {
41
- kind: 'root',
42
- name: 'site',
43
- } )
44
- ? getEditedEntityRecord( 'root', 'site' )
45
- : undefined;
34
+ const { getEditedEntityRecord } = select( coreStore );
46
35
  const _record = getEditedEntityRecord(
47
36
  'postType',
48
37
  postType,
@@ -52,31 +41,18 @@ export default function PostCardPanel( {
52
41
  [ TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE ].includes(
53
42
  postType
54
43
  ) && __experimentalGetTemplateInfo( _record );
55
- let _isSync = false;
56
- if ( GLOBAL_POST_TYPES.includes( postType ) ) {
57
- if ( PATTERN_POST_TYPE === postType ) {
58
- // When the post is first created, the top level wp_pattern_sync_status is not set so get meta value instead.
59
- const currentSyncStatus =
60
- _record?.meta?.wp_pattern_sync_status === 'unsynced'
61
- ? 'unsynced'
62
- : _record?.wp_pattern_sync_status;
63
- _isSync = currentSyncStatus !== 'unsynced';
64
- } else {
65
- _isSync = true;
66
- }
67
- }
68
44
  return {
69
45
  title: _templateInfo?.title || _record?.title,
70
46
  icon: unlock( select( editorStore ) ).getPostIcon( postType, {
71
47
  area: _record?.area,
72
48
  } ),
73
- isSync: _isSync,
74
- isFrontPage: siteSettings?.page_on_front === postId,
75
- isPostsPage: siteSettings?.page_for_posts === postId,
76
49
  };
77
50
  },
78
51
  [ postId, postType ]
79
52
  );
53
+
54
+ const pageTypeBadge = usePageTypeBadge();
55
+
80
56
  return (
81
57
  <div className="editor-post-card-panel">
82
58
  <HStack
@@ -84,12 +60,7 @@ export default function PostCardPanel( {
84
60
  className="editor-post-card-panel__header"
85
61
  align="flex-start"
86
62
  >
87
- <Icon
88
- className={ clsx( 'editor-post-card-panel__icon', {
89
- 'is-sync': isSync,
90
- } ) }
91
- icon={ icon }
92
- />
63
+ <Icon className="editor-post-card-panel__icon" icon={ icon } />
93
64
  <Text
94
65
  numberOfLines={ 2 }
95
66
  truncate
@@ -99,14 +70,9 @@ export default function PostCardPanel( {
99
70
  lineHeight="20px"
100
71
  >
101
72
  { title ? decodeEntities( title ) : __( 'No title' ) }
102
- { isFrontPage && (
103
- <span className="editor-post-card-panel__title-badge">
104
- { __( 'Homepage' ) }
105
- </span>
106
- ) }
107
- { isPostsPage && (
73
+ { pageTypeBadge && (
108
74
  <span className="editor-post-card-panel__title-badge">
109
- { __( 'Posts Page' ) }
75
+ { pageTypeBadge }
110
76
  </span>
111
77
  ) }
112
78
  </Text>
@@ -34,17 +34,9 @@
34
34
  }
35
35
  }
36
36
 
37
- .editor-post-card-panel__icon.is-sync {
38
- fill: var(--wp-block-synced-color);
39
-
40
- & + .editor-post-card-panel__title {
41
- color: var(--wp-block-synced-color);
42
- }
43
- }
44
-
45
37
  .editor-post-card-panel__title-badge {
46
38
  background: $gray-100;
47
- color: $gray-700;
39
+ color: $gray-800;
48
40
  padding: 0 $grid-unit-05;
49
41
  border-radius: $radius-small;
50
42
  font-size: 12px;
@@ -70,7 +70,7 @@ export default function PostContentInformation() {
70
70
  readingTime <= 1
71
71
  ? __( '1 minute' )
72
72
  : sprintf(
73
- // translators: %s: the number of minutes to read the post.
73
+ /* translators: %s: the number of minutes to read the post. */
74
74
  _n( '%s minute', '%s minutes', readingTime ),
75
75
  readingTime.toLocaleString()
76
76
  );
@@ -121,6 +121,35 @@ function PostFeaturedImage( {
121
121
  } );
122
122
  }
123
123
 
124
+ /**
125
+ * Generates the featured image alt text for this editing context.
126
+ *
127
+ * @param {Object} imageMedia The image media object.
128
+ * @param {string} imageMedia.alt_text The alternative text of the image.
129
+ * @param {Object} imageMedia.media_details The media details of the image.
130
+ * @param {Object} imageMedia.media_details.sizes The sizes of the image.
131
+ * @param {Object} imageMedia.media_details.sizes.full The full size details of the image.
132
+ * @param {string} imageMedia.media_details.sizes.full.file The file name of the full size image.
133
+ * @param {string} imageMedia.slug The slug of the image.
134
+ * @return {string} The featured image alt text.
135
+ */
136
+ function getImageDescription( imageMedia ) {
137
+ if ( imageMedia.alt_text ) {
138
+ return sprintf(
139
+ // Translators: %s: The selected image alt text.
140
+ __( 'Current image: %s' ),
141
+ imageMedia.alt_text
142
+ );
143
+ }
144
+ return sprintf(
145
+ // Translators: %s: The selected image filename.
146
+ __(
147
+ 'The current image has no alternative text. The file name is: %s'
148
+ ),
149
+ imageMedia.media_details.sizes?.full?.file || imageMedia.slug
150
+ );
151
+ }
152
+
124
153
  return (
125
154
  <PostFeaturedImageCheck>
126
155
  { noticeUI }
@@ -130,21 +159,7 @@ function PostFeaturedImage( {
130
159
  id={ `editor-post-featured-image-${ featuredImageId }-describedby` }
131
160
  className="hidden"
132
161
  >
133
- { media.alt_text &&
134
- sprintf(
135
- // Translators: %s: The selected image alt text.
136
- __( 'Current image: %s' ),
137
- media.alt_text
138
- ) }
139
- { ! media.alt_text &&
140
- sprintf(
141
- // Translators: %s: The selected image filename.
142
- __(
143
- 'The current image has no alternative text. The file name is: %s'
144
- ),
145
- media.media_details.sizes?.full?.file ||
146
- media.slug
147
- ) }
162
+ { getImageDescription( media ) }
148
163
  </div>
149
164
  ) }
150
165
  <MediaUploadCheck fallback={ instructions }>
@@ -188,7 +203,7 @@ function PostFeaturedImage( {
188
203
  <img
189
204
  className="editor-post-featured-image__preview-image"
190
205
  src={ mediaSourceUrl }
191
- alt=""
206
+ alt={ getImageDescription( media ) }
192
207
  />
193
208
  ) }
194
209
  { isLoading && <Spinner /> }
@@ -41,8 +41,6 @@
41
41
  .editor-post-featured-image__preview {
42
42
  width: 100%;
43
43
  padding: 0;
44
- transition: all 0.1s ease-out;
45
- @include reduce-motion("transition");
46
44
  box-shadow: 0 0 0 0 var(--wp-admin-theme-color);
47
45
  overflow: hidden; // Ensure the focus style properly encapsulates the image.
48
46
  outline-offset: -#{$border-width};
@@ -66,6 +64,11 @@
66
64
 
67
65
  .editor-post-featured-image__toggle {
68
66
  box-shadow: inset 0 0 0 $border-width $gray-400;
67
+
68
+ &:focus:not(:disabled) {
69
+ // Allow smooth transition between focused and unfocused box-shadow states.
70
+ box-shadow: 0 0 0 currentColor inset, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
71
+ }
69
72
  }
70
73
 
71
74
  .editor-post-featured-image__actions {
@@ -44,7 +44,7 @@ function PostLastRevision() {
44
44
  icon={ backup }
45
45
  iconPosition="right"
46
46
  text={ sprintf(
47
- /* translators: %s: number of revisions */
47
+ /* translators: %s: number of revisions. */
48
48
  __( 'Revisions (%s)' ),
49
49
  revisionsCount
50
50
  ) }
@@ -16,7 +16,7 @@ exports[`PostSavedState returns a disabled button if the post is not saveable 1`
16
16
  xmlns="http://www.w3.org/2000/svg"
17
17
  >
18
18
  <path
19
- d="M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"
19
+ d="M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z"
20
20
  />
21
21
  </svg>
22
22
  </button>
@@ -48,7 +48,7 @@ export function getFullPostScheduleLabel( dateAttribute ) {
48
48
 
49
49
  const timezoneAbbreviation = getTimezoneAbbreviation();
50
50
  const formattedDate = dateI18n(
51
- // translators: If using a space between 'g:i' and 'a', use a non-breaking space.
51
+ // translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.
52
52
  _x( 'F j, Y g:i\xa0a', 'post schedule full date format' ),
53
53
  date
54
54
  );
@@ -35,23 +35,23 @@ function setupUseSelectMock( { hasStickyAction, postType } ) {
35
35
  describe( 'PostSticky', () => {
36
36
  it( 'should not render anything if the post type is not "post"', () => {
37
37
  setupUseSelectMock( { hasStickyAction: true, postType: 'page' } );
38
- render( <PostStickyCheck>Can Toggle Sticky</PostStickyCheck> );
38
+ render( <PostStickyCheck>Can Show Sticky</PostStickyCheck> );
39
39
  expect(
40
- screen.queryByText( 'Can Toggle Sticky' )
40
+ screen.queryByText( 'Can Show Sticky' )
41
41
  ).not.toBeInTheDocument();
42
42
  } );
43
43
 
44
44
  it( "should not render anything if post doesn't support stickying", () => {
45
45
  setupUseSelectMock( { hasStickyAction: false, postType: 'post' } );
46
- render( <PostStickyCheck>Can Toggle Sticky</PostStickyCheck> );
46
+ render( <PostStickyCheck>Can Show Sticky</PostStickyCheck> );
47
47
  expect(
48
- screen.queryByText( 'Can Toggle Sticky' )
48
+ screen.queryByText( 'Can Show Sticky' )
49
49
  ).not.toBeInTheDocument();
50
50
  } );
51
51
 
52
52
  it( 'should render if the post supports stickying', () => {
53
53
  setupUseSelectMock( { hasStickyAction: true, postType: 'post' } );
54
- render( <PostStickyCheck>Can Toggle Sticky</PostStickyCheck> );
55
- expect( screen.getByText( 'Can Toggle Sticky' ) ).toBeVisible();
54
+ render( <PostStickyCheck>Can Show Sticky</PostStickyCheck> );
55
+ expect( screen.getByText( 'Can Show Sticky' ) ).toBeVisible();
56
56
  } );
57
57
  } );
@@ -2,8 +2,12 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { __, _x, sprintf } from '@wordpress/i18n';
5
- import { useEffect, useMemo, useState } from '@wordpress/element';
6
- import { FormTokenField, withFilters } from '@wordpress/components';
5
+ import { Fragment, useEffect, useMemo, useState } from '@wordpress/element';
6
+ import {
7
+ FormTokenField,
8
+ withFilters,
9
+ __experimentalVStack as VStack,
10
+ } from '@wordpress/components';
7
11
  import { useSelect, useDispatch } from '@wordpress/data';
8
12
  import deprecated from '@wordpress/deprecated';
9
13
  import { store as coreStore } from '@wordpress/core-data';
@@ -288,8 +292,15 @@ export function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) {
288
292
  singularName
289
293
  );
290
294
 
295
+ const Wrapper = ( { children } ) =>
296
+ __nextHasNoMarginBottom ? (
297
+ <VStack spacing={ 4 }>{ children }</VStack>
298
+ ) : (
299
+ <Fragment>{ children }</Fragment>
300
+ );
301
+
291
302
  return (
292
- <>
303
+ <Wrapper>
293
304
  <FormTokenField
294
305
  __next40pxDefaultSize
295
306
  value={ values }
@@ -306,7 +317,7 @@ export function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) {
306
317
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
307
318
  />
308
319
  <MostUsedTerms taxonomy={ taxonomy } onSelect={ appendTerm } />
309
- </>
320
+ </Wrapper>
310
321
  );
311
322
  }
312
323