@wordpress/editor 14.17.1 → 14.19.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 (410) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +2 -0
  3. package/build/bindings/pattern-overrides.js +0 -1
  4. package/build/bindings/pattern-overrides.js.map +1 -1
  5. package/build/bindings/post-meta.js +0 -1
  6. package/build/bindings/post-meta.js.map +1 -1
  7. package/build/components/autocompleters/user.js +0 -1
  8. package/build/components/autocompleters/user.js.map +1 -1
  9. package/build/components/block-removal-warnings/index.js +0 -1
  10. package/build/components/block-removal-warnings/index.js.map +1 -1
  11. package/build/components/block-settings-menu/content-only-settings-menu.js +0 -1
  12. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  13. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -1
  14. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  15. package/build/components/collab-sidebar/comments.js +0 -1
  16. package/build/components/collab-sidebar/comments.js.map +1 -1
  17. package/build/components/collab-sidebar/index.js +0 -1
  18. package/build/components/collab-sidebar/index.js.map +1 -1
  19. package/build/components/collab-sidebar/utils.js +0 -1
  20. package/build/components/collab-sidebar/utils.js.map +1 -1
  21. package/build/components/deprecated.js +0 -1
  22. package/build/components/deprecated.js.map +1 -1
  23. package/build/components/document-outline/index.js +16 -17
  24. package/build/components/document-outline/index.js.map +1 -1
  25. package/build/components/editor/index.js +9 -5
  26. package/build/components/editor/index.js.map +1 -1
  27. package/build/components/editor-help/index.native.js +0 -1
  28. package/build/components/editor-help/index.native.js.map +1 -1
  29. package/build/components/editor-notices/index.js +0 -1
  30. package/build/components/editor-notices/index.js.map +1 -1
  31. package/build/components/editor-snackbars/index.js +0 -1
  32. package/build/components/editor-snackbars/index.js.map +1 -1
  33. package/build/components/entities-saved-states/entity-record-item.js +2 -1
  34. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  35. package/build/components/entities-saved-states/entity-type-list.js +2 -2
  36. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  37. package/build/components/entities-saved-states/hooks/use-is-dirty.js +0 -1
  38. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  39. package/build/components/entities-saved-states/index.js +66 -43
  40. package/build/components/entities-saved-states/index.js.map +1 -1
  41. package/build/components/keyboard-shortcut-help-modal/index.js +0 -1
  42. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  43. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -1
  44. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  45. package/build/components/list-view-sidebar/index.js +0 -1
  46. package/build/components/list-view-sidebar/index.js.map +1 -1
  47. package/build/components/local-autosave-monitor/index.js +0 -1
  48. package/build/components/local-autosave-monitor/index.js.map +1 -1
  49. package/build/components/mode-switcher/index.js +0 -1
  50. package/build/components/mode-switcher/index.js.map +1 -1
  51. package/build/components/page-attributes/parent.js +8 -5
  52. package/build/components/page-attributes/parent.js.map +1 -1
  53. package/build/components/post-actions/actions.js +0 -1
  54. package/build/components/post-actions/actions.js.map +1 -1
  55. package/build/components/post-actions/index.js +19 -29
  56. package/build/components/post-actions/index.js.map +1 -1
  57. package/build/components/post-author/check.js +3 -4
  58. package/build/components/post-author/check.js.map +1 -1
  59. package/build/components/post-author/combobox.js +4 -2
  60. package/build/components/post-author/combobox.js.map +1 -1
  61. package/build/components/post-author/hook.js +8 -5
  62. package/build/components/post-author/hook.js.map +1 -1
  63. package/build/components/post-card-panel/index.js +2 -2
  64. package/build/components/post-card-panel/index.js.map +1 -1
  65. package/build/components/post-featured-image/index.js +4 -2
  66. package/build/components/post-featured-image/index.js.map +1 -1
  67. package/build/components/post-fields/index.js +0 -1
  68. package/build/components/post-fields/index.js.map +1 -1
  69. package/build/components/post-format/index.js +0 -1
  70. package/build/components/post-format/index.js.map +1 -1
  71. package/build/components/post-format/panel.js +0 -1
  72. package/build/components/post-format/panel.js.map +1 -1
  73. package/build/components/post-publish-button/index.js +0 -1
  74. package/build/components/post-publish-button/index.js.map +1 -1
  75. package/build/components/post-publish-panel/maybe-category-panel.js +2 -4
  76. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  77. package/build/components/post-publish-panel/maybe-post-format-panel.js +0 -1
  78. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  79. package/build/components/post-publish-panel/maybe-tags-panel.js +1 -1
  80. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  81. package/build/components/post-publish-panel/maybe-upload-media.js +0 -1
  82. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  83. package/build/components/post-publish-panel/media-util.js +0 -1
  84. package/build/components/post-publish-panel/media-util.js.map +1 -1
  85. package/build/components/post-saved-state/index.js +0 -1
  86. package/build/components/post-saved-state/index.js.map +1 -1
  87. package/build/components/post-schedule/index.js +0 -1
  88. package/build/components/post-schedule/index.js.map +1 -1
  89. package/build/components/post-taxonomies/check.js +1 -1
  90. package/build/components/post-taxonomies/check.js.map +1 -1
  91. package/build/components/post-taxonomies/flat-term-selector.js +2 -3
  92. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  93. package/build/components/post-taxonomies/hierarchical-term-selector.js +2 -3
  94. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  95. package/build/components/post-taxonomies/index.js +1 -2
  96. package/build/components/post-taxonomies/index.js.map +1 -1
  97. package/build/components/post-taxonomies/most-used-terms.js +0 -1
  98. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  99. package/build/components/post-template/block-theme.js +68 -48
  100. package/build/components/post-template/block-theme.js.map +1 -1
  101. package/build/components/post-template/classic-theme.js +30 -19
  102. package/build/components/post-template/classic-theme.js.map +1 -1
  103. package/build/components/post-template/create-new-template-modal.js +3 -1
  104. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  105. package/build/components/post-template/panel.js +3 -11
  106. package/build/components/post-template/panel.js.map +1 -1
  107. package/build/components/post-template/swap-template-button.js +0 -1
  108. package/build/components/post-template/swap-template-button.js.map +1 -1
  109. package/build/components/post-transform-panel/hooks.js +0 -1
  110. package/build/components/post-transform-panel/hooks.js.map +1 -1
  111. package/build/components/post-type-support-check/index.js +0 -1
  112. package/build/components/post-type-support-check/index.js.map +1 -1
  113. package/build/components/preferences-modal/block-visibility.js +2 -2
  114. package/build/components/preferences-modal/block-visibility.js.map +1 -1
  115. package/build/components/preferences-modal/index.js +1 -2
  116. package/build/components/preferences-modal/index.js.map +1 -1
  117. package/build/components/preview-dropdown/index.js +6 -3
  118. package/build/components/preview-dropdown/index.js.map +1 -1
  119. package/build/components/provider/disable-non-page-content-blocks.js +0 -1
  120. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  121. package/build/components/provider/index.js +19 -19
  122. package/build/components/provider/index.js.map +1 -1
  123. package/build/components/provider/index.native.js +0 -1
  124. package/build/components/provider/index.native.js.map +1 -1
  125. package/build/components/provider/use-block-editor-settings.js +0 -1
  126. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  127. package/build/components/sidebar/header.js +1 -1
  128. package/build/components/sidebar/header.js.map +1 -1
  129. package/build/components/sidebar/index.js +1 -2
  130. package/build/components/sidebar/index.js.map +1 -1
  131. package/build/components/start-page-options/index.js +148 -23
  132. package/build/components/start-page-options/index.js.map +1 -1
  133. package/build/components/start-template-options/index.js +0 -1
  134. package/build/components/start-template-options/index.js.map +1 -1
  135. package/build/components/template-part-content-panel/index.js +0 -1
  136. package/build/components/template-part-content-panel/index.js.map +1 -1
  137. package/build/components/theme-support-check/index.js +0 -1
  138. package/build/components/theme-support-check/index.js.map +1 -1
  139. package/build/components/visual-editor/edit-template-blocks-notification.js +1 -1
  140. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  141. package/build/components/visual-editor/use-select-nearest-editable-block.js +0 -1
  142. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  143. package/build/dataviews/store/private-actions.js +0 -1
  144. package/build/dataviews/store/private-actions.js.map +1 -1
  145. package/build/dataviews/store/reducer.js +0 -1
  146. package/build/dataviews/store/reducer.js.map +1 -1
  147. package/build/hooks/custom-sources-backwards-compatibility.js +0 -1
  148. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  149. package/build/hooks/pattern-overrides.js +0 -1
  150. package/build/hooks/pattern-overrides.js.map +1 -1
  151. package/build/store/actions.js +0 -1
  152. package/build/store/actions.js.map +1 -1
  153. package/build/store/private-actions.js +29 -3
  154. package/build/store/private-actions.js.map +1 -1
  155. package/build/store/private-selectors.js +44 -1
  156. package/build/store/private-selectors.js.map +1 -1
  157. package/build/store/reducer.js +0 -1
  158. package/build/store/reducer.js.map +1 -1
  159. package/build/store/reducer.native.js +0 -1
  160. package/build/store/reducer.native.js.map +1 -1
  161. package/build/store/selectors.js +0 -1
  162. package/build/store/selectors.js.map +1 -1
  163. package/build/utils/get-template-info.js +0 -1
  164. package/build/utils/get-template-info.js.map +1 -1
  165. package/build/utils/media-upload/index.js +5 -2
  166. package/build/utils/media-upload/index.js.map +1 -1
  167. package/build/utils/terms.js +0 -1
  168. package/build/utils/terms.js.map +1 -1
  169. package/build-module/bindings/pattern-overrides.js +0 -1
  170. package/build-module/bindings/pattern-overrides.js.map +1 -1
  171. package/build-module/bindings/post-meta.js +0 -1
  172. package/build-module/bindings/post-meta.js.map +1 -1
  173. package/build-module/components/autocompleters/user.js +0 -1
  174. package/build-module/components/autocompleters/user.js.map +1 -1
  175. package/build-module/components/block-removal-warnings/index.js +0 -1
  176. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  177. package/build-module/components/block-settings-menu/content-only-settings-menu.js +0 -1
  178. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  179. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -1
  180. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  181. package/build-module/components/collab-sidebar/comments.js +0 -1
  182. package/build-module/components/collab-sidebar/comments.js.map +1 -1
  183. package/build-module/components/collab-sidebar/index.js +0 -1
  184. package/build-module/components/collab-sidebar/index.js.map +1 -1
  185. package/build-module/components/collab-sidebar/utils.js +0 -1
  186. package/build-module/components/collab-sidebar/utils.js.map +1 -1
  187. package/build-module/components/deprecated.js +0 -1
  188. package/build-module/components/deprecated.js.map +1 -1
  189. package/build-module/components/document-outline/index.js +17 -18
  190. package/build-module/components/document-outline/index.js.map +1 -1
  191. package/build-module/components/editor/index.js +9 -5
  192. package/build-module/components/editor/index.js.map +1 -1
  193. package/build-module/components/editor-help/index.native.js +0 -1
  194. package/build-module/components/editor-help/index.native.js.map +1 -1
  195. package/build-module/components/editor-notices/index.js +0 -1
  196. package/build-module/components/editor-notices/index.js.map +1 -1
  197. package/build-module/components/editor-snackbars/index.js +0 -1
  198. package/build-module/components/editor-snackbars/index.js.map +1 -1
  199. package/build-module/components/entities-saved-states/entity-record-item.js +2 -1
  200. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  201. package/build-module/components/entities-saved-states/entity-type-list.js +2 -2
  202. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  203. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +0 -1
  204. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  205. package/build-module/components/entities-saved-states/index.js +67 -44
  206. package/build-module/components/entities-saved-states/index.js.map +1 -1
  207. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -1
  208. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  209. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -1
  210. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  211. package/build-module/components/list-view-sidebar/index.js +0 -1
  212. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  213. package/build-module/components/local-autosave-monitor/index.js +0 -1
  214. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  215. package/build-module/components/mode-switcher/index.js +0 -1
  216. package/build-module/components/mode-switcher/index.js.map +1 -1
  217. package/build-module/components/page-attributes/parent.js +8 -5
  218. package/build-module/components/page-attributes/parent.js.map +1 -1
  219. package/build-module/components/post-actions/actions.js +0 -1
  220. package/build-module/components/post-actions/actions.js.map +1 -1
  221. package/build-module/components/post-actions/index.js +19 -29
  222. package/build-module/components/post-actions/index.js.map +1 -1
  223. package/build-module/components/post-author/check.js +3 -4
  224. package/build-module/components/post-author/check.js.map +1 -1
  225. package/build-module/components/post-author/combobox.js +4 -2
  226. package/build-module/components/post-author/combobox.js.map +1 -1
  227. package/build-module/components/post-author/hook.js +8 -5
  228. package/build-module/components/post-author/hook.js.map +1 -1
  229. package/build-module/components/post-card-panel/index.js +2 -2
  230. package/build-module/components/post-card-panel/index.js.map +1 -1
  231. package/build-module/components/post-featured-image/index.js +4 -2
  232. package/build-module/components/post-featured-image/index.js.map +1 -1
  233. package/build-module/components/post-fields/index.js +0 -1
  234. package/build-module/components/post-fields/index.js.map +1 -1
  235. package/build-module/components/post-format/index.js +0 -1
  236. package/build-module/components/post-format/index.js.map +1 -1
  237. package/build-module/components/post-format/panel.js +0 -1
  238. package/build-module/components/post-format/panel.js.map +1 -1
  239. package/build-module/components/post-publish-button/index.js +0 -1
  240. package/build-module/components/post-publish-button/index.js.map +1 -1
  241. package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -4
  242. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  243. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +0 -1
  244. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  245. package/build-module/components/post-publish-panel/maybe-tags-panel.js +1 -1
  246. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  247. package/build-module/components/post-publish-panel/maybe-upload-media.js +0 -1
  248. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  249. package/build-module/components/post-publish-panel/media-util.js +0 -1
  250. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  251. package/build-module/components/post-saved-state/index.js +0 -1
  252. package/build-module/components/post-saved-state/index.js.map +1 -1
  253. package/build-module/components/post-schedule/index.js +0 -1
  254. package/build-module/components/post-schedule/index.js.map +1 -1
  255. package/build-module/components/post-taxonomies/check.js +1 -1
  256. package/build-module/components/post-taxonomies/check.js.map +1 -1
  257. package/build-module/components/post-taxonomies/flat-term-selector.js +2 -3
  258. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  259. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +2 -3
  260. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  261. package/build-module/components/post-taxonomies/index.js +1 -2
  262. package/build-module/components/post-taxonomies/index.js.map +1 -1
  263. package/build-module/components/post-taxonomies/most-used-terms.js +0 -1
  264. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  265. package/build-module/components/post-template/block-theme.js +68 -48
  266. package/build-module/components/post-template/block-theme.js.map +1 -1
  267. package/build-module/components/post-template/classic-theme.js +30 -19
  268. package/build-module/components/post-template/classic-theme.js.map +1 -1
  269. package/build-module/components/post-template/create-new-template-modal.js +3 -1
  270. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  271. package/build-module/components/post-template/panel.js +3 -11
  272. package/build-module/components/post-template/panel.js.map +1 -1
  273. package/build-module/components/post-template/swap-template-button.js +0 -1
  274. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  275. package/build-module/components/post-transform-panel/hooks.js +0 -1
  276. package/build-module/components/post-transform-panel/hooks.js.map +1 -1
  277. package/build-module/components/post-type-support-check/index.js +0 -1
  278. package/build-module/components/post-type-support-check/index.js.map +1 -1
  279. package/build-module/components/preferences-modal/block-visibility.js +2 -2
  280. package/build-module/components/preferences-modal/block-visibility.js.map +1 -1
  281. package/build-module/components/preferences-modal/index.js +1 -2
  282. package/build-module/components/preferences-modal/index.js.map +1 -1
  283. package/build-module/components/preview-dropdown/index.js +6 -3
  284. package/build-module/components/preview-dropdown/index.js.map +1 -1
  285. package/build-module/components/provider/disable-non-page-content-blocks.js +0 -1
  286. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  287. package/build-module/components/provider/index.js +19 -19
  288. package/build-module/components/provider/index.js.map +1 -1
  289. package/build-module/components/provider/index.native.js +0 -1
  290. package/build-module/components/provider/index.native.js.map +1 -1
  291. package/build-module/components/provider/use-block-editor-settings.js +0 -1
  292. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  293. package/build-module/components/sidebar/header.js +1 -1
  294. package/build-module/components/sidebar/header.js.map +1 -1
  295. package/build-module/components/sidebar/index.js +1 -2
  296. package/build-module/components/sidebar/index.js.map +1 -1
  297. package/build-module/components/start-page-options/index.js +148 -24
  298. package/build-module/components/start-page-options/index.js.map +1 -1
  299. package/build-module/components/start-template-options/index.js +0 -1
  300. package/build-module/components/start-template-options/index.js.map +1 -1
  301. package/build-module/components/template-part-content-panel/index.js +0 -1
  302. package/build-module/components/template-part-content-panel/index.js.map +1 -1
  303. package/build-module/components/theme-support-check/index.js +0 -1
  304. package/build-module/components/theme-support-check/index.js.map +1 -1
  305. package/build-module/components/visual-editor/edit-template-blocks-notification.js +1 -1
  306. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  307. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +0 -1
  308. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  309. package/build-module/dataviews/store/private-actions.js +0 -1
  310. package/build-module/dataviews/store/private-actions.js.map +1 -1
  311. package/build-module/dataviews/store/reducer.js +0 -1
  312. package/build-module/dataviews/store/reducer.js.map +1 -1
  313. package/build-module/hooks/custom-sources-backwards-compatibility.js +0 -1
  314. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  315. package/build-module/hooks/pattern-overrides.js +0 -1
  316. package/build-module/hooks/pattern-overrides.js.map +1 -1
  317. package/build-module/store/actions.js +0 -1
  318. package/build-module/store/actions.js.map +1 -1
  319. package/build-module/store/private-actions.js +25 -1
  320. package/build-module/store/private-actions.js.map +1 -1
  321. package/build-module/store/private-selectors.js +43 -1
  322. package/build-module/store/private-selectors.js.map +1 -1
  323. package/build-module/store/reducer.js +0 -1
  324. package/build-module/store/reducer.js.map +1 -1
  325. package/build-module/store/reducer.native.js +0 -1
  326. package/build-module/store/reducer.native.js.map +1 -1
  327. package/build-module/store/selectors.js +0 -1
  328. package/build-module/store/selectors.js.map +1 -1
  329. package/build-module/utils/get-template-info.js +0 -1
  330. package/build-module/utils/get-template-info.js.map +1 -1
  331. package/build-module/utils/media-upload/index.js +5 -2
  332. package/build-module/utils/media-upload/index.js.map +1 -1
  333. package/build-module/utils/terms.js +0 -1
  334. package/build-module/utils/terms.js.map +1 -1
  335. package/build-style/style-rtl.css +49 -8
  336. package/build-style/style.css +49 -8
  337. package/build-types/components/document-outline/index.d.ts.map +1 -1
  338. package/build-types/components/editor/index.d.ts.map +1 -1
  339. package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -1
  340. package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -1
  341. package/build-types/components/entities-saved-states/index.d.ts +6 -2
  342. package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
  343. package/build-types/components/page-attributes/parent.d.ts.map +1 -1
  344. package/build-types/components/post-actions/index.d.ts.map +1 -1
  345. package/build-types/components/post-author/check.d.ts.map +1 -1
  346. package/build-types/components/post-author/combobox.d.ts.map +1 -1
  347. package/build-types/components/post-author/hook.d.ts +1 -0
  348. package/build-types/components/post-author/hook.d.ts.map +1 -1
  349. package/build-types/components/post-card-panel/index.d.ts.map +1 -1
  350. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts.map +1 -1
  351. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts.map +1 -1
  352. package/build-types/components/post-taxonomies/check.d.ts.map +1 -1
  353. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  354. package/build-types/components/post-taxonomies/index.d.ts.map +1 -1
  355. package/build-types/components/post-template/block-theme.d.ts.map +1 -1
  356. package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
  357. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
  358. package/build-types/components/post-template/hooks.d.ts +1 -1
  359. package/build-types/components/post-template/hooks.d.ts.map +1 -1
  360. package/build-types/components/post-template/panel.d.ts.map +1 -1
  361. package/build-types/components/preferences-modal/block-visibility.d.ts.map +1 -1
  362. package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
  363. package/build-types/components/provider/index.d.ts.map +1 -1
  364. package/build-types/components/start-page-options/index.d.ts +2 -1
  365. package/build-types/components/start-page-options/index.d.ts.map +1 -1
  366. package/build-types/store/private-actions.d.ts +4 -0
  367. package/build-types/store/private-actions.d.ts.map +1 -1
  368. package/build-types/store/private-selectors.d.ts +13 -0
  369. package/build-types/store/private-selectors.d.ts.map +1 -1
  370. package/build-types/utils/media-upload/index.d.ts +3 -1
  371. package/build-types/utils/media-upload/index.d.ts.map +1 -1
  372. package/package.json +37 -37
  373. package/src/components/document-outline/index.js +22 -16
  374. package/src/components/editor/index.js +24 -13
  375. package/src/components/entities-saved-states/entity-record-item.js +1 -0
  376. package/src/components/entities-saved-states/entity-type-list.js +6 -2
  377. package/src/components/entities-saved-states/index.js +98 -58
  378. package/src/components/entities-saved-states/style.scss +40 -5
  379. package/src/components/page-attributes/parent.js +55 -38
  380. package/src/components/post-actions/index.js +19 -37
  381. package/src/components/post-author/check.js +7 -4
  382. package/src/components/post-author/combobox.js +3 -1
  383. package/src/components/post-author/hook.js +4 -3
  384. package/src/components/post-card-panel/index.js +7 -5
  385. package/src/components/post-featured-image/index.js +2 -0
  386. package/src/components/post-publish-panel/maybe-category-panel.js +6 -2
  387. package/src/components/post-publish-panel/maybe-tags-panel.js +5 -1
  388. package/src/components/post-taxonomies/check.js +5 -3
  389. package/src/components/post-taxonomies/flat-term-selector.js +2 -2
  390. package/src/components/post-taxonomies/hierarchical-term-selector.js +2 -2
  391. package/src/components/post-taxonomies/index.js +5 -1
  392. package/src/components/post-taxonomies/test/index.js +32 -18
  393. package/src/components/post-template/block-theme.js +76 -56
  394. package/src/components/post-template/classic-theme.js +31 -15
  395. package/src/components/post-template/create-new-template-modal.js +1 -0
  396. package/src/components/post-template/panel.js +2 -12
  397. package/src/components/post-text-editor/style.scss +0 -2
  398. package/src/components/preferences-modal/block-visibility.js +2 -1
  399. package/src/components/preferences-modal/index.js +1 -1
  400. package/src/components/preview-dropdown/index.js +8 -6
  401. package/src/components/provider/index.js +21 -30
  402. package/src/components/sidebar/header.js +1 -1
  403. package/src/components/sidebar/index.js +1 -1
  404. package/src/components/start-page-options/index.js +149 -23
  405. package/src/components/start-page-options/style.scss +27 -0
  406. package/src/components/visual-editor/edit-template-blocks-notification.js +1 -1
  407. package/src/store/private-actions.js +33 -0
  408. package/src/store/private-selectors.js +57 -0
  409. package/src/utils/media-upload/index.js +3 -0
  410. package/tsconfig.tsbuildinfo +1 -1
@@ -1,8 +1,16 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { useEffect } from '@wordpress/element';
4
+ import { Flex, FlexItem, Modal, ToggleControl } from '@wordpress/components';
5
+ import { __ } from '@wordpress/i18n';
6
+ import { useState, useMemo, useEffect } from '@wordpress/element';
7
+ import {
8
+ store as blockEditorStore,
9
+ __experimentalBlockPatternsList as BlockPatternsList,
10
+ } from '@wordpress/block-editor';
5
11
  import { useSelect, useDispatch } from '@wordpress/data';
12
+ import { store as coreStore } from '@wordpress/core-data';
13
+ import { __unstableSerializeAndClean } from '@wordpress/blocks';
6
14
  import { store as preferencesStore } from '@wordpress/preferences';
7
15
  import { store as interfaceStore } from '@wordpress/interface';
8
16
 
@@ -11,11 +19,132 @@ import { store as interfaceStore } from '@wordpress/interface';
11
19
  */
12
20
  import { store as editorStore } from '../../store';
13
21
 
22
+ export function useStartPatterns() {
23
+ // A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,
24
+ // and it has no postTypes declared and the current post type is page or if
25
+ // the current post type is part of the postTypes declared.
26
+ const { blockPatternsWithPostContentBlockType, postType } = useSelect(
27
+ ( select ) => {
28
+ const { getPatternsByBlockTypes, getBlocksByName } =
29
+ select( blockEditorStore );
30
+ const { getCurrentPostType, getRenderingMode } =
31
+ select( editorStore );
32
+ const rootClientId =
33
+ getRenderingMode() === 'post-only'
34
+ ? ''
35
+ : getBlocksByName( 'core/post-content' )?.[ 0 ];
36
+ return {
37
+ blockPatternsWithPostContentBlockType: getPatternsByBlockTypes(
38
+ 'core/post-content',
39
+ rootClientId
40
+ ),
41
+ postType: getCurrentPostType(),
42
+ };
43
+ },
44
+ []
45
+ );
46
+
47
+ return useMemo( () => {
48
+ if ( ! blockPatternsWithPostContentBlockType?.length ) {
49
+ return [];
50
+ }
51
+
52
+ /*
53
+ * Filter patterns without postTypes declared if the current postType is page
54
+ * or patterns that declare the current postType in its post type array.
55
+ */
56
+ return blockPatternsWithPostContentBlockType.filter( ( pattern ) => {
57
+ return (
58
+ ( postType === 'page' && ! pattern.postTypes ) ||
59
+ ( Array.isArray( pattern.postTypes ) &&
60
+ pattern.postTypes.includes( postType ) )
61
+ );
62
+ } );
63
+ }, [ postType, blockPatternsWithPostContentBlockType ] );
64
+ }
65
+
66
+ function PatternSelection( { blockPatterns, onChoosePattern } ) {
67
+ const { editEntityRecord } = useDispatch( coreStore );
68
+ const { postType, postId } = useSelect( ( select ) => {
69
+ const { getCurrentPostType, getCurrentPostId } = select( editorStore );
70
+
71
+ return {
72
+ postType: getCurrentPostType(),
73
+ postId: getCurrentPostId(),
74
+ };
75
+ }, [] );
76
+ return (
77
+ <BlockPatternsList
78
+ blockPatterns={ blockPatterns }
79
+ onClickPattern={ ( _pattern, blocks ) => {
80
+ editEntityRecord( 'postType', postType, postId, {
81
+ blocks,
82
+ content: ( { blocks: blocksForSerialization = [] } ) =>
83
+ __unstableSerializeAndClean( blocksForSerialization ),
84
+ } );
85
+ onChoosePattern();
86
+ } }
87
+ />
88
+ );
89
+ }
90
+
91
+ function StartPageOptionsModal( { onClose } ) {
92
+ const [ showStartPatterns, setShowStartPatterns ] = useState( true );
93
+ const { set: setPreference } = useDispatch( preferencesStore );
94
+ const startPatterns = useStartPatterns();
95
+ const hasStartPattern = startPatterns.length > 0;
96
+
97
+ if ( ! hasStartPattern ) {
98
+ return null;
99
+ }
100
+
101
+ function handleClose() {
102
+ onClose();
103
+ setPreference( 'core', 'enableChoosePatternModal', showStartPatterns );
104
+ }
105
+
106
+ return (
107
+ <Modal
108
+ className="editor-start-page-options__modal"
109
+ title={ __( 'Choose a pattern' ) }
110
+ isFullScreen
111
+ onRequestClose={ handleClose }
112
+ >
113
+ <div className="editor-start-page-options__modal-content">
114
+ <PatternSelection
115
+ blockPatterns={ startPatterns }
116
+ onChoosePattern={ handleClose }
117
+ />
118
+ </div>
119
+ <Flex
120
+ className="editor-start-page-options__modal__actions"
121
+ justify="flex-end"
122
+ expanded={ false }
123
+ >
124
+ <FlexItem>
125
+ <ToggleControl
126
+ __nextHasNoMarginBottom
127
+ checked={ showStartPatterns }
128
+ label={ __( 'Show starter patterns' ) }
129
+ help={ __(
130
+ 'Shows starter patterns when creating a new page.'
131
+ ) }
132
+ onChange={ ( newValue ) => {
133
+ setShowStartPatterns( newValue );
134
+ } }
135
+ />
136
+ </FlexItem>
137
+ </Flex>
138
+ </Modal>
139
+ );
140
+ }
141
+
14
142
  export default function StartPageOptions() {
15
- const { postId, enabled } = useSelect( ( select ) => {
143
+ const [ isOpen, setIsOpen ] = useState( false );
144
+ const { isEditedPostDirty, isEditedPostEmpty } = useSelect( editorStore );
145
+ const { isModalActive } = useSelect( interfaceStore );
146
+ const { enabled, postId } = useSelect( ( select ) => {
16
147
  const { getCurrentPostId, getCurrentPostType } = select( editorStore );
17
- const preferencesModalActive =
18
- select( interfaceStore ).isModalActive( 'editor/preferences' );
19
148
  const choosePatternModalEnabled = select( preferencesStore ).get(
20
149
  'core',
21
150
  'enableChoosePatternModal'
@@ -23,36 +152,33 @@ export default function StartPageOptions() {
23
152
  return {
24
153
  postId: getCurrentPostId(),
25
154
  enabled:
26
- choosePatternModalEnabled &&
27
- ! preferencesModalActive &&
28
- 'page' === getCurrentPostType(),
155
+ choosePatternModalEnabled && 'page' === getCurrentPostType(),
29
156
  };
30
157
  }, [] );
31
- const { isEditedPostDirty, isEditedPostEmpty } = useSelect( editorStore );
32
- const { setIsInserterOpened } = useDispatch( editorStore );
33
158
 
159
+ // Note: The `postId` ensures the effect re-runs when pages are switched without remounting the component.
160
+ // Examples: changing pages in the List View, creating a new page via Command Palette.
34
161
  useEffect( () => {
35
- if ( ! enabled ) {
36
- return;
37
- }
38
-
39
162
  const isFreshPage = ! isEditedPostDirty() && isEditedPostEmpty();
40
- if ( isFreshPage ) {
41
- setIsInserterOpened( {
42
- tab: 'patterns',
43
- category: 'core/starter-content',
44
- } );
163
+ // Prevents immediately opening when features is enabled via preferences modal.
164
+ const isPreferencesModalActive = isModalActive( 'editor/preferences' );
165
+ if ( ! enabled || ! isFreshPage || isPreferencesModalActive ) {
166
+ return;
45
167
  }
46
168
 
47
- // Note: The `postId` ensures the effect re-runs when pages are switched without remounting the component.
48
- // Examples: changing pages in the List View, creating a new page via Command Palette.
169
+ // Open the modal after the initial render for a new page.
170
+ setIsOpen( true );
49
171
  }, [
50
- postId,
51
172
  enabled,
52
- setIsInserterOpened,
173
+ postId,
53
174
  isEditedPostDirty,
54
175
  isEditedPostEmpty,
176
+ isModalActive,
55
177
  ] );
56
178
 
57
- return null;
179
+ if ( ! isOpen ) {
180
+ return null;
181
+ }
182
+
183
+ return <StartPageOptionsModal onClose={ () => setIsOpen( false ) } />;
58
184
  }
@@ -1,3 +1,30 @@
1
+ $actions-height: 92px;
2
+
3
+ .editor-start-page-options__modal {
4
+ .editor-start-page-options__modal__actions {
5
+ position: absolute;
6
+ bottom: 0;
7
+ width: 100%;
8
+ height: $actions-height;
9
+ background-color: $white;
10
+ margin-left: - $grid-unit-40;
11
+ margin-right: - $grid-unit-40;
12
+ padding-left: $grid-unit-40;
13
+ padding-right: $grid-unit-40;
14
+ border-top: 1px solid $gray-300;
15
+ z-index: z-index(".editor-start-page-options__modal__actions");
16
+ }
17
+
18
+ .block-editor-block-patterns-list {
19
+ // Since the actions container is positioned absolutely,
20
+ // this padding bottom ensures that the content wrapper will properly
21
+ // detect overflowing content and start showing scrollbars at the right
22
+ // moment. Without this padding, the content would render under the actions
23
+ // bar without causing the wrapper to show a scrollbar.
24
+ padding-bottom: $actions-height;
25
+ }
26
+ }
27
+
1
28
  // 2 column masonry layout.
2
29
  .editor-start-page-options__modal-content .block-editor-block-patterns-list {
3
30
  column-count: 2;
@@ -94,7 +94,7 @@ export default function EditTemplateBlocksNotification( { contentRef } ) {
94
94
  size="medium"
95
95
  >
96
96
  { __(
97
- 'You’ve tried to select a block that is part of a template, which may be used on other posts and pages. Would you like to edit the template?'
97
+ 'You’ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?'
98
98
  ) }
99
99
  </ConfirmDialog>
100
100
  );
@@ -492,3 +492,36 @@ export const removeTemplates =
492
492
  .createErrorNotice( errorMessage, { type: 'snackbar' } );
493
493
  }
494
494
  };
495
+
496
+ /**
497
+ * Set the default rendering mode preference for the current post type.
498
+ *
499
+ * @param {string} mode The rendering mode to set as default.
500
+ */
501
+ export const setDefaultRenderingMode =
502
+ ( mode ) =>
503
+ ( { select, registry } ) => {
504
+ const postType = select.getCurrentPostType();
505
+ const theme = registry
506
+ .select( coreStore )
507
+ .getCurrentTheme()?.stylesheet;
508
+ const renderingModes =
509
+ registry
510
+ .select( preferencesStore )
511
+ .get( 'core', 'renderingModes' )?.[ theme ] ?? {};
512
+
513
+ if ( renderingModes[ postType ] === mode ) {
514
+ return;
515
+ }
516
+
517
+ const newModes = {
518
+ [ theme ]: {
519
+ ...renderingModes,
520
+ [ postType ]: mode,
521
+ },
522
+ };
523
+
524
+ registry
525
+ .dispatch( preferencesStore )
526
+ .set( 'core', 'renderingModes', newModes );
527
+ };
@@ -16,6 +16,7 @@ import {
16
16
  verse,
17
17
  } from '@wordpress/icons';
18
18
  import { store as coreStore } from '@wordpress/core-data';
19
+ import { store as preferencesStore } from '@wordpress/preferences';
19
20
 
20
21
  /**
21
22
  * Internal dependencies
@@ -34,6 +35,11 @@ const EMPTY_INSERTION_POINT = {
34
35
  filterValue: undefined,
35
36
  };
36
37
 
38
+ /**
39
+ * These are rendering modes that the editor supports.
40
+ */
41
+ const RENDERING_MODES = [ 'post-only', 'template-locked' ];
42
+
37
43
  /**
38
44
  * Get the inserter.
39
45
  *
@@ -215,3 +221,54 @@ export const getPostBlocksByName = createRegistrySelector( ( select ) =>
215
221
  () => [ select( blockEditorStore ).getBlocks() ]
216
222
  )
217
223
  );
224
+
225
+ /**
226
+ * Returns the default rendering mode for a post type by user preference or post type configuration.
227
+ *
228
+ * @param {Object} state Global application state.
229
+ * @param {string} postType The post type.
230
+ *
231
+ * @return {string} The default rendering mode. Returns `undefined` while resolving value.
232
+ */
233
+ export const getDefaultRenderingMode = createRegistrySelector(
234
+ ( select ) => ( state, postType ) => {
235
+ const { getPostType, getCurrentTheme, hasFinishedResolution } =
236
+ select( coreStore );
237
+
238
+ // This needs to be called before `hasFinishedResolution`.
239
+ // eslint-disable-next-line @wordpress/no-unused-vars-before-return
240
+ const currentTheme = getCurrentTheme();
241
+ // eslint-disable-next-line @wordpress/no-unused-vars-before-return
242
+ const postTypeEntity = getPostType( postType );
243
+
244
+ // Wait for the post type and theme resolution.
245
+ if (
246
+ ! hasFinishedResolution( 'getPostType', [ postType ] ) ||
247
+ ! hasFinishedResolution( 'getCurrentTheme' )
248
+ ) {
249
+ return undefined;
250
+ }
251
+
252
+ const theme = currentTheme?.stylesheet;
253
+ const defaultModePreference = select( preferencesStore ).get(
254
+ 'core',
255
+ 'renderingModes'
256
+ )?.[ theme ]?.[ postType ];
257
+ const postTypeDefaultMode = Array.isArray(
258
+ postTypeEntity?.supports?.editor
259
+ )
260
+ ? postTypeEntity.supports.editor.find(
261
+ ( features ) => 'default-mode' in features
262
+ )?.[ 'default-mode' ]
263
+ : undefined;
264
+
265
+ const defaultMode = defaultModePreference || postTypeDefaultMode;
266
+
267
+ // Fallback gracefully to 'post-only' when rendering mode is not supported.
268
+ if ( ! RENDERING_MODES.includes( defaultMode ) ) {
269
+ return 'post-only';
270
+ }
271
+
272
+ return defaultMode;
273
+ }
274
+ );
@@ -28,6 +28,7 @@ const noop = () => {};
28
28
  * @param {Function} $0.onError Function called when an error happens.
29
29
  * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.
30
30
  * @param {Function} $0.onSuccess Function called after the final representation of the file is available.
31
+ * @param {boolean} $0.multiple Whether to allow multiple files to be uploaded.
31
32
  */
32
33
  export default function mediaUpload( {
33
34
  additionalData = {},
@@ -37,6 +38,7 @@ export default function mediaUpload( {
37
38
  onError = noop,
38
39
  onFileChange,
39
40
  onSuccess,
41
+ multiple = true,
40
42
  } ) {
41
43
  const { getCurrentPost, getEditorSettings } = select( editorStore );
42
44
  const {
@@ -92,5 +94,6 @@ export default function mediaUpload( {
92
94
  onError( message );
93
95
  },
94
96
  wpAllowedMimeTypes,
97
+ multiple,
95
98
  } );
96
99
  }