@wordpress/editor 14.8.8 → 14.10.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 (414) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/bindings/api.js +0 -29
  3. package/build/bindings/api.js.map +1 -1
  4. package/build/components/autocompleters/user.js.map +1 -1
  5. package/build/components/block-manager/index.js +2 -2
  6. package/build/components/block-manager/index.js.map +1 -1
  7. package/build/components/block-settings-menu/content-only-settings-menu.js +15 -18
  8. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  9. package/build/components/commands/index.js.map +1 -1
  10. package/build/components/create-template-part-modal/index.js.map +1 -1
  11. package/build/components/create-template-part-modal/utils.js.map +1 -1
  12. package/build/components/document-outline/index.js.map +1 -1
  13. package/build/components/document-outline/item.js.map +1 -1
  14. package/build/components/document-tools/index.js +2 -7
  15. package/build/components/document-tools/index.js.map +1 -1
  16. package/build/components/entities-saved-states/index.js +1 -1
  17. package/build/components/entities-saved-states/index.js.map +1 -1
  18. package/build/components/header/index.js +19 -16
  19. package/build/components/header/index.js.map +1 -1
  20. package/build/components/inserter-sidebar/index.js +8 -9
  21. package/build/components/inserter-sidebar/index.js.map +1 -1
  22. package/build/components/media-categories/index.js.map +1 -1
  23. package/build/components/page-attributes/parent.js +1 -1
  24. package/build/components/page-attributes/parent.js.map +1 -1
  25. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  26. package/build/components/post-actions/index.js.map +1 -1
  27. package/build/components/post-content-information/index.js +1 -1
  28. package/build/components/post-content-information/index.js.map +1 -1
  29. package/build/components/post-featured-image/index.js.map +1 -1
  30. package/build/components/post-format/index.js +1 -1
  31. package/build/components/post-format/index.js.map +1 -1
  32. package/build/components/post-last-revision/index.js +1 -1
  33. package/build/components/post-last-revision/index.js.map +1 -1
  34. package/build/components/post-locked-modal/index.js +2 -2
  35. package/build/components/post-locked-modal/index.js.map +1 -1
  36. package/build/components/post-preview-button/index.js +1 -1
  37. package/build/components/post-preview-button/index.js.map +1 -1
  38. package/build/components/post-publish-button/index.js.map +1 -1
  39. package/build/components/post-publish-panel/maybe-post-format-panel.js +1 -1
  40. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  41. package/build/components/post-publish-panel/maybe-upload-media.js +1 -0
  42. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  43. package/build/components/post-publish-panel/media-util.js +1 -0
  44. package/build/components/post-publish-panel/media-util.js.map +1 -1
  45. package/build/components/post-publish-panel/postpublish.js +1 -1
  46. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  47. package/build/components/post-schedule/label.js.map +1 -1
  48. package/build/components/post-taxonomies/flat-term-selector.js +4 -4
  49. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  50. package/build/components/post-taxonomies/hierarchical-term-selector.js +3 -2
  51. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  52. package/build/components/post-taxonomies/index.js +1 -1
  53. package/build/components/post-taxonomies/index.js.map +1 -1
  54. package/build/components/post-taxonomies/panel.js.map +1 -1
  55. package/build/components/post-template/classic-theme.js +2 -4
  56. package/build/components/post-template/classic-theme.js.map +1 -1
  57. package/build/components/post-text-editor/index.js.map +1 -1
  58. package/build/components/post-title/index.js +15 -19
  59. package/build/components/post-title/index.js.map +1 -1
  60. package/build/components/post-title/index.native.js +2 -2
  61. package/build/components/post-title/index.native.js.map +1 -1
  62. package/build/components/post-url/index.js +76 -63
  63. package/build/components/post-url/index.js.map +1 -1
  64. package/build/components/post-url/panel.js +46 -26
  65. package/build/components/post-url/panel.js.map +1 -1
  66. package/build/components/post-visibility/index.js.map +1 -1
  67. package/build/components/preferences-modal/index.js.map +1 -1
  68. package/build/components/preview-dropdown/index.js.map +1 -1
  69. package/build/components/provider/disable-non-page-content-blocks.js +17 -18
  70. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  71. package/build/components/provider/index.js +1 -1
  72. package/build/components/provider/index.js.map +1 -1
  73. package/build/components/provider/use-post-content-blocks.js +34 -0
  74. package/build/components/provider/use-post-content-blocks.js.map +1 -0
  75. package/build/components/resizable-editor/resize-handle.js +4 -0
  76. package/build/components/resizable-editor/resize-handle.js.map +1 -1
  77. package/build/components/time-to-read/index.js +1 -1
  78. package/build/components/time-to-read/index.js.map +1 -1
  79. package/build/components/visual-editor/index.js.map +1 -1
  80. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  81. package/build/components/zoom-out-toggle/index.js +1 -1
  82. package/build/components/zoom-out-toggle/index.js.map +1 -1
  83. package/build/dataviews/actions/duplicate-template-part.js +1 -1
  84. package/build/dataviews/actions/duplicate-template-part.js.map +1 -1
  85. package/build/dataviews/store/private-actions.js +2 -7
  86. package/build/dataviews/store/private-actions.js.map +1 -1
  87. package/build/private-apis.js +0 -1
  88. package/build/private-apis.js.map +1 -1
  89. package/build/store/actions.js +46 -6
  90. package/build/store/actions.js.map +1 -1
  91. package/build/store/constants.js +1 -0
  92. package/build/store/constants.js.map +1 -1
  93. package/build/store/local-autosave.js.map +1 -1
  94. package/build/store/private-actions.js +7 -6
  95. package/build/store/private-actions.js.map +1 -1
  96. package/build/store/private-selectors.js +3 -3
  97. package/build/store/private-selectors.js.map +1 -1
  98. package/build/store/selectors.js +21 -0
  99. package/build/store/selectors.js.map +1 -1
  100. package/build/utils/media-upload/index.js.map +1 -1
  101. package/build-module/bindings/api.js +1 -29
  102. package/build-module/bindings/api.js.map +1 -1
  103. package/build-module/components/autocompleters/user.js +1 -3
  104. package/build-module/components/autocompleters/user.js.map +1 -1
  105. package/build-module/components/block-manager/category.js +1 -2
  106. package/build-module/components/block-manager/category.js.map +1 -1
  107. package/build-module/components/block-manager/checklist.js +1 -2
  108. package/build-module/components/block-manager/checklist.js.map +1 -1
  109. package/build-module/components/block-manager/index.js +3 -4
  110. package/build-module/components/block-manager/index.js.map +1 -1
  111. package/build-module/components/block-settings-menu/content-only-settings-menu.js +15 -21
  112. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  113. package/build-module/components/blog-title/index.js +1 -3
  114. package/build-module/components/blog-title/index.js.map +1 -1
  115. package/build-module/components/collapsible-block-toolbar/index.js +1 -3
  116. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  117. package/build-module/components/commands/index.js.map +1 -1
  118. package/build-module/components/create-template-part-modal/index.js +1 -2
  119. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  120. package/build-module/components/create-template-part-modal/utils.js.map +1 -1
  121. package/build-module/components/document-bar/index.js +1 -2
  122. package/build-module/components/document-bar/index.js.map +1 -1
  123. package/build-module/components/document-outline/index.js +1 -2
  124. package/build-module/components/document-outline/index.js.map +1 -1
  125. package/build-module/components/document-outline/item.js +1 -2
  126. package/build-module/components/document-outline/item.js.map +1 -1
  127. package/build-module/components/document-tools/index.js +3 -10
  128. package/build-module/components/document-tools/index.js.map +1 -1
  129. package/build-module/components/editor/index.js +1 -3
  130. package/build-module/components/editor/index.js.map +1 -1
  131. package/build-module/components/editor-help/add-blocks.native.js +1 -3
  132. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  133. package/build-module/components/editor-help/customize-blocks.native.js +1 -3
  134. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  135. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +1 -2
  136. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  137. package/build-module/components/editor-help/index.native.js +1 -3
  138. package/build-module/components/editor-help/index.native.js.map +1 -1
  139. package/build-module/components/editor-help/intro-to-blocks.native.js +1 -3
  140. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  141. package/build-module/components/editor-help/move-blocks.native.js +1 -3
  142. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  143. package/build-module/components/editor-help/remove-blocks.native.js +1 -3
  144. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  145. package/build-module/components/editor-help/view-sections.native.js +1 -2
  146. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  147. package/build-module/components/editor-interface/index.js +1 -3
  148. package/build-module/components/editor-interface/index.js.map +1 -1
  149. package/build-module/components/editor-notices/index.js +1 -3
  150. package/build-module/components/editor-notices/index.js.map +1 -1
  151. package/build-module/components/entities-saved-states/entity-record-item.js +1 -3
  152. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  153. package/build-module/components/entities-saved-states/entity-type-list.js +1 -2
  154. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  155. package/build-module/components/entities-saved-states/index.js +2 -3
  156. package/build-module/components/entities-saved-states/index.js.map +1 -1
  157. package/build-module/components/error-boundary/index.native.js +1 -2
  158. package/build-module/components/error-boundary/index.native.js.map +1 -1
  159. package/build-module/components/header/index.js +20 -18
  160. package/build-module/components/header/index.js.map +1 -1
  161. package/build-module/components/inserter-sidebar/index.js +8 -9
  162. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  163. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -2
  164. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  165. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -3
  166. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  167. package/build-module/components/list-view-sidebar/list-view-outline.js +1 -3
  168. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  169. package/build-module/components/media-categories/index.js.map +1 -1
  170. package/build-module/components/more-menu/index.js +1 -3
  171. package/build-module/components/more-menu/index.js.map +1 -1
  172. package/build-module/components/offline-status/index.native.js +1 -2
  173. package/build-module/components/offline-status/index.native.js.map +1 -1
  174. package/build-module/components/page-attributes/parent.js +2 -3
  175. package/build-module/components/page-attributes/parent.js.map +1 -1
  176. package/build-module/components/plugin-document-setting-panel/index.js +1 -3
  177. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  178. package/build-module/components/post-actions/index.js +1 -3
  179. package/build-module/components/post-actions/index.js.map +1 -1
  180. package/build-module/components/post-author/panel.js +1 -2
  181. package/build-module/components/post-author/panel.js.map +1 -1
  182. package/build-module/components/post-card-panel/index.js +1 -2
  183. package/build-module/components/post-card-panel/index.js.map +1 -1
  184. package/build-module/components/post-content-information/index.js +1 -1
  185. package/build-module/components/post-content-information/index.js.map +1 -1
  186. package/build-module/components/post-discussion/panel.js +1 -2
  187. package/build-module/components/post-discussion/panel.js.map +1 -1
  188. package/build-module/components/post-excerpt/panel.js +1 -3
  189. package/build-module/components/post-excerpt/panel.js.map +1 -1
  190. package/build-module/components/post-featured-image/index.js +1 -2
  191. package/build-module/components/post-featured-image/index.js.map +1 -1
  192. package/build-module/components/post-format/index.js +2 -3
  193. package/build-module/components/post-format/index.js.map +1 -1
  194. package/build-module/components/post-format/panel.js +1 -2
  195. package/build-module/components/post-format/panel.js.map +1 -1
  196. package/build-module/components/post-last-revision/index.js +1 -1
  197. package/build-module/components/post-last-revision/index.js.map +1 -1
  198. package/build-module/components/post-locked-modal/index.js +3 -5
  199. package/build-module/components/post-locked-modal/index.js.map +1 -1
  200. package/build-module/components/post-panel-row/index.js +1 -2
  201. package/build-module/components/post-panel-row/index.js.map +1 -1
  202. package/build-module/components/post-preview-button/index.js +2 -4
  203. package/build-module/components/post-preview-button/index.js.map +1 -1
  204. package/build-module/components/post-publish-button/index.js +1 -2
  205. package/build-module/components/post-publish-button/index.js.map +1 -1
  206. package/build-module/components/post-publish-panel/index.js +1 -3
  207. package/build-module/components/post-publish-panel/index.js.map +1 -1
  208. package/build-module/components/post-publish-panel/maybe-category-panel.js +1 -2
  209. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  210. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -3
  211. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  212. package/build-module/components/post-publish-panel/maybe-tags-panel.js +1 -2
  213. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  214. package/build-module/components/post-publish-panel/maybe-upload-media.js +2 -2
  215. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  216. package/build-module/components/post-publish-panel/media-util.js +1 -0
  217. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  218. package/build-module/components/post-publish-panel/postpublish.js +2 -4
  219. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  220. package/build-module/components/post-publish-panel/prepublish.js +1 -3
  221. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  222. package/build-module/components/post-saved-state/index.js +1 -2
  223. package/build-module/components/post-saved-state/index.js.map +1 -1
  224. package/build-module/components/post-schedule/label.js.map +1 -1
  225. package/build-module/components/post-status/index.js +1 -3
  226. package/build-module/components/post-status/index.js.map +1 -1
  227. package/build-module/components/post-switch-to-draft-button/index.js +1 -3
  228. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  229. package/build-module/components/post-taxonomies/flat-term-selector.js +5 -7
  230. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  231. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +4 -4
  232. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  233. package/build-module/components/post-taxonomies/index.js +1 -1
  234. package/build-module/components/post-taxonomies/index.js.map +1 -1
  235. package/build-module/components/post-taxonomies/most-used-terms.js +1 -2
  236. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  237. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  238. package/build-module/components/post-template/block-theme.js +1 -3
  239. package/build-module/components/post-template/block-theme.js.map +1 -1
  240. package/build-module/components/post-template/classic-theme.js +3 -6
  241. package/build-module/components/post-template/classic-theme.js.map +1 -1
  242. package/build-module/components/post-template/create-new-template-modal.js +1 -2
  243. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  244. package/build-module/components/post-template/create-new-template.js +1 -3
  245. package/build-module/components/post-template/create-new-template.js.map +1 -1
  246. package/build-module/components/post-template/swap-template-button.js +1 -3
  247. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  248. package/build-module/components/post-text-editor/index.js +1 -3
  249. package/build-module/components/post-text-editor/index.js.map +1 -1
  250. package/build-module/components/post-title/index.js +15 -19
  251. package/build-module/components/post-title/index.js.map +1 -1
  252. package/build-module/components/post-title/index.native.js +2 -2
  253. package/build-module/components/post-title/index.native.js.map +1 -1
  254. package/build-module/components/post-trash/index.js +1 -2
  255. package/build-module/components/post-trash/index.js.map +1 -1
  256. package/build-module/components/post-url/index.js +78 -66
  257. package/build-module/components/post-url/index.js.map +1 -1
  258. package/build-module/components/post-url/panel.js +48 -28
  259. package/build-module/components/post-url/panel.js.map +1 -1
  260. package/build-module/components/post-visibility/index.js +1 -2
  261. package/build-module/components/post-visibility/index.js.map +1 -1
  262. package/build-module/components/posts-per-page/index.js +1 -3
  263. package/build-module/components/posts-per-page/index.js.map +1 -1
  264. package/build-module/components/preferences-modal/index.js +1 -3
  265. package/build-module/components/preferences-modal/index.js.map +1 -1
  266. package/build-module/components/preview-dropdown/index.js +1 -3
  267. package/build-module/components/preview-dropdown/index.js.map +1 -1
  268. package/build-module/components/provider/disable-non-page-content-blocks.js +17 -18
  269. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  270. package/build-module/components/provider/index.js +2 -4
  271. package/build-module/components/provider/index.js.map +1 -1
  272. package/build-module/components/provider/index.native.js +1 -3
  273. package/build-module/components/provider/index.native.js.map +1 -1
  274. package/build-module/components/provider/use-post-content-blocks.js +27 -0
  275. package/build-module/components/provider/use-post-content-blocks.js.map +1 -0
  276. package/build-module/components/resizable-editor/resize-handle.js +5 -3
  277. package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
  278. package/build-module/components/save-publish-panels/index.js +1 -3
  279. package/build-module/components/save-publish-panels/index.js.map +1 -1
  280. package/build-module/components/sidebar/header.js +1 -2
  281. package/build-module/components/sidebar/header.js.map +1 -1
  282. package/build-module/components/sidebar/index.js +1 -2
  283. package/build-module/components/sidebar/index.js.map +1 -1
  284. package/build-module/components/sidebar/post-summary.js +1 -3
  285. package/build-module/components/sidebar/post-summary.js.map +1 -1
  286. package/build-module/components/site-discussion/index.js +1 -3
  287. package/build-module/components/site-discussion/index.js.map +1 -1
  288. package/build-module/components/start-template-options/index.js +1 -2
  289. package/build-module/components/start-template-options/index.js.map +1 -1
  290. package/build-module/components/table-of-contents/panel.js +1 -3
  291. package/build-module/components/table-of-contents/panel.js.map +1 -1
  292. package/build-module/components/template-part-menu-items/convert-to-template-part.js +1 -3
  293. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  294. package/build-module/components/template-validation-notice/index.js +1 -3
  295. package/build-module/components/template-validation-notice/index.js.map +1 -1
  296. package/build-module/components/text-editor/index.js +1 -2
  297. package/build-module/components/text-editor/index.js.map +1 -1
  298. package/build-module/components/time-to-read/index.js +1 -1
  299. package/build-module/components/time-to-read/index.js.map +1 -1
  300. package/build-module/components/visual-editor/index.js +1 -3
  301. package/build-module/components/visual-editor/index.js.map +1 -1
  302. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  303. package/build-module/components/zoom-out-toggle/index.js +1 -1
  304. package/build-module/components/zoom-out-toggle/index.js.map +1 -1
  305. package/build-module/dataviews/actions/duplicate-template-part.js +1 -1
  306. package/build-module/dataviews/actions/duplicate-template-part.js.map +1 -1
  307. package/build-module/dataviews/store/private-actions.js +4 -8
  308. package/build-module/dataviews/store/private-actions.js.map +1 -1
  309. package/build-module/hooks/pattern-overrides.js +1 -3
  310. package/build-module/hooks/pattern-overrides.js.map +1 -1
  311. package/build-module/private-apis.js +1 -2
  312. package/build-module/private-apis.js.map +1 -1
  313. package/build-module/store/actions.js +44 -6
  314. package/build-module/store/actions.js.map +1 -1
  315. package/build-module/store/constants.js +1 -0
  316. package/build-module/store/constants.js.map +1 -1
  317. package/build-module/store/local-autosave.js.map +1 -1
  318. package/build-module/store/private-actions.js +7 -6
  319. package/build-module/store/private-actions.js.map +1 -1
  320. package/build-module/store/private-selectors.js +2 -2
  321. package/build-module/store/private-selectors.js.map +1 -1
  322. package/build-module/store/selectors.js +21 -0
  323. package/build-module/store/selectors.js.map +1 -1
  324. package/build-module/utils/media-upload/index.js.map +1 -1
  325. package/build-style/style-rtl.css +29 -6
  326. package/build-style/style.css +29 -6
  327. package/build-types/bindings/api.d.ts +0 -13
  328. package/build-types/bindings/api.d.ts.map +1 -1
  329. package/build-types/components/document-tools/index.d.ts.map +1 -1
  330. package/build-types/components/header/index.d.ts.map +1 -1
  331. package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
  332. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  333. package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
  334. package/build-types/components/post-url/index.d.ts.map +1 -1
  335. package/build-types/components/post-url/panel.d.ts.map +1 -1
  336. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
  337. package/build-types/components/provider/index.d.ts.map +1 -1
  338. package/build-types/components/provider/use-post-content-blocks.d.ts +2 -0
  339. package/build-types/components/provider/use-post-content-blocks.d.ts.map +1 -0
  340. package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -1
  341. package/build-types/private-apis.d.ts.map +1 -1
  342. package/build-types/store/actions.d.ts +2 -17
  343. package/build-types/store/actions.d.ts.map +1 -1
  344. package/build-types/store/private-selectors.d.ts +2 -2
  345. package/build-types/store/private-selectors.d.ts.map +1 -1
  346. package/build-types/store/selectors.d.ts +21 -0
  347. package/build-types/store/selectors.d.ts.map +1 -1
  348. package/package.json +38 -38
  349. package/src/bindings/api.js +1 -32
  350. package/src/components/block-settings-menu/content-only-settings-menu.js +19 -19
  351. package/src/components/document-tools/index.js +2 -5
  352. package/src/components/header/index.js +24 -13
  353. package/src/components/inserter-sidebar/index.js +8 -11
  354. package/src/components/post-saved-state/test/__snapshots__/index.js.snap +1 -1
  355. package/src/components/post-taxonomies/hierarchical-term-selector.js +1 -0
  356. package/src/components/post-template/classic-theme.js +1 -2
  357. package/src/components/post-url/index.js +67 -55
  358. package/src/components/post-url/panel.js +57 -33
  359. package/src/components/post-url/style.scss +21 -3
  360. package/src/components/provider/disable-non-page-content-blocks.js +20 -34
  361. package/src/components/provider/index.js +1 -0
  362. package/src/components/provider/use-post-content-blocks.js +42 -0
  363. package/src/components/resizable-editor/resize-handle.js +5 -0
  364. package/src/components/zoom-out-toggle/index.js +1 -1
  365. package/src/dataviews/store/private-actions.ts +7 -7
  366. package/src/private-apis.js +1 -5
  367. package/src/store/actions.js +51 -7
  368. package/src/store/private-selectors.js +2 -2
  369. package/src/store/selectors.js +21 -0
  370. package/src/store/test/actions.js +76 -0
  371. package/src/store/test/reducer.js +0 -22
  372. package/tsconfig.tsbuildinfo +1 -1
  373. package/build/dataviews/actions/delete-post.js +0 -98
  374. package/build/dataviews/actions/delete-post.js.map +0 -1
  375. package/build/dataviews/actions/rename-post.js +0 -125
  376. package/build/dataviews/actions/rename-post.js.map +0 -1
  377. package/build/dataviews/actions/reset-post.js +0 -113
  378. package/build/dataviews/actions/reset-post.js.map +0 -1
  379. package/build/dataviews/actions/restore-post.js +0 -112
  380. package/build/dataviews/actions/restore-post.js.map +0 -1
  381. package/build/dataviews/actions/trash-post.js +0 -144
  382. package/build/dataviews/actions/trash-post.js.map +0 -1
  383. package/build/dataviews/fields/index.js +0 -32
  384. package/build/dataviews/fields/index.js.map +0 -1
  385. package/build-module/dataviews/actions/delete-post.js +0 -89
  386. package/build-module/dataviews/actions/delete-post.js.map +0 -1
  387. package/build-module/dataviews/actions/rename-post.js +0 -118
  388. package/build-module/dataviews/actions/rename-post.js.map +0 -1
  389. package/build-module/dataviews/actions/reset-post.js +0 -106
  390. package/build-module/dataviews/actions/reset-post.js.map +0 -1
  391. package/build-module/dataviews/actions/restore-post.js +0 -104
  392. package/build-module/dataviews/actions/restore-post.js.map +0 -1
  393. package/build-module/dataviews/actions/trash-post.js +0 -137
  394. package/build-module/dataviews/actions/trash-post.js.map +0 -1
  395. package/build-module/dataviews/fields/index.js +0 -26
  396. package/build-module/dataviews/fields/index.js.map +0 -1
  397. package/build-types/dataviews/actions/delete-post.d.ts +0 -5
  398. package/build-types/dataviews/actions/delete-post.d.ts.map +0 -1
  399. package/build-types/dataviews/actions/rename-post.d.ts +0 -5
  400. package/build-types/dataviews/actions/rename-post.d.ts.map +0 -1
  401. package/build-types/dataviews/actions/reset-post.d.ts +0 -5
  402. package/build-types/dataviews/actions/reset-post.d.ts.map +0 -1
  403. package/build-types/dataviews/actions/restore-post.d.ts +0 -5
  404. package/build-types/dataviews/actions/restore-post.d.ts.map +0 -1
  405. package/build-types/dataviews/actions/trash-post.d.ts +0 -5
  406. package/build-types/dataviews/actions/trash-post.d.ts.map +0 -1
  407. package/build-types/dataviews/fields/index.d.ts +0 -8
  408. package/build-types/dataviews/fields/index.d.ts.map +0 -1
  409. package/src/dataviews/actions/delete-post.tsx +0 -109
  410. package/src/dataviews/actions/rename-post.tsx +0 -146
  411. package/src/dataviews/actions/reset-post.tsx +0 -147
  412. package/src/dataviews/actions/restore-post.tsx +0 -134
  413. package/src/dataviews/actions/trash-post.tsx +0 -198
  414. package/src/dataviews/fields/index.ts +0 -26
@@ -411,6 +411,7 @@ export function HierarchicalTermSelector( { slug } ) {
411
411
  __next40pxDefaultSize
412
412
  __nextHasNoMarginBottom
413
413
  label={ filterLabel }
414
+ placeholder={ filterLabel }
414
415
  value={ filterValue }
415
416
  onChange={ setFilter }
416
417
  />
@@ -177,8 +177,7 @@ function PostTemplateDropdownContent( { onClose } ) {
177
177
  { canEdit && onNavigateToEntityRecord && (
178
178
  <p>
179
179
  <Button
180
- // TODO: Switch to `true` (40px size) if possible
181
- __next40pxDefaultSize={ false }
180
+ __next40pxDefaultSize
182
181
  variant="link"
183
182
  onClick={ () => {
184
183
  onNavigateToEntityRecord( {
@@ -17,7 +17,7 @@ import {
17
17
  import { store as noticesStore } from '@wordpress/notices';
18
18
  import { copySmall } from '@wordpress/icons';
19
19
  import { store as coreStore } from '@wordpress/core-data';
20
- import { useCopyToClipboard } from '@wordpress/compose';
20
+ import { useCopyToClipboard, useInstanceId } from '@wordpress/compose';
21
21
 
22
22
  /**
23
23
  * Internal dependencies
@@ -70,25 +70,29 @@ export default function PostURL( { onClose } ) {
70
70
  const { createNotice } = useDispatch( noticesStore );
71
71
  const [ forceEmptyField, setForceEmptyField ] = useState( false );
72
72
  const copyButtonRef = useCopyToClipboard( permalink, () => {
73
- createNotice( 'info', __( 'Copied URL to clipboard.' ), {
73
+ createNotice( 'info', __( 'Copied Permalink to clipboard.' ), {
74
74
  isDismissible: true,
75
75
  type: 'snackbar',
76
76
  } );
77
77
  } );
78
+ const postUrlSlugDescriptionId =
79
+ 'editor-post-url__slug-descriotion-' + useInstanceId( PostURL );
80
+
78
81
  return (
79
82
  <div className="editor-post-url">
80
83
  <InspectorPopoverHeader
81
- title={ __( 'Link' ) }
84
+ title={ __( 'Slug' ) }
82
85
  onClose={ onClose }
83
86
  />
84
87
  <VStack spacing={ 3 }>
85
88
  { isEditable && (
86
- <div>
89
+ <p className="editor-post-url__intro">
87
90
  { createInterpolateElement(
88
91
  __(
89
- 'Customize the last part of the URL. <a>Learn more.</a>'
92
+ '<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>'
90
93
  ),
91
94
  {
95
+ span: <span id={ postUrlSlugDescriptionId } />,
92
96
  a: (
93
97
  <ExternalLink
94
98
  href={ __(
@@ -98,59 +102,67 @@ export default function PostURL( { onClose } ) {
98
102
  ),
99
103
  }
100
104
  ) }
101
- </div>
105
+ </p>
102
106
  ) }
103
107
  <div>
104
108
  { isEditable && (
105
- <InputControl
106
- __next40pxDefaultSize
107
- prefix={
108
- <InputControlPrefixWrapper>
109
- /
110
- </InputControlPrefixWrapper>
111
- }
112
- suffix={
113
- <InputControlSuffixWrapper variant="control">
114
- <Button
115
- icon={ copySmall }
116
- ref={ copyButtonRef }
117
- size="small"
118
- label="Copy"
119
- />
120
- </InputControlSuffixWrapper>
121
- }
122
- label={ __( 'Link' ) }
123
- hideLabelFromVision
124
- value={ forceEmptyField ? '' : postSlug }
125
- autoComplete="off"
126
- spellCheck="false"
127
- type="text"
128
- className="editor-post-url__input"
129
- onChange={ ( newValue ) => {
130
- editPost( { slug: newValue } );
131
- // When we delete the field the permalink gets
132
- // reverted to the original value.
133
- // The forceEmptyField logic allows the user to have
134
- // the field temporarily empty while typing.
135
- if ( ! newValue ) {
136
- if ( ! forceEmptyField ) {
137
- setForceEmptyField( true );
138
- }
139
- return;
109
+ <>
110
+ <InputControl
111
+ __next40pxDefaultSize
112
+ prefix={
113
+ <InputControlPrefixWrapper>
114
+ /
115
+ </InputControlPrefixWrapper>
140
116
  }
141
- if ( forceEmptyField ) {
142
- setForceEmptyField( false );
117
+ suffix={
118
+ <InputControlSuffixWrapper variant="control">
119
+ <Button
120
+ icon={ copySmall }
121
+ ref={ copyButtonRef }
122
+ size="small"
123
+ label="Copy"
124
+ />
125
+ </InputControlSuffixWrapper>
143
126
  }
144
- } }
145
- onBlur={ ( event ) => {
146
- editPost( {
147
- slug: cleanForSlug( event.target.value ),
148
- } );
149
- if ( forceEmptyField ) {
150
- setForceEmptyField( false );
151
- }
152
- } }
153
- help={
127
+ label={ __( 'Slug' ) }
128
+ hideLabelFromVision
129
+ value={ forceEmptyField ? '' : postSlug }
130
+ autoComplete="off"
131
+ spellCheck="false"
132
+ type="text"
133
+ className="editor-post-url__input"
134
+ onChange={ ( newValue ) => {
135
+ editPost( { slug: newValue } );
136
+ // When we delete the field the permalink gets
137
+ // reverted to the original value.
138
+ // The forceEmptyField logic allows the user to have
139
+ // the field temporarily empty while typing.
140
+ if ( ! newValue ) {
141
+ if ( ! forceEmptyField ) {
142
+ setForceEmptyField( true );
143
+ }
144
+ return;
145
+ }
146
+ if ( forceEmptyField ) {
147
+ setForceEmptyField( false );
148
+ }
149
+ } }
150
+ onBlur={ ( event ) => {
151
+ editPost( {
152
+ slug: cleanForSlug(
153
+ event.target.value
154
+ ),
155
+ } );
156
+ if ( forceEmptyField ) {
157
+ setForceEmptyField( false );
158
+ }
159
+ } }
160
+ aria-describedby={ postUrlSlugDescriptionId }
161
+ />
162
+ <p className="editor-post-url__permalink">
163
+ <span className="editor-post-url__permalink-visual-label">
164
+ { __( 'Permalink:' ) }
165
+ </span>
154
166
  <ExternalLink
155
167
  className="editor-post-url__link"
156
168
  href={ postLink }
@@ -166,8 +178,8 @@ export default function PostURL( { onClose } ) {
166
178
  { permalinkSuffix }
167
179
  </span>
168
180
  </ExternalLink>
169
- }
170
- />
181
+ </p>
182
+ </>
171
183
  ) }
172
184
  { ! isEditable && (
173
185
  <ExternalLink
@@ -3,11 +3,7 @@
3
3
  */
4
4
  import { useMemo, useState } from '@wordpress/element';
5
5
  import { useSelect } from '@wordpress/data';
6
- import {
7
- Dropdown,
8
- Button,
9
- __experimentalTruncate as Truncate,
10
- } from '@wordpress/components';
6
+ import { Dropdown, Button, ExternalLink } from '@wordpress/components';
11
7
  import { __, sprintf } from '@wordpress/i18n';
12
8
  import { safeDecodeURIComponent } from '@wordpress/url';
13
9
  import { store as coreStore } from '@wordpress/core-data';
@@ -26,6 +22,20 @@ import { store as editorStore } from '../../store';
26
22
  * @return {JSX.Element} The rendered PostURLPanel component.
27
23
  */
28
24
  export default function PostURLPanel() {
25
+ const { isFrontPage } = useSelect( ( select ) => {
26
+ const { getCurrentPostId } = select( editorStore );
27
+ const { getEditedEntityRecord, canUser } = select( coreStore );
28
+ const siteSettings = canUser( 'read', {
29
+ kind: 'root',
30
+ name: 'site',
31
+ } )
32
+ ? getEditedEntityRecord( 'root', 'site' )
33
+ : undefined;
34
+ const _id = getCurrentPostId();
35
+ return {
36
+ isFrontPage: siteSettings?.page_on_front === _id,
37
+ };
38
+ }, [] );
29
39
  // Use internal state instead of a ref to make sure that the component
30
40
  // re-renders when the popover's anchor updates.
31
41
  const [ popoverAnchor, setPopoverAnchor ] = useState( null );
@@ -42,41 +52,38 @@ export default function PostURLPanel() {
42
52
  [ popoverAnchor ]
43
53
  );
44
54
 
55
+ const label = isFrontPage ? __( 'Link' ) : __( 'Slug' );
56
+
45
57
  return (
46
58
  <PostURLCheck>
47
- <PostPanelRow label={ __( 'Link' ) } ref={ setPopoverAnchor }>
48
- <Dropdown
49
- popoverProps={ popoverProps }
50
- className="editor-post-url__panel-dropdown"
51
- contentClassName="editor-post-url__panel-dialog"
52
- focusOnMount
53
- renderToggle={ ( { isOpen, onToggle } ) => (
54
- <PostURLToggle isOpen={ isOpen } onClick={ onToggle } />
55
- ) }
56
- renderContent={ ( { onClose } ) => (
57
- <PostURL onClose={ onClose } />
58
- ) }
59
- />
59
+ <PostPanelRow label={ label } ref={ setPopoverAnchor }>
60
+ { ! isFrontPage && (
61
+ <Dropdown
62
+ popoverProps={ popoverProps }
63
+ className="editor-post-url__panel-dropdown"
64
+ contentClassName="editor-post-url__panel-dialog"
65
+ focusOnMount
66
+ renderToggle={ ( { isOpen, onToggle } ) => (
67
+ <PostURLToggle
68
+ isOpen={ isOpen }
69
+ onClick={ onToggle }
70
+ />
71
+ ) }
72
+ renderContent={ ( { onClose } ) => (
73
+ <PostURL onClose={ onClose } />
74
+ ) }
75
+ />
76
+ ) }
77
+ { isFrontPage && <FrontPageLink /> }
60
78
  </PostPanelRow>
61
79
  </PostURLCheck>
62
80
  );
63
81
  }
64
82
 
65
83
  function PostURLToggle( { isOpen, onClick } ) {
66
- const { slug, isFrontPage, postLink } = useSelect( ( select ) => {
67
- const { getCurrentPostId, getCurrentPost } = select( editorStore );
68
- const { getEditedEntityRecord, canUser } = select( coreStore );
69
- const siteSettings = canUser( 'read', {
70
- kind: 'root',
71
- name: 'site',
72
- } )
73
- ? getEditedEntityRecord( 'root', 'site' )
74
- : undefined;
75
- const _id = getCurrentPostId();
84
+ const { slug } = useSelect( ( select ) => {
76
85
  return {
77
86
  slug: select( editorStore ).getEditedPostSlug(),
78
- isFrontPage: siteSettings?.page_on_front === _id,
79
- postLink: getCurrentPost()?.link,
80
87
  };
81
88
  }, [] );
82
89
  const decodedSlug = safeDecodeURIComponent( slug );
@@ -90,9 +97,26 @@ function PostURLToggle( { isOpen, onClick } ) {
90
97
  aria-label={ sprintf( __( 'Change link: %s' ), decodedSlug ) }
91
98
  onClick={ onClick }
92
99
  >
93
- <Truncate numberOfLines={ 1 }>
94
- { isFrontPage ? postLink : `/${ decodedSlug }` }
95
- </Truncate>
100
+ <>{ decodedSlug }</>
96
101
  </Button>
97
102
  );
98
103
  }
104
+
105
+ function FrontPageLink() {
106
+ const { postLink } = useSelect( ( select ) => {
107
+ const { getCurrentPost } = select( editorStore );
108
+ return {
109
+ postLink: getCurrentPost()?.link,
110
+ };
111
+ }, [] );
112
+
113
+ return (
114
+ <ExternalLink
115
+ className="editor-post-url__front-page-link"
116
+ href={ postLink }
117
+ target="_blank"
118
+ >
119
+ { postLink }
120
+ </ExternalLink>
121
+ );
122
+ }
@@ -9,14 +9,19 @@
9
9
  }
10
10
 
11
11
  /* rtl:begin:ignore */
12
- .editor-post-url__link {
12
+ .editor-post-url__link,
13
+ .editor-post-url__front-page-link {
13
14
  direction: ltr;
14
15
  word-break: break-word;
15
- margin-top: $grid-unit-05;
16
- color: $gray-700;
17
16
  }
18
17
  /* rtl:end:ignore */
19
18
 
19
+ .editor-post-url__front-page-link {
20
+ // Match padding on tertiary buttons for alignment.
21
+ padding: $grid-unit-15 * 0.5 0 $grid-unit-15 * 0.5 $grid-unit-15;
22
+ }
23
+
24
+
20
25
  .editor-post-url__link-slug {
21
26
  font-weight: 600;
22
27
  }
@@ -30,3 +35,16 @@
30
35
  .editor-post-url__panel-toggle {
31
36
  word-break: break-word;
32
37
  }
38
+
39
+ .editor-post-url__intro {
40
+ margin: 0;
41
+ }
42
+
43
+ .editor-post-url__permalink {
44
+ margin-top: $grid-unit-10;
45
+ margin-bottom: 0;
46
+
47
+ &-visual-label {
48
+ display: block;
49
+ }
50
+ }
@@ -3,52 +3,32 @@
3
3
  */
4
4
  import { useSelect, useRegistry } from '@wordpress/data';
5
5
  import { store as blockEditorStore } from '@wordpress/block-editor';
6
- import { useEffect, useMemo } from '@wordpress/element';
7
- import { applyFilters } from '@wordpress/hooks';
6
+ import { useEffect } from '@wordpress/element';
8
7
 
9
8
  /**
10
9
  * Internal dependencies
11
10
  */
12
- import { store as editorStore } from '../../store';
13
- import { unlock } from '../../lock-unlock';
14
-
15
- const POST_CONTENT_BLOCK_TYPES = [
16
- 'core/post-title',
17
- 'core/post-featured-image',
18
- 'core/post-content',
19
- ];
11
+ import usePostContentBlocks from './use-post-content-blocks';
20
12
 
21
13
  /**
22
14
  * Component that when rendered, makes it so that the site editor allows only
23
15
  * page content to be edited.
24
16
  */
25
17
  export default function DisableNonPageContentBlocks() {
26
- const contentOnlyBlockTypes = useMemo(
27
- () => [
28
- ...applyFilters(
29
- 'editor.postContentBlockTypes',
30
- POST_CONTENT_BLOCK_TYPES
31
- ),
32
- 'core/template-part',
33
- ],
34
- []
35
- );
36
-
37
- // Note that there are two separate subscriptions because the result for each
38
- // returns a new array.
39
- const contentOnlyIds = useSelect(
18
+ const contentOnlyIds = usePostContentBlocks();
19
+ const templateParts = useSelect( ( select ) => {
20
+ const { getBlocksByName } = select( blockEditorStore );
21
+ return getBlocksByName( 'core/template-part' );
22
+ }, [] );
23
+ const disabledIds = useSelect(
40
24
  ( select ) => {
41
- const { getPostBlocksByName } = unlock( select( editorStore ) );
42
- return getPostBlocksByName( contentOnlyBlockTypes );
25
+ const { getBlockOrder } = select( blockEditorStore );
26
+ return templateParts.flatMap( ( clientId ) =>
27
+ getBlockOrder( clientId )
28
+ );
43
29
  },
44
- [ contentOnlyBlockTypes ]
30
+ [ templateParts ]
45
31
  );
46
- const disabledIds = useSelect( ( select ) => {
47
- const { getBlocksByName, getBlockOrder } = select( blockEditorStore );
48
- return getBlocksByName( 'core/template-part' ).flatMap( ( clientId ) =>
49
- getBlockOrder( clientId )
50
- );
51
- }, [] );
52
32
 
53
33
  const registry = useRegistry();
54
34
 
@@ -61,6 +41,9 @@ export default function DisableNonPageContentBlocks() {
61
41
  for ( const clientId of contentOnlyIds ) {
62
42
  setBlockEditingMode( clientId, 'contentOnly' );
63
43
  }
44
+ for ( const clientId of templateParts ) {
45
+ setBlockEditingMode( clientId, 'contentOnly' );
46
+ }
64
47
  for ( const clientId of disabledIds ) {
65
48
  setBlockEditingMode( clientId, 'disabled' );
66
49
  }
@@ -72,12 +55,15 @@ export default function DisableNonPageContentBlocks() {
72
55
  for ( const clientId of contentOnlyIds ) {
73
56
  unsetBlockEditingMode( clientId );
74
57
  }
58
+ for ( const clientId of templateParts ) {
59
+ unsetBlockEditingMode( clientId );
60
+ }
75
61
  for ( const clientId of disabledIds ) {
76
62
  unsetBlockEditingMode( clientId );
77
63
  }
78
64
  } );
79
65
  };
80
- }, [ contentOnlyIds, disabledIds, registry ] );
66
+ }, [ templateParts, contentOnlyIds, disabledIds, registry ] );
81
67
 
82
68
  return null;
83
69
  }
@@ -222,6 +222,7 @@ export const ExperimentalEditorProvider = withRegistryProvider(
222
222
  shouldRenderTemplate,
223
223
  post.id,
224
224
  post.type,
225
+ post.slug,
225
226
  rootLevelPost.type,
226
227
  rootLevelPost.slug,
227
228
  postTypes,
@@ -0,0 +1,42 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useSelect } from '@wordpress/data';
5
+ import { useMemo } from '@wordpress/element';
6
+ import { applyFilters } from '@wordpress/hooks';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import { store as editorStore } from '../../store';
12
+ import { unlock } from '../../lock-unlock';
13
+
14
+ const POST_CONTENT_BLOCK_TYPES = [
15
+ 'core/post-title',
16
+ 'core/post-featured-image',
17
+ 'core/post-content',
18
+ ];
19
+
20
+ export default function usePostContentBlocks() {
21
+ const contentOnlyBlockTypes = useMemo(
22
+ () => [
23
+ ...applyFilters(
24
+ 'editor.postContentBlockTypes',
25
+ POST_CONTENT_BLOCK_TYPES
26
+ ),
27
+ ],
28
+ []
29
+ );
30
+
31
+ // Note that there are two separate subscriptions because the result for each
32
+ // returns a new array.
33
+ const contentOnlyIds = useSelect(
34
+ ( select ) => {
35
+ const { getPostBlocksByName } = unlock( select( editorStore ) );
36
+ return getPostBlocksByName( contentOnlyBlockTypes );
37
+ },
38
+ [ contentOnlyBlockTypes ]
39
+ );
40
+
41
+ return contentOnlyIds;
42
+ }
@@ -15,6 +15,11 @@ export default function ResizeHandle( { direction, resizeWidthBy } ) {
15
15
  function handleKeyDown( event ) {
16
16
  const { keyCode } = event;
17
17
 
18
+ if ( keyCode !== LEFT && keyCode !== RIGHT ) {
19
+ return;
20
+ }
21
+ event.preventDefault();
22
+
18
23
  if (
19
24
  ( direction === 'left' && keyCode === LEFT ) ||
20
25
  ( direction === 'right' && keyCode === RIGHT )
@@ -40,7 +40,7 @@ const ZoomOutToggle = () => {
40
40
  <Button
41
41
  onClick={ handleZoomOut }
42
42
  icon={ zoomOutIcon }
43
- label={ __( 'Toggle Zoom Out' ) }
43
+ label={ __( 'Zoom Out' ) }
44
44
  isPressed={ isZoomOut }
45
45
  size="compact"
46
46
  showTooltip={ ! showIconLabels }
@@ -8,11 +8,6 @@ import { doAction } from '@wordpress/hooks';
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
11
- import duplicateTemplatePart from '../actions/duplicate-template-part';
12
- import resetPost from '../actions/reset-post';
13
- import trashPost from '../actions/trash-post';
14
- import renamePost from '../actions/rename-post';
15
- import restorePost from '../actions/restore-post';
16
11
  import type { PostType } from '../types';
17
12
  import { store as editorStore } from '../../store';
18
13
  import { unlock } from '../../lock-unlock';
@@ -24,8 +19,13 @@ import {
24
19
  reorderPage,
25
20
  exportPattern,
26
21
  permanentlyDeletePost,
22
+ restorePost,
23
+ trashPost,
24
+ renamePost,
25
+ resetPost,
26
+ deletePost,
27
27
  } from '@wordpress/fields';
28
- import deletePost from '../actions/delete-post';
28
+ import duplicateTemplatePart from '../actions/duplicate-template-part';
29
29
 
30
30
  export function registerEntityAction< Item >(
31
31
  kind: string,
@@ -117,8 +117,8 @@ export const registerPostTypeActions =
117
117
  ? reorderPage
118
118
  : undefined,
119
119
  postTypeConfig.slug === 'wp_block' ? exportPattern : undefined,
120
- resetPost,
121
120
  restorePost,
121
+ resetPost,
122
122
  deletePost,
123
123
  trashPost,
124
124
  permanentlyDeletePost,
@@ -23,10 +23,7 @@ import {
23
23
  mergeBaseAndUserConfigs,
24
24
  GlobalStylesProvider,
25
25
  } from './components/global-styles-provider';
26
- import {
27
- registerCoreBlockBindingsSources,
28
- bootstrapBlockBindingsSourcesFromServer,
29
- } from './bindings/api';
26
+ import { registerCoreBlockBindingsSources } from './bindings/api';
30
27
 
31
28
  const { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;
32
29
 
@@ -47,7 +44,6 @@ lock( privateApis, {
47
44
  ViewMoreMenuGroup,
48
45
  ResizableEditor,
49
46
  registerCoreBlockBindingsSources,
50
- bootstrapBlockBindingsSourcesFromServer,
51
47
 
52
48
  // This is a temporary private API while we're updating the site editor to use EditorProvider.
53
49
  interfaceStore,
@@ -30,7 +30,7 @@ import {
30
30
  getNotificationArgumentsForSaveFail,
31
31
  getNotificationArgumentsForTrashFail,
32
32
  } from './utils/notice-builder';
33
-
33
+ import { unlock } from '../lock-unlock';
34
34
  /**
35
35
  * Returns an action generator used in signalling that editor has initialized with
36
36
  * the specified post object and editor settings.
@@ -159,6 +159,29 @@ export function setEditedPost( postType, postId ) {
159
159
  *
160
160
  * @param {Object} edits Post attributes to edit.
161
161
  * @param {Object} options Options for the edit.
162
+ *
163
+ * @example
164
+ * ```js
165
+ * // Update the post title
166
+ * wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } );
167
+ * ```
168
+ *
169
+ * @example
170
+ *```js
171
+ * // Get specific media size based on the featured media ID
172
+ * // Note: change sizes?.large for any registered size
173
+ * const getFeaturedMediaUrl = useSelect( ( select ) => {
174
+ * const getFeaturedMediaId =
175
+ * select( 'core/editor' ).getEditedPostAttribute( 'featured_media' );
176
+ * const getMedia = select( 'core' ).getMedia( getFeaturedMediaId );
177
+ *
178
+ * return (
179
+ * getMedia?.media_details?.sizes?.large?.source_url || getMedia?.source_url || ''
180
+ * );
181
+ * }, [] );
182
+ * ```
183
+ *
184
+ * @return {Object} Action object
162
185
  */
163
186
  export const editPost =
164
187
  ( edits, options ) =>
@@ -255,7 +278,11 @@ export const savePost =
255
278
 
256
279
  if ( ! error ) {
257
280
  try {
258
- await doActionAsync( 'editor.savePost', options );
281
+ await doActionAsync(
282
+ 'editor.savePost',
283
+ { id: previousRecord.id },
284
+ options
285
+ );
259
286
  } catch ( err ) {
260
287
  error = err;
261
288
  }
@@ -741,15 +768,32 @@ export function removeEditorPanel( panelName ) {
741
768
  * use an object.
742
769
  * @param {string} value.rootClientId The root client ID to insert at.
743
770
  * @param {number} value.insertionIndex The index to insert at.
771
+ * @param {string} value.filterValue A query to filter the inserter results.
772
+ * @param {Function} value.onSelect A callback when an item is selected.
773
+ * @param {string} value.tab The tab to open in the inserter.
774
+ * @param {string} value.category The category to initialize in the inserter.
744
775
  *
745
776
  * @return {Object} Action object.
746
777
  */
747
- export function setIsInserterOpened( value ) {
748
- return {
749
- type: 'SET_IS_INSERTER_OPENED',
750
- value,
778
+ export const setIsInserterOpened =
779
+ ( value ) =>
780
+ ( { dispatch, registry } ) => {
781
+ if (
782
+ typeof value === 'object' &&
783
+ value.hasOwnProperty( 'rootClientId' ) &&
784
+ value.hasOwnProperty( 'insertionIndex' )
785
+ ) {
786
+ unlock( registry.dispatch( blockEditorStore ) ).setInsertionPoint( {
787
+ rootClientId: value.rootClientId,
788
+ index: value.insertionIndex,
789
+ } );
790
+ }
791
+
792
+ dispatch( {
793
+ type: 'SET_IS_INSERTER_OPENED',
794
+ value,
795
+ } );
751
796
  };
752
- }
753
797
 
754
798
  /**
755
799
  * Returns an action object used to open/close the list view.
@@ -37,13 +37,13 @@ const EMPTY_INSERTION_POINT = {
37
37
  };
38
38
 
39
39
  /**
40
- * Get the insertion point for the inserter.
40
+ * Get the inserter.
41
41
  *
42
42
  * @param {Object} state Global application state.
43
43
  *
44
44
  * @return {Object} The root client ID, index to insert at and starting filter value.
45
45
  */
46
- export const getInsertionPoint = createRegistrySelector( ( select ) =>
46
+ export const getInserter = createRegistrySelector( ( select ) =>
47
47
  createSelector(
48
48
  ( state ) => {
49
49
  if ( typeof state.blockInserterPanel === 'object' ) {