@wordpress/edit-site 5.3.2 → 5.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 (339) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/build/components/add-new-template/new-template-part.js +8 -5
  3. package/build/components/add-new-template/new-template-part.js.map +1 -1
  4. package/build/components/add-new-template/new-template.js +9 -25
  5. package/build/components/add-new-template/new-template.js.map +1 -1
  6. package/build/components/app/index.js.map +1 -1
  7. package/build/components/block-editor/editor-canvas.js +4 -3
  8. package/build/components/block-editor/editor-canvas.js.map +1 -1
  9. package/build/components/block-editor/index.js +3 -3
  10. package/build/components/block-editor/index.js.map +1 -1
  11. package/build/components/editor/index.js +28 -24
  12. package/build/components/editor/index.js.map +1 -1
  13. package/build/components/global-styles/border-panel.js +6 -6
  14. package/build/components/global-styles/border-panel.js.map +1 -1
  15. package/build/components/global-styles/color-palette-panel.js +7 -4
  16. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  17. package/build/components/global-styles/color-utils.js +1 -1
  18. package/build/components/global-styles/color-utils.js.map +1 -1
  19. package/build/components/global-styles/context-menu.js +16 -3
  20. package/build/components/global-styles/context-menu.js.map +1 -1
  21. package/build/components/global-styles/custom-css.js +3 -3
  22. package/build/components/global-styles/custom-css.js.map +1 -1
  23. package/build/components/global-styles/dimensions-panel.js +10 -9
  24. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  25. package/build/components/global-styles/global-styles-provider.js +2 -2
  26. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  27. package/build/components/global-styles/gradients-palette-panel.js +10 -5
  28. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  29. package/build/components/global-styles/header.js +4 -2
  30. package/build/components/global-styles/header.js.map +1 -1
  31. package/build/components/global-styles/hooks.js +16 -53
  32. package/build/components/global-styles/hooks.js.map +1 -1
  33. package/build/components/global-styles/navigation-button.js +1 -1
  34. package/build/components/global-styles/navigation-button.js.map +1 -1
  35. package/build/components/global-styles/palette.js +5 -3
  36. package/build/components/global-styles/palette.js.map +1 -1
  37. package/build/components/global-styles/preview.js +2 -2
  38. package/build/components/global-styles/preview.js.map +1 -1
  39. package/build/components/global-styles/screen-background-color.js +5 -4
  40. package/build/components/global-styles/screen-background-color.js.map +1 -1
  41. package/build/components/global-styles/screen-block-list.js +14 -3
  42. package/build/components/global-styles/screen-block-list.js.map +1 -1
  43. package/build/components/global-styles/screen-button-color.js +9 -7
  44. package/build/components/global-styles/screen-button-color.js.map +1 -1
  45. package/build/components/global-styles/screen-colors.js +10 -8
  46. package/build/components/global-styles/screen-colors.js.map +1 -1
  47. package/build/components/global-styles/screen-css.js +5 -5
  48. package/build/components/global-styles/screen-css.js.map +1 -1
  49. package/build/components/global-styles/screen-heading-color.js +10 -8
  50. package/build/components/global-styles/screen-heading-color.js.map +1 -1
  51. package/build/components/global-styles/screen-link-color.js +5 -4
  52. package/build/components/global-styles/screen-link-color.js.map +1 -1
  53. package/build/components/global-styles/screen-root.js +2 -2
  54. package/build/components/global-styles/screen-root.js.map +1 -1
  55. package/build/components/global-styles/screen-style-variations.js +2 -2
  56. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  57. package/build/components/global-styles/screen-text-color.js +5 -4
  58. package/build/components/global-styles/screen-text-color.js.map +1 -1
  59. package/build/components/global-styles/screen-typography.js +5 -3
  60. package/build/components/global-styles/screen-typography.js.map +1 -1
  61. package/build/components/global-styles/shadow-panel.js +4 -5
  62. package/build/components/global-styles/shadow-panel.js.map +1 -1
  63. package/build/components/global-styles/subtitle.js +3 -2
  64. package/build/components/global-styles/subtitle.js.map +1 -1
  65. package/build/components/global-styles/typography-panel.js +24 -301
  66. package/build/components/global-styles/typography-panel.js.map +1 -1
  67. package/build/components/global-styles/typography-preview.js +2 -2
  68. package/build/components/global-styles/typography-preview.js.map +1 -1
  69. package/build/components/global-styles/ui.js +3 -10
  70. package/build/components/global-styles/ui.js.map +1 -1
  71. package/build/components/global-styles-renderer/index.js +2 -2
  72. package/build/components/global-styles-renderer/index.js.map +1 -1
  73. package/build/components/header-edit-mode/index.js +6 -3
  74. package/build/components/header-edit-mode/index.js.map +1 -1
  75. package/build/components/keyboard-shortcut-help-modal/config.js +1 -1
  76. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  77. package/build/components/layout/index.js +10 -23
  78. package/build/components/layout/index.js.map +1 -1
  79. package/build/components/list/actions/rename-menu-item.js +1 -1
  80. package/build/components/list/actions/rename-menu-item.js.map +1 -1
  81. package/build/components/list/table.js +1 -0
  82. package/build/components/list/table.js.map +1 -1
  83. package/build/components/navigation-inspector/index.js +0 -29
  84. package/build/components/navigation-inspector/index.js.map +1 -1
  85. package/build/components/navigation-inspector/navigation-menu.js +6 -4
  86. package/build/components/navigation-inspector/navigation-menu.js.map +1 -1
  87. package/build/components/save-panel/index.js +4 -3
  88. package/build/components/save-panel/index.js.map +1 -1
  89. package/build/components/sidebar/index.js +18 -23
  90. package/build/components/sidebar/index.js.map +1 -1
  91. package/build/components/sidebar-edit-mode/index.js +1 -1
  92. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  93. package/build/components/sidebar-edit-mode/template-card/index.js +9 -2
  94. package/build/components/sidebar-edit-mode/template-card/index.js.map +1 -1
  95. package/build/components/sidebar-edit-mode/template-card/last-revision.js +84 -0
  96. package/build/components/sidebar-edit-mode/template-card/last-revision.js.map +1 -0
  97. package/build/components/sidebar-navigation-screen/index.js +28 -7
  98. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  99. package/build/components/sidebar-navigation-screen-navigation-item/index.js +72 -0
  100. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -0
  101. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +2 -2
  102. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  103. package/build/components/sidebar-navigation-screen-template/index.js +70 -0
  104. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -0
  105. package/build/components/sidebar-navigation-screen-templates/index.js +32 -82
  106. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  107. package/build/components/sidebar-navigation-screen-templates-browse/index.js +43 -0
  108. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -0
  109. package/build/components/site-hub/index.js +14 -49
  110. package/build/components/site-hub/index.js.map +1 -1
  111. package/build/components/start-template-options/index.js +175 -0
  112. package/build/components/start-template-options/index.js.map +1 -0
  113. package/build/components/style-book/index.js +10 -3
  114. package/build/components/style-book/index.js.map +1 -1
  115. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +55 -20
  116. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  117. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +3 -3
  118. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  119. package/build/components/sync-state-with-url/{use-sync-sidebar-path-with-url.js → use-sync-path-with-url.js} +12 -12
  120. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -0
  121. package/build/components/use-edited-entity-record/index.js +6 -2
  122. package/build/components/use-edited-entity-record/index.js.map +1 -1
  123. package/build/hooks/push-changes-to-global-styles/index.js +7 -6
  124. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  125. package/build/{experiments.js → private-apis.js} +3 -3
  126. package/build/private-apis.js.map +1 -0
  127. package/build/store/index.js +3 -3
  128. package/build/store/index.js.map +1 -1
  129. package/build/utils/get-is-list-page.js +5 -6
  130. package/build/utils/get-is-list-page.js.map +1 -1
  131. package/build-module/components/add-new-template/new-template-part.js +7 -4
  132. package/build-module/components/add-new-template/new-template-part.js.map +1 -1
  133. package/build-module/components/add-new-template/new-template.js +8 -22
  134. package/build-module/components/add-new-template/new-template.js.map +1 -1
  135. package/build-module/components/app/index.js.map +1 -1
  136. package/build-module/components/block-editor/editor-canvas.js +2 -1
  137. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  138. package/build-module/components/block-editor/index.js +3 -3
  139. package/build-module/components/block-editor/index.js.map +1 -1
  140. package/build-module/components/editor/index.js +27 -25
  141. package/build-module/components/editor/index.js.map +1 -1
  142. package/build-module/components/global-styles/border-panel.js +8 -8
  143. package/build-module/components/global-styles/border-panel.js.map +1 -1
  144. package/build-module/components/global-styles/color-palette-panel.js +8 -5
  145. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  146. package/build-module/components/global-styles/color-utils.js +2 -2
  147. package/build-module/components/global-styles/color-utils.js.map +1 -1
  148. package/build-module/components/global-styles/context-menu.js +13 -2
  149. package/build-module/components/global-styles/context-menu.js.map +1 -1
  150. package/build-module/components/global-styles/custom-css.js +4 -4
  151. package/build-module/components/global-styles/custom-css.js.map +1 -1
  152. package/build-module/components/global-styles/dimensions-panel.js +12 -11
  153. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  154. package/build-module/components/global-styles/global-styles-provider.js +3 -3
  155. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  156. package/build-module/components/global-styles/gradients-palette-panel.js +11 -6
  157. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  158. package/build-module/components/global-styles/header.js +5 -3
  159. package/build-module/components/global-styles/header.js.map +1 -1
  160. package/build-module/components/global-styles/hooks.js +15 -52
  161. package/build-module/components/global-styles/hooks.js.map +1 -1
  162. package/build-module/components/global-styles/navigation-button.js +2 -2
  163. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  164. package/build-module/components/global-styles/palette.js +6 -4
  165. package/build-module/components/global-styles/palette.js.map +1 -1
  166. package/build-module/components/global-styles/preview.js +3 -3
  167. package/build-module/components/global-styles/preview.js.map +1 -1
  168. package/build-module/components/global-styles/screen-background-color.js +7 -6
  169. package/build-module/components/global-styles/screen-background-color.js.map +1 -1
  170. package/build-module/components/global-styles/screen-block-list.js +12 -3
  171. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  172. package/build-module/components/global-styles/screen-button-color.js +11 -9
  173. package/build-module/components/global-styles/screen-button-color.js.map +1 -1
  174. package/build-module/components/global-styles/screen-colors.js +12 -10
  175. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  176. package/build-module/components/global-styles/screen-css.js +5 -5
  177. package/build-module/components/global-styles/screen-css.js.map +1 -1
  178. package/build-module/components/global-styles/screen-heading-color.js +12 -10
  179. package/build-module/components/global-styles/screen-heading-color.js.map +1 -1
  180. package/build-module/components/global-styles/screen-link-color.js +7 -6
  181. package/build-module/components/global-styles/screen-link-color.js.map +1 -1
  182. package/build-module/components/global-styles/screen-root.js +3 -3
  183. package/build-module/components/global-styles/screen-root.js.map +1 -1
  184. package/build-module/components/global-styles/screen-style-variations.js +3 -3
  185. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  186. package/build-module/components/global-styles/screen-text-color.js +7 -6
  187. package/build-module/components/global-styles/screen-text-color.js.map +1 -1
  188. package/build-module/components/global-styles/screen-typography.js +6 -4
  189. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  190. package/build-module/components/global-styles/shadow-panel.js +6 -7
  191. package/build-module/components/global-styles/shadow-panel.js.map +1 -1
  192. package/build-module/components/global-styles/subtitle.js +3 -2
  193. package/build-module/components/global-styles/subtitle.js.map +1 -1
  194. package/build-module/components/global-styles/typography-panel.js +29 -302
  195. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  196. package/build-module/components/global-styles/typography-preview.js +3 -3
  197. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  198. package/build-module/components/global-styles/ui.js +4 -11
  199. package/build-module/components/global-styles/ui.js.map +1 -1
  200. package/build-module/components/global-styles-renderer/index.js +3 -3
  201. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  202. package/build-module/components/header-edit-mode/index.js +6 -3
  203. package/build-module/components/header-edit-mode/index.js.map +1 -1
  204. package/build-module/components/keyboard-shortcut-help-modal/config.js +1 -1
  205. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  206. package/build-module/components/layout/index.js +10 -23
  207. package/build-module/components/layout/index.js.map +1 -1
  208. package/build-module/components/list/actions/rename-menu-item.js +1 -1
  209. package/build-module/components/list/actions/rename-menu-item.js.map +1 -1
  210. package/build-module/components/list/table.js +1 -0
  211. package/build-module/components/list/table.js.map +1 -1
  212. package/build-module/components/navigation-inspector/index.js +0 -27
  213. package/build-module/components/navigation-inspector/index.js.map +1 -1
  214. package/build-module/components/navigation-inspector/navigation-menu.js +7 -5
  215. package/build-module/components/navigation-inspector/navigation-menu.js.map +1 -1
  216. package/build-module/components/save-panel/index.js +3 -2
  217. package/build-module/components/save-panel/index.js.map +1 -1
  218. package/build-module/components/sidebar/index.js +15 -21
  219. package/build-module/components/sidebar/index.js.map +1 -1
  220. package/build-module/components/sidebar-edit-mode/index.js +1 -1
  221. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  222. package/build-module/components/sidebar-edit-mode/template-card/index.js +9 -4
  223. package/build-module/components/sidebar-edit-mode/template-card/index.js.map +1 -1
  224. package/build-module/components/sidebar-edit-mode/template-card/last-revision.js +70 -0
  225. package/build-module/components/sidebar-edit-mode/template-card/last-revision.js.map +1 -0
  226. package/build-module/components/sidebar-navigation-screen/index.js +27 -9
  227. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  228. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +55 -0
  229. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -0
  230. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +2 -2
  231. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  232. package/build-module/components/sidebar-navigation-screen-template/index.js +53 -0
  233. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -0
  234. package/build-module/components/sidebar-navigation-screen-templates/index.js +34 -81
  235. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  236. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +31 -0
  237. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -0
  238. package/build-module/components/site-hub/index.js +14 -46
  239. package/build-module/components/site-hub/index.js.map +1 -1
  240. package/build-module/components/start-template-options/index.js +156 -0
  241. package/build-module/components/start-template-options/index.js.map +1 -0
  242. package/build-module/components/style-book/index.js +11 -4
  243. package/build-module/components/style-book/index.js.map +1 -1
  244. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +55 -21
  245. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  246. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  247. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  248. package/build-module/components/sync-state-with-url/{use-sync-sidebar-path-with-url.js → use-sync-path-with-url.js} +11 -11
  249. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -0
  250. package/build-module/components/use-edited-entity-record/index.js +6 -2
  251. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  252. package/build-module/hooks/push-changes-to-global-styles/index.js +9 -8
  253. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  254. package/build-module/{experiments.js → private-apis.js} +2 -2
  255. package/build-module/private-apis.js.map +1 -0
  256. package/build-module/store/index.js +1 -1
  257. package/build-module/store/index.js.map +1 -1
  258. package/build-module/utils/get-is-list-page.js +5 -6
  259. package/build-module/utils/get-is-list-page.js.map +1 -1
  260. package/build-style/style-rtl.css +91 -41
  261. package/build-style/style.css +91 -41
  262. package/package.json +31 -31
  263. package/src/components/add-new-template/new-template-part.js +7 -4
  264. package/src/components/add-new-template/new-template.js +9 -22
  265. package/src/components/app/index.js +0 -1
  266. package/src/components/block-editor/editor-canvas.js +2 -1
  267. package/src/components/block-editor/index.js +3 -3
  268. package/src/components/editor/index.js +31 -28
  269. package/src/components/global-styles/border-panel.js +8 -8
  270. package/src/components/global-styles/color-palette-panel.js +6 -3
  271. package/src/components/global-styles/color-utils.js +2 -3
  272. package/src/components/global-styles/context-menu.js +17 -2
  273. package/src/components/global-styles/custom-css.js +4 -4
  274. package/src/components/global-styles/dimensions-panel.js +15 -11
  275. package/src/components/global-styles/global-styles-provider.js +3 -3
  276. package/src/components/global-styles/gradients-palette-panel.js +7 -4
  277. package/src/components/global-styles/header.js +9 -3
  278. package/src/components/global-styles/hooks.js +20 -93
  279. package/src/components/global-styles/navigation-button.js +4 -2
  280. package/src/components/global-styles/palette.js +4 -4
  281. package/src/components/global-styles/preview.js +3 -3
  282. package/src/components/global-styles/screen-background-color.js +6 -5
  283. package/src/components/global-styles/screen-block-list.js +19 -3
  284. package/src/components/global-styles/screen-button-color.js +11 -9
  285. package/src/components/global-styles/screen-colors.js +10 -10
  286. package/src/components/global-styles/screen-css.js +14 -7
  287. package/src/components/global-styles/screen-heading-color.js +12 -10
  288. package/src/components/global-styles/screen-link-color.js +6 -5
  289. package/src/components/global-styles/screen-root.js +3 -3
  290. package/src/components/global-styles/screen-style-variations.js +3 -3
  291. package/src/components/global-styles/screen-text-color.js +6 -5
  292. package/src/components/global-styles/screen-typography.js +4 -4
  293. package/src/components/global-styles/shadow-panel.js +9 -6
  294. package/src/components/global-styles/style.scss +7 -1
  295. package/src/components/global-styles/subtitle.js +5 -2
  296. package/src/components/global-styles/typography-panel.js +31 -395
  297. package/src/components/global-styles/typography-preview.js +3 -3
  298. package/src/components/global-styles/ui.js +3 -8
  299. package/src/components/global-styles-renderer/index.js +3 -3
  300. package/src/components/header-edit-mode/index.js +6 -3
  301. package/src/components/keyboard-shortcut-help-modal/config.js +1 -1
  302. package/src/components/layout/index.js +35 -48
  303. package/src/components/layout/style.scss +11 -23
  304. package/src/components/list/actions/rename-menu-item.js +1 -1
  305. package/src/components/list/table.js +4 -0
  306. package/src/components/navigation-inspector/index.js +0 -32
  307. package/src/components/navigation-inspector/navigation-menu.js +10 -4
  308. package/src/components/save-panel/index.js +4 -1
  309. package/src/components/sidebar/index.js +14 -19
  310. package/src/components/sidebar-edit-mode/index.js +1 -1
  311. package/src/components/sidebar-edit-mode/template-card/index.js +24 -14
  312. package/src/components/sidebar-edit-mode/template-card/last-revision.js +75 -0
  313. package/src/components/sidebar-edit-mode/template-card/style.scss +4 -0
  314. package/src/components/sidebar-navigation-screen/index.js +27 -11
  315. package/src/components/sidebar-navigation-screen/style.scss +4 -6
  316. package/src/components/sidebar-navigation-screen-navigation-item/index.js +52 -0
  317. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  318. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +0 -4
  319. package/src/components/sidebar-navigation-screen-template/index.js +52 -0
  320. package/src/components/sidebar-navigation-screen-templates/index.js +49 -83
  321. package/src/components/sidebar-navigation-screen-templates-browse/index.js +31 -0
  322. package/src/components/site-hub/index.js +67 -122
  323. package/src/components/site-hub/style.scss +1 -11
  324. package/src/components/start-template-options/index.js +171 -0
  325. package/src/components/start-template-options/style.scss +76 -0
  326. package/src/components/style-book/index.js +11 -7
  327. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +48 -14
  328. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  329. package/src/components/sync-state-with-url/{use-sync-sidebar-path-with-url.js → use-sync-path-with-url.js} +10 -10
  330. package/src/components/use-edited-entity-record/index.js +6 -2
  331. package/src/hooks/push-changes-to-global-styles/index.js +29 -24
  332. package/src/{experiments.js → private-apis.js} +1 -1
  333. package/src/store/index.js +1 -1
  334. package/src/style.scss +1 -0
  335. package/src/utils/get-is-list-page.js +5 -5
  336. package/build/components/sync-state-with-url/use-sync-sidebar-path-with-url.js.map +0 -1
  337. package/build/experiments.js.map +0 -1
  338. package/build-module/components/sync-state-with-url/use-sync-sidebar-path-with-url.js.map +0 -1
  339. package/build-module/experiments.js.map +0 -1
@@ -13,7 +13,7 @@ import {
13
13
  import { __, _n, sprintf } from '@wordpress/i18n';
14
14
  import { shuffle } from '@wordpress/icons';
15
15
  import { useMemo } from '@wordpress/element';
16
- import { experiments as blockEditorExperiments } from '@wordpress/block-editor';
16
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
17
17
 
18
18
  /**
19
19
  * Internal dependencies
@@ -22,9 +22,9 @@ import Subtitle from './subtitle';
22
22
  import { NavigationButtonAsItem } from './navigation-button';
23
23
  import { useColorRandomizer } from './hooks';
24
24
  import ColorIndicatorWrapper from './color-indicator-wrapper';
25
- import { unlock } from '../../experiments';
25
+ import { unlock } from '../../private-apis';
26
26
 
27
- const { useGlobalSetting } = unlock( blockEditorExperiments );
27
+ const { useGlobalSetting } = unlock( blockEditorPrivateApis );
28
28
 
29
29
  const EMPTY_COLORS = [];
30
30
 
@@ -65,7 +65,7 @@ function Palette( { name } ) {
65
65
 
66
66
  return (
67
67
  <VStack spacing={ 3 }>
68
- <Subtitle>{ __( 'Palette' ) }</Subtitle>
68
+ <Subtitle level={ 3 }>{ __( 'Palette' ) }</Subtitle>
69
69
  <ItemGroup isBordered isSeparated>
70
70
  <NavigationButtonAsItem
71
71
  path={ screenPath }
@@ -4,7 +4,7 @@
4
4
  import {
5
5
  __unstableIframe as Iframe,
6
6
  __unstableEditorStyles as EditorStyles,
7
- experiments as blockEditorExperiments,
7
+ privateApis as blockEditorPrivateApis,
8
8
  } from '@wordpress/block-editor';
9
9
  import {
10
10
  __unstableMotion as motion,
@@ -17,10 +17,10 @@ import { useState, useMemo } from '@wordpress/element';
17
17
  /**
18
18
  * Internal dependencies
19
19
  */
20
- import { unlock } from '../../experiments';
20
+ import { unlock } from '../../private-apis';
21
21
 
22
22
  const { useGlobalSetting, useGlobalStyle, useGlobalStylesOutput } = unlock(
23
- blockEditorExperiments
23
+ blockEditorPrivateApis
24
24
  );
25
25
 
26
26
  const firstFrame = {
@@ -9,7 +9,7 @@ import classnames from 'classnames';
9
9
  import { __ } from '@wordpress/i18n';
10
10
  import {
11
11
  __experimentalColorGradientControl as ColorGradientControl,
12
- experiments as blockEditorExperiments,
12
+ privateApis as blockEditorPrivateApis,
13
13
  } from '@wordpress/block-editor';
14
14
 
15
15
  /**
@@ -17,17 +17,17 @@ import {
17
17
  */
18
18
  import ScreenHeader from './header';
19
19
  import {
20
- getSupportedGlobalStylesPanels,
20
+ useSupportedStyles,
21
21
  useColorsPerOrigin,
22
22
  useGradientsPerOrigin,
23
23
  } from './hooks';
24
- import { unlock } from '../../experiments';
24
+ import { unlock } from '../../private-apis';
25
25
 
26
- const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorExperiments );
26
+ const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
27
27
 
28
28
  function ScreenBackgroundColor( { name, variation = '' } ) {
29
29
  const prefix = variation ? `variations.${ variation }.` : '';
30
- const supports = getSupportedGlobalStylesPanels( name );
30
+ const supports = useSupportedStyles( name );
31
31
  const [ areCustomSolidsEnabled ] = useGlobalSetting( 'color.custom', name );
32
32
  const [ areCustomGradientsEnabled ] = useGlobalSetting(
33
33
  'color.customGradient',
@@ -122,6 +122,7 @@ function ScreenBackgroundColor( { name, variation = '' } ) {
122
122
  showTitle={ false }
123
123
  enableAlpha
124
124
  __experimentalIsRenderedInSidebar
125
+ headingLevel={ 3 }
125
126
  { ...controlProps }
126
127
  />
127
128
  </>
@@ -10,7 +10,10 @@ import {
10
10
  } from '@wordpress/components';
11
11
  import { useSelect } from '@wordpress/data';
12
12
  import { useState, useMemo, useEffect, useRef } from '@wordpress/element';
13
- import { BlockIcon } from '@wordpress/block-editor';
13
+ import {
14
+ BlockIcon,
15
+ privateApis as blockEditorPrivateApis,
16
+ } from '@wordpress/block-editor';
14
17
  import { useDebounce } from '@wordpress/compose';
15
18
  import { speak } from '@wordpress/a11y';
16
19
 
@@ -20,10 +23,17 @@ import { speak } from '@wordpress/a11y';
20
23
  import { useHasBorderPanel } from './border-panel';
21
24
  import { useHasColorPanel } from './color-utils';
22
25
  import { useHasDimensionsPanel } from './dimensions-panel';
23
- import { useHasTypographyPanel } from './typography-panel';
24
26
  import { useHasVariationsPanel } from './variations-panel';
25
27
  import ScreenHeader from './header';
26
28
  import { NavigationButtonAsItem } from './navigation-button';
29
+ import { unlock } from '../../private-apis';
30
+ import { useSupportedStyles } from './hooks';
31
+
32
+ const {
33
+ useHasTypographyPanel,
34
+ useGlobalSetting,
35
+ overrideSettingsWithSupports,
36
+ } = unlock( blockEditorPrivateApis );
27
37
 
28
38
  function useSortedBlockTypes() {
29
39
  const blockItems = useSelect(
@@ -49,7 +59,13 @@ function useSortedBlockTypes() {
49
59
  }
50
60
 
51
61
  function BlockMenuItem( { block } ) {
52
- const hasTypographyPanel = useHasTypographyPanel( block.name );
62
+ const [ rawSettings ] = useGlobalSetting( '', block.name );
63
+ const supports = useSupportedStyles( block.name );
64
+ const settings = useMemo(
65
+ () => overrideSettingsWithSupports( rawSettings, supports ),
66
+ [ rawSettings, supports ]
67
+ );
68
+ const hasTypographyPanel = useHasTypographyPanel( settings );
53
69
  const hasColorPanel = useHasColorPanel( block.name );
54
70
  const hasBorderPanel = useHasBorderPanel( block.name );
55
71
  const hasDimensionsPanel = useHasDimensionsPanel( block.name );
@@ -4,21 +4,21 @@
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import {
6
6
  __experimentalColorGradientControl as ColorGradientControl,
7
- experiments as blockEditorExperiments,
7
+ privateApis as blockEditorPrivateApis,
8
8
  } from '@wordpress/block-editor';
9
9
 
10
10
  /**
11
11
  * Internal dependencies
12
12
  */
13
13
  import ScreenHeader from './header';
14
- import { getSupportedGlobalStylesPanels, useColorsPerOrigin } from './hooks';
15
- import { unlock } from '../../experiments';
14
+ import { useSupportedStyles, useColorsPerOrigin } from './hooks';
15
+ import { unlock } from '../../private-apis';
16
16
 
17
- const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorExperiments );
17
+ const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
18
18
 
19
19
  function ScreenButtonColor( { name, variation = '' } ) {
20
20
  const prefix = variation ? `variations.${ variation }.` : '';
21
- const supports = getSupportedGlobalStylesPanels( name );
21
+ const supports = useSupportedStyles( name );
22
22
  const colorsPerOrigin = useColorsPerOrigin( name );
23
23
  const [ areCustomSolidsEnabled ] = useGlobalSetting( 'color.custom', name );
24
24
  const [ isBackgroundEnabled ] = useGlobalSetting(
@@ -64,9 +64,9 @@ function ScreenButtonColor( { name, variation = '' } ) {
64
64
  ) }
65
65
  />
66
66
 
67
- <h4 className="edit-site-global-styles-section-title">
67
+ <h3 className="edit-site-global-styles-section-title">
68
68
  { __( 'Text color' ) }
69
- </h4>
69
+ </h3>
70
70
 
71
71
  <ColorGradientControl
72
72
  className="edit-site-screen-button-color__control"
@@ -78,11 +78,12 @@ function ScreenButtonColor( { name, variation = '' } ) {
78
78
  colorValue={ buttonTextColor }
79
79
  onColorChange={ setButtonTextColor }
80
80
  clearable={ buttonTextColor === userButtonTextColor }
81
+ headingLevel={ 4 }
81
82
  />
82
83
 
83
- <h4 className="edit-site-global-styles-section-title">
84
+ <h3 className="edit-site-global-styles-section-title">
84
85
  { __( 'Background color' ) }
85
- </h4>
86
+ </h3>
86
87
 
87
88
  <ColorGradientControl
88
89
  className="edit-site-screen-button-color__control"
@@ -94,6 +95,7 @@ function ScreenButtonColor( { name, variation = '' } ) {
94
95
  colorValue={ buttonBgColor }
95
96
  onColorChange={ setButtonBgColor }
96
97
  clearable={ buttonBgColor === userButtonBgColor }
98
+ headingLevel={ 4 }
97
99
  />
98
100
  </>
99
101
  );
@@ -10,7 +10,7 @@ import {
10
10
  FlexItem,
11
11
  ColorIndicator,
12
12
  } from '@wordpress/components';
13
- import { experiments as blockEditorExperiments } from '@wordpress/block-editor';
13
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
14
14
 
15
15
  /**
16
16
  * Internal dependencies
@@ -18,19 +18,19 @@ import { experiments as blockEditorExperiments } from '@wordpress/block-editor';
18
18
  import ScreenHeader from './header';
19
19
  import Palette from './palette';
20
20
  import { NavigationButtonAsItem } from './navigation-button';
21
- import { getSupportedGlobalStylesPanels } from './hooks';
21
+ import { useSupportedStyles } from './hooks';
22
22
  import Subtitle from './subtitle';
23
23
  import ColorIndicatorWrapper from './color-indicator-wrapper';
24
24
  import BlockPreviewPanel from './block-preview-panel';
25
25
  import { getVariationClassName } from './utils';
26
- import { unlock } from '../../experiments';
26
+ import { unlock } from '../../private-apis';
27
27
 
28
- const { useGlobalStyle } = unlock( blockEditorExperiments );
28
+ const { useGlobalStyle } = unlock( blockEditorPrivateApis );
29
29
 
30
30
  function BackgroundColorItem( { name, parentMenu, variation = '' } ) {
31
31
  const prefix = variation ? `variations.${ variation }.` : '';
32
32
  const urlPrefix = variation ? `/variations/${ variation }` : '';
33
- const supports = getSupportedGlobalStylesPanels( name );
33
+ const supports = useSupportedStyles( name );
34
34
  const hasSupport =
35
35
  supports.includes( 'backgroundColor' ) ||
36
36
  supports.includes( 'background' );
@@ -67,7 +67,7 @@ function BackgroundColorItem( { name, parentMenu, variation = '' } ) {
67
67
  function TextColorItem( { name, parentMenu, variation = '' } ) {
68
68
  const prefix = variation ? `variations.${ variation }.` : '';
69
69
  const urlPrefix = variation ? `/variations/${ variation }` : '';
70
- const supports = getSupportedGlobalStylesPanels( name );
70
+ const supports = useSupportedStyles( name );
71
71
  const hasSupport = supports.includes( 'color' );
72
72
  const [ color ] = useGlobalStyle( prefix + 'color.text', name );
73
73
 
@@ -98,7 +98,7 @@ function TextColorItem( { name, parentMenu, variation = '' } ) {
98
98
  function LinkColorItem( { name, parentMenu, variation = '' } ) {
99
99
  const prefix = variation ? `variations.${ variation }.` : '';
100
100
  const urlPrefix = variation ? `/variations/${ variation }` : '';
101
- const supports = getSupportedGlobalStylesPanels( name );
101
+ const supports = useSupportedStyles( name );
102
102
  const hasSupport = supports.includes( 'linkColor' );
103
103
  const [ color ] = useGlobalStyle(
104
104
  prefix + 'elements.link.color.text',
@@ -138,7 +138,7 @@ function LinkColorItem( { name, parentMenu, variation = '' } ) {
138
138
  function HeadingColorItem( { name, parentMenu, variation = '' } ) {
139
139
  const prefix = variation ? `variations.${ variation }.` : '';
140
140
  const urlPrefix = variation ? `/variations/${ variation }` : '';
141
- const supports = getSupportedGlobalStylesPanels( name );
141
+ const supports = useSupportedStyles( name );
142
142
  const hasSupport = supports.includes( 'color' );
143
143
  const [ color ] = useGlobalStyle(
144
144
  prefix + 'elements.heading.color.text',
@@ -176,7 +176,7 @@ function HeadingColorItem( { name, parentMenu, variation = '' } ) {
176
176
  function ButtonColorItem( { name, parentMenu, variation = '' } ) {
177
177
  const prefix = variation ? `variations.${ variation }.` : '';
178
178
  const urlPrefix = variation ? `/variations/${ variation }` : '';
179
- const supports = getSupportedGlobalStylesPanels( name );
179
+ const supports = useSupportedStyles( name );
180
180
  const hasSupport = supports.includes( 'buttonColor' );
181
181
  const [ color ] = useGlobalStyle(
182
182
  prefix + 'elements.button.color.text',
@@ -233,7 +233,7 @@ function ScreenColors( { name, variation = '' } ) {
233
233
  <Palette name={ name } />
234
234
 
235
235
  <VStack spacing={ 3 }>
236
- <Subtitle>{ __( 'Elements' ) }</Subtitle>
236
+ <Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>
237
237
  <ItemGroup isBordered isSeparated>
238
238
  <BackgroundColorItem
239
239
  name={ name }
@@ -32,13 +32,20 @@ function ScreenCSS( { name } ) {
32
32
 
33
33
  return (
34
34
  <>
35
- <ScreenHeader title={ __( 'CSS' ) } description={ description } />
36
- <ExternalLink
37
- href="https://wordpress.org/support/article/css/"
38
- className="edit-site-global-styles-screen-css-help-link"
39
- >
40
- { __( 'Learn more about CSS' ) }
41
- </ExternalLink>
35
+ <ScreenHeader
36
+ title={ __( 'CSS' ) }
37
+ description={
38
+ <>
39
+ { description }
40
+ <ExternalLink
41
+ href="https://wordpress.org/support/article/css/"
42
+ className="edit-site-global-styles-screen-css-help-link"
43
+ >
44
+ { __( 'Learn more about CSS' ) }
45
+ </ExternalLink>
46
+ </>
47
+ }
48
+ />
42
49
  <div className="edit-site-global-styles-screen-css">
43
50
  <CustomCSSControl blockName={ name } />
44
51
  </div>
@@ -8,7 +8,7 @@ import {
8
8
  } from '@wordpress/components';
9
9
  import {
10
10
  __experimentalColorGradientControl as ColorGradientControl,
11
- experiments as blockEditorExperiments,
11
+ privateApis as blockEditorPrivateApis,
12
12
  } from '@wordpress/block-editor';
13
13
  import { useState } from '@wordpress/element';
14
14
 
@@ -17,18 +17,18 @@ import { useState } from '@wordpress/element';
17
17
  */
18
18
  import ScreenHeader from './header';
19
19
  import {
20
- getSupportedGlobalStylesPanels,
20
+ useSupportedStyles,
21
21
  useColorsPerOrigin,
22
22
  useGradientsPerOrigin,
23
23
  } from './hooks';
24
- import { unlock } from '../../experiments';
24
+ import { unlock } from '../../private-apis';
25
25
 
26
- const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorExperiments );
26
+ const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
27
27
 
28
28
  function ScreenHeadingColor( { name, variation = '' } ) {
29
29
  const prefix = variation ? `variations.${ variation }.` : '';
30
30
  const [ selectedLevel, setCurrentTab ] = useState( 'heading' );
31
- const supports = getSupportedGlobalStylesPanels( name );
31
+ const supports = useSupportedStyles( name );
32
32
  const [ areCustomSolidsEnabled ] = useGlobalSetting( 'color.custom', name );
33
33
  const [ areCustomGradientsEnabled ] = useGlobalSetting(
34
34
  'color.customGradient',
@@ -125,7 +125,7 @@ function ScreenHeadingColor( { name, variation = '' } ) {
125
125
  ) }
126
126
  />
127
127
  <div className="edit-site-global-styles-screen-heading-color">
128
- <h4>{ __( 'Select heading level' ) }</h4>
128
+ <h3>{ __( 'Select heading level' ) }</h3>
129
129
 
130
130
  <ToggleGroupControl
131
131
  __nextHasNoMarginBottom
@@ -151,7 +151,7 @@ function ScreenHeadingColor( { name, variation = '' } ) {
151
151
  </div>
152
152
  { hasTextColor && (
153
153
  <div className="edit-site-global-styles-screen-heading-color">
154
- <h4>
154
+ <h3>
155
155
  { selectedLevel === 'heading'
156
156
  ? __( 'Text color for all heading levels' )
157
157
  : sprintf(
@@ -159,7 +159,7 @@ function ScreenHeadingColor( { name, variation = '' } ) {
159
159
  __( 'Text color for %s' ),
160
160
  selectedLevel.toUpperCase()
161
161
  ) }
162
- </h4>
162
+ </h3>
163
163
  <ColorGradientControl
164
164
  className="edit-site-screen-heading-text-color__control"
165
165
  colors={ colorsPerOrigin }
@@ -170,12 +170,13 @@ function ScreenHeadingColor( { name, variation = '' } ) {
170
170
  colorValue={ color }
171
171
  onColorChange={ setColor }
172
172
  clearable={ color === userColor }
173
+ headingLevel={ 4 }
173
174
  />
174
175
  </div>
175
176
  ) }
176
177
  { hasBackgroundColor && (
177
178
  <div className="edit-site-global-styles-screen-heading-color">
178
- <h4>
179
+ <h3>
179
180
  { selectedLevel === 'heading'
180
181
  ? __( 'Background color for all heading levels' )
181
182
  : sprintf(
@@ -183,7 +184,7 @@ function ScreenHeadingColor( { name, variation = '' } ) {
183
184
  __( 'Background color for %s' ),
184
185
  selectedLevel.toUpperCase()
185
186
  ) }
186
- </h4>
187
+ </h3>
187
188
  <ColorGradientControl
188
189
  className="edit-site-screen-heading-background-color__control"
189
190
  colors={ colorsPerOrigin }
@@ -193,6 +194,7 @@ function ScreenHeadingColor( { name, variation = '' } ) {
193
194
  showTitle={ false }
194
195
  enableAlpha
195
196
  __experimentalIsRenderedInSidebar
197
+ headingLevel={ 4 }
196
198
  { ...controlProps }
197
199
  />
198
200
  </div>
@@ -4,7 +4,7 @@
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import {
6
6
  __experimentalColorGradientControl as ColorGradientControl,
7
- experiments as blockEditorExperiments,
7
+ privateApis as blockEditorPrivateApis,
8
8
  } from '@wordpress/block-editor';
9
9
  import { TabPanel } from '@wordpress/components';
10
10
 
@@ -12,14 +12,14 @@ import { TabPanel } from '@wordpress/components';
12
12
  * Internal dependencies
13
13
  */
14
14
  import ScreenHeader from './header';
15
- import { getSupportedGlobalStylesPanels, useColorsPerOrigin } from './hooks';
16
- import { unlock } from '../../experiments';
15
+ import { useSupportedStyles, useColorsPerOrigin } from './hooks';
16
+ import { unlock } from '../../private-apis';
17
17
 
18
- const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorExperiments );
18
+ const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
19
19
 
20
20
  function ScreenLinkColor( { name, variation = '' } ) {
21
21
  const prefix = variation ? `variations.${ variation }.` : '';
22
- const supports = getSupportedGlobalStylesPanels( name );
22
+ const supports = useSupportedStyles( name );
23
23
  const [ areCustomSolidsEnabled ] = useGlobalSetting( 'color.custom', name );
24
24
  const colorsPerOrigin = useColorsPerOrigin( name );
25
25
  const [ isLinkEnabled ] = useGlobalSetting( 'color.link', name );
@@ -111,6 +111,7 @@ function ScreenLinkColor( { name, variation = '' } ) {
111
111
  pseudoSelectorConfig.value ===
112
112
  pseudoSelectorConfig.userValue
113
113
  }
114
+ headingLevel={ 3 }
114
115
  />
115
116
  </>
116
117
  );
@@ -16,7 +16,7 @@ import { isRTL, __ } from '@wordpress/i18n';
16
16
  import { chevronLeft, chevronRight } from '@wordpress/icons';
17
17
  import { useSelect } from '@wordpress/data';
18
18
  import { store as coreStore } from '@wordpress/core-data';
19
- import { experiments as blockEditorExperiments } from '@wordpress/block-editor';
19
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
20
20
 
21
21
  /**
22
22
  * Internal dependencies
@@ -25,10 +25,10 @@ import { IconWithCurrentColor } from './icon-with-current-color';
25
25
  import { NavigationButtonAsItem } from './navigation-button';
26
26
  import ContextMenu from './context-menu';
27
27
  import StylesPreview from './preview';
28
- import { unlock } from '../../experiments';
28
+ import { unlock } from '../../private-apis';
29
29
 
30
30
  function ScreenRoot() {
31
- const { useGlobalStyle } = unlock( blockEditorExperiments );
31
+ const { useGlobalStyle } = unlock( blockEditorPrivateApis );
32
32
  const [ customCSS ] = useGlobalStyle( 'css' );
33
33
 
34
34
  const { variations, canEditCSS } = useSelect( ( select ) => {
@@ -25,7 +25,7 @@ import {
25
25
  import { __ } from '@wordpress/i18n';
26
26
  import {
27
27
  store as blockEditorStore,
28
- experiments as blockEditorExperiments,
28
+ privateApis as blockEditorPrivateApis,
29
29
  } from '@wordpress/block-editor';
30
30
 
31
31
  /**
@@ -34,9 +34,9 @@ import {
34
34
  import { mergeBaseAndUserConfigs } from './global-styles-provider';
35
35
  import StylesPreview from './preview';
36
36
  import ScreenHeader from './header';
37
- import { unlock } from '../../experiments';
37
+ import { unlock } from '../../private-apis';
38
38
 
39
- const { GlobalStylesContext } = unlock( blockEditorExperiments );
39
+ const { GlobalStylesContext } = unlock( blockEditorPrivateApis );
40
40
 
41
41
  function compareVariations( a, b ) {
42
42
  return (
@@ -4,21 +4,21 @@
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import {
6
6
  __experimentalColorGradientControl as ColorGradientControl,
7
- experiments as blockEditorExperiments,
7
+ privateApis as blockEditorPrivateApis,
8
8
  } from '@wordpress/block-editor';
9
9
 
10
10
  /**
11
11
  * Internal dependencies
12
12
  */
13
13
  import ScreenHeader from './header';
14
- import { getSupportedGlobalStylesPanels, useColorsPerOrigin } from './hooks';
15
- import { unlock } from '../../experiments';
14
+ import { useSupportedStyles, useColorsPerOrigin } from './hooks';
15
+ import { unlock } from '../../private-apis';
16
16
 
17
- const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorExperiments );
17
+ const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
18
18
 
19
19
  function ScreenTextColor( { name, variation = '' } ) {
20
20
  const prefix = variation ? `variations.${ variation }.` : '';
21
- const supports = getSupportedGlobalStylesPanels( name );
21
+ const supports = useSupportedStyles( name );
22
22
  const [ areCustomSolidsEnabled ] = useGlobalSetting( 'color.custom', name );
23
23
  const [ isTextEnabled ] = useGlobalSetting( 'color.text', name );
24
24
  const colorsPerOrigin = useColorsPerOrigin( name );
@@ -53,6 +53,7 @@ function ScreenTextColor( { name, variation = '' } ) {
53
53
  colorValue={ color }
54
54
  onColorChange={ setColor }
55
55
  clearable={ color === userColor }
56
+ headingLevel={ 3 }
56
57
  />
57
58
  </>
58
59
  );
@@ -8,7 +8,7 @@ import {
8
8
  __experimentalHStack as HStack,
9
9
  FlexItem,
10
10
  } from '@wordpress/components';
11
- import { experiments as blockEditorExperiments } from '@wordpress/block-editor';
11
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
12
12
 
13
13
  /**
14
14
  * Internal dependencies
@@ -19,9 +19,9 @@ import Subtitle from './subtitle';
19
19
  import TypographyPanel from './typography-panel';
20
20
  import BlockPreviewPanel from './block-preview-panel';
21
21
  import { getVariationClassName } from './utils';
22
- import { unlock } from '../../experiments';
22
+ import { unlock } from '../../private-apis';
23
23
 
24
- const { useGlobalStyle } = unlock( blockEditorExperiments );
24
+ const { useGlobalStyle } = unlock( blockEditorPrivateApis );
25
25
 
26
26
  function Item( { name, parentMenu, element, label } ) {
27
27
  const hasSupport = ! name;
@@ -109,7 +109,7 @@ function ScreenTypography( { name, variation = '' } ) {
109
109
  { ! name && (
110
110
  <div className="edit-site-global-styles-screen-typography">
111
111
  <VStack spacing={ 3 }>
112
- <Subtitle>{ __( 'Elements' ) }</Subtitle>
112
+ <Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>
113
113
  <ItemGroup isBordered isSeparated>
114
114
  <Item
115
115
  name={ name }
@@ -22,19 +22,19 @@ import {
22
22
  import { __ } from '@wordpress/i18n';
23
23
  import { shadow as shadowIcon, Icon, check } from '@wordpress/icons';
24
24
  import { useCallback } from '@wordpress/element';
25
- import { experiments as blockEditorExperiments } from '@wordpress/block-editor';
25
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
26
26
 
27
27
  /**
28
28
  * Internal dependencies
29
29
  */
30
- import { getSupportedGlobalStylesPanels } from './hooks';
30
+ import { useSupportedStyles } from './hooks';
31
31
  import { IconWithCurrentColor } from './icon-with-current-color';
32
- import { unlock } from '../../experiments';
32
+ import { unlock } from '../../private-apis';
33
33
 
34
- const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorExperiments );
34
+ const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
35
35
 
36
36
  export function useHasShadowControl( name ) {
37
- const supports = getSupportedGlobalStylesPanels( name );
37
+ const supports = useSupportedStyles( name );
38
38
  return supports.includes( 'shadow' );
39
39
  }
40
40
 
@@ -44,7 +44,10 @@ export default function ShadowPanel( { name, variation = '' } ) {
44
44
  const [ userShadow ] = useGlobalStyle( `${ prefix }shadow`, name, 'user' );
45
45
  const hasShadow = () => !! userShadow;
46
46
 
47
- const resetShadow = () => setShadow( undefined );
47
+ const resetShadow = useCallback(
48
+ () => setShadow( undefined ),
49
+ [ setShadow ]
50
+ );
48
51
  const resetAll = useCallback(
49
52
  () => resetShadow( undefined ),
50
53
  [ resetShadow ]
@@ -62,6 +62,11 @@
62
62
  padding: 0 $grid-unit-20;
63
63
  }
64
64
 
65
+ .edit-site-global-styles-header {
66
+ // Need to override the too specific bottom margin for complementary areas.
67
+ margin-bottom: 0 !important;
68
+ }
69
+
65
70
  .edit-site-global-styles-subtitle {
66
71
  // Need to override the too specific styles for complementary areas.
67
72
  margin-bottom: 0 !important;
@@ -181,7 +186,8 @@
181
186
  }
182
187
 
183
188
  .edit-site-global-styles-screen-css-help-link {
184
- padding-left: $grid-unit-20;
189
+ display: block;
190
+ margin-top: $grid-unit-10;
185
191
  }
186
192
  .edit-site-global-styles-screen-variations {
187
193
  margin-top: $grid-unit-20;
@@ -3,9 +3,12 @@
3
3
  */
4
4
  import { __experimentalHeading as Heading } from '@wordpress/components';
5
5
 
6
- function Subtitle( { children } ) {
6
+ function Subtitle( { children, level } ) {
7
7
  return (
8
- <Heading className="edit-site-global-styles-subtitle" level={ 2 }>
8
+ <Heading
9
+ className="edit-site-global-styles-subtitle"
10
+ level={ level ?? 2 }
11
+ >
9
12
  { children }
10
13
  </Heading>
11
14
  );