@wordpress/editor 14.5.0 → 14.7.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 (415) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +37 -0
  3. package/build/bindings/post-meta.js +12 -10
  4. package/build/bindings/post-meta.js.map +1 -1
  5. package/build/components/block-manager/index.js +4 -1
  6. package/build/components/block-manager/index.js.map +1 -1
  7. package/build/components/block-settings-menu/content-only-settings-menu.js +5 -8
  8. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  9. package/build/components/create-template-part-modal/index.js +1 -0
  10. package/build/components/create-template-part-modal/index.js.map +1 -1
  11. package/build/components/document-bar/index.js +4 -4
  12. package/build/components/document-bar/index.js.map +1 -1
  13. package/build/components/editor-history/redo.js +4 -1
  14. package/build/components/editor-history/redo.js.map +1 -1
  15. package/build/components/editor-history/undo.js +4 -1
  16. package/build/components/editor-history/undo.js.map +1 -1
  17. package/build/components/editor-interface/index.js +2 -3
  18. package/build/components/editor-interface/index.js.map +1 -1
  19. package/build/components/error-boundary/index.js +4 -1
  20. package/build/components/error-boundary/index.js.map +1 -1
  21. package/build/components/global-styles-provider/index.js +17 -4
  22. package/build/components/global-styles-provider/index.js.map +1 -1
  23. package/build/components/index.js +8 -0
  24. package/build/components/index.js.map +1 -1
  25. package/build/components/inserter-sidebar/index.js +8 -7
  26. package/build/components/inserter-sidebar/index.js.map +1 -1
  27. package/build/components/local-autosave-monitor/index.js +5 -5
  28. package/build/components/local-autosave-monitor/index.js.map +1 -1
  29. package/build/components/page-attributes/parent.js +10 -6
  30. package/build/components/page-attributes/parent.js.map +1 -1
  31. package/build/components/plugin-preview-menu-item/index.js +57 -0
  32. package/build/components/plugin-preview-menu-item/index.js.map +1 -0
  33. package/build/components/post-actions/actions.js +4 -499
  34. package/build/components/post-actions/actions.js.map +1 -1
  35. package/build/components/post-actions/index.js +13 -25
  36. package/build/components/post-actions/index.js.map +1 -1
  37. package/build/components/post-card-panel/index.js +20 -20
  38. package/build/components/post-card-panel/index.js.map +1 -1
  39. package/build/components/post-excerpt/panel.js +4 -1
  40. package/build/components/post-excerpt/panel.js.map +1 -1
  41. package/build/components/post-featured-image/index.js +14 -3
  42. package/build/components/post-featured-image/index.js.map +1 -1
  43. package/build/components/post-format/index.js +4 -1
  44. package/build/components/post-format/index.js.map +1 -1
  45. package/build/components/post-last-revision/index.js +4 -1
  46. package/build/components/post-last-revision/index.js.map +1 -1
  47. package/build/components/post-locked-modal/index.js +12 -3
  48. package/build/components/post-locked-modal/index.js.map +1 -1
  49. package/build/components/post-publish-panel/index.js +4 -1
  50. package/build/components/post-publish-panel/index.js.map +1 -1
  51. package/build/components/post-publish-panel/maybe-post-format-panel.js +4 -1
  52. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  53. package/build/components/post-publish-panel/maybe-upload-media.js +14 -8
  54. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  55. package/build/components/post-publish-panel/postpublish.js +4 -0
  56. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  57. package/build/components/post-slug/index.js +1 -0
  58. package/build/components/post-slug/index.js.map +1 -1
  59. package/build/components/post-status/index.js +4 -2
  60. package/build/components/post-status/index.js.map +1 -1
  61. package/build/components/post-taxonomies/hierarchical-term-selector.js +6 -2
  62. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  63. package/build/components/post-taxonomies/most-used-terms.js +4 -1
  64. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  65. package/build/components/post-template/block-theme.js +13 -4
  66. package/build/components/post-template/block-theme.js.map +1 -1
  67. package/build/components/post-template/classic-theme.js +4 -1
  68. package/build/components/post-template/classic-theme.js.map +1 -1
  69. package/build/components/post-title/index.js +32 -46
  70. package/build/components/post-title/index.js.map +1 -1
  71. package/build/components/post-url/index.js +10 -6
  72. package/build/components/post-url/index.js.map +1 -1
  73. package/build/components/preview-dropdown/index.js +26 -14
  74. package/build/components/preview-dropdown/index.js.map +1 -1
  75. package/build/components/provider/use-block-editor-settings.js +5 -6
  76. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  77. package/build/components/save-publish-panels/index.js +8 -2
  78. package/build/components/save-publish-panels/index.js.map +1 -1
  79. package/build/components/sidebar/post-summary.js +10 -7
  80. package/build/components/sidebar/post-summary.js.map +1 -1
  81. package/build/components/start-template-options/index.js +4 -1
  82. package/build/components/start-template-options/index.js.map +1 -1
  83. package/build/components/table-of-contents/index.js +4 -1
  84. package/build/components/table-of-contents/index.js.map +1 -1
  85. package/build/components/template-content-panel/index.js +1 -1
  86. package/build/components/template-content-panel/index.js.map +1 -1
  87. package/build/components/text-editor/index.js +4 -1
  88. package/build/components/text-editor/index.js.map +1 -1
  89. package/build/components/visual-editor/index.js +1 -6
  90. package/build/components/visual-editor/index.js.map +1 -1
  91. package/build/dataviews/actions/duplicate-pattern.js +48 -0
  92. package/build/dataviews/actions/duplicate-pattern.js.map +1 -0
  93. package/build/dataviews/actions/duplicate-post.js +146 -0
  94. package/build/dataviews/actions/duplicate-post.js.map +1 -0
  95. package/build/dataviews/actions/duplicate-post.native.js +9 -0
  96. package/build/dataviews/actions/duplicate-post.native.js.map +1 -0
  97. package/build/dataviews/actions/duplicate-template-part.js +67 -0
  98. package/build/dataviews/actions/duplicate-template-part.js.map +1 -0
  99. package/build/dataviews/actions/export-pattern.js +2 -0
  100. package/build/dataviews/actions/export-pattern.js.map +1 -1
  101. package/build/dataviews/actions/permanently-delete-post.js +2 -0
  102. package/build/dataviews/actions/permanently-delete-post.js.map +1 -1
  103. package/build/dataviews/actions/rename-post.js +125 -0
  104. package/build/dataviews/actions/rename-post.js.map +1 -0
  105. package/build/dataviews/actions/reorder-page.js +116 -0
  106. package/build/dataviews/actions/reorder-page.js.map +1 -0
  107. package/build/dataviews/actions/reorder-page.native.js +9 -0
  108. package/build/dataviews/actions/reorder-page.native.js.map +1 -0
  109. package/build/dataviews/actions/reset-post.js +9 -3
  110. package/build/dataviews/actions/reset-post.js.map +1 -1
  111. package/build/dataviews/actions/trash-post.js +8 -2
  112. package/build/dataviews/actions/trash-post.js.map +1 -1
  113. package/build/dataviews/actions/utils.js +9 -1
  114. package/build/dataviews/actions/utils.js.map +1 -1
  115. package/build/dataviews/actions/view-post-revisions.js +49 -0
  116. package/build/dataviews/actions/view-post-revisions.js.map +1 -0
  117. package/build/dataviews/actions/view-post.js +36 -0
  118. package/build/dataviews/actions/view-post.js.map +1 -0
  119. package/build/dataviews/fields/index.js +32 -0
  120. package/build/dataviews/fields/index.js.map +1 -0
  121. package/build/dataviews/store/private-actions.js +16 -2
  122. package/build/dataviews/store/private-actions.js.map +1 -1
  123. package/build/dataviews/types.js.map +1 -1
  124. package/build/private-apis.js +2 -2
  125. package/build/private-apis.js.map +1 -1
  126. package/build/store/private-actions.js +2 -2
  127. package/build/store/private-actions.js.map +1 -1
  128. package/build/store/utils/is-template-revertable.js +1 -1
  129. package/build/store/utils/is-template-revertable.js.map +1 -1
  130. package/build-module/bindings/post-meta.js +12 -10
  131. package/build-module/bindings/post-meta.js.map +1 -1
  132. package/build-module/components/block-manager/index.js +4 -1
  133. package/build-module/components/block-manager/index.js.map +1 -1
  134. package/build-module/components/block-settings-menu/content-only-settings-menu.js +6 -9
  135. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  136. package/build-module/components/create-template-part-modal/index.js +1 -0
  137. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  138. package/build-module/components/document-bar/index.js +4 -4
  139. package/build-module/components/document-bar/index.js.map +1 -1
  140. package/build-module/components/editor-history/redo.js +4 -1
  141. package/build-module/components/editor-history/redo.js.map +1 -1
  142. package/build-module/components/editor-history/undo.js +4 -1
  143. package/build-module/components/editor-history/undo.js.map +1 -1
  144. package/build-module/components/editor-interface/index.js +2 -3
  145. package/build-module/components/editor-interface/index.js.map +1 -1
  146. package/build-module/components/error-boundary/index.js +4 -1
  147. package/build-module/components/error-boundary/index.js.map +1 -1
  148. package/build-module/components/global-styles-provider/index.js +17 -4
  149. package/build-module/components/global-styles-provider/index.js.map +1 -1
  150. package/build-module/components/index.js +1 -0
  151. package/build-module/components/index.js.map +1 -1
  152. package/build-module/components/inserter-sidebar/index.js +8 -7
  153. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  154. package/build-module/components/local-autosave-monitor/index.js +5 -5
  155. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  156. package/build-module/components/page-attributes/parent.js +10 -6
  157. package/build-module/components/page-attributes/parent.js.map +1 -1
  158. package/build-module/components/plugin-preview-menu-item/index.js +52 -0
  159. package/build-module/components/plugin-preview-menu-item/index.js.map +1 -0
  160. package/build-module/components/post-actions/actions.js +5 -501
  161. package/build-module/components/post-actions/actions.js.map +1 -1
  162. package/build-module/components/post-actions/index.js +13 -25
  163. package/build-module/components/post-actions/index.js.map +1 -1
  164. package/build-module/components/post-card-panel/index.js +20 -20
  165. package/build-module/components/post-card-panel/index.js.map +1 -1
  166. package/build-module/components/post-excerpt/panel.js +4 -1
  167. package/build-module/components/post-excerpt/panel.js.map +1 -1
  168. package/build-module/components/post-featured-image/index.js +14 -3
  169. package/build-module/components/post-featured-image/index.js.map +1 -1
  170. package/build-module/components/post-format/index.js +4 -1
  171. package/build-module/components/post-format/index.js.map +1 -1
  172. package/build-module/components/post-last-revision/index.js +4 -1
  173. package/build-module/components/post-last-revision/index.js.map +1 -1
  174. package/build-module/components/post-locked-modal/index.js +12 -3
  175. package/build-module/components/post-locked-modal/index.js.map +1 -1
  176. package/build-module/components/post-publish-panel/index.js +4 -1
  177. package/build-module/components/post-publish-panel/index.js.map +1 -1
  178. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +4 -1
  179. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  180. package/build-module/components/post-publish-panel/maybe-upload-media.js +14 -8
  181. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  182. package/build-module/components/post-publish-panel/postpublish.js +4 -0
  183. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  184. package/build-module/components/post-slug/index.js +1 -0
  185. package/build-module/components/post-slug/index.js.map +1 -1
  186. package/build-module/components/post-status/index.js +4 -2
  187. package/build-module/components/post-status/index.js.map +1 -1
  188. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +7 -3
  189. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  190. package/build-module/components/post-taxonomies/most-used-terms.js +4 -1
  191. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  192. package/build-module/components/post-template/block-theme.js +13 -4
  193. package/build-module/components/post-template/block-theme.js.map +1 -1
  194. package/build-module/components/post-template/classic-theme.js +4 -1
  195. package/build-module/components/post-template/classic-theme.js.map +1 -1
  196. package/build-module/components/post-title/index.js +33 -47
  197. package/build-module/components/post-title/index.js.map +1 -1
  198. package/build-module/components/post-url/index.js +11 -7
  199. package/build-module/components/post-url/index.js.map +1 -1
  200. package/build-module/components/preview-dropdown/index.js +26 -14
  201. package/build-module/components/preview-dropdown/index.js.map +1 -1
  202. package/build-module/components/provider/use-block-editor-settings.js +6 -7
  203. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  204. package/build-module/components/save-publish-panels/index.js +8 -2
  205. package/build-module/components/save-publish-panels/index.js.map +1 -1
  206. package/build-module/components/sidebar/post-summary.js +10 -7
  207. package/build-module/components/sidebar/post-summary.js.map +1 -1
  208. package/build-module/components/start-template-options/index.js +4 -1
  209. package/build-module/components/start-template-options/index.js.map +1 -1
  210. package/build-module/components/table-of-contents/index.js +4 -1
  211. package/build-module/components/table-of-contents/index.js.map +1 -1
  212. package/build-module/components/template-content-panel/index.js +1 -1
  213. package/build-module/components/template-content-panel/index.js.map +1 -1
  214. package/build-module/components/text-editor/index.js +4 -1
  215. package/build-module/components/text-editor/index.js.map +1 -1
  216. package/build-module/components/visual-editor/index.js +1 -6
  217. package/build-module/components/visual-editor/index.js.map +1 -1
  218. package/build-module/dataviews/actions/duplicate-pattern.js +39 -0
  219. package/build-module/dataviews/actions/duplicate-pattern.js.map +1 -0
  220. package/build-module/dataviews/actions/duplicate-post.js +139 -0
  221. package/build-module/dataviews/actions/duplicate-post.js.map +1 -0
  222. package/build-module/dataviews/actions/duplicate-post.native.js +3 -0
  223. package/build-module/dataviews/actions/duplicate-post.native.js.map +1 -0
  224. package/build-module/dataviews/actions/duplicate-template-part.js +58 -0
  225. package/build-module/dataviews/actions/duplicate-template-part.js.map +1 -0
  226. package/build-module/dataviews/actions/export-pattern.js +2 -0
  227. package/build-module/dataviews/actions/export-pattern.js.map +1 -1
  228. package/build-module/dataviews/actions/permanently-delete-post.js +3 -0
  229. package/build-module/dataviews/actions/permanently-delete-post.js.map +1 -1
  230. package/build-module/dataviews/actions/rename-post.js +118 -0
  231. package/build-module/dataviews/actions/rename-post.js.map +1 -0
  232. package/build-module/dataviews/actions/reorder-page.js +111 -0
  233. package/build-module/dataviews/actions/reorder-page.js.map +1 -0
  234. package/build-module/dataviews/actions/reorder-page.native.js +3 -0
  235. package/build-module/dataviews/actions/reorder-page.native.js.map +1 -0
  236. package/build-module/dataviews/actions/reset-post.js +9 -3
  237. package/build-module/dataviews/actions/reset-post.js.map +1 -1
  238. package/build-module/dataviews/actions/trash-post.js +8 -2
  239. package/build-module/dataviews/actions/trash-post.js.map +1 -1
  240. package/build-module/dataviews/actions/utils.js +7 -1
  241. package/build-module/dataviews/actions/utils.js.map +1 -1
  242. package/build-module/dataviews/actions/view-post-revisions.js +43 -0
  243. package/build-module/dataviews/actions/view-post-revisions.js.map +1 -0
  244. package/build-module/dataviews/actions/view-post.js +30 -0
  245. package/build-module/dataviews/actions/view-post.js.map +1 -0
  246. package/build-module/dataviews/fields/index.js +26 -0
  247. package/build-module/dataviews/fields/index.js.map +1 -0
  248. package/build-module/dataviews/store/private-actions.js +16 -2
  249. package/build-module/dataviews/store/private-actions.js.map +1 -1
  250. package/build-module/dataviews/types.js.map +1 -1
  251. package/build-module/private-apis.js +2 -2
  252. package/build-module/private-apis.js.map +1 -1
  253. package/build-module/store/private-actions.js +2 -2
  254. package/build-module/store/private-actions.js.map +1 -1
  255. package/build-module/store/utils/is-template-revertable.js +1 -1
  256. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  257. package/build-style/style-rtl.css +14 -38
  258. package/build-style/style.css +14 -38
  259. package/build-types/bindings/post-meta.d.ts +0 -3
  260. package/build-types/bindings/post-meta.d.ts.map +1 -1
  261. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +1 -1
  262. package/build-types/components/create-template-part-modal/index.d.ts.map +1 -1
  263. package/build-types/components/editor-history/redo.d.ts.map +1 -1
  264. package/build-types/components/editor-history/undo.d.ts.map +1 -1
  265. package/build-types/components/editor-interface/index.d.ts.map +1 -1
  266. package/build-types/components/error-boundary/index.d.ts.map +1 -1
  267. package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
  268. package/build-types/components/index.d.ts +1 -0
  269. package/build-types/components/index.d.ts.map +1 -1
  270. package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
  271. package/build-types/components/page-attributes/parent.d.ts.map +1 -1
  272. package/build-types/components/plugin-preview-menu-item/index.d.ts +3 -0
  273. package/build-types/components/plugin-preview-menu-item/index.d.ts.map +1 -0
  274. package/build-types/components/post-actions/actions.d.ts +1 -26
  275. package/build-types/components/post-actions/actions.d.ts.map +1 -1
  276. package/build-types/components/post-actions/index.d.ts +3 -2
  277. package/build-types/components/post-actions/index.d.ts.map +1 -1
  278. package/build-types/components/post-card-panel/index.d.ts +4 -2
  279. package/build-types/components/post-card-panel/index.d.ts.map +1 -1
  280. package/build-types/components/post-format/index.d.ts.map +1 -1
  281. package/build-types/components/post-last-revision/index.d.ts.map +1 -1
  282. package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
  283. package/build-types/components/post-publish-panel/index.d.ts.map +1 -1
  284. package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts.map +1 -1
  285. package/build-types/components/post-publish-panel/maybe-upload-media.d.ts.map +1 -1
  286. package/build-types/components/post-slug/index.d.ts.map +1 -1
  287. package/build-types/components/post-status/index.d.ts.map +1 -1
  288. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +1 -17
  289. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  290. package/build-types/components/post-taxonomies/most-used-terms.d.ts.map +1 -1
  291. package/build-types/components/post-template/block-theme.d.ts.map +1 -1
  292. package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
  293. package/build-types/components/post-url/index.d.ts.map +1 -1
  294. package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
  295. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
  296. package/build-types/components/save-publish-panels/index.d.ts.map +1 -1
  297. package/build-types/components/sidebar/post-summary.d.ts.map +1 -1
  298. package/build-types/components/start-template-options/index.d.ts.map +1 -1
  299. package/build-types/components/template-content-panel/index.d.ts.map +1 -1
  300. package/build-types/components/text-editor/index.d.ts.map +1 -1
  301. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  302. package/build-types/dataviews/actions/duplicate-pattern.d.ts +5 -0
  303. package/build-types/dataviews/actions/duplicate-pattern.d.ts.map +1 -0
  304. package/build-types/dataviews/actions/duplicate-post.d.ts +5 -0
  305. package/build-types/dataviews/actions/duplicate-post.d.ts.map +1 -0
  306. package/build-types/dataviews/actions/duplicate-post.native.d.ts +3 -0
  307. package/build-types/dataviews/actions/duplicate-post.native.d.ts.map +1 -0
  308. package/build-types/dataviews/actions/duplicate-template-part.d.ts +5 -0
  309. package/build-types/dataviews/actions/duplicate-template-part.d.ts.map +1 -0
  310. package/build-types/dataviews/actions/export-pattern.d.ts.map +1 -1
  311. package/build-types/dataviews/actions/permanently-delete-post.d.ts.map +1 -1
  312. package/build-types/dataviews/actions/rename-post.d.ts +5 -0
  313. package/build-types/dataviews/actions/rename-post.d.ts.map +1 -0
  314. package/build-types/dataviews/actions/reorder-page.d.ts +8 -0
  315. package/build-types/dataviews/actions/reorder-page.d.ts.map +1 -0
  316. package/build-types/dataviews/actions/reorder-page.native.d.ts +3 -0
  317. package/build-types/dataviews/actions/reorder-page.native.d.ts.map +1 -0
  318. package/build-types/dataviews/actions/reset-post.d.ts.map +1 -1
  319. package/build-types/dataviews/actions/trash-post.d.ts.map +1 -1
  320. package/build-types/dataviews/actions/utils.d.ts +5 -3
  321. package/build-types/dataviews/actions/utils.d.ts.map +1 -1
  322. package/build-types/dataviews/actions/view-post-revisions.d.ts +8 -0
  323. package/build-types/dataviews/actions/view-post-revisions.d.ts.map +1 -0
  324. package/build-types/dataviews/actions/view-post.d.ts +8 -0
  325. package/build-types/dataviews/actions/view-post.d.ts.map +1 -0
  326. package/build-types/dataviews/fields/index.d.ts +8 -0
  327. package/build-types/dataviews/fields/index.d.ts.map +1 -0
  328. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  329. package/build-types/dataviews/types.d.ts +57 -8
  330. package/build-types/dataviews/types.d.ts.map +1 -1
  331. package/build-types/store/private-actions.d.ts.map +1 -1
  332. package/build-types/store/utils/is-template-revertable.d.ts.map +1 -1
  333. package/package.json +36 -36
  334. package/src/bindings/post-meta.js +14 -8
  335. package/src/components/block-manager/index.js +2 -0
  336. package/src/components/block-manager/style.scss +2 -2
  337. package/src/components/block-settings-menu/content-only-settings-menu.js +5 -9
  338. package/src/components/create-template-part-modal/index.js +1 -0
  339. package/src/components/create-template-part-modal/style.scss +1 -1
  340. package/src/components/document-bar/index.js +4 -4
  341. package/src/components/document-outline/style.scss +1 -1
  342. package/src/components/editor-history/redo.js +2 -0
  343. package/src/components/editor-history/undo.js +2 -0
  344. package/src/components/editor-interface/index.js +2 -4
  345. package/src/components/error-boundary/index.js +6 -1
  346. package/src/components/error-boundary/style.native.scss +1 -1
  347. package/src/components/error-boundary/style.scss +1 -1
  348. package/src/components/global-styles-provider/index.js +16 -3
  349. package/src/components/header/style.scss +6 -3
  350. package/src/components/index.js +1 -0
  351. package/src/components/inserter-sidebar/index.js +12 -5
  352. package/src/components/local-autosave-monitor/index.js +6 -6
  353. package/src/components/page-attributes/parent.js +18 -13
  354. package/src/components/plugin-preview-menu-item/index.js +52 -0
  355. package/src/components/post-actions/actions.js +5 -616
  356. package/src/components/post-actions/index.js +24 -34
  357. package/src/components/post-card-panel/index.js +28 -27
  358. package/src/components/post-card-panel/style.scss +1 -1
  359. package/src/components/post-discussion/style.scss +0 -9
  360. package/src/components/post-excerpt/panel.js +2 -0
  361. package/src/components/post-featured-image/index.js +8 -0
  362. package/src/components/post-featured-image/style.scss +1 -2
  363. package/src/components/post-format/index.js +2 -0
  364. package/src/components/post-format/style.scss +0 -6
  365. package/src/components/post-last-revision/index.js +2 -0
  366. package/src/components/post-locked-modal/index.js +14 -2
  367. package/src/components/post-locked-modal/style.scss +1 -1
  368. package/src/components/post-publish-panel/index.js +2 -0
  369. package/src/components/post-publish-panel/maybe-post-format-panel.js +2 -0
  370. package/src/components/post-publish-panel/maybe-upload-media.js +37 -29
  371. package/src/components/post-publish-panel/postpublish.js +8 -2
  372. package/src/components/post-publish-panel/style.scss +3 -1
  373. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +8 -8
  374. package/src/components/post-slug/index.js +1 -0
  375. package/src/components/post-status/index.js +3 -2
  376. package/src/components/post-status/style.scss +0 -19
  377. package/src/components/post-taxonomies/hierarchical-term-selector.js +5 -1
  378. package/src/components/post-taxonomies/most-used-terms.js +2 -0
  379. package/src/components/post-template/block-theme.js +15 -9
  380. package/src/components/post-template/classic-theme.js +2 -0
  381. package/src/components/post-title/index.js +30 -41
  382. package/src/components/post-url/index.js +17 -9
  383. package/src/components/preview-dropdown/index.js +28 -20
  384. package/src/components/provider/use-block-editor-settings.js +5 -5
  385. package/src/components/resizable-editor/style.scss +2 -2
  386. package/src/components/save-publish-panels/index.js +4 -0
  387. package/src/components/save-publish-panels/style.scss +3 -3
  388. package/src/components/sidebar/post-summary.js +20 -16
  389. package/src/components/site-discussion/style.scss +0 -14
  390. package/src/components/start-template-options/index.js +6 -1
  391. package/src/components/table-of-contents/index.js +2 -0
  392. package/src/components/template-content-panel/index.js +4 -1
  393. package/src/components/text-editor/index.js +2 -0
  394. package/src/components/visual-editor/index.js +2 -9
  395. package/src/dataviews/actions/duplicate-pattern.tsx +40 -0
  396. package/src/dataviews/actions/duplicate-post.native.tsx +3 -0
  397. package/src/dataviews/actions/duplicate-post.tsx +174 -0
  398. package/src/dataviews/actions/duplicate-template-part.tsx +70 -0
  399. package/src/dataviews/actions/export-pattern.tsx +2 -0
  400. package/src/dataviews/actions/permanently-delete-post.tsx +2 -0
  401. package/src/dataviews/actions/rename-post.tsx +146 -0
  402. package/src/dataviews/actions/reorder-page.native.tsx +3 -0
  403. package/src/dataviews/actions/reorder-page.tsx +125 -0
  404. package/src/dataviews/actions/reset-post.tsx +6 -1
  405. package/src/dataviews/actions/trash-post.tsx +4 -0
  406. package/src/dataviews/actions/utils.ts +14 -4
  407. package/src/dataviews/actions/view-post-revisions.tsx +47 -0
  408. package/src/dataviews/actions/view-post.tsx +30 -0
  409. package/src/dataviews/fields/index.ts +26 -0
  410. package/src/dataviews/store/private-actions.ts +42 -1
  411. package/src/dataviews/types.ts +47 -6
  412. package/src/private-apis.js +2 -2
  413. package/src/store/private-actions.js +4 -2
  414. package/src/store/utils/is-template-revertable.js +2 -1
  415. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"permanently-delete-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/permanently-delete-post.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,qBAAqB,EAAE,MAAM,CAAE,mBAAmB,CAmGvD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"permanently-delete-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/permanently-delete-post.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAOnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,qBAAqB,EAAE,MAAM,CAAE,mBAAmB,CAoGvD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Action } from '@wordpress/dataviews';
2
+ import type { PostWithPermissions } from '../types';
3
+ declare const renamePost: Action<PostWithPermissions>;
4
+ export default renamePost;
5
+ //# sourceMappingURL=rename-post.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rename-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/rename-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAkBnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnE,QAAA,MAAM,UAAU,EAAE,MAAM,CAAE,mBAAmB,CAyG5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Action } from '@wordpress/dataviews';
2
+ /**
3
+ * Internal dependencies
4
+ */
5
+ import type { BasePost } from '../types';
6
+ declare const reorderPage: Action<BasePost>;
7
+ export default reorderPage;
8
+ //# sourceMappingURL=reorder-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reorder-page.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/reorder-page.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAoB,MAAM,sBAAsB,CAAC;AAErE;;GAEG;AACH,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAgGxD,QAAA,MAAM,WAAW,EAAE,MAAM,CAAE,QAAQ,CAOlC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const reorderPage: undefined;
2
+ export default reorderPage;
3
+ //# sourceMappingURL=reorder-page.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reorder-page.native.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/reorder-page.native.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,WAAY,CAAC;AAE9B,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"reset-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/reset-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AASnD,OAAO,KAAK,EAAE,IAAI,EAAiB,MAAM,UAAU,CAAC;AAGpD,QAAA,MAAM,SAAS,EAAE,MAAM,CAAE,IAAI,CAkH5B,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"reset-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/reset-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AASnD,OAAO,KAAK,EAAE,IAAI,EAAiB,MAAM,UAAU,CAAC;AAGpD,QAAA,MAAM,SAAS,EAAE,MAAM,CAAE,IAAI,CAuH5B,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"trash-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/trash-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,SAAS,EAAE,MAAM,CAAE,mBAAmB,CA0K3C,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"trash-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/trash-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,SAAS,EAAE,MAAM,CAAE,mBAAmB,CA8K3C,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,5 +1,7 @@
1
- import type { Post, TemplateOrTemplatePart } from '../types';
2
- export declare function isTemplateOrTemplatePart(p: Post): p is TemplateOrTemplatePart;
1
+ import type { Post, TemplatePart, Template } from '../types';
2
+ export declare function isTemplate(post: Post): post is Template;
3
+ export declare function isTemplatePart(post: Post): post is TemplatePart;
4
+ export declare function isTemplateOrTemplatePart(p: Post): p is Template | TemplatePart;
3
5
  export declare function getItemTitle(item: Post): string;
4
6
  /**
5
7
  * Check if a template is removable.
@@ -7,5 +9,5 @@ export declare function getItemTitle(item: Post): string;
7
9
  * @param template The template entity to check.
8
10
  * @return Whether the template is removable.
9
11
  */
10
- export declare function isTemplateRemovable(template: TemplateOrTemplatePart): boolean;
12
+ export declare function isTemplateRemovable(template: Template | TemplatePart): boolean;
11
13
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/utils.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAE7D,wBAAgB,wBAAwB,CACvC,CAAC,EAAE,IAAI,GACL,CAAC,IAAI,sBAAsB,CAE7B;AAED,wBAAgB,YAAY,CAAE,IAAI,EAAE,IAAI,UAWvC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAE,QAAQ,EAAE,sBAAsB,WAYpE"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/utils.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE7D,wBAAgB,UAAU,CAAE,IAAI,EAAE,IAAI,GAAI,IAAI,IAAI,QAAQ,CAEzD;AAED,wBAAgB,cAAc,CAAE,IAAI,EAAE,IAAI,GAAI,IAAI,IAAI,YAAY,CAEjE;AAED,wBAAgB,wBAAwB,CACvC,CAAC,EAAE,IAAI,GACL,CAAC,IAAI,QAAQ,GAAG,YAAY,CAE9B;AAED,wBAAgB,YAAY,CAAE,IAAI,EAAE,IAAI,UAWvC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAE,QAAQ,EAAE,QAAQ,GAAG,YAAY,WAcrE"}
@@ -0,0 +1,8 @@
1
+ import type { Action } from '@wordpress/dataviews';
2
+ /**
3
+ * Internal dependencies
4
+ */
5
+ import type { Post } from '../types';
6
+ declare const viewPostRevisions: Action<Post>;
7
+ export default viewPostRevisions;
8
+ //# sourceMappingURL=view-post-revisions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-post-revisions.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/view-post-revisions.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,QAAA,MAAM,iBAAiB,EAAE,MAAM,CAAE,IAAI,CAgCpC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Action } from '@wordpress/dataviews';
2
+ /**
3
+ * Internal dependencies
4
+ */
5
+ import type { BasePost } from '../types';
6
+ declare const viewPost: Action<BasePost>;
7
+ export default viewPost;
8
+ //# sourceMappingURL=view-post.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-post.d.ts","sourceRoot":"","sources":["../../../src/dataviews/actions/view-post.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,QAAA,MAAM,QAAQ,EAAE,MAAM,CAAE,QAAQ,CAe/B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Field } from '@wordpress/dataviews';
2
+ /**
3
+ * Internal dependencies
4
+ */
5
+ import type { BasePost } from '../types';
6
+ export declare const titleField: Field<BasePost>;
7
+ export declare const orderField: Field<BasePost>;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dataviews/fields/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,eAAO,MAAM,UAAU,EAAE,KAAK,CAAE,QAAQ,CAMvC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAE,QAAQ,CAKvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../../src/dataviews/store/private-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAgBnD,wBAAgB,oBAAoB,CAAE,IAAI,EACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAE,IAAI,CAAE;;;;;EAQtB;AAED,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM;;;;;EAQhB;AAED,wBAAgB,UAAU,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;EAMrD;AAED,eAAO,MAAM,uBAAuB,aACvB,MAAM,oBACI;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,kBAyCtC,CAAC"}
1
+ {"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../../src/dataviews/store/private-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAuBnD,wBAAgB,oBAAoB,CAAE,IAAI,EACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAE,IAAI,CAAE;;;;;EAQtB;AAED,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM;;;;;EAQhB;AAED,wBAAgB,UAAU,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;EAMrD;AAED,eAAO,MAAM,uBAAuB,aACvB,MAAM,oBACI;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,kBA2EtC,CAAC"}
@@ -1,31 +1,74 @@
1
1
  type PostStatus = 'published' | 'draft' | 'pending' | 'private' | 'future' | 'auto-draft' | 'trash';
2
- export interface BasePost {
2
+ export interface CommonPost {
3
3
  status?: PostStatus;
4
4
  title: string | {
5
5
  rendered: string;
6
6
  } | {
7
7
  raw: string;
8
8
  };
9
+ content: string | {
10
+ raw: string;
11
+ rendered: string;
12
+ };
9
13
  type: string;
10
14
  id: string | number;
15
+ blocks?: Object[];
16
+ _links?: Links;
17
+ }
18
+ interface Links {
19
+ 'predecessor-version'?: {
20
+ href: string;
21
+ id: number;
22
+ }[];
23
+ 'version-history'?: {
24
+ href: string;
25
+ count: number;
26
+ }[];
27
+ [key: string]: {
28
+ href: string;
29
+ }[] | undefined;
30
+ }
31
+ export interface BasePost extends CommonPost {
32
+ comment_status?: 'open' | 'closed';
33
+ excerpt?: string | {
34
+ raw: string;
35
+ rendered: string;
36
+ };
37
+ meta?: Record<string, any>;
38
+ parent?: number;
39
+ password?: string;
40
+ template?: string;
41
+ format?: string;
42
+ featured_media?: number;
43
+ menu_order?: number;
44
+ ping_status?: 'open' | 'closed';
45
+ link?: string;
11
46
  }
12
- export interface TemplateOrTemplatePart extends BasePost {
13
- type: 'wp_template' | 'wp_template_part';
47
+ export interface Template extends CommonPost {
48
+ type: 'wp_template';
49
+ is_custom: boolean;
14
50
  source: string;
51
+ origin: string;
52
+ plugin?: string;
15
53
  has_theme_file: boolean;
16
54
  id: string;
17
55
  }
18
- export interface Pattern extends BasePost {
56
+ export interface TemplatePart extends CommonPost {
57
+ type: 'wp_template_part';
58
+ source: string;
59
+ origin: string;
60
+ has_theme_file: boolean;
61
+ id: string;
62
+ area: string;
63
+ }
64
+ export interface Pattern extends CommonPost {
19
65
  slug: string;
20
66
  title: {
21
67
  raw: string;
22
68
  };
23
- content: {
24
- raw: string;
25
- } | string;
26
69
  wp_pattern_sync_status: string;
27
70
  }
28
- export type Post = TemplateOrTemplatePart | Pattern | BasePost;
71
+ export type Post = Template | TemplatePart | Pattern | BasePost;
29
72
  export type PostWithPermissions = Post & {
30
73
  permissions: {
31
74
  delete: boolean;
@@ -34,6 +77,12 @@ export type PostWithPermissions = Post & {
34
77
  };
35
78
  export interface PostType {
36
79
  slug: string;
80
+ viewable: boolean;
81
+ supports?: {
82
+ 'page-attributes'?: boolean;
83
+ title?: boolean;
84
+ revisions?: boolean;
85
+ };
37
86
  }
38
87
  export type CoreDataError = {
39
88
  message?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dataviews/types.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GACZ,WAAW,GACX,OAAO,GACP,SAAS,GACT,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC;AAEX,MAAM,WAAW,QAAQ;IACxB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,I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"mappings":"AAmBA;;;;;;GAMG;AACH,yCAJW,MAAM,GAEL,MAAM,CAOjB;;AAOM,yCAFI,MAAM,OAAC;;;;mBAqChB;AAOK,2CAFI,MAAM,EAAE;;WAoBjB;AAOK,2CAFI,MAAM,EAAE;;WAkBjB;AAWK,0FALJ;IAA2B,MAAM;IACN,kBAAkB;IAClB,cAAc;IACd,KAAK;CAClC;;WAiGC;AAUK,yCALI,MAAM;;;;oBAiIf;AAOK;;oBA0HL"}
1
+ {"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../src/store/private-actions.js"],"names":[],"mappings":"AAmBA;;;;;;GAMG;AACH,yCAJW,MAAM,GAEL,MAAM,CAOjB;;AAOM,yCAFI,MAAM,OAAC;;;;mBAqChB;AAOK,2CAFI,MAAM,EAAE;;WAoBjB;AAOK,2CAFI,MAAM,EAAE;;WAkBjB;AAWK,0FALJ;IAA2B,MAAM;IACN,kBAAkB;IAClB,cAAc;IACd,KAAK;CAClC;;WAmGC;AAUK,yCALI,MAAM;;;;oBAiIf;AAOK;;oBA0HL"}
@@ -1 +1 @@
1
- {"version":3,"file":"is-template-revertable.d.ts","sourceRoot":"","sources":["../../../src/store/utils/is-template-revertable.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,qEAHW,MAAM,GACL,OAAO,CAWlB"}
1
+ {"version":3,"file":"is-template-revertable.d.ts","sourceRoot":"","sources":["../../../src/store/utils/is-template-revertable.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,qEAHW,MAAM,GACL,OAAO,CAYlB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "14.5.0",
3
+ "version": "14.7.0",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -32,40 +32,40 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.16.0",
35
- "@wordpress/a11y": "^4.5.0",
36
- "@wordpress/api-fetch": "^7.5.0",
37
- "@wordpress/blob": "^4.5.0",
38
- "@wordpress/block-editor": "^14.0.0",
39
- "@wordpress/blocks": "^13.5.0",
40
- "@wordpress/commands": "^1.5.0",
41
- "@wordpress/components": "^28.5.0",
42
- "@wordpress/compose": "^7.5.0",
43
- "@wordpress/core-data": "^7.5.0",
44
- "@wordpress/data": "^10.5.0",
45
- "@wordpress/dataviews": "^4.1.0",
46
- "@wordpress/date": "^5.5.0",
47
- "@wordpress/deprecated": "^4.5.0",
48
- "@wordpress/dom": "^4.5.0",
49
- "@wordpress/element": "^6.5.0",
50
- "@wordpress/hooks": "^4.5.0",
51
- "@wordpress/html-entities": "^4.5.0",
52
- "@wordpress/i18n": "^5.5.0",
53
- "@wordpress/icons": "^10.5.0",
54
- "@wordpress/interface": "^6.5.0",
55
- "@wordpress/keyboard-shortcuts": "^5.5.0",
56
- "@wordpress/keycodes": "^4.5.0",
57
- "@wordpress/media-utils": "^5.5.0",
58
- "@wordpress/notices": "^5.5.0",
59
- "@wordpress/patterns": "^2.5.0",
60
- "@wordpress/plugins": "^7.5.0",
61
- "@wordpress/preferences": "^4.5.0",
62
- "@wordpress/private-apis": "^1.5.0",
63
- "@wordpress/reusable-blocks": "^5.5.0",
64
- "@wordpress/rich-text": "^7.5.0",
65
- "@wordpress/server-side-render": "^5.5.0",
66
- "@wordpress/url": "^4.5.0",
67
- "@wordpress/warning": "^3.5.0",
68
- "@wordpress/wordcount": "^4.5.0",
35
+ "@wordpress/a11y": "^4.7.0",
36
+ "@wordpress/api-fetch": "^7.7.0",
37
+ "@wordpress/blob": "^4.7.0",
38
+ "@wordpress/block-editor": "^14.2.0",
39
+ "@wordpress/blocks": "^13.7.0",
40
+ "@wordpress/commands": "^1.7.0",
41
+ "@wordpress/components": "^28.7.0",
42
+ "@wordpress/compose": "^7.7.0",
43
+ "@wordpress/core-data": "^7.7.0",
44
+ "@wordpress/data": "^10.7.0",
45
+ "@wordpress/dataviews": "^4.3.0",
46
+ "@wordpress/date": "^5.7.0",
47
+ "@wordpress/deprecated": "^4.7.0",
48
+ "@wordpress/dom": "^4.7.0",
49
+ "@wordpress/element": "^6.7.0",
50
+ "@wordpress/hooks": "^4.7.0",
51
+ "@wordpress/html-entities": "^4.7.0",
52
+ "@wordpress/i18n": "^5.7.0",
53
+ "@wordpress/icons": "^10.7.0",
54
+ "@wordpress/interface": "^6.7.0",
55
+ "@wordpress/keyboard-shortcuts": "^5.7.0",
56
+ "@wordpress/keycodes": "^4.7.0",
57
+ "@wordpress/media-utils": "^5.7.0",
58
+ "@wordpress/notices": "^5.7.0",
59
+ "@wordpress/patterns": "^2.7.0",
60
+ "@wordpress/plugins": "^7.7.0",
61
+ "@wordpress/preferences": "^4.7.0",
62
+ "@wordpress/private-apis": "^1.7.0",
63
+ "@wordpress/reusable-blocks": "^5.7.0",
64
+ "@wordpress/rich-text": "^7.7.0",
65
+ "@wordpress/server-side-render": "^5.7.0",
66
+ "@wordpress/url": "^4.7.0",
67
+ "@wordpress/warning": "^3.7.0",
68
+ "@wordpress/wordcount": "^4.7.0",
69
69
  "change-case": "^4.1.2",
70
70
  "client-zip": "^2.4.5",
71
71
  "clsx": "^2.1.1",
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "c3101ab024e2bfc85d525c6d247e0d57cafc9fd9"
88
+ "gitHead": "c90d920de07c53dff82c5914635b56fafa503b7f"
89
89
  }
@@ -10,9 +10,6 @@ import { store as editorStore } from '../store';
10
10
 
11
11
  export default {
12
12
  name: 'core/post-meta',
13
- getPlaceholder( { args } ) {
14
- return args.key;
15
- },
16
13
  getValues( { registry, context, bindings } ) {
17
14
  const meta = registry
18
15
  .select( coreDataStore )
@@ -23,7 +20,9 @@ export default {
23
20
  )?.meta;
24
21
  const newValues = {};
25
22
  for ( const [ attributeName, source ] of Object.entries( bindings ) ) {
26
- newValues[ attributeName ] = meta?.[ source.args.key ];
23
+ // Use the key if the value is not set.
24
+ newValues[ attributeName ] =
25
+ meta?.[ source.args.key ] || source.args.key;
27
26
  }
28
27
  return newValues;
29
28
  },
@@ -53,13 +52,20 @@ export default {
53
52
  }
54
53
 
55
54
  // Check that the custom field is not protected and available in the REST API.
56
- const isFieldExposed = !! select( coreDataStore ).getEntityRecord(
55
+ // Empty string or `false` could be a valid value, so we need to check if the field value is undefined.
56
+ const fieldValue = select( coreDataStore ).getEntityRecord(
57
57
  'postType',
58
58
  postType,
59
59
  context?.postId
60
60
  )?.meta?.[ args.key ];
61
61
 
62
- if ( ! isFieldExposed ) {
62
+ if ( fieldValue === undefined ) {
63
+ return false;
64
+ }
65
+ // Check that custom fields metabox is not enabled.
66
+ const areCustomFieldsEnabled =
67
+ select( editorStore ).getEditorSettings().enableCustomFields;
68
+ if ( areCustomFieldsEnabled ) {
63
69
  return false;
64
70
  }
65
71
 
@@ -88,10 +94,10 @@ export default {
88
94
  return null;
89
95
  }
90
96
 
91
- // Remove footnotes from the list of fields
97
+ // Remove footnotes or private keys from the list of fields.
92
98
  return Object.fromEntries(
93
99
  Object.entries( metaFields ).filter(
94
- ( [ key ] ) => key !== 'footnotes'
100
+ ( [ key ] ) => key !== 'footnotes' && key.charAt( 0 ) !== '_'
95
101
  )
96
102
  );
97
103
  },
@@ -67,6 +67,8 @@ function BlockManager( {
67
67
  numberOfHiddenBlocks
68
68
  ) }
69
69
  <Button
70
+ // TODO: Switch to `true` (40px size) if possible
71
+ __next40pxDefaultSize={ false }
70
72
  variant="link"
71
73
  onClick={ () => enableAllBlockTypes( blockTypes ) }
72
74
  >
@@ -9,8 +9,8 @@
9
9
  }
10
10
 
11
11
  .editor-block-manager__disabled-blocks-count {
12
- border: 1px solid $gray-300;
13
- border-width: 1px 0;
12
+ border: $border-width solid $gray-300;
13
+ border-width: $border-width 0;
14
14
  // Cover up horizontal areas off the sides of the box rectangle
15
15
  box-shadow: -$grid-unit-40 0 0 0 $white, $grid-unit-40 0 0 0 $white;
16
16
  padding: $grid-unit-10;
@@ -10,7 +10,7 @@ import {
10
10
  import { store as coreStore } from '@wordpress/core-data';
11
11
  import { __experimentalText as Text, MenuItem } from '@wordpress/components';
12
12
  import { useSelect, useDispatch } from '@wordpress/data';
13
- import { __ } from '@wordpress/i18n';
13
+ import { __, _x } from '@wordpress/i18n';
14
14
 
15
15
  /**
16
16
  * Internal dependencies
@@ -137,27 +137,23 @@ function TemplateLockContentOnlyMenuItems( { clientId, onClose } ) {
137
137
  );
138
138
  const blockDisplayInformation =
139
139
  useBlockDisplayInformation( contentLockingParent );
140
- // Disable reason: We're using a hook here so it has to be on top-level.
141
- // eslint-disable-next-line @wordpress/no-unused-vars-before-return
142
- const { modifyContentLockBlock, selectBlock } = unlock(
143
- useDispatch( blockEditorStore )
144
- );
145
-
140
+ const blockEditorActions = useDispatch( blockEditorStore );
146
141
  if ( ! blockDisplayInformation?.title ) {
147
142
  return null;
148
143
  }
149
144
 
145
+ const { modifyContentLockBlock } = unlock( blockEditorActions );
146
+
150
147
  return (
151
148
  <>
152
149
  <BlockSettingsMenuFirstItem>
153
150
  <MenuItem
154
151
  onClick={ () => {
155
- selectBlock( contentLockingParent );
156
152
  modifyContentLockBlock( contentLockingParent );
157
153
  onClose();
158
154
  } }
159
155
  >
160
- { __( 'Unlock' ) }
156
+ { _x( 'Unlock', 'Unlock content locked blocks' ) }
161
157
  </MenuItem>
162
158
  </BlockSettingsMenuFirstItem>
163
159
  <Text
@@ -143,6 +143,7 @@ export function CreateTemplatePartModalContents( {
143
143
  required
144
144
  />
145
145
  <BaseControl
146
+ __nextHasNoMarginBottom
146
147
  label={ __( 'Area' ) }
147
148
  id={ `editor-create-template-part-modal__area-selection-${ instanceId }` }
148
149
  className="editor-create-template-part-modal__area-base-control"
@@ -5,7 +5,7 @@
5
5
  .editor-create-template-part-modal__area-radio-group {
6
6
  width: 100%;
7
7
  border: $border-width solid $gray-700;
8
- border-radius: 2px;
8
+ border-radius: $radius-small;
9
9
 
10
10
  .components-button.editor-create-template-part-modal__area-radio {
11
11
  display: block;
@@ -120,9 +120,9 @@ export default function DocumentBar( props ) {
120
120
  const title = props.title || entityTitle;
121
121
  const icon = props.icon || templateIcon;
122
122
 
123
- const mounted = useRef( false );
123
+ const mountedRef = useRef( false );
124
124
  useEffect( () => {
125
- mounted.current = true;
125
+ mountedRef.current = true;
126
126
  }, [] );
127
127
 
128
128
  return (
@@ -143,7 +143,7 @@ export default function DocumentBar( props ) {
143
143
  } }
144
144
  size="compact"
145
145
  initial={
146
- mounted.current
146
+ mountedRef.current
147
147
  ? { opacity: 0, transform: 'translateX(15%)' }
148
148
  : false // Don't show entry animation when DocumentBar mounts.
149
149
  }
@@ -170,7 +170,7 @@ export default function DocumentBar( props ) {
170
170
  // Force entry animation when the back button is added or removed.
171
171
  key={ hasBackButton }
172
172
  initial={
173
- mounted.current
173
+ mountedRef.current
174
174
  ? {
175
175
  opacity: 0,
176
176
  transform: hasBackButton
@@ -51,7 +51,7 @@
51
51
  padding: 2px 5px 2px 1px;
52
52
  color: $gray-900;
53
53
  text-align: left;
54
- border-radius: $radius-block-ui;
54
+ border-radius: $radius-small;
55
55
 
56
56
  &:disabled {
57
57
  cursor: default;
@@ -25,6 +25,8 @@ function EditorHistoryRedo( props, ref ) {
25
25
  const { redo } = useDispatch( editorStore );
26
26
  return (
27
27
  <Button
28
+ // TODO: Switch to `true` (40px size) if possible
29
+ __next40pxDefaultSize={ false }
28
30
  { ...props }
29
31
  ref={ ref }
30
32
  icon={ ! isRTL() ? redoIcon : undoIcon }
@@ -21,6 +21,8 @@ function EditorHistoryUndo( props, ref ) {
21
21
  const { undo } = useDispatch( editorStore );
22
22
  return (
23
23
  <Button
24
+ // TODO: Switch to `true` (40px size) if possible
25
+ __next40pxDefaultSize={ false }
24
26
  { ...props }
25
27
  ref={ ref }
26
28
  icon={ ! isRTL() ? undoIcon : redoIcon }
@@ -99,7 +99,6 @@ export default function EditorInterface( {
99
99
  select( blockEditorStore ).__unstableGetEditorMode(),
100
100
  };
101
101
  }, [] );
102
- const isWideViewport = useViewportMatch( 'large' );
103
102
  const isLargeViewport = useViewportMatch( 'medium' );
104
103
  const secondarySidebarLabel = isListViewOpened
105
104
  ? __( 'Document Overview' )
@@ -122,11 +121,10 @@ export default function EditorInterface( {
122
121
  return (
123
122
  <InterfaceSkeleton
124
123
  enableRegionNavigation={ enableRegionNavigation }
125
- isDistractionFree={ isDistractionFree && isWideViewport }
124
+ isDistractionFree={ isDistractionFree }
126
125
  className={ clsx( 'editor-editor-interface', className, {
127
126
  'is-entity-save-view-open': !! entitiesSavedStatesCallback,
128
- 'is-distraction-free':
129
- isDistractionFree && isWideViewport && ! isPreviewMode,
127
+ 'is-distraction-free': isDistractionFree && ! isPreviewMode,
130
128
  } ) }
131
129
  labels={ {
132
130
  ...interfaceLabels,
@@ -29,7 +29,12 @@ function getContent() {
29
29
  function CopyButton( { text, children } ) {
30
30
  const ref = useCopyToClipboard( text );
31
31
  return (
32
- <Button variant="secondary" ref={ ref }>
32
+ <Button
33
+ // TODO: Switch to `true` (40px size) if possible
34
+ __next40pxDefaultSize={ false }
35
+ variant="secondary"
36
+ ref={ ref }
37
+ >
33
38
  { children }
34
39
  </Button>
35
40
  );
@@ -86,7 +86,7 @@
86
86
  }
87
87
 
88
88
  .copy-button__container--secondary {
89
- border: 1px #c6c6c8;
89
+ border: $border-width #c6c6c8;
90
90
  background-color: $white;
91
91
  }
92
92
 
@@ -3,5 +3,5 @@
3
3
  max-width: 780px;
4
4
  padding: 20px;
5
5
  margin-top: 60px;
6
- box-shadow: $shadow-modal;
6
+ box-shadow: $elevation-large;
7
7
  }
@@ -23,10 +23,23 @@ const { GlobalStylesContext, cleanEmptyObject } = unlock(
23
23
 
24
24
  export function mergeBaseAndUserConfigs( base, user ) {
25
25
  return deepmerge( base, user, {
26
- // We only pass as arrays the presets,
27
- // in which case we want the new array of values
28
- // to override the old array (no merging).
26
+ /*
27
+ * We only pass as arrays the presets,
28
+ * in which case we want the new array of values
29
+ * to override the old array (no merging).
30
+ */
29
31
  isMergeableObject: isPlainObject,
32
+ /*
33
+ * Exceptions to the above rule.
34
+ * Background images should be replaced, not merged,
35
+ * as they themselves are specific object definitions for the style.
36
+ */
37
+ customMerge: ( key ) => {
38
+ if ( key === 'backgroundImage' ) {
39
+ return ( baseConfig, userConfig ) => userConfig;
40
+ }
41
+ return undefined;
42
+ },
30
43
  } );
31
44
  }
32
45
 
@@ -228,7 +228,7 @@
228
228
  }
229
229
 
230
230
  .editor-header__post-preview-button {
231
- @include break-small {
231
+ @include break-mobile {
232
232
  display: none;
233
233
  }
234
234
  }
@@ -240,10 +240,13 @@
240
240
 
241
241
  .editor-header {
242
242
  background-color: $white;
243
- border-bottom: 1px solid #e0e0e0;
244
- position: absolute;
245
243
  width: 100%;
246
244
 
245
+ @include break-medium {
246
+ border-bottom: 1px solid #e0e0e0;
247
+ position: absolute;
248
+ }
249
+
247
250
 
248
251
  // hide some parts
249
252
  & > .edit-post-header__settings > .edit-post-header__post-preview-button {