@wordpress/edit-site 6.9.0 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  3. package/build/components/add-new-template/utils.js.map +1 -1
  4. package/build/components/app/index.js +1 -1
  5. package/build/components/app/index.js.map +1 -1
  6. package/build/components/editor/index.js +0 -1
  7. package/build/components/editor/index.js.map +1 -1
  8. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  9. package/build/components/global-styles/font-families.js +41 -25
  10. package/build/components/global-styles/font-families.js.map +1 -1
  11. package/build/components/global-styles/font-family-item.js +1 -1
  12. package/build/components/global-styles/font-family-item.js.map +1 -1
  13. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  14. package/build/components/global-styles/font-library-modal/context.js +1 -0
  15. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  16. package/build/components/global-styles/font-library-modal/font-card.js +1 -1
  17. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  18. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  19. package/build/components/global-styles/font-library-modal/installed-fonts.js +4 -3
  20. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  21. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  22. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  23. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  24. package/build/components/global-styles/font-library-modal/upload-fonts.js +1 -0
  25. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  26. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  27. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  28. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  29. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +1 -1
  30. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -1
  31. package/build/components/global-styles/font-sizes/font-size.js +8 -9
  32. package/build/components/global-styles/font-sizes/font-size.js.map +1 -1
  33. package/build/components/global-styles/font-sizes/font-sizes-count.js +1 -1
  34. package/build/components/global-styles/font-sizes/font-sizes-count.js.map +1 -1
  35. package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  36. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  37. package/build/components/global-styles/palette.js.map +1 -1
  38. package/build/components/global-styles/preset-colors.js.map +1 -1
  39. package/build/components/global-styles/screen-block-list.js +2 -2
  40. package/build/components/global-styles/screen-block-list.js.map +1 -1
  41. package/build/components/global-styles/screen-revisions/index.js +3 -8
  42. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  43. package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  44. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  45. package/build/components/global-styles/screen-style-variations.js +9 -2
  46. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  47. package/build/components/global-styles/shadow-utils.js.map +1 -1
  48. package/build/components/global-styles/shadows-edit-panel.js +17 -5
  49. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  50. package/build/components/global-styles/shadows-panel.js +1 -1
  51. package/build/components/global-styles/shadows-panel.js.map +1 -1
  52. package/build/components/global-styles/style-variations-container.js +1 -5
  53. package/build/components/global-styles/style-variations-container.js.map +1 -1
  54. package/build/components/global-styles/typography-elements.js.map +1 -1
  55. package/build/components/global-styles/typography-preview.js.map +1 -1
  56. package/build/components/global-styles/ui.js +20 -14
  57. package/build/components/global-styles/ui.js.map +1 -1
  58. package/build/components/global-styles/utils.js.map +1 -1
  59. package/build/components/global-styles/variations/variation.js +1 -1
  60. package/build/components/global-styles/variations/variation.js.map +1 -1
  61. package/build/components/global-styles-sidebar/index.js +0 -6
  62. package/build/components/global-styles-sidebar/index.js.map +1 -1
  63. package/build/components/layout/animation.js.map +1 -1
  64. package/build/components/layout/index.js +3 -14
  65. package/build/components/layout/index.js.map +1 -1
  66. package/build/components/page-patterns/delete-category-menu-item.js +1 -1
  67. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  68. package/build/components/page-patterns/fields.js.map +1 -1
  69. package/build/components/page-patterns/header.js +1 -1
  70. package/build/components/page-patterns/header.js.map +1 -1
  71. package/build/components/page-patterns/index.js +4 -2
  72. package/build/components/page-patterns/index.js.map +1 -1
  73. package/build/components/page-templates/index.js +1 -0
  74. package/build/components/page-templates/index.js.map +1 -1
  75. package/build/components/post-fields/index.js +4 -4
  76. package/build/components/post-fields/index.js.map +1 -1
  77. package/build/components/revisions/index.js.map +1 -1
  78. package/build/components/routes/use-title.js +1 -1
  79. package/build/components/routes/use-title.js.map +1 -1
  80. package/build/components/save-button/index.js +3 -3
  81. package/build/components/save-button/index.js.map +1 -1
  82. package/build/components/save-panel/index.js +1 -1
  83. package/build/components/save-panel/index.js.map +1 -1
  84. package/build/components/sidebar-button/index.js +1 -1
  85. package/build/components/sidebar-button/index.js.map +1 -1
  86. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  87. package/build/components/sidebar-navigation-screen-details-footer/index.js +1 -1
  88. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  89. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  90. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +4 -4
  91. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  92. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +2 -2
  93. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  94. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  95. package/build/components/style-book/constants.js.map +1 -1
  96. package/build/components/style-book/index.js.map +1 -1
  97. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  98. package/build/deprecated.js.map +1 -1
  99. package/build/hooks/commands/use-edit-mode-commands.js +5 -5
  100. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  101. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  102. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  103. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  104. package/build/index.js +2 -4
  105. package/build/index.js.map +1 -1
  106. package/build/posts.js +1 -1
  107. package/build/posts.js.map +1 -1
  108. package/build/store/actions.js.map +1 -1
  109. package/build/store/private-actions.js +0 -1
  110. package/build/store/private-actions.js.map +1 -1
  111. package/build/store/selectors.js.map +1 -1
  112. package/build/utils/get-filtered-template-parts.js.map +1 -1
  113. package/build-module/components/add-new-pattern/index.js +1 -3
  114. package/build-module/components/add-new-pattern/index.js.map +1 -1
  115. package/build-module/components/add-new-post/index.js +1 -2
  116. package/build-module/components/add-new-post/index.js.map +1 -1
  117. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -2
  118. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  119. package/build-module/components/add-new-template/add-custom-template-modal-content.js +1 -3
  120. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  121. package/build-module/components/add-new-template/index.js +1 -3
  122. package/build-module/components/add-new-template/index.js.map +1 -1
  123. package/build-module/components/add-new-template/utils.js.map +1 -1
  124. package/build-module/components/app/index.js +2 -3
  125. package/build-module/components/app/index.js.map +1 -1
  126. package/build-module/components/editor/index.js +1 -4
  127. package/build-module/components/editor/index.js.map +1 -1
  128. package/build-module/components/editor-canvas-container/index.js +1 -2
  129. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  130. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  131. package/build-module/components/global-styles/color-palette-panel.js +1 -2
  132. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  133. package/build-module/components/global-styles/font-families.js +45 -31
  134. package/build-module/components/global-styles/font-families.js.map +1 -1
  135. package/build-module/components/global-styles/font-family-item.js +2 -3
  136. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  137. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +1 -2
  138. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  139. package/build-module/components/global-styles/font-library-modal/context.js +1 -0
  140. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  141. package/build-module/components/global-styles/font-library-modal/font-card.js +2 -3
  142. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  143. package/build-module/components/global-styles/font-library-modal/font-collection.js +1 -3
  144. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  145. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +1 -2
  146. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  147. package/build-module/components/global-styles/font-library-modal/index.js +1 -2
  148. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  149. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +5 -6
  150. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  151. package/build-module/components/global-styles/font-library-modal/library-font-details.js +1 -3
  152. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  153. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +1 -2
  154. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  155. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  156. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +2 -2
  157. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  158. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  159. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  160. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  161. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +1 -1
  162. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -1
  163. package/build-module/components/global-styles/font-sizes/font-size.js +9 -12
  164. package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -1
  165. package/build-module/components/global-styles/font-sizes/font-sizes-count.js +2 -3
  166. package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +1 -1
  167. package/build-module/components/global-styles/font-sizes/font-sizes.js +1 -3
  168. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  169. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +1 -2
  170. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -1
  171. package/build-module/components/global-styles/gradients-palette-panel.js +1 -2
  172. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  173. package/build-module/components/global-styles/header.js +1 -2
  174. package/build-module/components/global-styles/header.js.map +1 -1
  175. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  176. package/build-module/components/global-styles/navigation-button.js +1 -2
  177. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  178. package/build-module/components/global-styles/palette.js +1 -2
  179. package/build-module/components/global-styles/palette.js.map +1 -1
  180. package/build-module/components/global-styles/preset-colors.js.map +1 -1
  181. package/build-module/components/global-styles/preview-iframe.js +1 -3
  182. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  183. package/build-module/components/global-styles/preview-styles.js +1 -2
  184. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  185. package/build-module/components/global-styles/root-menu.js +1 -3
  186. package/build-module/components/global-styles/root-menu.js.map +1 -1
  187. package/build-module/components/global-styles/screen-background.js +1 -3
  188. package/build-module/components/global-styles/screen-background.js.map +1 -1
  189. package/build-module/components/global-styles/screen-block-list.js +3 -5
  190. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  191. package/build-module/components/global-styles/screen-block.js +1 -3
  192. package/build-module/components/global-styles/screen-block.js.map +1 -1
  193. package/build-module/components/global-styles/screen-color-palette.js +1 -3
  194. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  195. package/build-module/components/global-styles/screen-colors.js +1 -3
  196. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  197. package/build-module/components/global-styles/screen-css.js +1 -3
  198. package/build-module/components/global-styles/screen-css.js.map +1 -1
  199. package/build-module/components/global-styles/screen-layout.js +1 -3
  200. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  201. package/build-module/components/global-styles/screen-revisions/index.js +5 -12
  202. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  203. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +2 -3
  204. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  205. package/build-module/components/global-styles/screen-root.js +1 -3
  206. package/build-module/components/global-styles/screen-root.js.map +1 -1
  207. package/build-module/components/global-styles/screen-style-variations.js +10 -5
  208. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  209. package/build-module/components/global-styles/screen-typography-element.js +1 -3
  210. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  211. package/build-module/components/global-styles/screen-typography.js +1 -3
  212. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  213. package/build-module/components/global-styles/shadow-utils.js.map +1 -1
  214. package/build-module/components/global-styles/shadows-edit-panel.js +19 -9
  215. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  216. package/build-module/components/global-styles/shadows-panel.js +2 -4
  217. package/build-module/components/global-styles/shadows-panel.js.map +1 -1
  218. package/build-module/components/global-styles/size-control/index.js +1 -2
  219. package/build-module/components/global-styles/size-control/index.js.map +1 -1
  220. package/build-module/components/global-styles/style-variations-container.js +2 -6
  221. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  222. package/build-module/components/global-styles/typeset.js +3 -5
  223. package/build-module/components/global-styles/typeset.js.map +1 -1
  224. package/build-module/components/global-styles/typography-elements.js +1 -2
  225. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  226. package/build-module/components/global-styles/typography-example.js +1 -2
  227. package/build-module/components/global-styles/typography-example.js.map +1 -1
  228. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  229. package/build-module/components/global-styles/ui.js +21 -17
  230. package/build-module/components/global-styles/ui.js.map +1 -1
  231. package/build-module/components/global-styles/utils.js.map +1 -1
  232. package/build-module/components/global-styles/variations/variation.js +1 -1
  233. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  234. package/build-module/components/global-styles/variations/variations-color.js +1 -2
  235. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  236. package/build-module/components/global-styles/variations/variations-typography.js +1 -2
  237. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  238. package/build-module/components/global-styles-sidebar/default-sidebar.js +1 -3
  239. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  240. package/build-module/components/global-styles-sidebar/index.js +2 -9
  241. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  242. package/build-module/components/layout/animation.js.map +1 -1
  243. package/build-module/components/layout/index.js +4 -17
  244. package/build-module/components/layout/index.js.map +1 -1
  245. package/build-module/components/more-menu/index.js +1 -3
  246. package/build-module/components/more-menu/index.js.map +1 -1
  247. package/build-module/components/page/header.js +1 -2
  248. package/build-module/components/page/header.js.map +1 -1
  249. package/build-module/components/page/index.js +1 -2
  250. package/build-module/components/page/index.js.map +1 -1
  251. package/build-module/components/page-patterns/delete-category-menu-item.js +2 -4
  252. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  253. package/build-module/components/page-patterns/fields.js +1 -2
  254. package/build-module/components/page-patterns/fields.js.map +1 -1
  255. package/build-module/components/page-patterns/header.js +2 -3
  256. package/build-module/components/page-patterns/header.js.map +1 -1
  257. package/build-module/components/page-patterns/index.js +5 -4
  258. package/build-module/components/page-patterns/index.js.map +1 -1
  259. package/build-module/components/page-patterns/rename-category-menu-item.js +1 -3
  260. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  261. package/build-module/components/page-templates/fields.js +1 -2
  262. package/build-module/components/page-templates/fields.js.map +1 -1
  263. package/build-module/components/page-templates/index.js +1 -0
  264. package/build-module/components/page-templates/index.js.map +1 -1
  265. package/build-module/components/pagination/index.js +1 -2
  266. package/build-module/components/pagination/index.js.map +1 -1
  267. package/build-module/components/post-edit/index.js +1 -2
  268. package/build-module/components/post-edit/index.js.map +1 -1
  269. package/build-module/components/post-fields/index.js +5 -6
  270. package/build-module/components/post-fields/index.js.map +1 -1
  271. package/build-module/components/post-list/index.js +1 -3
  272. package/build-module/components/post-list/index.js.map +1 -1
  273. package/build-module/components/posts-app/index.js +1 -2
  274. package/build-module/components/posts-app/index.js.map +1 -1
  275. package/build-module/components/resizable-frame/index.js +1 -3
  276. package/build-module/components/resizable-frame/index.js.map +1 -1
  277. package/build-module/components/revisions/index.js +1 -2
  278. package/build-module/components/revisions/index.js.map +1 -1
  279. package/build-module/components/routes/use-title.js +1 -1
  280. package/build-module/components/routes/use-title.js.map +1 -1
  281. package/build-module/components/save-button/index.js +3 -3
  282. package/build-module/components/save-button/index.js.map +1 -1
  283. package/build-module/components/save-panel/index.js +2 -3
  284. package/build-module/components/save-panel/index.js.map +1 -1
  285. package/build-module/components/sidebar-button/index.js +1 -1
  286. package/build-module/components/sidebar-button/index.js.map +1 -1
  287. package/build-module/components/sidebar-dataviews/add-new-view.js +1 -3
  288. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  289. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +1 -3
  290. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  291. package/build-module/components/sidebar-dataviews/dataview-item.js +1 -2
  292. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  293. package/build-module/components/sidebar-dataviews/index.js +1 -3
  294. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  295. package/build-module/components/sidebar-navigation-item/index.js +1 -2
  296. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  297. package/build-module/components/sidebar-navigation-screen/index.js +1 -3
  298. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  299. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -3
  300. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  301. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -2
  302. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  303. package/build-module/components/sidebar-navigation-screen-global-styles/content.js +1 -2
  304. package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
  305. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +1 -3
  306. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  307. package/build-module/components/sidebar-navigation-screen-main/index.js +1 -3
  308. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  309. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  310. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +1 -3
  311. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  312. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -2
  313. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  314. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -2
  315. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  316. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +4 -4
  317. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  318. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +3 -5
  319. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  320. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +1 -3
  321. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  322. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -3
  323. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  324. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +1 -2
  325. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  326. package/build-module/components/site-hub/index.js +1 -2
  327. package/build-module/components/site-hub/index.js.map +1 -1
  328. package/build-module/components/style-book/constants.js.map +1 -1
  329. package/build-module/components/style-book/index.js +1 -2
  330. package/build-module/components/style-book/index.js.map +1 -1
  331. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  332. package/build-module/components/welcome-guide/editor.js +1 -3
  333. package/build-module/components/welcome-guide/editor.js.map +1 -1
  334. package/build-module/components/welcome-guide/image.js +1 -2
  335. package/build-module/components/welcome-guide/image.js.map +1 -1
  336. package/build-module/components/welcome-guide/index.js +1 -3
  337. package/build-module/components/welcome-guide/index.js.map +1 -1
  338. package/build-module/components/welcome-guide/page.js +1 -3
  339. package/build-module/components/welcome-guide/page.js.map +1 -1
  340. package/build-module/components/welcome-guide/styles.js +1 -3
  341. package/build-module/components/welcome-guide/styles.js.map +1 -1
  342. package/build-module/components/welcome-guide/template.js +1 -3
  343. package/build-module/components/welcome-guide/template.js.map +1 -1
  344. package/build-module/deprecated.js.map +1 -1
  345. package/build-module/hooks/commands/use-edit-mode-commands.js +5 -5
  346. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  347. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -3
  348. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  349. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  350. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  351. package/build-module/index.js +2 -4
  352. package/build-module/index.js.map +1 -1
  353. package/build-module/posts.js +1 -1
  354. package/build-module/posts.js.map +1 -1
  355. package/build-module/store/actions.js.map +1 -1
  356. package/build-module/store/private-actions.js +0 -1
  357. package/build-module/store/private-actions.js.map +1 -1
  358. package/build-module/store/selectors.js.map +1 -1
  359. package/build-module/utils/get-filtered-template-parts.js.map +1 -1
  360. package/build-style/posts-rtl.css +34 -37
  361. package/build-style/posts.css +34 -37
  362. package/build-style/style-rtl.css +38 -39
  363. package/build-style/style.css +38 -39
  364. package/package.json +42 -42
  365. package/src/components/editor/index.js +0 -1
  366. package/src/components/global-styles/font-families.js +51 -35
  367. package/src/components/global-styles/font-sizes/font-size.js +9 -6
  368. package/src/components/global-styles/font-sizes/font-sizes-count.js +1 -1
  369. package/src/components/global-styles/screen-block-list.js +1 -1
  370. package/src/components/global-styles/screen-revisions/index.js +2 -11
  371. package/src/components/global-styles/screen-style-variations.js +7 -2
  372. package/src/components/global-styles/shadows-edit-panel.js +21 -5
  373. package/src/components/global-styles/style-variations-container.js +2 -7
  374. package/src/components/global-styles/ui.js +18 -12
  375. package/src/components/global-styles-sidebar/index.js +1 -11
  376. package/src/components/layout/index.js +7 -23
  377. package/src/components/page-patterns/index.js +3 -2
  378. package/src/components/sidebar-button/index.js +1 -1
  379. package/src/components/sidebar-button/style.scss +2 -2
  380. package/src/components/sidebar-navigation-screen/style.scss +5 -1
  381. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  382. package/src/index.js +1 -5
  383. package/src/store/private-actions.js +0 -3
@@ -827,44 +827,31 @@ ul.dataviews-view-list {
827
827
  }
828
828
  .dataviews-view-list li {
829
829
  margin: 0;
830
- cursor: pointer;
831
830
  border-top: 1px solid #f0f0f0;
832
831
  }
833
832
  .dataviews-view-list li .dataviews-view-list__item-wrapper {
834
833
  position: relative;
835
- border-radius: 4px;
836
- }
837
- .dataviews-view-list li .dataviews-view-list__item-wrapper > * {
838
- width: 100%;
834
+ padding: 16px 24px;
839
835
  }
840
836
  .dataviews-view-list li .dataviews-view-list__item-actions {
841
- position: absolute;
842
- top: 16px;
843
- right: 0;
837
+ flex: 0;
838
+ overflow: hidden;
844
839
  }
845
840
  .dataviews-view-list li .dataviews-view-list__item-actions > div {
846
841
  height: 24px;
847
842
  }
848
843
  .dataviews-view-list li .dataviews-view-list__item-actions .components-button {
844
+ position: relative;
845
+ z-index: 1;
849
846
  opacity: 0;
850
847
  }
851
- .dataviews-view-list li:has(.dataviews-view-list__fields:empty) .dataviews-view-list__item-actions {
852
- top: 50%;
853
- transform: translateY(-50%);
854
- }
855
- .dataviews-view-list li.is-selected .dataviews-view-list__item-actions, .dataviews-view-list li.is-hovered .dataviews-view-list__item-actions, .dataviews-view-list li:focus-within .dataviews-view-list__item-actions {
856
- background: #f8f8f8;
857
- padding-left: 8px;
858
- margin-right: 24px;
859
- box-shadow: -12px 0 8px 0 #f8f8f8;
848
+ .dataviews-view-list li:where(.is-selected, .is-hovered, :focus-within) .dataviews-view-list__item-actions {
849
+ flex-basis: min-content;
850
+ overflow: unset;
851
+ margin-inline: 8px 0;
860
852
  }
861
- .dataviews-view-list li.is-selected .dataviews-view-list__item-actions .components-button, .dataviews-view-list li.is-hovered .dataviews-view-list__item-actions .components-button, .dataviews-view-list li:focus-within .dataviews-view-list__item-actions .components-button {
853
+ .dataviews-view-list li:where(.is-selected, .is-hovered, :focus-within) .dataviews-view-list__item-actions .components-button {
862
854
  opacity: 1;
863
- position: static;
864
- }
865
- .dataviews-view-list li.is-selected .dataviews-view-list__item-actions {
866
- background-color: #f7f8ff;
867
- box-shadow: -12px 0 8px 0 #f7f8ff;
868
855
  }
869
856
  .dataviews-view-list li.is-selected.is-selected {
870
857
  border-top: 1px solid rgba(var(--wp-admin-theme-color--rgb), 0.12);
@@ -897,26 +884,36 @@ ul.dataviews-view-list {
897
884
  color: var(--wp-admin-theme-color);
898
885
  }
899
886
  .dataviews-view-list .dataviews-view-list__item {
900
- box-sizing: border-box;
901
- padding: 16px 24px;
902
- width: 100%;
887
+ position: absolute;
888
+ z-index: 1;
889
+ inset: 0;
903
890
  scroll-margin: 8px 0;
891
+ appearance: none;
892
+ border: none;
893
+ background: none;
894
+ padding: 0;
895
+ cursor: pointer;
896
+ }
897
+ .dataviews-view-list .dataviews-view-list__item:focus-visible {
898
+ outline: none;
904
899
  }
905
900
  .dataviews-view-list .dataviews-view-list__item:focus-visible::before {
906
901
  position: absolute;
907
902
  content: "";
908
- top: var(--wp-admin-border-width-focus);
909
- right: var(--wp-admin-border-width-focus);
910
- bottom: var(--wp-admin-border-width-focus);
911
- left: var(--wp-admin-border-width-focus);
903
+ inset: var(--wp-admin-border-width-focus);
912
904
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
913
905
  border-radius: 2px;
906
+ outline: 2px solid transparent;
914
907
  }
915
- .dataviews-view-list .dataviews-view-list__item .dataviews-view-list__primary-field {
908
+ .dataviews-view-list .dataviews-view-list__primary-field {
909
+ flex: 1;
916
910
  min-height: 24px;
917
911
  line-height: 24px;
918
912
  overflow: hidden;
919
913
  }
914
+ .dataviews-view-list .dataviews-view-list__primary-field:has(a, button) {
915
+ z-index: 1;
916
+ }
920
917
  .dataviews-view-list .dataviews-view-list__media-wrapper {
921
918
  width: 52px;
922
919
  height: 52px;
@@ -948,6 +945,7 @@ ul.dataviews-view-list {
948
945
  }
949
946
  .dataviews-view-list .dataviews-view-list__field-wrapper {
950
947
  min-height: 52px;
948
+ flex-grow: 1;
951
949
  }
952
950
  .dataviews-view-list .dataviews-view-list__fields {
953
951
  color: #757575;
@@ -1155,8 +1153,7 @@ ul.dataviews-view-list {
1155
1153
  align-items: center;
1156
1154
  padding: 6px 0;
1157
1155
  line-height: 20px;
1158
- -webkit-hyphens: auto;
1159
- hyphens: auto;
1156
+ hyphens: auto;
1160
1157
  }
1161
1158
 
1162
1159
  .dataforms-layouts-panel__field-control {
@@ -2546,7 +2543,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2546
2543
  contain: content;
2547
2544
  }
2548
2545
 
2549
- @keyframes _u3rbd_slide-from-right {
2546
+ @keyframes _s81uu_slide-from-right {
2550
2547
  from {
2551
2548
  transform: translateX(50px);
2552
2549
  opacity: 0;
@@ -2556,7 +2553,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2556
2553
  opacity: 1;
2557
2554
  }
2558
2555
  }
2559
- @keyframes _u3rbd_slide-from-left {
2556
+ @keyframes _s81uu_slide-from-left {
2560
2557
  from {
2561
2558
  transform: translateX(-50px);
2562
2559
  opacity: 0;
@@ -2612,10 +2609,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2612
2609
  }
2613
2610
  }
2614
2611
  .edit-site-sidebar__screen-wrapper.slide-from-left {
2615
- animation-name: _u3rbd_slide-from-left;
2612
+ animation-name: _s81uu_slide-from-left;
2616
2613
  }
2617
2614
  .edit-site-sidebar__screen-wrapper.slide-from-right {
2618
- animation-name: _u3rbd_slide-from-right;
2615
+ animation-name: _s81uu_slide-from-right;
2619
2616
  }
2620
2617
 
2621
2618
  .edit-site-sidebar-button {
@@ -2630,7 +2627,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2630
2627
  box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2631
2628
  outline: 3px solid transparent;
2632
2629
  }
2633
- .edit-site-sidebar-button:hover, .edit-site-sidebar-button:focus-visible, .edit-site-sidebar-button:focus, .edit-site-sidebar-button:not([aria-disabled=true]):active, .edit-site-sidebar-button[aria-expanded=true] {
2630
+ .edit-site-sidebar-button:hover:not(:disabled, [aria-disabled=true]), .edit-site-sidebar-button:focus-visible, .edit-site-sidebar-button:focus, .edit-site-sidebar-button:not(:disabled, [aria-disabled=true]):active, .edit-site-sidebar-button[aria-expanded=true] {
2634
2631
  color: #f0f0f0;
2635
2632
  }
2636
2633
 
@@ -2725,7 +2722,9 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2725
2722
  .edit-site-sidebar-navigation-screen__title {
2726
2723
  flex-grow: 1;
2727
2724
  overflow-wrap: break-word;
2728
- padding: 2px 0 0 0;
2725
+ }
2726
+ .edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title, .edit-site-sidebar-navigation-screen__title.edit-site-sidebar-navigation-screen__title .edit-site-sidebar-navigation-screen__title {
2727
+ line-height: 32px;
2729
2728
  }
2730
2729
 
2731
2730
  .edit-site-sidebar-navigation-screen__actions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "6.9.0",
3
+ "version": "6.10.0",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,47 +27,47 @@
27
27
  "module": "build-module/index.js",
28
28
  "react-native": "src/index",
29
29
  "dependencies": {
30
- "@babel/runtime": "^7.16.0",
30
+ "@babel/runtime": "7.25.7",
31
31
  "@react-spring/web": "^9.4.5",
32
- "@wordpress/a11y": "^4.9.0",
33
- "@wordpress/api-fetch": "^7.9.0",
34
- "@wordpress/blob": "^4.9.0",
35
- "@wordpress/block-editor": "^14.4.0",
36
- "@wordpress/block-library": "^9.9.0",
37
- "@wordpress/blocks": "^13.9.0",
38
- "@wordpress/commands": "^1.9.0",
39
- "@wordpress/components": "^28.9.0",
40
- "@wordpress/compose": "^7.9.0",
41
- "@wordpress/core-commands": "^1.9.0",
42
- "@wordpress/core-data": "^7.9.0",
43
- "@wordpress/data": "^10.9.0",
44
- "@wordpress/dataviews": "^4.5.0",
45
- "@wordpress/date": "^5.9.0",
46
- "@wordpress/deprecated": "^4.9.0",
47
- "@wordpress/dom": "^4.9.0",
48
- "@wordpress/editor": "^14.9.0",
49
- "@wordpress/element": "^6.9.0",
50
- "@wordpress/escape-html": "^3.9.0",
51
- "@wordpress/hooks": "^4.9.0",
52
- "@wordpress/html-entities": "^4.9.0",
53
- "@wordpress/i18n": "^5.9.0",
54
- "@wordpress/icons": "^10.9.0",
55
- "@wordpress/keyboard-shortcuts": "^5.9.0",
56
- "@wordpress/keycodes": "^4.9.0",
57
- "@wordpress/notices": "^5.9.0",
58
- "@wordpress/patterns": "^2.9.0",
59
- "@wordpress/plugins": "^7.9.0",
60
- "@wordpress/preferences": "^4.9.0",
61
- "@wordpress/primitives": "^4.9.0",
62
- "@wordpress/priority-queue": "^3.9.0",
63
- "@wordpress/private-apis": "^1.9.0",
64
- "@wordpress/reusable-blocks": "^5.9.0",
65
- "@wordpress/router": "^1.9.0",
66
- "@wordpress/style-engine": "^2.9.0",
67
- "@wordpress/url": "^4.9.0",
68
- "@wordpress/viewport": "^6.9.0",
69
- "@wordpress/widgets": "^4.9.0",
70
- "@wordpress/wordcount": "^4.9.0",
32
+ "@wordpress/a11y": "^4.10.0",
33
+ "@wordpress/api-fetch": "^7.10.0",
34
+ "@wordpress/blob": "^4.10.0",
35
+ "@wordpress/block-editor": "^14.5.0",
36
+ "@wordpress/block-library": "^9.10.0",
37
+ "@wordpress/blocks": "^13.10.0",
38
+ "@wordpress/commands": "^1.10.0",
39
+ "@wordpress/components": "^28.10.0",
40
+ "@wordpress/compose": "^7.10.0",
41
+ "@wordpress/core-commands": "^1.10.0",
42
+ "@wordpress/core-data": "^7.10.0",
43
+ "@wordpress/data": "^10.10.0",
44
+ "@wordpress/dataviews": "^4.6.0",
45
+ "@wordpress/date": "^5.10.0",
46
+ "@wordpress/deprecated": "^4.10.0",
47
+ "@wordpress/dom": "^4.10.0",
48
+ "@wordpress/editor": "^14.10.0",
49
+ "@wordpress/element": "^6.10.0",
50
+ "@wordpress/escape-html": "^3.10.0",
51
+ "@wordpress/hooks": "^4.10.0",
52
+ "@wordpress/html-entities": "^4.10.0",
53
+ "@wordpress/i18n": "^5.10.0",
54
+ "@wordpress/icons": "^10.10.0",
55
+ "@wordpress/keyboard-shortcuts": "^5.10.0",
56
+ "@wordpress/keycodes": "^4.10.0",
57
+ "@wordpress/notices": "^5.10.0",
58
+ "@wordpress/patterns": "^2.10.0",
59
+ "@wordpress/plugins": "^7.10.0",
60
+ "@wordpress/preferences": "^4.10.0",
61
+ "@wordpress/primitives": "^4.10.0",
62
+ "@wordpress/priority-queue": "^3.10.0",
63
+ "@wordpress/private-apis": "^1.10.0",
64
+ "@wordpress/reusable-blocks": "^5.10.0",
65
+ "@wordpress/router": "^1.10.0",
66
+ "@wordpress/style-engine": "^2.10.0",
67
+ "@wordpress/url": "^4.10.0",
68
+ "@wordpress/viewport": "^6.10.0",
69
+ "@wordpress/widgets": "^4.10.0",
70
+ "@wordpress/wordcount": "^4.10.0",
71
71
  "change-case": "^4.1.2",
72
72
  "clsx": "^2.1.1",
73
73
  "colord": "^2.9.2",
@@ -82,5 +82,5 @@
82
82
  "publishConfig": {
83
83
  "access": "public"
84
84
  },
85
- "gitHead": "2e5495c635910cb34bfaca3c6258d2e989f66214"
85
+ "gitHead": "ab34a7ac935fd1478eac63b596242d83270897ee"
86
86
  }
@@ -230,7 +230,6 @@ export default function EditSiteEditor( { isPostsList = false } ) {
230
230
  'show-icon-labels': showIconLabels,
231
231
  } ) }
232
232
  styles={ styles }
233
- enableRegionNavigation={ false }
234
233
  customSaveButton={
235
234
  _isPreviewingTheme && <SaveButton size="compact" />
236
235
  }
@@ -6,9 +6,11 @@ import {
6
6
  __experimentalText as Text,
7
7
  __experimentalItemGroup as ItemGroup,
8
8
  __experimentalVStack as VStack,
9
+ __experimentalHStack as HStack,
9
10
  Button,
10
11
  } from '@wordpress/components';
11
12
  import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
13
+ import { settings } from '@wordpress/icons';
12
14
  import { useContext } from '@wordpress/element';
13
15
 
14
16
  /**
@@ -25,6 +27,19 @@ import { unlock } from '../../lock-unlock';
25
27
 
26
28
  const { useGlobalSetting } = unlock( blockEditorPrivateApis );
27
29
 
30
+ /**
31
+ * Maps the fonts with the source, if available.
32
+ *
33
+ * @param {Array} fonts The fonts to map.
34
+ * @param {string} source The source of the fonts.
35
+ * @return {Array} The mapped fonts.
36
+ */
37
+ function mapFontsWithSource( fonts, source ) {
38
+ return fonts
39
+ ? fonts.map( ( f ) => setUIValuesNeeded( f, { source } ) )
40
+ : [];
41
+ }
42
+
28
43
  function FontFamilies() {
29
44
  const { baseCustomFonts, modalTabOpen, setModalTabOpen } =
30
45
  useContext( FontLibraryContext );
@@ -34,18 +49,12 @@ function FontFamilies() {
34
49
  undefined,
35
50
  'base'
36
51
  );
37
- const themeFonts = fontFamilies?.theme
38
- ? fontFamilies.theme
39
- .map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )
40
- .sort( ( a, b ) => a.name.localeCompare( b.name ) )
41
- : [];
42
- const customFonts = fontFamilies?.custom
43
- ? fontFamilies.custom
44
- .map( ( f ) => setUIValuesNeeded( f, { source: 'custom' } ) )
45
- .sort( ( a, b ) => a.name.localeCompare( b.name ) )
46
- : [];
47
- const hasFonts = 0 < customFonts.length || 0 < themeFonts.length;
48
-
52
+ const themeFonts = mapFontsWithSource( fontFamilies?.theme, 'theme' );
53
+ const customFonts = mapFontsWithSource( fontFamilies?.custom, 'custom' );
54
+ const activeFonts = [ ...themeFonts, ...customFonts ].sort( ( a, b ) =>
55
+ a.name.localeCompare( b.name )
56
+ );
57
+ const hasFonts = 0 < activeFonts.length;
49
58
  const hasInstalledFonts =
50
59
  hasFonts ||
51
60
  baseFontFamilies?.theme?.length > 0 ||
@@ -60,12 +69,20 @@ function FontFamilies() {
60
69
  />
61
70
  ) }
62
71
 
63
- <VStack spacing={ 4 }>
64
- { [ ...themeFonts, ...customFonts ].length > 0 && (
72
+ <VStack spacing={ 2 }>
73
+ <HStack justify="space-between">
74
+ <Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>
75
+ <Button
76
+ onClick={ () => setModalTabOpen( 'installed-fonts' ) }
77
+ label={ __( 'Manage fonts' ) }
78
+ icon={ settings }
79
+ size="small"
80
+ />
81
+ </HStack>
82
+ { activeFonts.length > 0 && (
65
83
  <>
66
- <Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>
67
84
  <ItemGroup size="large" isBordered isSeparated>
68
- { themeFonts.map( ( font ) => (
85
+ { activeFonts.map( ( font ) => (
69
86
  <FontFamilyItem
70
87
  key={ font.slug }
71
88
  font={ font }
@@ -75,31 +92,30 @@ function FontFamilies() {
75
92
  </>
76
93
  ) }
77
94
  { ! hasFonts && (
78
- <VStack>
79
- <Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>
95
+ <>
80
96
  <Text as="p">
81
97
  { hasInstalledFonts
82
98
  ? __( 'No fonts activated.' )
83
99
  : __( 'No fonts installed.' ) }
84
100
  </Text>
85
- </VStack>
101
+ <Button
102
+ className="edit-site-global-styles-font-families__manage-fonts"
103
+ variant="secondary"
104
+ __next40pxDefaultSize
105
+ onClick={ () => {
106
+ setModalTabOpen(
107
+ hasInstalledFonts
108
+ ? 'installed-fonts'
109
+ : 'upload-fonts'
110
+ );
111
+ } }
112
+ >
113
+ { hasInstalledFonts
114
+ ? __( 'Manage fonts' )
115
+ : __( 'Add fonts' ) }
116
+ </Button>
117
+ </>
86
118
  ) }
87
- <Button
88
- className="edit-site-global-styles-font-families__manage-fonts"
89
- variant="secondary"
90
- __next40pxDefaultSize
91
- onClick={ () => {
92
- setModalTabOpen(
93
- hasInstalledFonts
94
- ? 'installed-fonts'
95
- : 'upload-fonts'
96
- );
97
- } }
98
- >
99
- { hasInstalledFonts
100
- ? __( 'Manage fonts' )
101
- : __( 'Add fonts' ) }
102
- </Button>
103
119
  </VStack>
104
120
  </>
105
121
  );
@@ -36,7 +36,7 @@ function FontSize() {
36
36
 
37
37
  const {
38
38
  params: { origin, slug },
39
- goTo,
39
+ goBack,
40
40
  } = useNavigator();
41
41
 
42
42
  const [ fontSizes, setFontSizes ] = useGlobalSetting(
@@ -53,10 +53,10 @@ function FontSize() {
53
53
 
54
54
  // Navigate to the font sizes list if the font size is not available.
55
55
  useEffect( () => {
56
- if ( ! fontSize ) {
57
- goTo( '/typography/font-sizes/', { isBack: true } );
56
+ if ( !! slug && ! fontSize ) {
57
+ goBack();
58
58
  }
59
- }, [ fontSize, goTo ] );
59
+ }, [ slug, fontSize, goBack ] );
60
60
 
61
61
  if ( ! origin || ! slug || ! fontSize ) {
62
62
  return null;
@@ -158,7 +158,6 @@ function FontSize() {
158
158
  __( 'Manage the font size %s.' ),
159
159
  fontSize.name
160
160
  ) }
161
- onBack={ () => goTo( '/typography/font-sizes/' ) }
162
161
  />
163
162
  { origin === 'custom' && (
164
163
  <FlexItem>
@@ -197,7 +196,11 @@ function FontSize() {
197
196
  </HStack>
198
197
 
199
198
  <View>
200
- <Spacer paddingX={ 4 }>
199
+ <Spacer
200
+ paddingX={ 4 }
201
+ marginBottom={ 0 }
202
+ paddingBottom={ 6 }
203
+ >
201
204
  <VStack spacing={ 4 }>
202
205
  <FlexItem>
203
206
  <FontSizePreview fontSize={ fontSize } />
@@ -24,7 +24,7 @@ function FontSizes() {
24
24
  </HStack>
25
25
  <ItemGroup isBordered isSeparated>
26
26
  <NavigationButtonAsItem
27
- path="/typography/font-sizes/"
27
+ path="/typography/font-sizes"
28
28
  aria-label={ __( 'Edit font size presets' ) }
29
29
  >
30
30
  <HStack direction="row">
@@ -174,7 +174,7 @@ function ScreenBlockList() {
174
174
  className="edit-site-block-types-search"
175
175
  onChange={ setFilterValue }
176
176
  value={ filterValue }
177
- label={ __( 'Search for blocks' ) }
177
+ label={ __( 'Search' ) }
178
178
  placeholder={ __( 'Search' ) }
179
179
  />
180
180
  <MemoizedBlockList filterValue={ deferredFilterValue } />
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import { __, sprintf } from '@wordpress/i18n';
5
5
  import {
6
- useNavigator,
7
6
  __experimentalConfirmDialog as ConfirmDialog,
8
7
  Spinner,
9
8
  } from '@wordpress/components';
@@ -33,7 +32,6 @@ const { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(
33
32
  const PAGE_SIZE = 10;
34
33
 
35
34
  function ScreenRevisions() {
36
- const { goTo } = useNavigator();
37
35
  const { user: currentEditorGlobalStyles, setUserConfig } =
38
36
  useContext( GlobalStylesContext );
39
37
  const { blocks, editorCanvasContainerView } = useSelect(
@@ -71,6 +69,8 @@ function ScreenRevisions() {
71
69
  currentEditorGlobalStyles
72
70
  );
73
71
 
72
+ // The actual code that triggers the revisions screen to navigate back
73
+ // to the home screen in in `packages/edit-site/src/components/global-styles/ui.js`.
74
74
  const onCloseRevisions = () => {
75
75
  const canvasContainerView =
76
76
  editorCanvasContainerView === 'global-styles-revisions:style-book'
@@ -85,15 +85,6 @@ function ScreenRevisions() {
85
85
  onCloseRevisions();
86
86
  };
87
87
 
88
- useEffect( () => {
89
- if (
90
- ! editorCanvasContainerView ||
91
- ! editorCanvasContainerView.startsWith( 'global-styles-revisions' )
92
- ) {
93
- goTo( '/' ); // Return to global styles main panel.
94
- }
95
- }, [ editorCanvasContainerView ] );
96
-
97
88
  useEffect( () => {
98
89
  if ( ! isLoading && revisions.length ) {
99
90
  setCurrentRevisions( revisions );
@@ -4,6 +4,8 @@
4
4
  import { Card, CardBody } from '@wordpress/components';
5
5
  import { __ } from '@wordpress/i18n';
6
6
  import { useZoomOut } from '@wordpress/block-editor';
7
+ import { useDispatch } from '@wordpress/data';
8
+ import { store as editorStore } from '@wordpress/editor';
7
9
 
8
10
  /**
9
11
  * Internal dependencies
@@ -12,9 +14,12 @@ import ScreenHeader from './header';
12
14
  import SidebarNavigationScreenGlobalStylesContent from '../sidebar-navigation-screen-global-styles/content';
13
15
 
14
16
  function ScreenStyleVariations() {
15
- // Move to zoom out mode when this component is mounted
16
- // and back to the previous mode when unmounted.
17
+ // Style Variations should only be previewed in with
18
+ // - a "zoomed out" editor
19
+ // - "Desktop" device preview
20
+ const { setDeviceType } = useDispatch( editorStore );
17
21
  useZoomOut();
22
+ setDeviceType( 'desktop' );
18
23
 
19
24
  return (
20
25
  <>
@@ -35,7 +35,7 @@ import {
35
35
  reset,
36
36
  moreVertical,
37
37
  } from '@wordpress/icons';
38
- import { useState, useMemo } from '@wordpress/element';
38
+ import { useState, useMemo, useEffect } from '@wordpress/element';
39
39
 
40
40
  /**
41
41
  * Internal dependencies
@@ -73,12 +73,30 @@ const presetShadowMenuItems = [
73
73
 
74
74
  export default function ShadowsEditPanel() {
75
75
  const {
76
+ goBack,
76
77
  params: { category, slug },
77
- goTo,
78
78
  } = useNavigator();
79
79
  const [ shadows, setShadows ] = useGlobalSetting(
80
80
  `shadow.presets.${ category }`
81
81
  );
82
+
83
+ useEffect( () => {
84
+ const hasCurrentShadow = shadows?.some(
85
+ ( shadow ) => shadow.slug === slug
86
+ );
87
+ // If the shadow being edited doesn't exist anymore in the global styles setting, navigate back
88
+ // to prevent the user from editing a non-existent shadow entry.
89
+ // This can happen, for example:
90
+ // - when the user deletes the shadow
91
+ // - when the user resets the styles while editing a custom shadow
92
+ //
93
+ // The check on the slug is necessary to prevent a double back navigation when the user triggers
94
+ // a backward navigation by interacting with the screen's UI.
95
+ if ( !! slug && ! hasCurrentShadow ) {
96
+ goBack();
97
+ }
98
+ }, [ shadows, slug, goBack ] );
99
+
82
100
  const [ baseShadows ] = useGlobalSetting(
83
101
  `shadow.presets.${ category }`,
84
102
  undefined,
@@ -123,9 +141,7 @@ export default function ShadowsEditPanel() {
123
141
  };
124
142
 
125
143
  const handleShadowDelete = () => {
126
- const updatedShadows = shadows.filter( ( s ) => s.slug !== slug );
127
- setShadows( updatedShadows );
128
- goTo( `/shadows` );
144
+ setShadows( shadows.filter( ( s ) => s.slug !== slug ) );
129
145
  };
130
146
 
131
147
  const handleShadowRename = ( newName ) => {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { store as coreStore } from '@wordpress/core-data';
5
5
  import { useSelect } from '@wordpress/data';
6
- import { useContext, useEffect, useMemo, useState } from '@wordpress/element';
6
+ import { useContext, useMemo } from '@wordpress/element';
7
7
  import { __experimentalGrid as Grid } from '@wordpress/components';
8
8
  import { __ } from '@wordpress/i18n';
9
9
  import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
@@ -20,12 +20,7 @@ const { GlobalStylesContext } = unlock( blockEditorPrivateApis );
20
20
 
21
21
  export default function StyleVariationsContainer( { gap = 2 } ) {
22
22
  const { user } = useContext( GlobalStylesContext );
23
- const [ currentUserStyles, setCurrentUserStyles ] = useState( user );
24
- const userStyles = currentUserStyles?.styles;
25
-
26
- useEffect( () => {
27
- setCurrentUserStyles( user );
28
- }, [ user ] );
23
+ const userStyles = user?.styles;
29
24
 
30
25
  const variations = useSelect( ( select ) => {
31
26
  return select(
@@ -70,10 +70,8 @@ function GlobalStylesActionMenu() {
70
70
  const { setEditorCanvasContainerView } = unlock(
71
71
  useDispatch( editSiteStore )
72
72
  );
73
- const { goTo } = useNavigator();
74
73
  const loadCustomCSS = () => {
75
74
  setEditorCanvasContainerView( 'global-styles-css' );
76
- goTo( '/css' );
77
75
  };
78
76
 
79
77
  return (
@@ -253,21 +251,29 @@ function GlobalStylesEditorCanvasContainerLink() {
253
251
  switch ( editorCanvasContainerView ) {
254
252
  case 'global-styles-revisions':
255
253
  case 'global-styles-revisions:style-book':
256
- goTo( '/revisions' );
254
+ if ( ! isRevisionsOpen ) {
255
+ goTo( '/revisions' );
256
+ }
257
257
  break;
258
258
  case 'global-styles-css':
259
259
  goTo( '/css' );
260
260
  break;
261
+ // The stand-alone style book is open
262
+ // and the revisions panel is open,
263
+ // close the revisions panel.
264
+ // Otherwise keep the style book open while
265
+ // browsing global styles panel.
266
+ //
267
+ // Falling through as it matches the default scenario.
261
268
  case 'style-book':
262
- /*
263
- * The stand-alone style book is open
264
- * and the revisions panel is open,
265
- * close the revisions panel.
266
- * Otherwise keep the style book open while
267
- * browsing global styles panel.
268
- */
269
+ default:
270
+ // In general, if the revision screen is in view but the
271
+ // `editorCanvasContainerView` is not a revision view, close it.
272
+ // This also includes the scenario when the stand-alone style
273
+ // book is open, in which case we want the user to close the
274
+ // revisions screen and browse global styles.
269
275
  if ( isRevisionsOpen ) {
270
- goTo( '/' );
276
+ goTo( '/', { isBack: true } );
271
277
  }
272
278
  break;
273
279
  }
@@ -302,7 +308,7 @@ function GlobalStylesUI() {
302
308
  <ScreenTypography />
303
309
  </GlobalStylesNavigationScreen>
304
310
 
305
- <GlobalStylesNavigationScreen path="/typography/font-sizes/">
311
+ <GlobalStylesNavigationScreen path="/typography/font-sizes">
306
312
  <FontSizes />
307
313
  </GlobalStylesNavigationScreen>
308
314