@wordpress/edit-site 5.29.0 → 5.30.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 (364) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/actions/index.js +1 -1
  3. package/build/components/actions/index.js.map +1 -1
  4. package/build/components/block-editor/editor-canvas.js +10 -11
  5. package/build/components/block-editor/editor-canvas.js.map +1 -1
  6. package/build/components/editor/index.js +1 -15
  7. package/build/components/editor/index.js.map +1 -1
  8. package/build/components/global-styles/color-palette-panel.js +9 -0
  9. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  10. package/build/components/global-styles/font-families.js +1 -1
  11. package/build/components/global-styles/font-families.js.map +1 -1
  12. package/build/components/global-styles/font-library-modal/collection-font-variant.js +2 -2
  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 +62 -58
  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 +10 -15
  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 +118 -76
  19. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  20. package/build/components/global-styles/font-library-modal/font-demo.js +29 -8
  21. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  22. package/build/components/global-styles/font-library-modal/index.js +19 -6
  23. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  24. package/build/components/global-styles/font-library-modal/installed-fonts.js +151 -79
  25. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  26. package/build/components/global-styles/font-library-modal/library-font-variant.js +2 -2
  27. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  28. package/build/components/global-styles/font-library-modal/upload-fonts.js +8 -14
  29. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  30. package/build/components/global-styles/font-library-modal/utils/index.js +38 -4
  31. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  32. package/build/components/global-styles/font-library-modal/utils/preview-styles.js +1 -1
  33. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  34. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  35. package/build/components/global-styles/header.js +1 -1
  36. package/build/components/global-styles/header.js.map +1 -1
  37. package/build/components/global-styles/highlighted-colors.js +50 -0
  38. package/build/components/global-styles/highlighted-colors.js.map +1 -0
  39. package/build/components/global-styles/preview-colors.js +62 -0
  40. package/build/components/global-styles/preview-colors.js.map +1 -0
  41. package/build/components/global-styles/preview-iframe.js +131 -0
  42. package/build/components/global-styles/preview-iframe.js.map +1 -0
  43. package/build/components/global-styles/preview-styles.js +163 -0
  44. package/build/components/global-styles/preview-styles.js.map +1 -0
  45. package/build/components/global-styles/preview-typography.js +65 -0
  46. package/build/components/global-styles/preview-typography.js.map +1 -0
  47. package/build/components/global-styles/screen-block-list.js +1 -1
  48. package/build/components/global-styles/screen-block-list.js.map +1 -1
  49. package/build/components/global-styles/screen-block.js +1 -1
  50. package/build/components/global-styles/screen-block.js.map +1 -1
  51. package/build/components/global-styles/screen-colors.js +10 -2
  52. package/build/components/global-styles/screen-colors.js.map +1 -1
  53. package/build/components/global-styles/screen-revisions/index.js +2 -2
  54. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  55. package/build/components/global-styles/screen-root.js +2 -2
  56. package/build/components/global-styles/screen-root.js.map +1 -1
  57. package/build/components/global-styles/screen-typography.js +10 -2
  58. package/build/components/global-styles/screen-typography.js.map +1 -1
  59. package/build/components/global-styles/style-variations-container.js +12 -84
  60. package/build/components/global-styles/style-variations-container.js.map +1 -1
  61. package/build/components/global-styles/{typogrphy-elements.js → typography-elements.js} +1 -1
  62. package/build/components/global-styles/typography-elements.js.map +1 -0
  63. package/build/components/global-styles/ui.js +27 -2
  64. package/build/components/global-styles/ui.js.map +1 -1
  65. package/build/components/global-styles/utils.js +22 -0
  66. package/build/components/global-styles/utils.js.map +1 -1
  67. package/build/components/global-styles/variations/variation.js +90 -0
  68. package/build/components/global-styles/variations/variation.js.map +1 -0
  69. package/build/components/global-styles/variations/variations-color.js +36 -0
  70. package/build/components/global-styles/variations/variations-color.js.map +1 -0
  71. package/build/components/global-styles/{variations-panel.js → variations/variations-panel.js} +1 -1
  72. package/build/components/global-styles/variations/variations-panel.js.map +1 -0
  73. package/build/components/global-styles/variations/variations-typography.js +64 -0
  74. package/build/components/global-styles/variations/variations-typography.js.map +1 -0
  75. package/build/components/header-edit-mode/index.js +12 -11
  76. package/build/components/header-edit-mode/index.js.map +1 -1
  77. package/build/components/header-edit-mode/more-menu/index.js +10 -2
  78. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  79. package/build/components/layout/index.js +4 -1
  80. package/build/components/layout/index.js.map +1 -1
  81. package/build/components/page-patterns/index.js +14 -14
  82. package/build/components/page-patterns/index.js.map +1 -1
  83. package/build/components/{list/added-by.js → page-templates-template-parts/hooks.js} +1 -61
  84. package/build/components/page-templates-template-parts/hooks.js.map +1 -0
  85. package/build/components/page-templates-template-parts/index.js +14 -6
  86. package/build/components/page-templates-template-parts/index.js.map +1 -1
  87. package/build/components/resizable-frame/index.js +2 -1
  88. package/build/components/resizable-frame/index.js.map +1 -1
  89. package/build/components/revisions/index.js.map +1 -1
  90. package/build/components/save-panel/index.js +18 -3
  91. package/build/components/save-panel/index.js.map +1 -1
  92. package/build/components/sidebar/index.js +1 -1
  93. package/build/components/sidebar/index.js.map +1 -1
  94. package/build/components/sidebar-dataviews/default-views.js +2 -0
  95. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  96. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  97. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  98. package/build/components/sidebar-navigation-screen-main/index.js +1 -2
  99. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  100. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  101. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -3
  102. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  103. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  104. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  105. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +2 -2
  106. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  107. package/build/components/sidebar-navigation-screen-template/index.js +2 -2
  108. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  109. package/build/components/sidebar-navigation-screen-templates-browse/content.js +4 -4
  110. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  111. package/build/components/sidebar-navigation-screen-templates-browse/index.js +7 -5
  112. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  113. package/build/components/start-template-options/index.js.map +1 -1
  114. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +65 -0
  115. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  116. package/build-module/components/actions/index.js +1 -1
  117. package/build-module/components/actions/index.js.map +1 -1
  118. package/build-module/components/block-editor/editor-canvas.js +10 -11
  119. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  120. package/build-module/components/editor/index.js +2 -16
  121. package/build-module/components/editor/index.js.map +1 -1
  122. package/build-module/components/global-styles/color-palette-panel.js +8 -0
  123. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  124. package/build-module/components/global-styles/font-families.js +1 -1
  125. package/build-module/components/global-styles/font-families.js.map +1 -1
  126. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +4 -4
  127. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  128. package/build-module/components/global-styles/font-library-modal/context.js +63 -59
  129. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  130. package/build-module/components/global-styles/font-library-modal/font-card.js +11 -16
  131. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  132. package/build-module/components/global-styles/font-library-modal/font-collection.js +121 -79
  133. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  134. package/build-module/components/global-styles/font-library-modal/font-demo.js +30 -9
  135. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  136. package/build-module/components/global-styles/font-library-modal/index.js +19 -6
  137. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  138. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +151 -79
  139. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  140. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +4 -4
  141. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  142. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +9 -15
  143. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  144. package/build-module/components/global-styles/font-library-modal/utils/index.js +37 -4
  145. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  146. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js +1 -1
  147. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  148. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  149. package/build-module/components/global-styles/header.js +1 -1
  150. package/build-module/components/global-styles/header.js.map +1 -1
  151. package/build-module/components/global-styles/highlighted-colors.js +43 -0
  152. package/build-module/components/global-styles/highlighted-colors.js.map +1 -0
  153. package/build-module/components/global-styles/preview-colors.js +54 -0
  154. package/build-module/components/global-styles/preview-colors.js.map +1 -0
  155. package/build-module/components/global-styles/preview-iframe.js +124 -0
  156. package/build-module/components/global-styles/preview-iframe.js.map +1 -0
  157. package/build-module/components/global-styles/preview-styles.js +155 -0
  158. package/build-module/components/global-styles/preview-styles.js.map +1 -0
  159. package/build-module/components/global-styles/preview-typography.js +58 -0
  160. package/build-module/components/global-styles/preview-typography.js.map +1 -0
  161. package/build-module/components/global-styles/screen-block-list.js +1 -1
  162. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  163. package/build-module/components/global-styles/screen-block.js +1 -1
  164. package/build-module/components/global-styles/screen-block.js.map +1 -1
  165. package/build-module/components/global-styles/screen-colors.js +10 -2
  166. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  167. package/build-module/components/global-styles/screen-revisions/index.js +2 -2
  168. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  169. package/build-module/components/global-styles/screen-root.js +2 -2
  170. package/build-module/components/global-styles/screen-root.js.map +1 -1
  171. package/build-module/components/global-styles/screen-typography.js +10 -2
  172. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  173. package/build-module/components/global-styles/style-variations-container.js +13 -85
  174. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  175. package/build-module/components/global-styles/{typogrphy-elements.js → typography-elements.js} +1 -1
  176. package/build-module/components/global-styles/typography-elements.js.map +1 -0
  177. package/build-module/components/global-styles/ui.js +27 -2
  178. package/build-module/components/global-styles/ui.js.map +1 -1
  179. package/build-module/components/global-styles/utils.js +21 -0
  180. package/build-module/components/global-styles/utils.js.map +1 -1
  181. package/build-module/components/global-styles/variations/variation.js +82 -0
  182. package/build-module/components/global-styles/variations/variation.js.map +1 -0
  183. package/build-module/components/global-styles/variations/variations-color.js +28 -0
  184. package/build-module/components/global-styles/variations/variations-color.js.map +1 -0
  185. package/build-module/components/global-styles/{variations-panel.js → variations/variations-panel.js} +1 -1
  186. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -0
  187. package/build-module/components/global-styles/variations/variations-typography.js +56 -0
  188. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -0
  189. package/build-module/components/header-edit-mode/index.js +13 -12
  190. package/build-module/components/header-edit-mode/index.js.map +1 -1
  191. package/build-module/components/header-edit-mode/more-menu/index.js +13 -5
  192. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  193. package/build-module/components/layout/index.js +4 -1
  194. package/build-module/components/layout/index.js.map +1 -1
  195. package/build-module/components/page-patterns/index.js +14 -14
  196. package/build-module/components/page-patterns/index.js.map +1 -1
  197. package/build-module/components/{list/added-by.js → page-templates-template-parts/hooks.js} +2 -59
  198. package/build-module/components/page-templates-template-parts/hooks.js.map +1 -0
  199. package/build-module/components/page-templates-template-parts/index.js +13 -5
  200. package/build-module/components/page-templates-template-parts/index.js.map +1 -1
  201. package/build-module/components/resizable-frame/index.js +2 -1
  202. package/build-module/components/resizable-frame/index.js.map +1 -1
  203. package/build-module/components/revisions/index.js.map +1 -1
  204. package/build-module/components/save-panel/index.js +18 -3
  205. package/build-module/components/save-panel/index.js.map +1 -1
  206. package/build-module/components/sidebar/index.js +1 -1
  207. package/build-module/components/sidebar/index.js.map +1 -1
  208. package/build-module/components/sidebar-dataviews/default-views.js +3 -1
  209. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  210. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  211. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  212. package/build-module/components/sidebar-navigation-screen-main/index.js +1 -2
  213. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  214. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  215. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -3
  216. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  217. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  218. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  219. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  220. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  221. package/build-module/components/sidebar-navigation-screen-template/index.js +1 -1
  222. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  223. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  224. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  225. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +7 -5
  226. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  227. package/build-module/components/start-template-options/index.js.map +1 -1
  228. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +63 -1
  229. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  230. package/build-style/style-rtl.css +163 -286
  231. package/build-style/style.css +163 -286
  232. package/package.json +42 -42
  233. package/src/components/actions/index.js +1 -1
  234. package/src/components/block-editor/editor-canvas.js +13 -12
  235. package/src/components/block-editor/style.scss +0 -3
  236. package/src/components/editor/index.js +0 -20
  237. package/src/components/global-styles/color-palette-panel.js +11 -1
  238. package/src/components/global-styles/font-families.js +1 -1
  239. package/src/components/global-styles/font-library-modal/collection-font-variant.js +5 -5
  240. package/src/components/global-styles/font-library-modal/context.js +116 -104
  241. package/src/components/global-styles/font-library-modal/font-card.js +11 -26
  242. package/src/components/global-styles/font-library-modal/font-collection.js +297 -218
  243. package/src/components/global-styles/font-library-modal/font-demo.js +38 -4
  244. package/src/components/global-styles/font-library-modal/index.js +23 -16
  245. package/src/components/global-styles/font-library-modal/installed-fonts.js +243 -114
  246. package/src/components/global-styles/font-library-modal/library-font-variant.js +5 -5
  247. package/src/components/global-styles/font-library-modal/style.scss +15 -8
  248. package/src/components/global-styles/font-library-modal/upload-fonts.js +17 -19
  249. package/src/components/global-styles/font-library-modal/utils/index.js +44 -4
  250. package/src/components/global-styles/font-library-modal/utils/preview-styles.js +2 -1
  251. package/src/components/global-styles/font-library-modal/utils/test/getDisplaySrcFromFontFace.spec.js +7 -18
  252. package/src/components/global-styles/gradients-palette-panel.js +2 -2
  253. package/src/components/global-styles/header.js +1 -1
  254. package/src/components/global-styles/highlighted-colors.js +39 -0
  255. package/src/components/global-styles/preview-colors.js +61 -0
  256. package/src/components/global-styles/preview-iframe.js +153 -0
  257. package/src/components/global-styles/preview-styles.js +185 -0
  258. package/src/components/global-styles/preview-typography.js +62 -0
  259. package/src/components/global-styles/screen-block-list.js +1 -1
  260. package/src/components/global-styles/screen-block.js +4 -1
  261. package/src/components/global-styles/screen-colors.js +13 -1
  262. package/src/components/global-styles/screen-revisions/index.js +5 -2
  263. package/src/components/global-styles/screen-root.js +2 -2
  264. package/src/components/global-styles/screen-typography.js +19 -2
  265. package/src/components/global-styles/style-variations-container.js +14 -92
  266. package/src/components/global-styles/style.scss +0 -34
  267. package/src/components/global-styles/ui.js +26 -2
  268. package/src/components/global-styles/utils.js +37 -0
  269. package/src/components/global-styles/variations/style.scss +44 -0
  270. package/src/components/global-styles/variations/variation.js +93 -0
  271. package/src/components/global-styles/variations/variations-color.js +30 -0
  272. package/src/components/global-styles/{variations-panel.js → variations/variations-panel.js} +1 -1
  273. package/src/components/global-styles/variations/variations-typography.js +85 -0
  274. package/src/components/header-edit-mode/index.js +20 -27
  275. package/src/components/header-edit-mode/more-menu/index.js +17 -8
  276. package/src/components/header-edit-mode/style.scss +4 -0
  277. package/src/components/layout/index.js +5 -0
  278. package/src/components/page-patterns/index.js +21 -21
  279. package/src/components/{list/added-by.js → page-templates-template-parts/hooks.js} +1 -66
  280. package/src/components/page-templates-template-parts/index.js +20 -3
  281. package/src/components/page-templates-template-parts/style.scss +48 -0
  282. package/src/components/resizable-frame/index.js +1 -0
  283. package/src/components/revisions/index.js +1 -1
  284. package/src/components/save-panel/index.js +34 -12
  285. package/src/components/sidebar/index.js +1 -1
  286. package/src/components/sidebar-dataviews/default-views.js +3 -1
  287. package/src/components/sidebar-edit-mode/page-panels/page-status.js +1 -1
  288. package/src/components/sidebar-edit-mode/template-panel/index.js +1 -1
  289. package/src/components/sidebar-navigation-screen-main/index.js +0 -2
  290. package/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +1 -1
  291. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -2
  292. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -1
  293. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +1 -1
  294. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  295. package/src/components/sidebar-navigation-screen-template/index.js +1 -1
  296. package/src/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  297. package/src/components/sidebar-navigation-screen-templates-browse/index.js +5 -3
  298. package/src/components/start-template-options/index.js +1 -1
  299. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +173 -0
  300. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +68 -1
  301. package/src/style.scss +2 -2
  302. package/build/components/global-styles/font-library-modal/collection-font-details.js +0 -50
  303. package/build/components/global-styles/font-library-modal/collection-font-details.js.map +0 -1
  304. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js +0 -30
  305. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +0 -1
  306. package/build/components/global-styles/font-library-modal/library-font-card.js +0 -39
  307. package/build/components/global-styles/font-library-modal/library-font-card.js.map +0 -1
  308. package/build/components/global-styles/font-library-modal/tab-panel-layout.js +0 -67
  309. package/build/components/global-styles/font-library-modal/tab-panel-layout.js.map +0 -1
  310. package/build/components/global-styles/preview.js +0 -271
  311. package/build/components/global-styles/preview.js.map +0 -1
  312. package/build/components/global-styles/typogrphy-elements.js.map +0 -1
  313. package/build/components/global-styles/variations-panel.js.map +0 -1
  314. package/build/components/list/added-by.js.map +0 -1
  315. package/build/components/list/header.js +0 -55
  316. package/build/components/list/header.js.map +0 -1
  317. package/build/components/list/index.js +0 -80
  318. package/build/components/list/index.js.map +0 -1
  319. package/build/components/list/table.js +0 -94
  320. package/build/components/list/table.js.map +0 -1
  321. package/build/components/list/use-register-shortcuts.js +0 -51
  322. package/build/components/list/use-register-shortcuts.js.map +0 -1
  323. package/build/components/sidebar-navigation-screen-main/template-part-hint.js +0 -36
  324. package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +0 -1
  325. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +0 -36
  326. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +0 -1
  327. package/build-module/components/global-styles/font-library-modal/collection-font-details.js +0 -42
  328. package/build-module/components/global-styles/font-library-modal/collection-font-details.js.map +0 -1
  329. package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js +0 -23
  330. package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +0 -1
  331. package/build-module/components/global-styles/font-library-modal/library-font-card.js +0 -31
  332. package/build-module/components/global-styles/font-library-modal/library-font-card.js.map +0 -1
  333. package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js +0 -60
  334. package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js.map +0 -1
  335. package/build-module/components/global-styles/preview.js +0 -264
  336. package/build-module/components/global-styles/preview.js.map +0 -1
  337. package/build-module/components/global-styles/typogrphy-elements.js.map +0 -1
  338. package/build-module/components/global-styles/variations-panel.js.map +0 -1
  339. package/build-module/components/list/added-by.js.map +0 -1
  340. package/build-module/components/list/header.js +0 -47
  341. package/build-module/components/list/header.js.map +0 -1
  342. package/build-module/components/list/index.js +0 -72
  343. package/build-module/components/list/index.js.map +0 -1
  344. package/build-module/components/list/table.js +0 -86
  345. package/build-module/components/list/table.js.map +0 -1
  346. package/build-module/components/list/use-register-shortcuts.js +0 -45
  347. package/build-module/components/list/use-register-shortcuts.js.map +0 -1
  348. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +0 -29
  349. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js.map +0 -1
  350. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +0 -27
  351. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +0 -1
  352. package/src/components/global-styles/font-library-modal/collection-font-details.js +0 -56
  353. package/src/components/global-styles/font-library-modal/confirm-delete-dialog.js +0 -33
  354. package/src/components/global-styles/font-library-modal/library-font-card.js +0 -34
  355. package/src/components/global-styles/font-library-modal/tab-panel-layout.js +0 -85
  356. package/src/components/global-styles/preview.js +0 -327
  357. package/src/components/list/header.js +0 -48
  358. package/src/components/list/index.js +0 -87
  359. package/src/components/list/style.scss +0 -188
  360. package/src/components/list/table.js +0 -140
  361. package/src/components/list/use-register-shortcuts.js +0 -49
  362. package/src/components/sidebar-navigation-screen-main/template-part-hint.js +0 -34
  363. package/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js +0 -22
  364. /package/src/components/global-styles/{typogrphy-elements.js → typography-elements.js} +0 -0
@@ -73,7 +73,11 @@ function ScreenRevisions() {
73
73
 
74
74
  const onCloseRevisions = () => {
75
75
  goTo( '/' ); // Return to global styles main panel.
76
- setEditorCanvasContainerView( undefined );
76
+ const canvasContainerView =
77
+ editorCanvasContainerView === 'global-styles-revisions:style-book'
78
+ ? 'style-book'
79
+ : undefined;
80
+ setEditorCanvasContainerView( canvasContainerView );
77
81
  };
78
82
 
79
83
  const restoreRevision = ( revision ) => {
@@ -99,7 +103,6 @@ function ScreenRevisions() {
99
103
  ! editorCanvasContainerView.startsWith( 'global-styles-revisions' )
100
104
  ) {
101
105
  goTo( '/' ); // Return to global styles main panel.
102
- setEditorCanvasContainerView( editorCanvasContainerView );
103
106
  }
104
107
  }, [ editorCanvasContainerView ] );
105
108
 
@@ -24,7 +24,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
24
24
  import { IconWithCurrentColor } from './icon-with-current-color';
25
25
  import { NavigationButtonAsItem } from './navigation-button';
26
26
  import RootMenu from './root-menu';
27
- import StylesPreview from './preview';
27
+ import PreviewStyles from './preview-styles';
28
28
  import { unlock } from '../../lock-unlock';
29
29
 
30
30
  const { useGlobalStyle } = unlock( blockEditorPrivateApis );
@@ -58,7 +58,7 @@ function ScreenRoot() {
58
58
  <VStack spacing={ 4 }>
59
59
  <Card>
60
60
  <CardMedia>
61
- <StylesPreview />
61
+ <PreviewStyles />
62
62
  </CardMedia>
63
63
  </Card>
64
64
  { hasVariations && (
@@ -9,9 +9,11 @@ import { useSelect } from '@wordpress/data';
9
9
  /**
10
10
  * Internal dependencies
11
11
  */
12
- import TypographyElements from './typogrphy-elements';
12
+ import TypographyElements from './typography-elements';
13
+ import TypographyVariations from './variations/variations-typography';
13
14
  import FontFamilies from './font-families';
14
15
  import ScreenHeader from './header';
16
+ import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
15
17
 
16
18
  function ScreenTypography() {
17
19
  const fontLibraryEnabled = useSelect(
@@ -19,6 +21,14 @@ function ScreenTypography() {
19
21
  select( editorStore ).getEditorSettings().fontLibraryEnabled,
20
22
  []
21
23
  );
24
+ const typographyVariations =
25
+ useCurrentMergeThemeStyleVariationsWithUserConfig( {
26
+ property: 'typography',
27
+ filter: ( variation ) =>
28
+ variation?.settings?.typography?.fontFamilies &&
29
+ Object.keys( variation?.settings?.typography?.fontFamilies )
30
+ .length,
31
+ } );
22
32
 
23
33
  return (
24
34
  <>
@@ -30,7 +40,14 @@ function ScreenTypography() {
30
40
  />
31
41
  <div className="edit-site-global-styles-screen-typography">
32
42
  <VStack spacing={ 6 }>
33
- { fontLibraryEnabled && <FontFamilies /> }
43
+ { !! typographyVariations.length && (
44
+ <TypographyVariations />
45
+ ) }
46
+ { ! window.__experimentalDisableFontLibrary && (
47
+ <VStack spacing={ 3 }>
48
+ { fontLibraryEnabled && <FontFamilies /> }
49
+ </VStack>
50
+ ) }
34
51
  <TypographyElements />
35
52
  </VStack>
36
53
  </div>
@@ -1,104 +1,17 @@
1
- /**
2
- * External dependencies
3
- */
4
- import classnames from 'classnames';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
9
4
  import { store as coreStore } from '@wordpress/core-data';
10
5
  import { useSelect } from '@wordpress/data';
11
- import { useMemo, useContext, useState } from '@wordpress/element';
12
- import { ENTER } from '@wordpress/keycodes';
6
+ import { useMemo } from '@wordpress/element';
13
7
  import { __experimentalGrid as Grid } from '@wordpress/components';
14
- import { __, sprintf } from '@wordpress/i18n';
15
- import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
8
+ import { __ } from '@wordpress/i18n';
16
9
 
17
10
  /**
18
11
  * Internal dependencies
19
12
  */
20
- import { mergeBaseAndUserConfigs } from './global-styles-provider';
21
- import StylesPreview from './preview';
22
- import { unlock } from '../../lock-unlock';
23
-
24
- const { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(
25
- blockEditorPrivateApis
26
- );
27
-
28
- function Variation( { variation } ) {
29
- const [ isFocused, setIsFocused ] = useState( false );
30
- const { base, user, setUserConfig } = useContext( GlobalStylesContext );
31
- const context = useMemo( () => {
32
- return {
33
- user: {
34
- settings: variation.settings ?? {},
35
- styles: variation.styles ?? {},
36
- },
37
- base,
38
- merged: mergeBaseAndUserConfigs( base, variation ),
39
- setUserConfig: () => {},
40
- };
41
- }, [ variation, base ] );
42
-
43
- const selectVariation = () => {
44
- setUserConfig( () => {
45
- return {
46
- settings: variation.settings,
47
- styles: variation.styles,
48
- };
49
- } );
50
- };
51
-
52
- const selectOnEnter = ( event ) => {
53
- if ( event.keyCode === ENTER ) {
54
- event.preventDefault();
55
- selectVariation();
56
- }
57
- };
58
-
59
- const isActive = useMemo( () => {
60
- return areGlobalStyleConfigsEqual( user, variation );
61
- }, [ user, variation ] );
62
-
63
- let label = variation?.title;
64
- if ( variation?.description ) {
65
- label = sprintf(
66
- /* translators: %1$s: variation title. %2$s variation description. */
67
- __( '%1$s (%2$s)' ),
68
- variation?.title,
69
- variation?.description
70
- );
71
- }
72
-
73
- return (
74
- <GlobalStylesContext.Provider value={ context }>
75
- <div
76
- className={ classnames(
77
- 'edit-site-global-styles-variations_item',
78
- {
79
- 'is-active': isActive,
80
- }
81
- ) }
82
- role="button"
83
- onClick={ selectVariation }
84
- onKeyDown={ selectOnEnter }
85
- tabIndex="0"
86
- aria-label={ label }
87
- aria-current={ isActive }
88
- onFocus={ () => setIsFocused( true ) }
89
- onBlur={ () => setIsFocused( false ) }
90
- >
91
- <div className="edit-site-global-styles-variations_item-preview">
92
- <StylesPreview
93
- label={ variation?.title }
94
- isFocused={ isFocused }
95
- withHoverView
96
- />
97
- </div>
98
- </div>
99
- </GlobalStylesContext.Provider>
100
- );
101
- }
13
+ import PreviewStyles from './preview-styles';
14
+ import Variation from './variations/variation';
102
15
 
103
16
  export default function StyleVariationsContainer() {
104
17
  const variations = useSelect( ( select ) => {
@@ -128,7 +41,16 @@ export default function StyleVariationsContainer() {
128
41
  className="edit-site-global-styles-style-variations-container"
129
42
  >
130
43
  { withEmptyVariation.map( ( variation, index ) => (
131
- <Variation key={ index } variation={ variation } />
44
+ <Variation key={ index } variation={ variation }>
45
+ { ( isFocused ) => (
46
+ <PreviewStyles
47
+ label={ variation?.title }
48
+ withHoverView
49
+ isFocused={ isFocused }
50
+ variation={ variation }
51
+ />
52
+ ) }
53
+ </Variation>
132
54
  ) ) }
133
55
  </Grid>
134
56
  );
@@ -91,40 +91,6 @@
91
91
  margin: 0;
92
92
  }
93
93
 
94
- .edit-site-global-styles-variations_item {
95
- box-sizing: border-box;
96
- // To round the outline in Windows 10 high contrast mode.
97
- border-radius: $radius-block-ui;
98
-
99
- .edit-site-global-styles-variations_item-preview {
100
- padding: $border-width * 2;
101
- border-radius: $radius-block-ui;
102
- box-shadow: 0 0 0 $border-width $gray-200;
103
- // Shown in Windows 10 high contrast mode.
104
- outline: 1px solid transparent;
105
- }
106
-
107
- &.is-active .edit-site-global-styles-variations_item-preview {
108
- box-shadow: 0 0 0 $border-width $gray-900;
109
- // Shown in Windows 10 high contrast mode.
110
- outline-width: 3px;
111
- }
112
-
113
- &:hover .edit-site-global-styles-variations_item-preview {
114
- box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color);
115
- }
116
-
117
- &:focus .edit-site-global-styles-variations_item-preview {
118
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
119
- }
120
-
121
- &:focus-visible {
122
- // Shown in Windows 10 high contrast mode.
123
- outline: 3px solid transparent;
124
- outline-offset: 0;
125
- }
126
- }
127
-
128
94
  .edit-site-global-styles-icon-with-current-color {
129
95
  fill: currentColor;
130
96
  }
@@ -230,12 +230,14 @@ function GlobalStylesBlockLink() {
230
230
  }
231
231
 
232
232
  function GlobalStylesEditorCanvasContainerLink() {
233
- const { goTo } = useNavigator();
233
+ const { goTo, location } = useNavigator();
234
234
  const editorCanvasContainerView = useSelect(
235
235
  ( select ) =>
236
236
  unlock( select( editSiteStore ) ).getEditorCanvasContainerView(),
237
237
  []
238
238
  );
239
+ const path = location?.path;
240
+ const isRevisionsOpen = path === '/revisions';
239
241
 
240
242
  // If the user switches the editor canvas container view, redirect
241
243
  // to the appropriate screen. This effectively allows deep linking to the
@@ -249,11 +251,33 @@ function GlobalStylesEditorCanvasContainerLink() {
249
251
  case 'global-styles-css':
250
252
  goTo( '/css' );
251
253
  break;
254
+ case 'style-book':
255
+ /*
256
+ * The stand-alone style book is open
257
+ * and the revisions panel is open,
258
+ * close the revisions panel.
259
+ * Otherwise keep the style book open while
260
+ * browsing global styles panel.
261
+ */
262
+ if ( isRevisionsOpen ) {
263
+ goTo( '/' );
264
+ }
265
+ break;
252
266
  default:
267
+ /*
268
+ * Example: the user has navigated to "Browse styles" or elsewhere
269
+ * and changes the editorCanvasContainerView, e.g., closes the style book.
270
+ * The panel should not be affected.
271
+ * Exclude revisions panel from this behavior,
272
+ * as it should close when the editorCanvasContainerView doesn't correspond.
273
+ */
274
+ if ( path !== '/' && ! isRevisionsOpen ) {
275
+ return;
276
+ }
253
277
  goTo( '/' );
254
278
  break;
255
279
  }
256
- }, [ editorCanvasContainerView, goTo ] );
280
+ }, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );
257
281
  }
258
282
 
259
283
  function GlobalStylesUI() {
@@ -10,3 +10,40 @@ export function getVariationClassName( variation ) {
10
10
  }
11
11
  return `is-style-${ variation }`;
12
12
  }
13
+
14
+ function getFontFamilyFromSetting( fontFamilies, setting ) {
15
+ if ( ! setting ) {
16
+ return null;
17
+ }
18
+
19
+ const fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );
20
+ const fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];
21
+
22
+ return fontFamilies.find(
23
+ ( fontFamily ) => fontFamily.slug === fontFamilySlug
24
+ );
25
+ }
26
+
27
+ export function getFontFamilies( themeJson ) {
28
+ const fontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; // TODO this could not be under theme.
29
+ const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;
30
+ const bodyFontFamily = getFontFamilyFromSetting(
31
+ fontFamilies,
32
+ bodyFontFamilySetting
33
+ );
34
+
35
+ const headingFontFamilySetting =
36
+ themeJson?.styles?.elements?.heading?.typography?.fontFamily;
37
+
38
+ let headingFontFamily;
39
+ if ( ! headingFontFamilySetting ) {
40
+ headingFontFamily = bodyFontFamily;
41
+ } else {
42
+ headingFontFamily = getFontFamilyFromSetting(
43
+ fontFamilies,
44
+ themeJson?.styles?.elements?.heading?.typography?.fontFamily
45
+ );
46
+ }
47
+
48
+ return [ bodyFontFamily, headingFontFamily ];
49
+ }
@@ -0,0 +1,44 @@
1
+ .edit-site-global-styles-variations_item {
2
+ box-sizing: border-box;
3
+ // To round the outline in Windows 10 high contrast mode.
4
+ border-radius: $radius-block-ui;
5
+ cursor: pointer;
6
+
7
+ .edit-site-global-styles-variations_item-preview {
8
+ padding: $border-width * 2;
9
+ border-radius: $radius-block-ui;
10
+ box-shadow: 0 0 0 $border-width $gray-200;
11
+ // Shown in Windows 10 high contrast mode.
12
+ outline: 1px solid transparent;
13
+
14
+ .edit-site-global-styles-color-variations & {
15
+ padding: $grid-unit-10;
16
+ }
17
+ }
18
+
19
+ &.is-active .edit-site-global-styles-variations_item-preview {
20
+ box-shadow: 0 0 0 $border-width $gray-900;
21
+ // Shown in Windows 10 high contrast mode.
22
+ outline-width: 3px;
23
+ }
24
+
25
+ &:hover .edit-site-global-styles-variations_item-preview {
26
+ box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color);
27
+ }
28
+
29
+ &:focus .edit-site-global-styles-variations_item-preview {
30
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
31
+ }
32
+
33
+ &:focus-visible {
34
+ // Shown in Windows 10 high contrast mode.
35
+ outline: 3px solid transparent;
36
+ outline-offset: 0;
37
+ }
38
+ }
39
+
40
+ .edit-site-global-styles_preview-typography {
41
+ font-size: 22px;
42
+ line-height: 44px;
43
+ text-align: center;
44
+ }
@@ -0,0 +1,93 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classnames from 'classnames';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { useMemo, useContext, useState } from '@wordpress/element';
10
+ import { ENTER } from '@wordpress/keycodes';
11
+ import { __, sprintf } from '@wordpress/i18n';
12
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
13
+
14
+ /**
15
+ * Internal dependencies
16
+ */
17
+ import { mergeBaseAndUserConfigs } from '../global-styles-provider';
18
+ import { unlock } from '../../../lock-unlock';
19
+
20
+ const { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(
21
+ blockEditorPrivateApis
22
+ );
23
+
24
+ export default function Variation( { variation, children } ) {
25
+ const [ isFocused, setIsFocused ] = useState( false );
26
+ const { base, user, setUserConfig } = useContext( GlobalStylesContext );
27
+ const context = useMemo(
28
+ () => ( {
29
+ user: {
30
+ settings: variation.settings ?? {},
31
+ styles: variation.styles ?? {},
32
+ },
33
+ base,
34
+ merged: mergeBaseAndUserConfigs( base, variation ),
35
+ setUserConfig: () => {},
36
+ } ),
37
+ [ variation, base ]
38
+ );
39
+
40
+ const selectVariation = () => {
41
+ setUserConfig( () => ( {
42
+ settings: variation.settings,
43
+ styles: variation.styles,
44
+ } ) );
45
+ };
46
+
47
+ const selectOnEnter = ( event ) => {
48
+ if ( event.keyCode === ENTER ) {
49
+ event.preventDefault();
50
+ selectVariation();
51
+ }
52
+ };
53
+
54
+ const isActive = useMemo(
55
+ () => areGlobalStyleConfigsEqual( user, variation ),
56
+ [ user, variation ]
57
+ );
58
+
59
+ let label = variation?.title;
60
+ if ( variation?.description ) {
61
+ label = sprintf(
62
+ /* translators: %1$s: variation title. %2$s variation description. */
63
+ __( '%1$s (%2$s)' ),
64
+ variation?.title,
65
+ variation?.description
66
+ );
67
+ }
68
+
69
+ return (
70
+ <GlobalStylesContext.Provider value={ context }>
71
+ <div
72
+ className={ classnames(
73
+ 'edit-site-global-styles-variations_item',
74
+ {
75
+ 'is-active': isActive,
76
+ }
77
+ ) }
78
+ role="button"
79
+ onClick={ selectVariation }
80
+ onKeyDown={ selectOnEnter }
81
+ tabIndex="0"
82
+ aria-label={ label }
83
+ aria-current={ isActive }
84
+ onFocus={ () => setIsFocused( true ) }
85
+ onBlur={ () => setIsFocused( false ) }
86
+ >
87
+ <div className="edit-site-global-styles-variations_item-preview">
88
+ { children( isFocused ) }
89
+ </div>
90
+ </div>
91
+ </GlobalStylesContext.Provider>
92
+ );
93
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import {
5
+ __experimentalGrid as Grid,
6
+ __experimentalVStack as VStack,
7
+ } from '@wordpress/components';
8
+ import { __ } from '@wordpress/i18n';
9
+
10
+ /**
11
+ * Internal dependencies
12
+ */
13
+ import Subtitle from '../subtitle';
14
+ import Variation from './variation';
15
+ import StylesPreviewColors from '../preview-colors';
16
+
17
+ export default function ColorVariations( { variations } ) {
18
+ return (
19
+ <VStack spacing={ 3 }>
20
+ <Subtitle level={ 3 }>{ __( 'Presets' ) }</Subtitle>
21
+ <Grid columns={ 3 }>
22
+ { variations.map( ( variation, index ) => (
23
+ <Variation key={ index } variation={ variation }>
24
+ { () => <StylesPreviewColors /> }
25
+ </Variation>
26
+ ) ) }
27
+ </Grid>
28
+ </VStack>
29
+ );
30
+ }
@@ -8,7 +8,7 @@ import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';
8
8
  * Internal dependencies
9
9
  */
10
10
 
11
- import { NavigationButtonAsItem } from './navigation-button';
11
+ import { NavigationButtonAsItem } from '../navigation-button';
12
12
 
13
13
  function getCoreBlockStyles( blockStyles ) {
14
14
  return blockStyles?.filter( ( style ) => style.source === 'block' );
@@ -0,0 +1,85 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useContext } from '@wordpress/element';
5
+ import {
6
+ __experimentalGrid as Grid,
7
+ __experimentalVStack as VStack,
8
+ } from '@wordpress/components';
9
+ import { __ } from '@wordpress/i18n';
10
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
11
+
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+ import { mergeBaseAndUserConfigs } from '../global-styles-provider';
16
+ import { unlock } from '../../../lock-unlock';
17
+ import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
18
+ import PreviewTypography from '../preview-typography';
19
+ import Subtitle from '../subtitle';
20
+ import { getFontFamilies } from '../utils';
21
+ import Variation from './variation';
22
+
23
+ const { GlobalStylesContext } = unlock( blockEditorPrivateApis );
24
+
25
+ export default function TypographyVariations() {
26
+ const typographyVariations =
27
+ useCurrentMergeThemeStyleVariationsWithUserConfig( {
28
+ property: 'typography',
29
+ filter: ( variation ) =>
30
+ variation?.settings?.typography?.fontFamilies &&
31
+ Object.keys( variation?.settings?.typography?.fontFamilies )
32
+ .length,
33
+ } );
34
+
35
+ const { base } = useContext( GlobalStylesContext );
36
+
37
+ /*
38
+ * Filter duplicate variations based on the font families used in the variation.
39
+ */
40
+ const uniqueTypographyVariations = typographyVariations?.length
41
+ ? Object.values(
42
+ typographyVariations.reduce( ( acc, variation ) => {
43
+ const [ bodyFontFamily, headingFontFamily ] =
44
+ getFontFamilies(
45
+ mergeBaseAndUserConfigs( base, variation )
46
+ );
47
+ if (
48
+ headingFontFamily?.name &&
49
+ bodyFontFamily?.name &&
50
+ ! acc[
51
+ `${ headingFontFamily?.name }:${ bodyFontFamily?.name }`
52
+ ]
53
+ ) {
54
+ acc[
55
+ `${ headingFontFamily?.name }:${ bodyFontFamily?.name }`
56
+ ] = variation;
57
+ }
58
+
59
+ return acc;
60
+ }, {} )
61
+ )
62
+ : [];
63
+
64
+ return (
65
+ <VStack spacing={ 3 }>
66
+ <Subtitle level={ 3 }>{ __( 'Presets' ) }</Subtitle>
67
+ <Grid
68
+ columns={ 3 }
69
+ className="edit-site-global-styles-style-variations-container"
70
+ >
71
+ { typographyVariations && typographyVariations.length
72
+ ? uniqueTypographyVariations.map( ( variation, index ) => (
73
+ <Variation key={ index } variation={ variation }>
74
+ { () => (
75
+ <PreviewTypography
76
+ variation={ variation }
77
+ />
78
+ ) }
79
+ </Variation>
80
+ ) )
81
+ : null }
82
+ </Grid>
83
+ </VStack>
84
+ );
85
+ }