@wordpress/edit-site 5.30.0 → 5.32.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 (470) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/block-editor/editor-canvas.js +24 -4
  3. package/build/components/block-editor/editor-canvas.js.map +1 -1
  4. package/build/components/block-editor/site-editor-canvas.js +15 -4
  5. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  6. package/build/components/block-editor/use-site-editor-settings.js +1 -1
  7. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  8. package/build/components/editor/index.js +12 -3
  9. package/build/components/editor/index.js.map +1 -1
  10. package/build/components/editor-canvas-container/index.js +1 -2
  11. package/build/components/editor-canvas-container/index.js.map +1 -1
  12. package/build/components/global-styles/background-panel.js +38 -0
  13. package/build/components/global-styles/background-panel.js.map +1 -0
  14. package/build/components/global-styles/color-palette-panel.js +0 -9
  15. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  16. package/build/components/global-styles/font-families.js +1 -1
  17. package/build/components/global-styles/font-families.js.map +1 -1
  18. package/build/components/global-styles/font-library-modal/context.js +53 -17
  19. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  20. package/build/components/global-styles/font-library-modal/font-collection.js +4 -3
  21. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  22. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +3 -2
  23. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  24. package/build/components/global-styles/font-library-modal/installed-fonts.js +1 -1
  25. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  26. package/build/components/global-styles/font-library-modal/upload-fonts.js +44 -10
  27. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  28. package/build/components/global-styles/font-library-modal/utils/index.js +22 -4
  29. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  30. package/build/components/global-styles/font-library-modal/utils/preview-styles.js +3 -0
  31. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  32. package/build/components/global-styles/header.js +1 -1
  33. package/build/components/global-styles/header.js.map +1 -1
  34. package/build/components/global-styles/hooks.js +50 -1
  35. package/build/components/global-styles/hooks.js.map +1 -1
  36. package/build/components/global-styles/palette.js +3 -1
  37. package/build/components/global-styles/palette.js.map +1 -1
  38. package/build/components/global-styles/preview-colors.js +2 -2
  39. package/build/components/global-styles/preview-colors.js.map +1 -1
  40. package/build/components/global-styles/preview-iframe.js +0 -1
  41. package/build/components/global-styles/preview-iframe.js.map +1 -1
  42. package/build/components/global-styles/preview-styles.js +2 -2
  43. package/build/components/global-styles/preview-styles.js.map +1 -1
  44. package/build/components/global-styles/root-menu.js +8 -2
  45. package/build/components/global-styles/root-menu.js.map +1 -1
  46. package/build/components/global-styles/screen-background.js +34 -0
  47. package/build/components/global-styles/screen-background.js.map +1 -0
  48. package/build/components/global-styles/screen-color-palette.js +2 -2
  49. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  50. package/build/components/global-styles/screen-colors.js +5 -10
  51. package/build/components/global-styles/screen-colors.js.map +1 -1
  52. package/build/components/global-styles/screen-style-variations.js +3 -37
  53. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  54. package/build/components/global-styles/screen-typography.js +6 -11
  55. package/build/components/global-styles/screen-typography.js.map +1 -1
  56. package/build/components/global-styles/style-variations-container.js +5 -2
  57. package/build/components/global-styles/style-variations-container.js.map +1 -1
  58. package/build/components/global-styles/typography-elements.js +3 -1
  59. package/build/components/global-styles/typography-elements.js.map +1 -1
  60. package/build/components/global-styles/{preview-typography.js → typography-example.js} +4 -2
  61. package/build/components/global-styles/typography-example.js.map +1 -0
  62. package/build/components/global-styles/typography-preview.js +3 -1
  63. package/build/components/global-styles/typography-preview.js.map +1 -1
  64. package/build/components/global-styles/ui.js +4 -1
  65. package/build/components/global-styles/ui.js.map +1 -1
  66. package/build/components/global-styles/utils.js +1 -1
  67. package/build/components/global-styles/utils.js.map +1 -1
  68. package/build/components/global-styles/variations/variations-color.js +13 -7
  69. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  70. package/build/components/global-styles/variations/variations-typography.js +34 -37
  71. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  72. package/build/components/header-edit-mode/index.js +2 -1
  73. package/build/components/header-edit-mode/index.js.map +1 -1
  74. package/build/components/keyboard-shortcut-help-modal/config.js +6 -0
  75. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  76. package/build/components/keyboard-shortcut-help-modal/index.js +3 -0
  77. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  78. package/build/components/keyboard-shortcuts/global.js +17 -3
  79. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  80. package/build/components/layout/animation.js +129 -0
  81. package/build/components/layout/animation.js.map +1 -0
  82. package/build/components/layout/index.js +9 -17
  83. package/build/components/layout/index.js.map +1 -1
  84. package/build/components/layout/router.js +22 -22
  85. package/build/components/layout/router.js.map +1 -1
  86. package/build/components/page-pages/index.js +24 -27
  87. package/build/components/page-pages/index.js.map +1 -1
  88. package/build/components/page-patterns/delete-category-menu-item.js +6 -1
  89. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  90. package/build/components/page-patterns/index.js +19 -32
  91. package/build/components/page-patterns/index.js.map +1 -1
  92. package/build/components/page-patterns/search-items.js +16 -58
  93. package/build/components/page-patterns/search-items.js.map +1 -1
  94. package/build/components/page-patterns/use-patterns.js +9 -9
  95. package/build/components/page-patterns/use-patterns.js.map +1 -1
  96. package/build/components/page-templates-template-parts/actions.js +54 -41
  97. package/build/components/page-templates-template-parts/actions.js.map +1 -1
  98. package/build/components/page-templates-template-parts/index.js +31 -69
  99. package/build/components/page-templates-template-parts/index.js.map +1 -1
  100. package/build/components/plugin-template-setting-panel/index.js +12 -1
  101. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  102. package/build/components/save-button/index.js +45 -16
  103. package/build/components/save-button/index.js.map +1 -1
  104. package/build/components/save-hub/index.js +8 -112
  105. package/build/components/save-hub/index.js.map +1 -1
  106. package/build/components/save-panel/index.js +14 -9
  107. package/build/components/save-panel/index.js.map +1 -1
  108. package/build/components/sidebar/index.js +3 -8
  109. package/build/components/sidebar/index.js.map +1 -1
  110. package/build/components/sidebar-dataviews/custom-dataviews-list.js +2 -2
  111. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  112. package/build/components/sidebar-dataviews/dataview-item.js +2 -2
  113. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  114. package/build/components/sidebar-dataviews/default-views.js +3 -3
  115. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  116. package/build/components/sidebar-dataviews/index.js +5 -4
  117. package/build/components/sidebar-dataviews/index.js.map +1 -1
  118. package/build/components/sidebar-edit-mode/index.js +1 -2
  119. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  120. package/build/components/sidebar-edit-mode/page-panels/index.js +7 -17
  121. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  122. package/build/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
  123. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  124. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +3 -1
  125. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  126. package/build/components/sidebar-edit-mode/template-panel/index.js +32 -18
  127. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  128. package/build/components/sidebar-navigation-screen-details-footer/index.js +5 -1
  129. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  130. package/build/components/sidebar-navigation-screen-global-styles/index.js +18 -1
  131. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  132. package/build/components/sidebar-navigation-screen-navigation-menu/{delete-modal.js → delete-confirm-dialog.js} +4 -5
  133. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -0
  134. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +6 -6
  135. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  136. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  137. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  138. package/build/components/sidebar-navigation-screen-patterns/index.js +1 -5
  139. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  140. package/build/components/sidebar-navigation-screen-template/index.js +5 -1
  141. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  142. package/build/components/sidebar-navigation-screen-templates-browse/content.js +2 -2
  143. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  144. package/build/components/style-book/index.js +1 -1
  145. package/build/components/style-book/index.js.map +1 -1
  146. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -3
  147. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  148. package/build/components/sync-state-with-url/use-sync-path-with-url.js +1 -11
  149. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  150. package/build/components/template-actions/index.js +44 -27
  151. package/build/components/template-actions/index.js.map +1 -1
  152. package/build/components/welcome-guide/editor.js +11 -2
  153. package/build/components/welcome-guide/editor.js.map +1 -1
  154. package/build/hooks/index.js +0 -1
  155. package/build/hooks/index.js.map +1 -1
  156. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +15 -2
  157. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  158. package/build/store/selectors.js +1 -9
  159. package/build/store/selectors.js.map +1 -1
  160. package/build/utils/constants.js +5 -3
  161. package/build/utils/constants.js.map +1 -1
  162. package/build/utils/get-is-list-page.js +1 -1
  163. package/build/utils/get-is-list-page.js.map +1 -1
  164. package/build/utils/math.js +98 -0
  165. package/build/utils/math.js.map +1 -0
  166. package/build-module/components/block-editor/editor-canvas.js +24 -4
  167. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  168. package/build-module/components/block-editor/site-editor-canvas.js +15 -4
  169. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  170. package/build-module/components/block-editor/use-site-editor-settings.js +1 -1
  171. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  172. package/build-module/components/editor/index.js +13 -4
  173. package/build-module/components/editor/index.js.map +1 -1
  174. package/build-module/components/editor-canvas-container/index.js +1 -2
  175. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  176. package/build-module/components/global-styles/background-panel.js +31 -0
  177. package/build-module/components/global-styles/background-panel.js.map +1 -0
  178. package/build-module/components/global-styles/color-palette-panel.js +0 -8
  179. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  180. package/build-module/components/global-styles/font-families.js +1 -1
  181. package/build-module/components/global-styles/font-families.js.map +1 -1
  182. package/build-module/components/global-styles/font-library-modal/context.js +54 -18
  183. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  184. package/build-module/components/global-styles/font-library-modal/font-collection.js +4 -3
  185. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  186. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +4 -3
  187. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  188. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -1
  189. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  190. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +44 -10
  191. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  192. package/build-module/components/global-styles/font-library-modal/utils/index.js +22 -4
  193. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  194. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +3 -0
  195. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  196. package/build-module/components/global-styles/header.js +1 -1
  197. package/build-module/components/global-styles/header.js.map +1 -1
  198. package/build-module/components/global-styles/hooks.js +48 -1
  199. package/build-module/components/global-styles/hooks.js.map +1 -1
  200. package/build-module/components/global-styles/palette.js +3 -1
  201. package/build-module/components/global-styles/palette.js.map +1 -1
  202. package/build-module/components/global-styles/preview-colors.js +2 -2
  203. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  204. package/build-module/components/global-styles/preview-iframe.js +0 -1
  205. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  206. package/build-module/components/global-styles/preview-styles.js +2 -2
  207. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  208. package/build-module/components/global-styles/root-menu.js +9 -3
  209. package/build-module/components/global-styles/root-menu.js.map +1 -1
  210. package/build-module/components/global-styles/screen-background.js +26 -0
  211. package/build-module/components/global-styles/screen-background.js.map +1 -0
  212. package/build-module/components/global-styles/screen-color-palette.js +2 -2
  213. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  214. package/build-module/components/global-styles/screen-colors.js +5 -10
  215. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  216. package/build-module/components/global-styles/screen-style-variations.js +4 -38
  217. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  218. package/build-module/components/global-styles/screen-typography.js +6 -11
  219. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  220. package/build-module/components/global-styles/style-variations-container.js +5 -2
  221. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  222. package/build-module/components/global-styles/typography-elements.js +3 -1
  223. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  224. package/build-module/components/global-styles/{preview-typography.js → typography-example.js} +4 -2
  225. package/build-module/components/global-styles/typography-example.js.map +1 -0
  226. package/build-module/components/global-styles/typography-preview.js +3 -1
  227. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  228. package/build-module/components/global-styles/ui.js +4 -1
  229. package/build-module/components/global-styles/ui.js.map +1 -1
  230. package/build-module/components/global-styles/utils.js +1 -1
  231. package/build-module/components/global-styles/utils.js.map +1 -1
  232. package/build-module/components/global-styles/variations/variations-color.js +13 -7
  233. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  234. package/build-module/components/global-styles/variations/variations-typography.js +35 -38
  235. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  236. package/build-module/components/header-edit-mode/index.js +2 -1
  237. package/build-module/components/header-edit-mode/index.js.map +1 -1
  238. package/build-module/components/keyboard-shortcut-help-modal/config.js +6 -0
  239. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  240. package/build-module/components/keyboard-shortcut-help-modal/index.js +3 -0
  241. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  242. package/build-module/components/keyboard-shortcuts/global.js +17 -3
  243. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  244. package/build-module/components/layout/animation.js +122 -0
  245. package/build-module/components/layout/animation.js.map +1 -0
  246. package/build-module/components/layout/index.js +9 -17
  247. package/build-module/components/layout/index.js.map +1 -1
  248. package/build-module/components/layout/router.js +22 -22
  249. package/build-module/components/layout/router.js.map +1 -1
  250. package/build-module/components/page-pages/index.js +25 -28
  251. package/build-module/components/page-pages/index.js.map +1 -1
  252. package/build-module/components/page-patterns/delete-category-menu-item.js +6 -1
  253. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  254. package/build-module/components/page-patterns/index.js +21 -34
  255. package/build-module/components/page-patterns/index.js.map +1 -1
  256. package/build-module/components/page-patterns/search-items.js +14 -55
  257. package/build-module/components/page-patterns/search-items.js.map +1 -1
  258. package/build-module/components/page-patterns/use-patterns.js +9 -9
  259. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  260. package/build-module/components/page-templates-template-parts/actions.js +54 -40
  261. package/build-module/components/page-templates-template-parts/actions.js.map +1 -1
  262. package/build-module/components/page-templates-template-parts/index.js +34 -72
  263. package/build-module/components/page-templates-template-parts/index.js.map +1 -1
  264. package/build-module/components/plugin-template-setting-panel/index.js +12 -1
  265. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  266. package/build-module/components/save-button/index.js +46 -17
  267. package/build-module/components/save-button/index.js.map +1 -1
  268. package/build-module/components/save-hub/index.js +10 -114
  269. package/build-module/components/save-hub/index.js.map +1 -1
  270. package/build-module/components/save-panel/index.js +14 -9
  271. package/build-module/components/save-panel/index.js.map +1 -1
  272. package/build-module/components/sidebar/index.js +3 -8
  273. package/build-module/components/sidebar/index.js.map +1 -1
  274. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +2 -2
  275. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  276. package/build-module/components/sidebar-dataviews/dataview-item.js +2 -2
  277. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  278. package/build-module/components/sidebar-dataviews/default-views.js +4 -4
  279. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  280. package/build-module/components/sidebar-dataviews/index.js +5 -4
  281. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  282. package/build-module/components/sidebar-edit-mode/index.js +1 -2
  283. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  284. package/build-module/components/sidebar-edit-mode/page-panels/index.js +10 -20
  285. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  286. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
  287. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  288. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +4 -2
  289. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  290. package/build-module/components/sidebar-edit-mode/template-panel/index.js +33 -19
  291. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  292. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +5 -1
  293. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  294. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +19 -2
  295. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  296. package/build-module/components/sidebar-navigation-screen-navigation-menu/{delete-modal.js → delete-confirm-dialog.js} +3 -4
  297. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -0
  298. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +6 -6
  299. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  300. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  301. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  302. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -5
  303. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  304. package/build-module/components/sidebar-navigation-screen-template/index.js +5 -1
  305. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  306. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +2 -2
  307. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  308. package/build-module/components/style-book/index.js +1 -1
  309. package/build-module/components/style-book/index.js.map +1 -1
  310. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -3
  311. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  312. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +1 -11
  313. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  314. package/build-module/components/template-actions/index.js +44 -27
  315. package/build-module/components/template-actions/index.js.map +1 -1
  316. package/build-module/components/welcome-guide/editor.js +11 -2
  317. package/build-module/components/welcome-guide/editor.js.map +1 -1
  318. package/build-module/hooks/index.js +0 -1
  319. package/build-module/hooks/index.js.map +1 -1
  320. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +15 -2
  321. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  322. package/build-module/store/selectors.js +1 -9
  323. package/build-module/store/selectors.js.map +1 -1
  324. package/build-module/utils/constants.js +4 -2
  325. package/build-module/utils/constants.js.map +1 -1
  326. package/build-module/utils/get-is-list-page.js +1 -1
  327. package/build-module/utils/get-is-list-page.js.map +1 -1
  328. package/build-module/utils/math.js +92 -0
  329. package/build-module/utils/math.js.map +1 -0
  330. package/build-style/style-rtl.css +146 -130
  331. package/build-style/style.css +146 -130
  332. package/package.json +44 -44
  333. package/src/components/block-editor/editor-canvas.js +34 -9
  334. package/src/components/block-editor/site-editor-canvas.js +10 -7
  335. package/src/components/block-editor/use-site-editor-settings.js +0 -2
  336. package/src/components/editor/index.js +11 -4
  337. package/src/components/editor-canvas-container/index.js +0 -1
  338. package/src/components/global-styles/background-panel.js +34 -0
  339. package/src/components/global-styles/color-palette-panel.js +0 -11
  340. package/src/components/global-styles/font-families.js +1 -1
  341. package/src/components/global-styles/font-library-modal/context.js +77 -31
  342. package/src/components/global-styles/font-library-modal/font-collection.js +4 -3
  343. package/src/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +9 -2
  344. package/src/components/global-styles/font-library-modal/installed-fonts.js +1 -1
  345. package/src/components/global-styles/font-library-modal/style.scss +15 -6
  346. package/src/components/global-styles/font-library-modal/upload-fonts.js +53 -8
  347. package/src/components/global-styles/font-library-modal/utils/index.js +21 -8
  348. package/src/components/global-styles/font-library-modal/utils/preview-styles.js +4 -0
  349. package/src/components/global-styles/header.js +1 -1
  350. package/src/components/global-styles/hooks.js +68 -1
  351. package/src/components/global-styles/palette.js +3 -1
  352. package/src/components/global-styles/preview-colors.js +2 -2
  353. package/src/components/global-styles/preview-iframe.js +0 -1
  354. package/src/components/global-styles/preview-styles.js +2 -2
  355. package/src/components/global-styles/root-menu.js +12 -1
  356. package/src/components/global-styles/screen-background.js +29 -0
  357. package/src/components/global-styles/screen-color-palette.js +2 -2
  358. package/src/components/global-styles/screen-colors.js +4 -15
  359. package/src/components/global-styles/screen-style-variations.js +4 -36
  360. package/src/components/global-styles/screen-typography.js +6 -20
  361. package/src/components/global-styles/style-variations-container.js +2 -1
  362. package/src/components/global-styles/style.scss +15 -10
  363. package/src/components/global-styles/typography-elements.js +5 -1
  364. package/src/components/global-styles/{preview-typography.js → typography-example.js} +3 -1
  365. package/src/components/global-styles/typography-preview.js +3 -1
  366. package/src/components/global-styles/ui.js +5 -0
  367. package/src/components/global-styles/utils.js +1 -1
  368. package/src/components/global-styles/variations/style.scss +32 -23
  369. package/src/components/global-styles/variations/variations-color.js +12 -6
  370. package/src/components/global-styles/variations/variations-typography.js +41 -60
  371. package/src/components/header-edit-mode/index.js +1 -0
  372. package/src/components/header-edit-mode/style.scss +28 -17
  373. package/src/components/keyboard-shortcut-help-modal/config.js +4 -0
  374. package/src/components/keyboard-shortcut-help-modal/index.js +4 -0
  375. package/src/components/keyboard-shortcuts/global.js +16 -4
  376. package/src/components/layout/animation.js +122 -0
  377. package/src/components/layout/index.js +12 -27
  378. package/src/components/layout/router.js +26 -25
  379. package/src/components/layout/style.scss +2 -0
  380. package/src/components/page-pages/index.js +33 -54
  381. package/src/components/page-patterns/delete-category-menu-item.js +7 -0
  382. package/src/components/page-patterns/index.js +22 -31
  383. package/src/components/page-patterns/search-items.js +13 -58
  384. package/src/components/page-patterns/use-patterns.js +17 -10
  385. package/src/components/page-templates-template-parts/actions.js +106 -91
  386. package/src/components/page-templates-template-parts/index.js +41 -93
  387. package/src/components/page-templates-template-parts/style.scss +5 -0
  388. package/src/components/plugin-template-setting-panel/index.js +14 -1
  389. package/src/components/save-button/index.js +55 -26
  390. package/src/components/save-hub/index.js +20 -164
  391. package/src/components/save-panel/index.js +24 -17
  392. package/src/components/sidebar/index.js +2 -8
  393. package/src/components/sidebar-dataviews/custom-dataviews-list.js +2 -2
  394. package/src/components/sidebar-dataviews/dataview-item.js +2 -2
  395. package/src/components/sidebar-dataviews/default-views.js +12 -4
  396. package/src/components/sidebar-dataviews/index.js +5 -4
  397. package/src/components/sidebar-edit-mode/index.js +0 -2
  398. package/src/components/sidebar-edit-mode/page-panels/index.js +31 -62
  399. package/src/components/sidebar-edit-mode/page-panels/page-content.js +10 -10
  400. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +2 -0
  401. package/src/components/sidebar-edit-mode/template-panel/index.js +33 -24
  402. package/src/components/sidebar-edit-mode/template-panel/style.scss +1 -29
  403. package/src/components/sidebar-navigation-screen/style.scss +21 -9
  404. package/src/components/sidebar-navigation-screen-details-footer/index.js +6 -2
  405. package/src/components/sidebar-navigation-screen-global-styles/index.js +29 -2
  406. package/src/components/sidebar-navigation-screen-navigation-menu/{delete-modal.js → delete-confirm-dialog.js} +2 -3
  407. package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +11 -9
  408. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +6 -3
  409. package/src/components/sidebar-navigation-screen-patterns/index.js +0 -7
  410. package/src/components/sidebar-navigation-screen-template/index.js +6 -1
  411. package/src/components/sidebar-navigation-screen-templates-browse/content.js +2 -2
  412. package/src/components/style-book/index.js +1 -3
  413. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -3
  414. package/src/components/sync-state-with-url/use-sync-path-with-url.js +3 -19
  415. package/src/components/template-actions/index.js +63 -46
  416. package/src/components/welcome-guide/editor.js +9 -6
  417. package/src/hooks/index.js +0 -1
  418. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +21 -4
  419. package/src/store/selectors.js +3 -15
  420. package/src/style.scss +0 -2
  421. package/src/utils/constants.js +4 -2
  422. package/src/utils/get-is-list-page.js +1 -1
  423. package/src/utils/math.js +93 -0
  424. package/build/components/actions/index.js +0 -321
  425. package/build/components/actions/index.js.map +0 -1
  426. package/build/components/global-styles/preview-typography.js.map +0 -1
  427. package/build/components/sidebar-edit-mode/sidebar-card/index.js +0 -42
  428. package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
  429. package/build/components/sidebar-edit-mode/template-panel/template-actions.js +0 -50
  430. package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +0 -1
  431. package/build/components/sidebar-edit-mode/template-panel/template-areas.js +0 -70
  432. package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
  433. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +0 -1
  434. package/build/components/sidebar-navigation-screen-pages/index.js +0 -175
  435. package/build/components/sidebar-navigation-screen-pages/index.js.map +0 -1
  436. package/build/components/sidebar-navigation-screen-templates/index.js +0 -132
  437. package/build/components/sidebar-navigation-screen-templates/index.js.map +0 -1
  438. package/build/hooks/template-part-edit.js +0 -82
  439. package/build/hooks/template-part-edit.js.map +0 -1
  440. package/build/store/utils.js +0 -71
  441. package/build/store/utils.js.map +0 -1
  442. package/build-module/components/actions/index.js +0 -310
  443. package/build-module/components/actions/index.js.map +0 -1
  444. package/build-module/components/global-styles/preview-typography.js.map +0 -1
  445. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +0 -34
  446. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
  447. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +0 -42
  448. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +0 -1
  449. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +0 -63
  450. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
  451. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +0 -1
  452. package/build-module/components/sidebar-navigation-screen-pages/index.js +0 -167
  453. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +0 -1
  454. package/build-module/components/sidebar-navigation-screen-templates/index.js +0 -124
  455. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +0 -1
  456. package/build-module/hooks/template-part-edit.js +0 -75
  457. package/build-module/hooks/template-part-edit.js.map +0 -1
  458. package/build-module/store/utils.js +0 -64
  459. package/build-module/store/utils.js.map +0 -1
  460. package/src/components/actions/index.js +0 -411
  461. package/src/components/sidebar-edit-mode/sidebar-card/index.js +0 -34
  462. package/src/components/sidebar-edit-mode/sidebar-card/style.scss +0 -37
  463. package/src/components/sidebar-edit-mode/template-panel/template-actions.js +0 -49
  464. package/src/components/sidebar-edit-mode/template-panel/template-areas.js +0 -86
  465. package/src/components/sidebar-navigation-screen-pages/index.js +0 -238
  466. package/src/components/sidebar-navigation-screen-templates/index.js +0 -156
  467. package/src/components/sidebar-navigation-screen-templates/style.scss +0 -9
  468. package/src/hooks/template-part-edit.js +0 -89
  469. package/src/store/test/utils.js +0 -191
  470. package/src/store/utils.js +0 -69
@@ -1,186 +1,42 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { useSelect, useDispatch } from '@wordpress/data';
5
- import { Button, __experimentalHStack as HStack } from '@wordpress/components';
6
- import { __, sprintf, _n } from '@wordpress/i18n';
4
+ import { useSelect } from '@wordpress/data';
5
+ import { __experimentalHStack as HStack } from '@wordpress/components';
7
6
  import { store as coreStore } from '@wordpress/core-data';
8
- import { store as blockEditorStore } from '@wordpress/block-editor';
9
7
  import { check } from '@wordpress/icons';
10
- import { privateApis as routerPrivateApis } from '@wordpress/router';
11
- import { store as noticesStore } from '@wordpress/notices';
12
8
 
13
9
  /**
14
10
  * Internal dependencies
15
11
  */
16
12
  import SaveButton from '../save-button';
17
13
  import { isPreviewingTheme } from '../../utils/is-previewing-theme';
18
- import { unlock } from '../../lock-unlock';
19
- import { NAVIGATION_POST_TYPE } from '../../utils/constants';
20
-
21
- const { useLocation } = unlock( routerPrivateApis );
22
-
23
- const PUBLISH_ON_SAVE_ENTITIES = [
24
- {
25
- kind: 'postType',
26
- name: NAVIGATION_POST_TYPE,
27
- },
28
- ];
29
14
 
30
15
  export default function SaveHub() {
31
- const saveNoticeId = 'site-edit-save-notice';
32
- const { params } = useLocation();
33
-
34
- const { __unstableMarkLastChangeAsPersistent } =
35
- useDispatch( blockEditorStore );
36
-
37
- const { createSuccessNotice, createErrorNotice, removeNotice } =
38
- useDispatch( noticesStore );
39
-
40
- const { dirtyCurrentEntity, countUnsavedChanges, isDirty, isSaving } =
41
- useSelect(
42
- ( select ) => {
43
- const {
44
- __experimentalGetDirtyEntityRecords,
45
- isSavingEntityRecord,
46
- } = select( coreStore );
47
- const dirtyEntityRecords =
48
- __experimentalGetDirtyEntityRecords();
49
- let calcDirtyCurrentEntity = null;
50
-
51
- if ( dirtyEntityRecords.length === 1 ) {
52
- // if we are on global styles
53
- if ( params.path?.includes( 'wp_global_styles' ) ) {
54
- calcDirtyCurrentEntity = dirtyEntityRecords.find(
55
- ( record ) => record.name === 'globalStyles'
56
- );
57
- }
58
- // if we are on pages
59
- else if ( params.postId ) {
60
- calcDirtyCurrentEntity = dirtyEntityRecords.find(
61
- ( record ) =>
62
- record.name === params.postType &&
63
- String( record.key ) === params.postId
64
- );
65
- }
66
- }
67
-
68
- return {
69
- dirtyCurrentEntity: calcDirtyCurrentEntity,
70
- isDirty: dirtyEntityRecords.length > 0,
71
- isSaving: dirtyEntityRecords.some( ( record ) =>
72
- isSavingEntityRecord(
73
- record.kind,
74
- record.name,
75
- record.key
76
- )
77
- ),
78
- countUnsavedChanges: dirtyEntityRecords.length,
79
- };
80
- },
81
- [ params.path, params.postType, params.postId ]
16
+ const { isDisabled, isSaving } = useSelect( ( select ) => {
17
+ const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =
18
+ select( coreStore );
19
+ const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
20
+ const _isSaving = dirtyEntityRecords.some( ( record ) =>
21
+ isSavingEntityRecord( record.kind, record.name, record.key )
82
22
  );
83
-
84
- const {
85
- editEntityRecord,
86
- saveEditedEntityRecord,
87
- __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,
88
- } = useDispatch( coreStore );
89
-
90
- const disabled = isSaving || ( ! isDirty && ! isPreviewingTheme() );
91
-
92
- // if we have only one unsaved change and it matches current context, we can show a more specific label
93
- let label = dirtyCurrentEntity
94
- ? __( 'Save' )
95
- : sprintf(
96
- // translators: %d: number of unsaved changes (number).
97
- _n(
98
- 'Review %d change…',
99
- 'Review %d changes…',
100
- countUnsavedChanges
101
- ),
102
- countUnsavedChanges
103
- );
104
-
105
- if ( isSaving ) {
106
- label = __( 'Saving' );
107
- }
108
-
109
- const { homeUrl } = useSelect( ( select ) => {
110
- const {
111
- getUnstableBase, // Site index.
112
- } = select( coreStore );
113
23
  return {
114
- homeUrl: getUnstableBase()?.home,
24
+ isSaving: _isSaving,
25
+ isDisabled:
26
+ _isSaving ||
27
+ ( ! dirtyEntityRecords.length && ! isPreviewingTheme() ),
115
28
  };
116
29
  }, [] );
117
-
118
- const saveCurrentEntity = async () => {
119
- if ( ! dirtyCurrentEntity ) return;
120
-
121
- removeNotice( saveNoticeId );
122
- const { kind, name, key, property } = dirtyCurrentEntity;
123
-
124
- try {
125
- if ( 'root' === dirtyCurrentEntity.kind && 'site' === name ) {
126
- await saveSpecifiedEntityEdits( 'root', 'site', undefined, [
127
- property,
128
- ] );
129
- } else {
130
- if (
131
- PUBLISH_ON_SAVE_ENTITIES.some(
132
- ( typeToPublish ) =>
133
- typeToPublish.kind === kind &&
134
- typeToPublish.name === name
135
- )
136
- ) {
137
- editEntityRecord( kind, name, key, { status: 'publish' } );
138
- }
139
-
140
- await saveEditedEntityRecord( kind, name, key );
141
- }
142
-
143
- __unstableMarkLastChangeAsPersistent();
144
-
145
- createSuccessNotice( __( 'Site updated.' ), {
146
- type: 'snackbar',
147
- actions: [
148
- {
149
- label: __( 'View site' ),
150
- url: homeUrl,
151
- },
152
- ],
153
- id: saveNoticeId,
154
- } );
155
- } catch ( error ) {
156
- createErrorNotice( `${ __( 'Saving failed.' ) } ${ error }` );
157
- }
158
- };
159
-
160
30
  return (
161
31
  <HStack className="edit-site-save-hub" alignment="right" spacing={ 4 }>
162
- { dirtyCurrentEntity ? (
163
- <Button
164
- variant="primary"
165
- onClick={ saveCurrentEntity }
166
- isBusy={ isSaving }
167
- disabled={ isSaving }
168
- aria-disabled={ isSaving }
169
- className="edit-site-save-hub__button"
170
- __next40pxDefaultSize
171
- >
172
- { label }
173
- </Button>
174
- ) : (
175
- <SaveButton
176
- className="edit-site-save-hub__button"
177
- variant={ disabled ? null : 'primary' }
178
- showTooltip={ false }
179
- icon={ disabled && ! isSaving ? check : null }
180
- defaultLabel={ label }
181
- __next40pxDefaultSize
182
- />
183
- ) }
32
+ <SaveButton
33
+ className="edit-site-save-hub__button"
34
+ variant={ isDisabled ? null : 'primary' }
35
+ showTooltip={ false }
36
+ icon={ isDisabled && ! isSaving ? check : null }
37
+ showReviewMessage
38
+ __next40pxDefaultSize
39
+ />
184
40
  </HStack>
185
41
  );
186
42
  }
@@ -77,11 +77,13 @@ const EntitiesSavedStatesForPreview = ( { onClose } ) => {
77
77
  );
78
78
  };
79
79
 
80
- const _EntitiesSavedStates = ( { onClose } ) => {
80
+ const _EntitiesSavedStates = ( { onClose, renderDialog = undefined } ) => {
81
81
  if ( isPreviewingTheme() ) {
82
82
  return <EntitiesSavedStatesForPreview onClose={ onClose } />;
83
83
  }
84
- return <EntitiesSavedStates close={ onClose } />;
84
+ return (
85
+ <EntitiesSavedStates close={ onClose } renderDialog={ renderDialog } />
86
+ );
85
87
  };
86
88
 
87
89
  export default function SavePanel() {
@@ -142,21 +144,26 @@ export default function SavePanel() {
142
144
  } ) }
143
145
  ariaLabel={ __( 'Save panel' ) }
144
146
  >
145
- { isSaveViewOpen ? (
146
- <_EntitiesSavedStates onClose={ onClose } />
147
- ) : (
148
- <div className="edit-site-editor__toggle-save-panel">
149
- <Button
150
- variant="secondary"
151
- className="edit-site-editor__toggle-save-panel-button"
152
- onClick={ () => setIsSaveViewOpened( true ) }
153
- aria-expanded={ false }
154
- disabled={ disabled }
155
- __experimentalIsFocusable
156
- >
157
- { __( 'Open save panel' ) }
158
- </Button>
159
- </div>
147
+ <div
148
+ className={ classnames( 'edit-site-editor__toggle-save-panel', {
149
+ 'screen-reader-text': isSaveViewOpen,
150
+ } ) }
151
+ >
152
+ <Button
153
+ variant="secondary"
154
+ className={ classnames(
155
+ 'edit-site-editor__toggle-save-panel-button'
156
+ ) }
157
+ onClick={ () => setIsSaveViewOpened( true ) }
158
+ aria-haspopup={ 'dialog' }
159
+ disabled={ disabled }
160
+ __experimentalIsFocusable
161
+ >
162
+ { __( 'Open save panel' ) }
163
+ </Button>
164
+ </div>
165
+ { isSaveViewOpen && (
166
+ <_EntitiesSavedStates onClose={ onClose } renderDialog />
160
167
  ) }
161
168
  </NavigableRegion>
162
169
  );
@@ -19,7 +19,6 @@ import { __ } from '@wordpress/i18n';
19
19
  * Internal dependencies
20
20
  */
21
21
  import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';
22
- import SidebarNavigationScreenTemplates from '../sidebar-navigation-screen-templates';
23
22
  import SidebarNavigationScreenTemplate from '../sidebar-navigation-screen-template';
24
23
  import SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';
25
24
  import SidebarNavigationScreenPattern from '../sidebar-navigation-screen-pattern';
@@ -32,7 +31,6 @@ import SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-gl
32
31
  import SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';
33
32
  import SaveHub from '../save-hub';
34
33
  import { unlock } from '../../lock-unlock';
35
- import SidebarNavigationScreenPages from '../sidebar-navigation-screen-pages';
36
34
  import SidebarNavigationScreen from '../sidebar-navigation-screen';
37
35
  import DataViewsSidebarContent from '../sidebar-dataviews';
38
36
  import SidebarNavigationScreenPage from '../sidebar-navigation-screen-page';
@@ -70,27 +68,23 @@ function SidebarScreens() {
70
68
  <SidebarNavigationScreenGlobalStyles />
71
69
  </SidebarScreenWrapper>
72
70
  <SidebarScreenWrapper path="/page">
73
- <SidebarNavigationScreenPages />
74
- </SidebarScreenWrapper>
75
- <SidebarScreenWrapper path="/pages">
76
71
  <SidebarNavigationScreen
77
72
  title={ __( 'Manage pages' ) }
78
73
  content={ <DataViewsSidebarContent /> }
79
- backPath="/page"
80
74
  />
81
75
  </SidebarScreenWrapper>
82
76
  <SidebarScreenWrapper path="/page/:postId">
83
77
  <SidebarNavigationScreenPage />
84
78
  </SidebarScreenWrapper>
85
79
  <SidebarScreenWrapper path="/:postType(wp_template)">
86
- <SidebarNavigationScreenTemplates />
80
+ <SidebarNavigationScreenTemplatesBrowse />
87
81
  </SidebarScreenWrapper>
88
82
  { ! isMobileViewport && (
89
83
  <SidebarScreenWrapper path="/patterns">
90
84
  <SidebarNavigationScreenPatterns />
91
85
  </SidebarScreenWrapper>
92
86
  ) }
93
- <SidebarScreenWrapper path="/:postType(wp_template|wp_template_part)/all">
87
+ <SidebarScreenWrapper path="/:postType(wp_template_part)/all">
94
88
  <SidebarNavigationScreenTemplatesBrowse />
95
89
  </SidebarScreenWrapper>
96
90
  <SidebarScreenWrapper path="/:postType(wp_template_part|wp_block)/:postId">
@@ -110,7 +110,7 @@ function CustomDataViewItem( { dataviewId, isActive } ) {
110
110
  title={ dataview.title }
111
111
  type={ type }
112
112
  isActive={ isActive }
113
- isCustom="true"
113
+ isCustom
114
114
  customViewId={ dataviewId }
115
115
  suffix={
116
116
  <DropdownMenu
@@ -216,7 +216,7 @@ export default function CustomDataViewsList( { type, activeView, isCustom } ) {
216
216
  key={ customViewRecord.id }
217
217
  dataviewId={ customViewRecord.id }
218
218
  isActive={
219
- isCustom === 'true' &&
219
+ isCustom &&
220
220
  Number( activeView ) === customViewRecord.id
221
221
  }
222
222
  />
@@ -38,8 +38,8 @@ export default function DataViewItem( {
38
38
  const linkInfo = useLink( {
39
39
  path,
40
40
  layout,
41
- activeView: isCustom === 'true' ? customViewId : slug,
42
- isCustom,
41
+ activeView: isCustom ? customViewId : slug,
42
+ isCustom: isCustom ? 'true' : 'false',
43
43
  } );
44
44
  return (
45
45
  <HStack
@@ -11,7 +11,7 @@ import {
11
11
  LAYOUT_LIST,
12
12
  LAYOUT_TABLE,
13
13
  LAYOUT_GRID,
14
- OPERATOR_IN,
14
+ OPERATOR_IS_ANY,
15
15
  } from '../../utils/constants';
16
16
 
17
17
  export const DEFAULT_CONFIG_PER_VIEW_TYPE = {
@@ -29,7 +29,7 @@ export const DEFAULT_CONFIG_PER_VIEW_TYPE = {
29
29
  };
30
30
 
31
31
  const DEFAULT_PAGE_BASE = {
32
- type: LAYOUT_TABLE,
32
+ type: LAYOUT_LIST,
33
33
  search: '',
34
34
  filters: [],
35
35
  page: 1,
@@ -61,7 +61,11 @@ export const DEFAULT_VIEWS = {
61
61
  view: {
62
62
  ...DEFAULT_PAGE_BASE,
63
63
  filters: [
64
- { field: 'status', operator: OPERATOR_IN, value: 'draft' },
64
+ {
65
+ field: 'status',
66
+ operator: OPERATOR_IS_ANY,
67
+ value: 'draft',
68
+ },
65
69
  ],
66
70
  },
67
71
  },
@@ -72,7 +76,11 @@ export const DEFAULT_VIEWS = {
72
76
  view: {
73
77
  ...DEFAULT_PAGE_BASE,
74
78
  filters: [
75
- { field: 'status', operator: OPERATOR_IN, value: 'trash' },
79
+ {
80
+ field: 'status',
81
+ operator: OPERATOR_IS_ANY,
82
+ value: 'trash',
83
+ },
76
84
  ],
77
85
  },
78
86
  },
@@ -15,7 +15,7 @@ import DataViewItem from './dataview-item';
15
15
  import CustomDataViewsList from './custom-dataviews-list';
16
16
 
17
17
  const PATH_TO_TYPE = {
18
- '/pages': 'page',
18
+ '/page': 'page',
19
19
  };
20
20
 
21
21
  export default function DataViewsSidebarContent() {
@@ -25,6 +25,7 @@ export default function DataViewsSidebarContent() {
25
25
  if ( ! path || ! PATH_TO_TYPE[ path ] ) {
26
26
  return null;
27
27
  }
28
+ const isCustomBoolean = isCustom === 'true';
28
29
  const type = PATH_TO_TYPE[ path ];
29
30
 
30
31
  return (
@@ -39,10 +40,10 @@ export default function DataViewsSidebarContent() {
39
40
  icon={ dataview.icon }
40
41
  type={ dataview.view.type }
41
42
  isActive={
42
- isCustom === 'false' &&
43
+ ! isCustomBoolean &&
43
44
  dataview.slug === activeView
44
45
  }
45
- isCustom="false"
46
+ isCustom={ false }
46
47
  />
47
48
  );
48
49
  } ) }
@@ -51,7 +52,7 @@ export default function DataViewsSidebarContent() {
51
52
  <CustomDataViewsList
52
53
  activeView={ activeView }
53
54
  type={ type }
54
- isCustom="true"
55
+ isCustom
55
56
  />
56
57
  ) }
57
58
  </>
@@ -22,7 +22,6 @@ import { STORE_NAME } from '../../store/constants';
22
22
  import SettingsHeader from './settings-header';
23
23
  import PagePanels from './page-panels';
24
24
  import TemplatePanel from './template-panel';
25
- import PluginTemplateSettingPanel from '../plugin-template-setting-panel';
26
25
  import { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from './constants';
27
26
  import { store as editSiteStore } from '../../store';
28
27
  import { unlock } from '../../lock-unlock';
@@ -96,7 +95,6 @@ const FillContents = ( {
96
95
  focusable={ false }
97
96
  >
98
97
  { isEditingPage ? <PagePanels /> : <TemplatePanel /> }
99
- <PluginTemplateSettingPanel.Slot />
100
98
  </Tabs.TabPanel>
101
99
  <Tabs.TabPanel tabId={ SIDEBAR_BLOCK } focusable={ false }>
102
100
  <InspectorSlot bubblesVirtually />
@@ -1,69 +1,54 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import {
5
- PanelBody,
6
- __experimentalText as Text,
7
- __experimentalVStack as VStack,
8
- } from '@wordpress/components';
9
- import { page as pageIcon } from '@wordpress/icons';
10
- import { __, sprintf } from '@wordpress/i18n';
11
- import { humanTimeDiff } from '@wordpress/date';
4
+ import { PanelBody } from '@wordpress/components';
5
+ import { __ } from '@wordpress/i18n';
12
6
  import { useSelect } from '@wordpress/data';
13
7
  import { store as coreStore } from '@wordpress/core-data';
14
- import { decodeEntities } from '@wordpress/html-entities';
15
8
  import {
16
9
  PageAttributesPanel,
10
+ PluginDocumentSettingPanel,
17
11
  PostDiscussionPanel,
18
12
  PostExcerptPanel,
19
- PostFeaturedImagePanel,
20
13
  PostLastRevisionPanel,
21
14
  PostTaxonomiesPanel,
22
15
  store as editorStore,
16
+ privateApis as editorPrivateApis,
23
17
  } from '@wordpress/editor';
24
18
 
25
19
  /**
26
20
  * Internal dependencies
27
21
  */
28
22
  import { store as editSiteStore } from '../../../store';
29
- import SidebarCard from '../sidebar-card';
30
23
  import PageContent from './page-content';
31
24
  import PageSummary from './page-summary';
25
+ import { unlock } from '../../../lock-unlock';
26
+
27
+ const { PostCardPanel } = unlock( editorPrivateApis );
32
28
 
33
29
  export default function PagePanels() {
34
- const {
35
- id,
36
- type,
37
- hasResolved,
38
- status,
39
- date,
40
- password,
41
- title,
42
- modified,
43
- renderingMode,
44
- } = useSelect( ( select ) => {
45
- const { getEditedPostContext } = select( editSiteStore );
46
- const { getEditedEntityRecord, hasFinishedResolution } =
47
- select( coreStore );
48
- const { getRenderingMode } = select( editorStore );
49
- const context = getEditedPostContext();
50
- const queryArgs = [ 'postType', context.postType, context.postId ];
51
- const page = getEditedEntityRecord( ...queryArgs );
52
- return {
53
- hasResolved: hasFinishedResolution(
54
- 'getEditedEntityRecord',
55
- queryArgs
56
- ),
57
- title: page?.title,
58
- id: page?.id,
59
- type: page?.type,
60
- status: page?.status,
61
- date: page?.date,
62
- password: page?.password,
63
- modified: page?.modified,
64
- renderingMode: getRenderingMode(),
65
- };
66
- }, [] );
30
+ const { id, type, hasResolved, status, date, password, renderingMode } =
31
+ useSelect( ( select ) => {
32
+ const { getEditedPostContext } = select( editSiteStore );
33
+ const { getEditedEntityRecord, hasFinishedResolution } =
34
+ select( coreStore );
35
+ const { getRenderingMode } = select( editorStore );
36
+ const context = getEditedPostContext();
37
+ const queryArgs = [ 'postType', context.postType, context.postId ];
38
+ const page = getEditedEntityRecord( ...queryArgs );
39
+ return {
40
+ hasResolved: hasFinishedResolution(
41
+ 'getEditedEntityRecord',
42
+ queryArgs
43
+ ),
44
+ id: page?.id,
45
+ type: page?.type,
46
+ status: page?.status,
47
+ date: page?.date,
48
+ password: page?.password,
49
+ renderingMode: getRenderingMode(),
50
+ };
51
+ }, [] );
67
52
 
68
53
  if ( ! hasResolved ) {
69
54
  return null;
@@ -71,23 +56,7 @@ export default function PagePanels() {
71
56
 
72
57
  return (
73
58
  <>
74
- <PanelBody>
75
- <SidebarCard
76
- title={ decodeEntities( title ) }
77
- icon={ pageIcon }
78
- description={
79
- <VStack>
80
- <Text>
81
- { sprintf(
82
- // translators: %s: Human-readable time difference, e.g. "2 days ago".
83
- __( 'Last edited %s' ),
84
- humanTimeDiff( modified )
85
- ) }
86
- </Text>
87
- </VStack>
88
- }
89
- />
90
- </PanelBody>
59
+ <PostCardPanel />
91
60
  <PanelBody title={ __( 'Summary' ) }>
92
61
  <PageSummary
93
62
  status={ status }
@@ -97,6 +66,7 @@ export default function PagePanels() {
97
66
  postType={ type }
98
67
  />
99
68
  </PanelBody>
69
+ <PluginDocumentSettingPanel.Slot />
100
70
  { renderingMode !== 'post-only' && (
101
71
  <PanelBody title={ __( 'Content' ) }>
102
72
  <PageContent />
@@ -104,7 +74,6 @@ export default function PagePanels() {
104
74
  ) }
105
75
  <PostLastRevisionPanel />
106
76
  <PostTaxonomiesPanel />
107
- <PostFeaturedImagePanel />
108
77
  <PostExcerptPanel />
109
78
  <PostDiscussionPanel />
110
79
  <PageAttributesPanel />
@@ -6,7 +6,6 @@ import {
6
6
  store as blockEditorStore,
7
7
  privateApis as blockEditorPrivateApis,
8
8
  } from '@wordpress/block-editor';
9
- import { useMemo } from '@wordpress/element';
10
9
 
11
10
  /**
12
11
  * Internal dependencies
@@ -15,15 +14,16 @@ import { unlock } from '../../../lock-unlock';
15
14
 
16
15
  const { BlockQuickNavigation } = unlock( blockEditorPrivateApis );
17
16
 
17
+ const PAGE_CONTENT_BLOCKS = [
18
+ 'core/post-content',
19
+ 'core/post-featured-image',
20
+ 'core/post-title',
21
+ ];
22
+
18
23
  export default function PageContent() {
19
- const clientIdsTree = useSelect(
20
- ( select ) =>
21
- unlock( select( blockEditorStore ) ).getEnabledClientIdsTree(),
22
- []
23
- );
24
- const clientIds = useMemo(
25
- () => clientIdsTree.map( ( { clientId } ) => clientId ),
26
- [ clientIdsTree ]
27
- );
24
+ const clientIds = useSelect( ( select ) => {
25
+ const { getBlocksByName } = select( blockEditorStore );
26
+ return getBlocksByName( PAGE_CONTENT_BLOCKS );
27
+ }, [] );
28
28
  return <BlockQuickNavigation clientIds={ clientIds } />;
29
29
  }
@@ -7,6 +7,7 @@ import {
7
7
  PostURLPanel,
8
8
  PostSchedulePanel,
9
9
  PostTemplatePanel,
10
+ PostFeaturedImagePanel,
10
11
  } from '@wordpress/editor';
11
12
 
12
13
  /**
@@ -23,6 +24,7 @@ export default function PageSummary( {
23
24
  } ) {
24
25
  return (
25
26
  <VStack spacing={ 0 }>
27
+ <PostFeaturedImagePanel withPanelBody={ false } />
26
28
  <PageStatus
27
29
  status={ status }
28
30
  date={ date }