@wordpress/edit-site 6.2.0 → 6.4.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 (368) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-pattern/index.js +8 -2
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/{add-new-page → add-new-post}/index.js +21 -17
  5. package/build/components/add-new-post/index.js.map +1 -0
  6. package/build/components/add-new-template/index.js +3 -1
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/block-editor/use-site-editor-settings.js +6 -85
  9. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  10. package/build/components/editor/index.js +21 -3
  11. package/build/components/editor/index.js.map +1 -1
  12. package/build/components/global-styles/background-panel.js +0 -5
  13. package/build/components/global-styles/background-panel.js.map +1 -1
  14. package/build/components/global-styles/block-preview-panel.js +14 -5
  15. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  16. package/build/components/global-styles/font-families.js +42 -23
  17. package/build/components/global-styles/font-families.js.map +1 -1
  18. package/build/components/global-styles/font-library-modal/font-collection.js +13 -30
  19. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  20. package/build/components/global-styles/font-library-modal/index.js +4 -4
  21. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  22. package/build/components/global-styles/font-library-modal/installed-fonts.js +60 -12
  23. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  24. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +39 -0
  25. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -0
  26. package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +39 -0
  27. package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +1 -0
  28. package/build/components/global-styles/font-sizes/font-size-preview.js +44 -0
  29. package/build/components/global-styles/font-sizes/font-size-preview.js.map +1 -0
  30. package/build/components/global-styles/font-sizes/font-size.js +213 -0
  31. package/build/components/global-styles/font-sizes/font-size.js.map +1 -0
  32. package/build/components/global-styles/font-sizes/font-sizes-count.js +50 -0
  33. package/build/components/global-styles/font-sizes/font-sizes-count.js.map +1 -0
  34. package/build/components/global-styles/font-sizes/font-sizes.js +163 -0
  35. package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -0
  36. package/build/components/global-styles/font-sizes/rename-font-size-dialog.js +67 -0
  37. package/build/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -0
  38. package/build/components/global-styles/hooks.js +0 -40
  39. package/build/components/global-styles/hooks.js.map +1 -1
  40. package/build/components/global-styles/preview-typography.js +47 -0
  41. package/build/components/global-styles/preview-typography.js.map +1 -0
  42. package/build/components/global-styles/screen-block.js +17 -1
  43. package/build/components/global-styles/screen-block.js.map +1 -1
  44. package/build/components/global-styles/screen-layout.js +5 -1
  45. package/build/components/global-styles/screen-layout.js.map +1 -1
  46. package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  47. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  48. package/build/components/global-styles/screen-style-variations.js +2 -2
  49. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  50. package/build/components/global-styles/screen-typography.js +3 -2
  51. package/build/components/global-styles/screen-typography.js.map +1 -1
  52. package/build/components/global-styles/shadows-edit-panel.js +1 -2
  53. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  54. package/build/components/global-styles/size-control/index.js +85 -0
  55. package/build/components/global-styles/size-control/index.js.map +1 -0
  56. package/build/components/global-styles/style-variations-container.js +8 -5
  57. package/build/components/global-styles/style-variations-container.js.map +1 -1
  58. package/build/components/global-styles/typography-elements.js +0 -2
  59. package/build/components/global-styles/typography-elements.js.map +1 -1
  60. package/build/components/global-styles/ui.js +8 -0
  61. package/build/components/global-styles/ui.js.map +1 -1
  62. package/build/components/global-styles/variations/variation.js +4 -4
  63. package/build/components/global-styles/variations/variation.js.map +1 -1
  64. package/build/components/global-styles/variations/variations-color.js +4 -3
  65. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  66. package/build/components/global-styles/variations/variations-typography.js +15 -29
  67. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  68. package/build/components/global-styles-sidebar/index.js +2 -2
  69. package/build/components/global-styles-sidebar/index.js.map +1 -1
  70. package/build/components/layout/index.js +22 -8
  71. package/build/components/layout/index.js.map +1 -1
  72. package/build/components/layout/router.js +30 -43
  73. package/build/components/layout/router.js.map +1 -1
  74. package/build/components/page-patterns/header.js +1 -1
  75. package/build/components/page-patterns/header.js.map +1 -1
  76. package/build/components/page-patterns/index.js +65 -49
  77. package/build/components/page-patterns/index.js.map +1 -1
  78. package/build/components/page-patterns/search-items.js +29 -4
  79. package/build/components/page-patterns/search-items.js.map +1 -1
  80. package/build/components/page-patterns/use-patterns.js +22 -55
  81. package/build/components/page-patterns/use-patterns.js.map +1 -1
  82. package/build/components/page-templates/index.js +56 -50
  83. package/build/components/page-templates/index.js.map +1 -1
  84. package/build/components/pagination/index.js +4 -4
  85. package/build/components/pagination/index.js.map +1 -1
  86. package/build/components/post-edit/index.js +105 -0
  87. package/build/components/post-edit/index.js.map +1 -0
  88. package/build/components/post-fields/index.js +314 -0
  89. package/build/components/post-fields/index.js.map +1 -0
  90. package/build/components/post-list/index.js +281 -0
  91. package/build/components/post-list/index.js.map +1 -0
  92. package/build/components/posts-app/index.js +11 -17
  93. package/build/components/posts-app/index.js.map +1 -1
  94. package/build/components/posts-app/router.js +85 -0
  95. package/build/components/posts-app/router.js.map +1 -0
  96. package/build/components/revisions/index.js +10 -7
  97. package/build/components/revisions/index.js.map +1 -1
  98. package/build/components/save-panel/index.js +1 -1
  99. package/build/components/save-panel/index.js.map +1 -1
  100. package/build/components/sidebar-dataviews/add-new-view.js +4 -1
  101. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  102. package/build/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
  103. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  104. package/build/components/sidebar-dataviews/default-views.js +119 -93
  105. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  106. package/build/components/sidebar-dataviews/index.js +44 -2
  107. package/build/components/sidebar-dataviews/index.js.map +1 -1
  108. package/build/components/sidebar-navigation-screen-global-styles/content.js +64 -0
  109. package/build/components/sidebar-navigation-screen-global-styles/content.js.map +1 -0
  110. package/build/components/sidebar-navigation-screen-global-styles/index.js +2 -47
  111. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  112. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -2
  113. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  114. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +3 -2
  115. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  116. package/build/components/site-hub/index.js +81 -1
  117. package/build/components/site-hub/index.js.map +1 -1
  118. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -1
  119. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  120. package/build/hooks/push-changes-to-global-styles/index.js +2 -2
  121. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  122. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +65 -42
  123. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  124. package/build/index.js +10 -0
  125. package/build/index.js.map +1 -1
  126. package/build/posts.js +57 -2
  127. package/build/posts.js.map +1 -1
  128. package/build/store/private-actions.js +7 -2
  129. package/build/store/private-actions.js.map +1 -1
  130. package/build/store/selectors.js +34 -6
  131. package/build/store/selectors.js.map +1 -1
  132. package/build/utils/get-filtered-template-parts.js +64 -0
  133. package/build/utils/get-filtered-template-parts.js.map +1 -0
  134. package/build-module/components/add-new-pattern/index.js +8 -2
  135. package/build-module/components/add-new-pattern/index.js.map +1 -1
  136. package/build-module/components/{add-new-page → add-new-post}/index.js +21 -17
  137. package/build-module/components/add-new-post/index.js.map +1 -0
  138. package/build-module/components/add-new-template/index.js +3 -1
  139. package/build-module/components/add-new-template/index.js.map +1 -1
  140. package/build-module/components/block-editor/use-site-editor-settings.js +6 -85
  141. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  142. package/build-module/components/editor/index.js +21 -3
  143. package/build-module/components/editor/index.js.map +1 -1
  144. package/build-module/components/global-styles/background-panel.js +0 -5
  145. package/build-module/components/global-styles/background-panel.js.map +1 -1
  146. package/build-module/components/global-styles/block-preview-panel.js +14 -5
  147. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  148. package/build-module/components/global-styles/font-families.js +44 -25
  149. package/build-module/components/global-styles/font-families.js.map +1 -1
  150. package/build-module/components/global-styles/font-library-modal/font-collection.js +14 -31
  151. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  152. package/build-module/components/global-styles/font-library-modal/index.js +4 -4
  153. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  154. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +63 -15
  155. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  156. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +32 -0
  157. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -0
  158. package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +32 -0
  159. package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +1 -0
  160. package/build-module/components/global-styles/font-sizes/font-size-preview.js +37 -0
  161. package/build-module/components/global-styles/font-sizes/font-size-preview.js.map +1 -0
  162. package/build-module/components/global-styles/font-sizes/font-size.js +207 -0
  163. package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -0
  164. package/build-module/components/global-styles/font-sizes/font-sizes-count.js +43 -0
  165. package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +1 -0
  166. package/build-module/components/global-styles/font-sizes/font-sizes.js +157 -0
  167. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -0
  168. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +61 -0
  169. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -0
  170. package/build-module/components/global-styles/hooks.js +0 -38
  171. package/build-module/components/global-styles/hooks.js.map +1 -1
  172. package/build-module/components/global-styles/preview-typography.js +39 -0
  173. package/build-module/components/global-styles/preview-typography.js.map +1 -0
  174. package/build-module/components/global-styles/screen-block.js +18 -1
  175. package/build-module/components/global-styles/screen-block.js.map +1 -1
  176. package/build-module/components/global-styles/screen-layout.js +5 -1
  177. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  178. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  179. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  180. package/build-module/components/global-styles/screen-style-variations.js +2 -2
  181. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  182. package/build-module/components/global-styles/screen-typography.js +3 -2
  183. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  184. package/build-module/components/global-styles/shadows-edit-panel.js +1 -2
  185. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  186. package/build-module/components/global-styles/size-control/index.js +79 -0
  187. package/build-module/components/global-styles/size-control/index.js.map +1 -0
  188. package/build-module/components/global-styles/style-variations-container.js +9 -6
  189. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  190. package/build-module/components/global-styles/typography-elements.js +0 -2
  191. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  192. package/build-module/components/global-styles/ui.js +8 -0
  193. package/build-module/components/global-styles/ui.js.map +1 -1
  194. package/build-module/components/global-styles/variations/variation.js +5 -5
  195. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  196. package/build-module/components/global-styles/variations/variations-color.js +5 -4
  197. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  198. package/build-module/components/global-styles/variations/variations-typography.js +16 -30
  199. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  200. package/build-module/components/global-styles-sidebar/index.js +2 -2
  201. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  202. package/build-module/components/layout/index.js +20 -8
  203. package/build-module/components/layout/index.js.map +1 -1
  204. package/build-module/components/layout/router.js +30 -43
  205. package/build-module/components/layout/router.js.map +1 -1
  206. package/build-module/components/page-patterns/header.js +1 -1
  207. package/build-module/components/page-patterns/header.js.map +1 -1
  208. package/build-module/components/page-patterns/index.js +66 -50
  209. package/build-module/components/page-patterns/index.js.map +1 -1
  210. package/build-module/components/page-patterns/search-items.js +28 -4
  211. package/build-module/components/page-patterns/search-items.js.map +1 -1
  212. package/build-module/components/page-patterns/use-patterns.js +23 -56
  213. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  214. package/build-module/components/page-templates/index.js +58 -53
  215. package/build-module/components/page-templates/index.js.map +1 -1
  216. package/build-module/components/pagination/index.js +4 -4
  217. package/build-module/components/pagination/index.js.map +1 -1
  218. package/build-module/components/post-edit/index.js +98 -0
  219. package/build-module/components/post-edit/index.js.map +1 -0
  220. package/build-module/components/post-fields/index.js +306 -0
  221. package/build-module/components/post-fields/index.js.map +1 -0
  222. package/build-module/components/post-list/index.js +275 -0
  223. package/build-module/components/post-list/index.js.map +1 -0
  224. package/build-module/components/posts-app/index.js +11 -17
  225. package/build-module/components/posts-app/index.js.map +1 -1
  226. package/build-module/components/posts-app/router.js +77 -0
  227. package/build-module/components/posts-app/router.js.map +1 -0
  228. package/build-module/components/revisions/index.js +10 -7
  229. package/build-module/components/revisions/index.js.map +1 -1
  230. package/build-module/components/save-panel/index.js +1 -1
  231. package/build-module/components/save-panel/index.js.map +1 -1
  232. package/build-module/components/sidebar-dataviews/add-new-view.js +4 -1
  233. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  234. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
  235. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  236. package/build-module/components/sidebar-dataviews/default-views.js +117 -92
  237. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  238. package/build-module/components/sidebar-dataviews/index.js +47 -5
  239. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  240. package/build-module/components/sidebar-navigation-screen-global-styles/content.js +57 -0
  241. package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -0
  242. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -47
  243. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  244. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -2
  245. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  246. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +3 -2
  247. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  248. package/build-module/components/site-hub/index.js +81 -1
  249. package/build-module/components/site-hub/index.js.map +1 -1
  250. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -1
  251. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  252. package/build-module/hooks/push-changes-to-global-styles/index.js +2 -2
  253. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  254. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +61 -38
  255. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  256. package/build-module/index.js +11 -2
  257. package/build-module/index.js.map +1 -1
  258. package/build-module/posts.js +57 -2
  259. package/build-module/posts.js.map +1 -1
  260. package/build-module/store/private-actions.js +7 -2
  261. package/build-module/store/private-actions.js.map +1 -1
  262. package/build-module/store/selectors.js +35 -7
  263. package/build-module/store/selectors.js.map +1 -1
  264. package/build-module/utils/get-filtered-template-parts.js +57 -0
  265. package/build-module/utils/get-filtered-template-parts.js.map +1 -0
  266. package/build-style/posts-rtl.css +668 -510
  267. package/build-style/posts.css +668 -510
  268. package/build-style/style-rtl.css +772 -702
  269. package/build-style/style.css +772 -702
  270. package/package.json +41 -41
  271. package/src/components/add-new-pattern/index.js +8 -2
  272. package/src/components/{add-new-page → add-new-post}/index.js +28 -22
  273. package/src/components/add-new-template/index.js +4 -1
  274. package/src/components/add-new-template/style.scss +4 -6
  275. package/src/components/block-editor/use-site-editor-settings.js +10 -101
  276. package/src/components/editor/index.js +21 -5
  277. package/src/components/global-styles/background-panel.js +0 -8
  278. package/src/components/global-styles/block-preview-panel.js +22 -9
  279. package/src/components/global-styles/font-families.js +66 -31
  280. package/src/components/global-styles/font-library-modal/font-collection.js +17 -32
  281. package/src/components/global-styles/font-library-modal/index.js +4 -2
  282. package/src/components/global-styles/font-library-modal/installed-fonts.js +94 -13
  283. package/src/components/global-styles/font-library-modal/style.scss +26 -10
  284. package/src/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +43 -0
  285. package/src/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +37 -0
  286. package/src/components/global-styles/font-sizes/font-size-preview.js +43 -0
  287. package/src/components/global-styles/font-sizes/font-size.js +250 -0
  288. package/src/components/global-styles/font-sizes/font-sizes-count.js +40 -0
  289. package/src/components/global-styles/font-sizes/font-sizes.js +263 -0
  290. package/src/components/global-styles/font-sizes/rename-font-size-dialog.js +70 -0
  291. package/src/components/global-styles/hooks.js +0 -41
  292. package/src/components/global-styles/preview-typography.js +39 -0
  293. package/src/components/global-styles/screen-block.js +20 -0
  294. package/src/components/global-styles/screen-layout.js +5 -1
  295. package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  296. package/src/components/global-styles/screen-style-variations.js +2 -2
  297. package/src/components/global-styles/screen-typography.js +3 -2
  298. package/src/components/global-styles/shadows-edit-panel.js +1 -2
  299. package/src/components/global-styles/size-control/index.js +86 -0
  300. package/src/components/global-styles/style-variations-container.js +14 -7
  301. package/src/components/global-styles/style.scss +13 -3
  302. package/src/components/global-styles/typography-elements.js +0 -4
  303. package/src/components/global-styles/ui.js +10 -0
  304. package/src/components/global-styles/variations/variation.js +5 -5
  305. package/src/components/global-styles/variations/variations-color.js +6 -4
  306. package/src/components/global-styles/variations/variations-typography.js +15 -33
  307. package/src/components/global-styles-sidebar/index.js +2 -2
  308. package/src/components/layout/index.js +24 -4
  309. package/src/components/layout/router.js +29 -37
  310. package/src/components/layout/style.scss +38 -8
  311. package/src/components/page-patterns/header.js +1 -1
  312. package/src/components/page-patterns/index.js +62 -64
  313. package/src/components/page-patterns/search-items.js +37 -3
  314. package/src/components/page-patterns/style.scss +1 -8
  315. package/src/components/page-patterns/use-patterns.js +43 -82
  316. package/src/components/page-templates/index.js +67 -64
  317. package/src/components/page-templates/style.scss +6 -9
  318. package/src/components/pagination/index.js +4 -4
  319. package/src/components/post-edit/index.js +96 -0
  320. package/src/components/post-edit/style.scss +9 -0
  321. package/src/components/post-fields/index.js +345 -0
  322. package/src/components/post-list/index.js +326 -0
  323. package/src/components/{page-pages → post-list}/style.scss +25 -8
  324. package/src/components/posts-app/index.js +9 -11
  325. package/src/components/posts-app/router.js +69 -0
  326. package/src/components/revisions/index.js +9 -1
  327. package/src/components/save-panel/index.js +1 -1
  328. package/src/components/sidebar/style.scss +6 -0
  329. package/src/components/sidebar-dataviews/add-new-view.js +2 -1
  330. package/src/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
  331. package/src/components/sidebar-dataviews/default-views.js +131 -106
  332. package/src/components/sidebar-dataviews/index.js +39 -4
  333. package/src/components/sidebar-navigation-screen-global-styles/content.js +55 -0
  334. package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -54
  335. package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +2 -1
  336. package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +10 -2
  337. package/src/components/site-hub/index.js +84 -1
  338. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -2
  339. package/src/hooks/push-changes-to-global-styles/index.js +2 -2
  340. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +28 -24
  341. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +72 -47
  342. package/src/index.js +14 -1
  343. package/src/posts.js +63 -2
  344. package/src/posts.scss +9 -0
  345. package/src/store/private-actions.js +7 -3
  346. package/src/store/selectors.js +53 -14
  347. package/src/store/test/selectors.js +1 -26
  348. package/src/style.scss +2 -2
  349. package/src/utils/get-filtered-template-parts.js +61 -0
  350. package/src/utils/test/get-filtered-template-parts.js +127 -0
  351. package/build/components/add-new-page/index.js.map +0 -1
  352. package/build/components/global-styles/screen-background.js +0 -36
  353. package/build/components/global-styles/screen-background.js.map +0 -1
  354. package/build/components/page-pages/index.js +0 -473
  355. package/build/components/page-pages/index.js.map +0 -1
  356. package/build/components/table/index.js +0 -35
  357. package/build/components/table/index.js.map +0 -1
  358. package/build-module/components/add-new-page/index.js.map +0 -1
  359. package/build-module/components/global-styles/screen-background.js +0 -30
  360. package/build-module/components/global-styles/screen-background.js.map +0 -1
  361. package/build-module/components/page-pages/index.js +0 -465
  362. package/build-module/components/page-pages/index.js.map +0 -1
  363. package/build-module/components/table/index.js +0 -30
  364. package/build-module/components/table/index.js.map +0 -1
  365. package/src/components/global-styles/screen-background.js +0 -29
  366. package/src/components/page-pages/index.js +0 -564
  367. package/src/components/table/index.js +0 -33
  368. package/src/components/table/style.scss +0 -38
@@ -0,0 +1,39 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __experimentalHStack as HStack } from '@wordpress/components';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import TypographyExample from './typography-example';
10
+ import PreviewIframe from './preview-iframe';
11
+
12
+ const StylesPreviewTypography = ( { variation, isFocused, withHoverView } ) => {
13
+ return (
14
+ <PreviewIframe
15
+ label={ variation.title }
16
+ isFocused={ isFocused }
17
+ withHoverView={ withHoverView }
18
+ >
19
+ { ( { ratio, key } ) => (
20
+ <HStack
21
+ key={ key }
22
+ spacing={ 10 * ratio }
23
+ justify="center"
24
+ style={ {
25
+ height: '100%',
26
+ overflow: 'hidden',
27
+ } }
28
+ >
29
+ <TypographyExample
30
+ variation={ variation }
31
+ fontSize={ 85 * ratio }
32
+ />
33
+ </HStack>
34
+ ) }
35
+ </PreviewIframe>
36
+ );
37
+ };
38
+
39
+ export default StylesPreviewTypography;
@@ -25,6 +25,11 @@ import {
25
25
  VariationsPanel,
26
26
  } from './variations/variations-panel';
27
27
 
28
+ // Initial control values where no block style is set.
29
+ const BACKGROUND_BLOCK_DEFAULT_VALUES = {
30
+ backgroundSize: 'cover',
31
+ };
32
+
28
33
  function applyFallbackStyle( border ) {
29
34
  if ( ! border ) {
30
35
  return border;
@@ -70,6 +75,8 @@ const {
70
75
  useHasFiltersPanel,
71
76
  useHasImageSettingsPanel,
72
77
  useGlobalStyle,
78
+ useHasBackgroundPanel,
79
+ BackgroundPanel: StylesBackgroundPanel,
73
80
  BorderPanel: StylesBorderPanel,
74
81
  ColorPanel: StylesColorPanel,
75
82
  TypographyPanel: StylesTypographyPanel,
@@ -77,6 +84,7 @@ const {
77
84
  FiltersPanel: StylesFiltersPanel,
78
85
  ImageSettingsPanel,
79
86
  AdvancedPanel: StylesAdvancedPanel,
87
+ useGlobalStyleLinks,
80
88
  } = unlock( blockEditorPrivateApis );
81
89
 
82
90
  function ScreenBlock( { name, variation } ) {
@@ -96,6 +104,7 @@ function ScreenBlock( { name, variation } ) {
96
104
  const [ rawSettings, setSettings ] = useGlobalSetting( '', name );
97
105
  const settings = useSettingsForBlockElement( rawSettings, name );
98
106
  const blockType = getBlockType( name );
107
+ const _links = useGlobalStyleLinks();
99
108
 
100
109
  // Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.
101
110
  if (
@@ -121,6 +130,7 @@ function ScreenBlock( { name, variation } ) {
121
130
  }
122
131
 
123
132
  const blockVariations = useBlockVariations( name );
133
+ const hasBackgroundPanel = useHasBackgroundPanel( settings );
124
134
  const hasTypographyPanel = useHasTypographyPanel( settings );
125
135
  const hasColorPanel = useHasColorPanel( settings );
126
136
  const hasBorderPanel = useHasBorderPanel( settings );
@@ -254,6 +264,16 @@ function ScreenBlock( { name, variation } ) {
254
264
  settings={ settings }
255
265
  />
256
266
  ) }
267
+ { hasBackgroundPanel && (
268
+ <StylesBackgroundPanel
269
+ inheritedValue={ inheritedStyle }
270
+ value={ style }
271
+ onChange={ setStyle }
272
+ settings={ settings }
273
+ defaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }
274
+ themeFileURIs={ _links?.[ 'wp:theme-file' ] }
275
+ />
276
+ ) }
257
277
  { hasTypographyPanel && (
258
278
  <StylesTypographyPanel
259
279
  inheritedValue={ inheritedStyle }
@@ -23,7 +23,11 @@ function ScreenLayout() {
23
23
  const [ rawSettings ] = useGlobalSetting( '' );
24
24
  const settings = useSettingsForBlockElement( rawSettings );
25
25
  const hasDimensionsPanel = useHasDimensionsPanel( settings );
26
- const hasBackgroundPanel = useHasBackgroundPanel( settings );
26
+ /*
27
+ * Use the raw settings to determine if the background panel should be displayed,
28
+ * as the background panel is not dependent on the block element settings.
29
+ */
30
+ const hasBackgroundPanel = useHasBackgroundPanel( rawSettings );
27
31
  return (
28
32
  <>
29
33
  <ScreenHeader title={ __( 'Layout' ) } />
@@ -163,7 +163,7 @@ function RevisionsButtons( {
163
163
  >
164
164
  <Button
165
165
  className="edit-site-global-styles-screen-revisions__revision-button"
166
- __experimentalIsFocusable
166
+ accessibleWhenDisabled
167
167
  disabled={ isSelected }
168
168
  onClick={ () => {
169
169
  onChange( revision );
@@ -9,7 +9,7 @@ import { useZoomOut } from '@wordpress/block-editor';
9
9
  * Internal dependencies
10
10
  */
11
11
  import ScreenHeader from './header';
12
- import StyleVariationsContainer from './style-variations-container';
12
+ import SidebarNavigationScreenGlobalStylesContent from '../sidebar-navigation-screen-global-styles/content';
13
13
 
14
14
  function ScreenStyleVariations() {
15
15
  // Move to zoom out mode when this component is mounted
@@ -31,7 +31,7 @@ function ScreenStyleVariations() {
31
31
  className="edit-site-global-styles-screen-style-variations"
32
32
  >
33
33
  <CardBody>
34
- <StyleVariationsContainer />
34
+ <SidebarNavigationScreenGlobalStylesContent />
35
35
  </CardBody>
36
36
  </Card>
37
37
  </>
@@ -13,6 +13,7 @@ import TypographyElements from './typography-elements';
13
13
  import TypographyVariations from './variations/variations-typography';
14
14
  import FontFamilies from './font-families';
15
15
  import ScreenHeader from './header';
16
+ import FontSizesCount from './font-sizes/font-sizes-count';
16
17
 
17
18
  function ScreenTypography() {
18
19
  const fontLibraryEnabled = useSelect(
@@ -31,10 +32,10 @@ function ScreenTypography() {
31
32
  />
32
33
  <div className="edit-site-global-styles-screen">
33
34
  <VStack spacing={ 7 }>
34
- { ! window.__experimentalDisableFontLibrary &&
35
- fontLibraryEnabled && <FontFamilies /> }
35
+ { fontLibraryEnabled && <FontFamilies /> }
36
36
  <TypographyElements />
37
37
  <TypographyVariations title={ __( 'Presets' ) } />
38
+ <FontSizesCount />
38
39
  </VStack>
39
40
  </div>
40
41
  </>
@@ -371,8 +371,7 @@ function ShadowItem( { shadow, onChange, canRemove, onRemove } ) {
371
371
  'edit-site-global-styles__shadow-editor__remove-button',
372
372
  { 'is-open': isOpen }
373
373
  ),
374
- ariaLabel: __( 'Remove shadow' ),
375
- tooltip: __( 'Remove shadow' ),
374
+ label: __( 'Remove shadow' ),
376
375
  };
377
376
 
378
377
  return (
@@ -0,0 +1,86 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import {
10
+ BaseControl,
11
+ RangeControl,
12
+ Flex,
13
+ FlexItem,
14
+ useBaseControlProps,
15
+ __experimentalUseCustomUnits as useCustomUnits,
16
+ __experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,
17
+ __experimentalUnitControl as UnitControl,
18
+ __experimentalSpacer as Spacer,
19
+ } from '@wordpress/components';
20
+
21
+ const DEFAULT_UNITS = [ 'px', 'em', 'rem', 'vw', 'vh' ];
22
+
23
+ function SizeControl( props ) {
24
+ const { baseControlProps } = useBaseControlProps( props );
25
+ const { value, onChange, fallbackValue, disabled } = props;
26
+
27
+ const units = useCustomUnits( {
28
+ availableUnits: DEFAULT_UNITS,
29
+ } );
30
+
31
+ const [ valueQuantity, valueUnit = 'px' ] =
32
+ parseQuantityAndUnitFromRawValue( value, units );
33
+
34
+ const isValueUnitRelative =
35
+ !! valueUnit && [ 'em', 'rem', 'vw', 'vh' ].includes( valueUnit );
36
+
37
+ // Receives the new value from the UnitControl component as a string containing the value and unit.
38
+ const handleUnitControlChange = ( newValue ) => {
39
+ onChange( newValue );
40
+ };
41
+
42
+ // Receives the new value from the RangeControl component as a number.
43
+ const handleRangeControlChange = ( newValue ) => {
44
+ onChange?.( newValue + valueUnit );
45
+ };
46
+
47
+ return (
48
+ <BaseControl { ...baseControlProps }>
49
+ <Flex>
50
+ <FlexItem isBlock>
51
+ <UnitControl
52
+ __next40pxDefaultSize
53
+ __nextHasNoMarginBottom
54
+ label={ __( 'Custom' ) }
55
+ hideLabelFromVision
56
+ value={ value }
57
+ onChange={ handleUnitControlChange }
58
+ units={ units }
59
+ min={ 0 }
60
+ disabled={ disabled }
61
+ />
62
+ </FlexItem>
63
+ <FlexItem isBlock>
64
+ <Spacer marginX={ 2 } marginBottom={ 0 }>
65
+ <RangeControl
66
+ __next40pxDefaultSize
67
+ __nextHasNoMarginBottom
68
+ label={ __( 'Custom Size' ) }
69
+ hideLabelFromVision
70
+ value={ valueQuantity }
71
+ initialPosition={ fallbackValue }
72
+ withInputField={ false }
73
+ onChange={ handleRangeControlChange }
74
+ min={ 0 }
75
+ max={ isValueUnitRelative ? 10 : 100 }
76
+ step={ isValueUnitRelative ? 0.1 : 1 }
77
+ disabled={ disabled }
78
+ />
79
+ </Spacer>
80
+ </FlexItem>
81
+ </Flex>
82
+ </BaseControl>
83
+ );
84
+ }
85
+
86
+ export default SizeControl;
@@ -13,7 +13,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
13
13
  */
14
14
  import PreviewStyles from './preview-styles';
15
15
  import Variation from './variations/variation';
16
- import { isVariationWithSingleProperty } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
16
+ import { isVariationWithProperties } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
17
17
  import { unlock } from '../../lock-unlock';
18
18
 
19
19
  const { GlobalStylesContext } = unlock( blockEditorPrivateApis );
@@ -33,11 +33,14 @@ export default function StyleVariationsContainer( { gap = 2 } ) {
33
33
  ).__experimentalGetCurrentThemeGlobalStylesVariations();
34
34
  }, [] );
35
35
 
36
- // Filter out variations that are of single property type, i.e. color or typography variations.
37
- const multiplePropertyVariations = variations?.filter( ( variation ) => {
36
+ // Filter out variations that are color or typography variations.
37
+ const fullStyleVariations = variations?.filter( ( variation ) => {
38
38
  return (
39
- ! isVariationWithSingleProperty( variation, 'color' ) &&
40
- ! isVariationWithSingleProperty( variation, 'typography' )
39
+ ! isVariationWithProperties( variation, [ 'color' ] ) &&
40
+ ! isVariationWithProperties( variation, [
41
+ 'typography',
42
+ 'spacing',
43
+ ] )
41
44
  );
42
45
  } );
43
46
 
@@ -48,7 +51,7 @@ export default function StyleVariationsContainer( { gap = 2 } ) {
48
51
  settings: {},
49
52
  styles: {},
50
53
  },
51
- ...( multiplePropertyVariations ?? [] ),
54
+ ...( fullStyleVariations ?? [] ),
52
55
  ];
53
56
  return [
54
57
  ...withEmptyVariation.map( ( variation ) => {
@@ -105,7 +108,11 @@ export default function StyleVariationsContainer( { gap = 2 } ) {
105
108
  };
106
109
  } ),
107
110
  ];
108
- }, [ multiplePropertyVariations, userStyles?.blocks, userStyles?.css ] );
111
+ }, [ fullStyleVariations, userStyles?.blocks, userStyles?.css ] );
112
+
113
+ if ( ! fullStyleVariations || fullStyleVariations?.length < 1 ) {
114
+ return null;
115
+ }
109
116
 
110
117
  return (
111
118
  <Grid
@@ -23,6 +23,17 @@
23
23
  overflow: hidden;
24
24
  }
25
25
 
26
+ .edit-site-font-size__item {
27
+ white-space: nowrap;
28
+ text-overflow: ellipsis;
29
+ overflow: hidden;
30
+ line-break: anywhere;
31
+ }
32
+
33
+ .edit-site-font-size__item-value {
34
+ color: $gray-700;
35
+ }
36
+
26
37
  .edit-site-global-styles-screen {
27
38
  margin: $grid-unit-15 $grid-unit-20 $grid-unit-20;
28
39
  }
@@ -41,7 +52,6 @@
41
52
  color: $gray-700;
42
53
  }
43
54
 
44
- .edit-site-global-styles-font-families__add-fonts,
45
55
  .edit-site-global-styles-font-families__manage-fonts {
46
56
  justify-content: center;
47
57
  }
@@ -102,13 +112,13 @@
102
112
  .edit-site-global-styles__block-preview-panel {
103
113
  position: relative;
104
114
  width: 100%;
105
- overflow: auto;
106
115
  border: $gray-200 $border-width solid;
107
116
  border-radius: $radius-block-ui;
117
+ overflow: hidden;
108
118
  }
109
119
 
110
120
  .edit-site-global-styles__shadow-preview-panel {
111
- height: 150px;
121
+ height: $grid-unit-60 * 3;
112
122
  border: $gray-200 $border-width solid;
113
123
  border-radius: $radius-block-ui;
114
124
  overflow: auto;
@@ -31,9 +31,6 @@ function ElementItem( { parentMenu, element, label } ) {
31
31
  const [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );
32
32
  const [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );
33
33
  const [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );
34
- const [ letterSpacing ] = useGlobalStyle(
35
- prefix + 'typography.letterSpacing'
36
- );
37
34
  const [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );
38
35
  const [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );
39
36
  const [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );
@@ -62,7 +59,6 @@ function ElementItem( { parentMenu, element, label } ) {
62
59
  color,
63
60
  fontStyle,
64
61
  fontWeight,
65
- letterSpacing,
66
62
  ...extraStyles,
67
63
  } }
68
64
  >
@@ -33,6 +33,8 @@ import {
33
33
  import ScreenBlock from './screen-block';
34
34
  import ScreenTypography from './screen-typography';
35
35
  import ScreenTypographyElement from './screen-typography-element';
36
+ import FontSize from './font-sizes/font-size';
37
+ import FontSizes from './font-sizes/font-sizes';
36
38
  import ScreenColors from './screen-colors';
37
39
  import ScreenColorPalette from './screen-color-palette';
38
40
  import { ScreenShadows, ScreenShadowsEdit } from './screen-shadows';
@@ -313,6 +315,14 @@ function GlobalStylesUI() {
313
315
  <ScreenTypography />
314
316
  </GlobalStylesNavigationScreen>
315
317
 
318
+ <GlobalStylesNavigationScreen path="/typography/font-sizes/">
319
+ <FontSizes />
320
+ </GlobalStylesNavigationScreen>
321
+
322
+ <GlobalStylesNavigationScreen path="/typography/font-sizes/:origin/:slug">
323
+ <FontSize />
324
+ </GlobalStylesNavigationScreen>
325
+
316
326
  <GlobalStylesNavigationScreen path="/typography/text">
317
327
  <ScreenTypographyElement element="text" />
318
328
  </GlobalStylesNavigationScreen>
@@ -16,7 +16,7 @@ import { privateApis as editorPrivateApis } from '@wordpress/editor';
16
16
  /**
17
17
  * Internal dependencies
18
18
  */
19
- import { filterObjectByProperty } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
19
+ import { filterObjectByProperties } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
20
20
  import { unlock } from '../../../lock-unlock';
21
21
 
22
22
  const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
@@ -28,7 +28,7 @@ export default function Variation( {
28
28
  variation,
29
29
  children,
30
30
  isPill,
31
- property,
31
+ properties,
32
32
  showTooltip,
33
33
  } ) {
34
34
  const [ isFocused, setIsFocused ] = useState( false );
@@ -36,8 +36,8 @@ export default function Variation( {
36
36
 
37
37
  const context = useMemo( () => {
38
38
  let merged = mergeBaseAndUserConfigs( base, variation );
39
- if ( property ) {
40
- merged = filterObjectByProperty( merged, property );
39
+ if ( properties ) {
40
+ merged = filterObjectByProperties( merged, properties );
41
41
  }
42
42
  return {
43
43
  user: variation,
@@ -45,7 +45,7 @@ export default function Variation( {
45
45
  merged,
46
46
  setUserConfig: () => {},
47
47
  };
48
- }, [ variation, base, property ] );
48
+ }, [ variation, base, properties ] );
49
49
 
50
50
  const selectVariation = () => setUserConfig( variation );
51
51
 
@@ -2,20 +2,22 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import {
5
- __experimentalVStack as VStack,
6
5
  __experimentalGrid as Grid,
6
+ __experimentalVStack as VStack,
7
7
  } from '@wordpress/components';
8
8
 
9
9
  /**
10
10
  * Internal dependencies
11
11
  */
12
12
  import StylesPreviewColors from '../preview-colors';
13
- import { useColorVariations } from '../hooks';
13
+ import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
14
14
  import Subtitle from '../subtitle';
15
15
  import Variation from './variation';
16
16
 
17
17
  export default function ColorVariations( { title, gap = 2 } ) {
18
- const colorVariations = useColorVariations();
18
+ const propertiesToFilter = [ 'color' ];
19
+ const colorVariations =
20
+ useCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );
19
21
 
20
22
  // Return null if there is only one variation (the default).
21
23
  if ( colorVariations?.length <= 1 ) {
@@ -31,7 +33,7 @@ export default function ColorVariations( { title, gap = 2 } ) {
31
33
  key={ index }
32
34
  variation={ variation }
33
35
  isPill
34
- property="color"
36
+ properties={ propertiesToFilter }
35
37
  showTooltip
36
38
  >
37
39
  { () => <StylesPreviewColors /> }
@@ -3,21 +3,21 @@
3
3
  */
4
4
  import {
5
5
  __experimentalGrid as Grid,
6
- __experimentalVStack as HStack,
7
6
  __experimentalVStack as VStack,
8
7
  } from '@wordpress/components';
9
8
 
10
9
  /**
11
10
  * Internal dependencies
12
11
  */
13
- import { useTypographyVariations } from '../hooks';
14
- import TypographyExample from '../typography-example';
15
- import PreviewIframe from '../preview-iframe';
16
- import Variation from './variation';
12
+ import StylesPreviewTypography from '../preview-typography';
13
+ import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
17
14
  import Subtitle from '../subtitle';
15
+ import Variation from './variation';
18
16
 
19
17
  export default function TypographyVariations( { title, gap = 2 } ) {
20
- const typographyVariations = useTypographyVariations();
18
+ const propertiesToFilter = [ 'typography' ];
19
+ const typographyVariations =
20
+ useCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );
21
21
 
22
22
  // Return null if there is only one variation (the default).
23
23
  if ( typographyVariations?.length <= 1 ) {
@@ -32,40 +32,22 @@ export default function TypographyVariations( { title, gap = 2 } ) {
32
32
  gap={ gap }
33
33
  className="edit-site-global-styles-style-variations-container"
34
34
  >
35
- { typographyVariations &&
36
- typographyVariations.length &&
37
- typographyVariations.map( ( variation, index ) => (
35
+ { typographyVariations.map( ( variation, index ) => {
36
+ return (
38
37
  <Variation
39
38
  key={ index }
40
39
  variation={ variation }
41
- property="typography"
40
+ properties={ propertiesToFilter }
42
41
  showTooltip
43
42
  >
44
- { ( isFocused ) => (
45
- <PreviewIframe
46
- label={ variation?.title }
47
- isFocused={ isFocused }
48
- >
49
- { ( { ratio, key } ) => (
50
- <HStack
51
- key={ key }
52
- spacing={ 10 * ratio }
53
- justify="center"
54
- style={ {
55
- height: '100%',
56
- overflow: 'hidden',
57
- } }
58
- >
59
- <TypographyExample
60
- variation={ variation }
61
- fontSize={ 85 * ratio }
62
- />
63
- </HStack>
64
- ) }
65
- </PreviewIframe>
43
+ { () => (
44
+ <StylesPreviewTypography
45
+ variation={ variation }
46
+ />
66
47
  ) }
67
48
  </Variation>
68
- ) ) }
49
+ );
50
+ } ) }
69
51
  </Grid>
70
52
  </VStack>
71
53
  );
@@ -152,7 +152,7 @@ export default function GlobalStylesSidebar() {
152
152
  isPressed={
153
153
  isStyleBookOpened || isRevisionsStyleBookOpened
154
154
  }
155
- __experimentalIsFocusable
155
+ accessibleWhenDisabled
156
156
  disabled={ shouldClearCanvasContainerView }
157
157
  onClick={ toggleStyleBook }
158
158
  size="compact"
@@ -163,7 +163,7 @@ export default function GlobalStylesSidebar() {
163
163
  label={ __( 'Revisions' ) }
164
164
  icon={ backup }
165
165
  onClick={ toggleRevisions }
166
- __experimentalIsFocusable
166
+ accessibleWhenDisabled
167
167
  disabled={ ! hasRevisions }
168
168
  isPressed={
169
169
  isRevisionsOpened || isRevisionsStyleBookOpened
@@ -34,16 +34,16 @@ import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands
34
34
  */
35
35
  import ErrorBoundary from '../error-boundary';
36
36
  import { store as editSiteStore } from '../../store';
37
- import SiteHub from '../site-hub';
37
+ import { default as SiteHub, SiteHubMobile } from '../site-hub';
38
38
  import ResizableFrame from '../resizable-frame';
39
39
  import { unlock } from '../../lock-unlock';
40
- import SavePanel from '../save-panel';
41
40
  import KeyboardShortcutsRegister from '../keyboard-shortcuts/register';
42
41
  import KeyboardShortcutsGlobal from '../keyboard-shortcuts/global';
43
42
  import { useIsSiteEditorLoading } from './hooks';
44
43
  import useMovingAnimation from './animation';
45
44
  import SidebarContent from '../sidebar';
46
45
  import SaveHub from '../save-hub';
46
+ import SavePanel from '../save-panel';
47
47
  import useSyncCanvasModeWithURL from '../sync-state-with-url/use-sync-canvas-mode-with-url';
48
48
 
49
49
  const { useCommands } = unlock( coreCommandsPrivateApis );
@@ -163,6 +163,7 @@ export default function Layout( { route } ) {
163
163
  { areas.sidebar }
164
164
  </SidebarContent>
165
165
  <SaveHub />
166
+ <SavePanel />
166
167
  </motion.div>
167
168
  ) }
168
169
  </AnimatePresence>
@@ -173,6 +174,16 @@ export default function Layout( { route } ) {
173
174
 
174
175
  { isMobileViewport && areas.mobile && (
175
176
  <div className="edit-site-layout__mobile">
177
+ { canvasMode !== 'edit' && (
178
+ <SidebarContent routeKey={ routeKey }>
179
+ <SiteHubMobile
180
+ ref={ toggleRef }
181
+ isTransparent={
182
+ isResizableFrameOversized
183
+ }
184
+ />
185
+ </SidebarContent>
186
+ ) }
176
187
  { areas.mobile }
177
188
  </div>
178
189
  ) }
@@ -190,6 +201,17 @@ export default function Layout( { route } ) {
190
201
  </div>
191
202
  ) }
192
203
 
204
+ { ! isMobileViewport && areas.edit && (
205
+ <div
206
+ className="edit-site-layout__area"
207
+ style={ {
208
+ maxWidth: widths?.edit,
209
+ } }
210
+ >
211
+ { areas.edit }
212
+ </div>
213
+ ) }
214
+
193
215
  { ! isMobileViewport && areas.preview && (
194
216
  <div className="edit-site-layout__canvas-container">
195
217
  { canvasResizer }
@@ -236,8 +258,6 @@ export default function Layout( { route } ) {
236
258
  </div>
237
259
  ) }
238
260
  </div>
239
-
240
- <SavePanel />
241
261
  </div>
242
262
  </>
243
263
  );