@wordpress/edit-site 5.35.0 → 6.0.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 (886) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/components/add-new-page/index.js +33 -27
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +95 -78
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +35 -30
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +119 -95
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +87 -71
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/utils.js +36 -17
  13. package/build/components/add-new-template/utils.js.map +1 -1
  14. package/build/components/app/index.js +10 -4
  15. package/build/components/app/index.js.map +1 -1
  16. package/build/components/block-editor/block-inspector-button.js +5 -4
  17. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  18. package/build/components/block-editor/use-editor-iframe-props.js +88 -0
  19. package/build/components/block-editor/use-editor-iframe-props.js.map +1 -0
  20. package/build/components/canvas-loader/index.js +13 -12
  21. package/build/components/canvas-loader/index.js.map +1 -1
  22. package/build/components/dataviews-actions/index.js +7 -4
  23. package/build/components/dataviews-actions/index.js.map +1 -1
  24. package/build/components/editor/index.js +59 -148
  25. package/build/components/editor/index.js.map +1 -1
  26. package/build/components/editor-canvas-container/index.js +27 -29
  27. package/build/components/editor-canvas-container/index.js.map +1 -1
  28. package/build/components/error-boundary/index.js +2 -2
  29. package/build/components/error-boundary/index.js.map +1 -1
  30. package/build/components/error-boundary/warning.js +13 -11
  31. package/build/components/error-boundary/warning.js.map +1 -1
  32. package/build/components/global-styles/background-panel.js +6 -5
  33. package/build/components/global-styles/background-panel.js.map +1 -1
  34. package/build/components/global-styles/block-preview-panel.js +19 -17
  35. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  36. package/build/components/global-styles/color-indicator-wrapper.js +2 -2
  37. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  38. package/build/components/global-styles/color-palette-panel.js +30 -29
  39. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  40. package/build/components/global-styles/dimensions-panel.js +2 -2
  41. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  42. package/build/components/global-styles/font-families.js +55 -39
  43. package/build/components/global-styles/font-families.js.map +1 -1
  44. package/build/components/global-styles/font-family-item.js +17 -13
  45. package/build/components/global-styles/font-family-item.js.map +1 -1
  46. package/build/components/global-styles/font-library-modal/collection-font-variant.js +25 -22
  47. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/context.js +7 -30
  49. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/font-card.js +24 -16
  51. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/font-collection.js +195 -152
  53. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/font-demo.js +14 -12
  55. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +29 -20
  57. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/index.js +41 -36
  59. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/installed-fonts.js +153 -109
  61. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/library-font-details.js +16 -14
  63. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/library-font-variant.js +25 -22
  65. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/upload-fonts.js +40 -34
  67. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  68. package/build/components/global-styles/font-library-modal/utils/index.js +3 -3
  69. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  70. package/build/components/global-styles/gradients-palette-panel.js +41 -37
  71. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  72. package/build/components/global-styles/header.js +37 -28
  73. package/build/components/global-styles/header.js.map +1 -1
  74. package/build/components/global-styles/highlighted-colors.js +3 -4
  75. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  76. package/build/components/global-styles/hooks.js +11 -23
  77. package/build/components/global-styles/hooks.js.map +1 -1
  78. package/build/components/global-styles/icon-with-current-color.js +2 -2
  79. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  80. package/build/components/global-styles/navigation-button.js +15 -11
  81. package/build/components/global-styles/navigation-button.js.map +1 -1
  82. package/build/components/global-styles/palette.js +39 -32
  83. package/build/components/global-styles/palette.js.map +1 -1
  84. package/build/components/global-styles/preset-colors.js +3 -4
  85. package/build/components/global-styles/preset-colors.js.map +1 -1
  86. package/build/components/global-styles/preview-colors.js +22 -20
  87. package/build/components/global-styles/preview-colors.js.map +1 -1
  88. package/build/components/global-styles/preview-iframe.js +34 -29
  89. package/build/components/global-styles/preview-iframe.js.map +1 -1
  90. package/build/components/global-styles/preview-styles.js +95 -90
  91. package/build/components/global-styles/preview-styles.js.map +1 -1
  92. package/build/components/global-styles/root-menu.js +28 -21
  93. package/build/components/global-styles/root-menu.js.map +1 -1
  94. package/build/components/global-styles/screen-background.js +6 -4
  95. package/build/components/global-styles/screen-background.js.map +1 -1
  96. package/build/components/global-styles/screen-block-list.js +33 -27
  97. package/build/components/global-styles/screen-block-list.js.map +1 -1
  98. package/build/components/global-styles/screen-block.js +62 -53
  99. package/build/components/global-styles/screen-block.js.map +1 -1
  100. package/build/components/global-styles/screen-color-palette.js +29 -19
  101. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  102. package/build/components/global-styles/screen-colors.js +18 -14
  103. package/build/components/global-styles/screen-colors.js.map +1 -1
  104. package/build/components/global-styles/screen-css.js +20 -14
  105. package/build/components/global-styles/screen-css.js.map +1 -1
  106. package/build/components/global-styles/screen-layout.js +9 -4
  107. package/build/components/global-styles/screen-layout.js.map +1 -1
  108. package/build/components/global-styles/screen-revisions/index.js +52 -42
  109. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  110. package/build/components/global-styles/screen-revisions/revisions-buttons.js +81 -70
  111. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  112. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  113. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  114. package/build/components/global-styles/screen-root.js +76 -42
  115. package/build/components/global-styles/screen-root.js.map +1 -1
  116. package/build/components/global-styles/screen-shadows.js +22 -0
  117. package/build/components/global-styles/screen-shadows.js.map +1 -0
  118. package/build/components/global-styles/screen-style-variations.js +14 -9
  119. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  120. package/build/components/global-styles/screen-typography-element.js +50 -45
  121. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  122. package/build/components/global-styles/screen-typography.js +15 -11
  123. package/build/components/global-styles/screen-typography.js.map +1 -1
  124. package/build/components/global-styles/shadow-utils.js +230 -0
  125. package/build/components/global-styles/shadow-utils.js.map +1 -0
  126. package/build/components/global-styles/shadows-edit-panel.js +458 -0
  127. package/build/components/global-styles/shadows-edit-panel.js.map +1 -0
  128. package/build/components/global-styles/shadows-panel.js +128 -0
  129. package/build/components/global-styles/shadows-panel.js.map +1 -0
  130. package/build/components/global-styles/style-variations-container.js +67 -18
  131. package/build/components/global-styles/style-variations-container.js.map +1 -1
  132. package/build/components/global-styles/subtitle.js +5 -4
  133. package/build/components/global-styles/subtitle.js.map +1 -1
  134. package/build/components/global-styles/typography-elements.js +53 -45
  135. package/build/components/global-styles/typography-elements.js.map +1 -1
  136. package/build/components/global-styles/typography-example.js +11 -8
  137. package/build/components/global-styles/typography-example.js.map +1 -1
  138. package/build/components/global-styles/typography-panel.js +2 -2
  139. package/build/components/global-styles/typography-panel.js.map +1 -1
  140. package/build/components/global-styles/typography-preview.js +5 -4
  141. package/build/components/global-styles/typography-preview.js.map +1 -1
  142. package/build/components/global-styles/ui.js +124 -92
  143. package/build/components/global-styles/ui.js.map +1 -1
  144. package/build/components/global-styles/utils.js +28 -0
  145. package/build/components/global-styles/utils.js.map +1 -1
  146. package/build/components/global-styles/variations/variation.js +27 -22
  147. package/build/components/global-styles/variations/variation.js.map +1 -1
  148. package/build/components/global-styles/variations/variations-color.js +18 -13
  149. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  150. package/build/components/global-styles/variations/variations-panel.js +27 -17
  151. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  152. package/build/components/global-styles/variations/variations-typography.js +37 -31
  153. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  154. package/build/components/global-styles-renderer/index.js +5 -1
  155. package/build/components/global-styles-renderer/index.js.map +1 -1
  156. package/build/components/global-styles-sidebar/default-sidebar.js +22 -18
  157. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  158. package/build/components/global-styles-sidebar/index.js +34 -26
  159. package/build/components/global-styles-sidebar/index.js.map +1 -1
  160. package/build/components/layout/index.js +112 -95
  161. package/build/components/layout/index.js.map +1 -1
  162. package/build/components/layout/router.js +83 -103
  163. package/build/components/layout/router.js.map +1 -1
  164. package/build/components/media/index.js +2 -2
  165. package/build/components/media/index.js.map +1 -1
  166. package/build/components/{header-edit-mode/more-menu → more-menu}/index.js +7 -3
  167. package/build/components/more-menu/index.js.map +1 -0
  168. package/build/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
  169. package/build/components/more-menu/site-export.js.map +1 -0
  170. package/build/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
  171. package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  172. package/build/components/page/header.js +24 -20
  173. package/build/components/page/header.js.map +1 -1
  174. package/build/components/page/index.js +12 -10
  175. package/build/components/page/index.js.map +1 -1
  176. package/build/components/page-pages/index.js +133 -52
  177. package/build/components/page-pages/index.js.map +1 -1
  178. package/build/components/page-patterns/delete-category-menu-item.js +23 -20
  179. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  180. package/build/components/page-patterns/header.js +47 -32
  181. package/build/components/page-patterns/header.js.map +1 -1
  182. package/build/components/page-patterns/index.js +114 -108
  183. package/build/components/page-patterns/index.js.map +1 -1
  184. package/build/components/page-patterns/rename-category-menu-item.js +14 -11
  185. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  186. package/build/components/page-patterns/use-patterns.js +7 -6
  187. package/build/components/page-patterns/use-patterns.js.map +1 -1
  188. package/build/components/page-templates/index.js +78 -59
  189. package/build/components/page-templates/index.js.map +1 -1
  190. package/build/components/pagination/index.js +50 -41
  191. package/build/components/pagination/index.js.map +1 -1
  192. package/build/components/plugin-template-setting-panel/index.js +4 -2
  193. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  194. package/build/components/resizable-frame/index.js +38 -32
  195. package/build/components/resizable-frame/index.js.map +1 -1
  196. package/build/components/revisions/index.js +26 -20
  197. package/build/components/revisions/index.js.map +1 -1
  198. package/build/components/routes/link.js +5 -4
  199. package/build/components/routes/link.js.map +1 -1
  200. package/build/components/save-button/index.js +5 -4
  201. package/build/components/save-button/index.js.map +1 -1
  202. package/build/components/save-hub/index.js +12 -11
  203. package/build/components/save-hub/index.js.map +1 -1
  204. package/build/components/save-panel/index.js +34 -28
  205. package/build/components/save-panel/index.js.map +1 -1
  206. package/build/components/sidebar/index.js +14 -11
  207. package/build/components/sidebar/index.js.map +1 -1
  208. package/build/components/sidebar-button/index.js +2 -2
  209. package/build/components/sidebar-button/index.js.map +1 -1
  210. package/build/components/sidebar-dataviews/add-new-view.js +56 -48
  211. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  212. package/build/components/sidebar-dataviews/custom-dataviews-list.js +106 -89
  213. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  214. package/build/components/sidebar-dataviews/dataview-item.js +12 -10
  215. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  216. package/build/components/sidebar-dataviews/default-views.js +48 -0
  217. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  218. package/build/components/sidebar-dataviews/index.js +21 -22
  219. package/build/components/sidebar-dataviews/index.js.map +1 -1
  220. package/build/components/sidebar-navigation-item/index.js +27 -25
  221. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen/index.js +51 -39
  223. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  224. package/build/components/sidebar-navigation-screen-details-footer/index.js +24 -17
  225. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  226. package/build/components/sidebar-navigation-screen-details-panel/index.js +9 -7
  227. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
  229. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +5 -5
  231. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  232. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
  233. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-global-styles/index.js +54 -45
  235. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-main/index.js +45 -22
  237. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
  239. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +11 -10
  241. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +53 -42
  243. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
  245. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  246. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +42 -36
  247. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +16 -13
  249. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  251. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +27 -23
  253. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +50 -35
  255. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +12 -9
  257. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
  259. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-patterns/index.js +58 -63
  261. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-templates-browse/content.js +17 -17
  263. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  264. package/build/components/sidebar-navigation-screen-templates-browse/index.js +4 -4
  265. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  266. package/build/components/site-hub/index.js +81 -72
  267. package/build/components/site-hub/index.js.map +1 -1
  268. package/build/components/site-icon/index.js +8 -7
  269. package/build/components/site-icon/index.js.map +1 -1
  270. package/build/components/style-book/index.js +115 -99
  271. package/build/components/style-book/index.js.map +1 -1
  272. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +10 -30
  273. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  274. package/build/components/table/index.js +23 -15
  275. package/build/components/table/index.js.map +1 -1
  276. package/build/components/template-part-converter/convert-to-regular.js +5 -4
  277. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  278. package/build/components/template-part-converter/convert-to-template-part.js +23 -17
  279. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  280. package/build/components/template-part-converter/index.js +12 -10
  281. package/build/components/template-part-converter/index.js.map +1 -1
  282. package/build/components/welcome-guide/editor.js +20 -15
  283. package/build/components/welcome-guide/editor.js.map +1 -1
  284. package/build/components/welcome-guide/image.js +13 -12
  285. package/build/components/welcome-guide/image.js.map +1 -1
  286. package/build/components/welcome-guide/index.js +4 -2
  287. package/build/components/welcome-guide/index.js.map +1 -1
  288. package/build/components/welcome-guide/page.js +18 -13
  289. package/build/components/welcome-guide/page.js.map +1 -1
  290. package/build/components/welcome-guide/styles.js +45 -28
  291. package/build/components/welcome-guide/styles.js.map +1 -1
  292. package/build/components/welcome-guide/template.js +18 -13
  293. package/build/components/welcome-guide/template.js.map +1 -1
  294. package/build/deprecated.js +4 -4
  295. package/build/deprecated.js.map +1 -1
  296. package/build/hooks/commands/use-common-commands.js +12 -24
  297. package/build/hooks/commands/use-common-commands.js.map +1 -1
  298. package/build/hooks/commands/use-edit-mode-commands.js +2 -116
  299. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  300. package/build/hooks/index.js +0 -1
  301. package/build/hooks/index.js.map +1 -1
  302. package/build/hooks/push-changes-to-global-styles/index.js +25 -16
  303. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  304. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  305. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  306. package/build/index.js +3 -3
  307. package/build/index.js.map +1 -1
  308. package/build/store/private-actions.js +7 -1
  309. package/build/store/private-actions.js.map +1 -1
  310. package/build/store/selectors.js +2 -2
  311. package/build/store/selectors.js.map +1 -1
  312. package/build/utils/template-part-create.js +0 -62
  313. package/build/utils/template-part-create.js.map +1 -1
  314. package/build/utils/use-activate-theme.js +4 -5
  315. package/build/utils/use-activate-theme.js.map +1 -1
  316. package/build-module/components/add-new-page/index.js +34 -27
  317. package/build-module/components/add-new-page/index.js.map +1 -1
  318. package/build-module/components/add-new-pattern/index.js +98 -78
  319. package/build-module/components/add-new-pattern/index.js.map +1 -1
  320. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +36 -30
  321. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  322. package/build-module/components/add-new-template/add-custom-template-modal-content.js +121 -95
  323. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  324. package/build-module/components/add-new-template/index.js +89 -71
  325. package/build-module/components/add-new-template/index.js.map +1 -1
  326. package/build-module/components/add-new-template/utils.js +36 -17
  327. package/build-module/components/add-new-template/utils.js.map +1 -1
  328. package/build-module/components/app/index.js +11 -4
  329. package/build-module/components/app/index.js.map +1 -1
  330. package/build-module/components/block-editor/block-inspector-button.js +5 -4
  331. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  332. package/build-module/components/block-editor/use-editor-iframe-props.js +80 -0
  333. package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -0
  334. package/build-module/components/canvas-loader/index.js +14 -13
  335. package/build-module/components/canvas-loader/index.js.map +1 -1
  336. package/build-module/components/dataviews-actions/index.js +7 -4
  337. package/build-module/components/dataviews-actions/index.js.map +1 -1
  338. package/build-module/components/editor/index.js +65 -152
  339. package/build-module/components/editor/index.js.map +1 -1
  340. package/build-module/components/editor-canvas-container/index.js +29 -30
  341. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  342. package/build-module/components/error-boundary/index.js +2 -2
  343. package/build-module/components/error-boundary/index.js.map +1 -1
  344. package/build-module/components/error-boundary/warning.js +13 -11
  345. package/build-module/components/error-boundary/warning.js.map +1 -1
  346. package/build-module/components/global-styles/background-panel.js +6 -5
  347. package/build-module/components/global-styles/background-panel.js.map +1 -1
  348. package/build-module/components/global-styles/block-preview-panel.js +19 -17
  349. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  350. package/build-module/components/global-styles/color-indicator-wrapper.js +2 -2
  351. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  352. package/build-module/components/global-styles/color-palette-panel.js +31 -29
  353. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  354. package/build-module/components/global-styles/dimensions-panel.js +2 -2
  355. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  356. package/build-module/components/global-styles/font-families.js +58 -40
  357. package/build-module/components/global-styles/font-families.js.map +1 -1
  358. package/build-module/components/global-styles/font-family-item.js +18 -13
  359. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  360. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +26 -22
  361. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  362. package/build-module/components/global-styles/font-library-modal/context.js +7 -30
  363. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  364. package/build-module/components/global-styles/font-library-modal/font-card.js +25 -16
  365. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  366. package/build-module/components/global-styles/font-library-modal/font-collection.js +198 -153
  367. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  368. package/build-module/components/global-styles/font-library-modal/font-demo.js +14 -12
  369. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  370. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +30 -20
  371. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/index.js +42 -36
  373. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +157 -111
  375. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  376. package/build-module/components/global-styles/font-library-modal/library-font-details.js +18 -14
  377. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +26 -22
  379. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  380. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +42 -35
  381. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  382. package/build-module/components/global-styles/font-library-modal/utils/index.js +3 -3
  383. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  384. package/build-module/components/global-styles/gradients-palette-panel.js +42 -37
  385. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  386. package/build-module/components/global-styles/header.js +38 -28
  387. package/build-module/components/global-styles/header.js.map +1 -1
  388. package/build-module/components/global-styles/highlighted-colors.js +3 -4
  389. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  390. package/build-module/components/global-styles/hooks.js +11 -23
  391. package/build-module/components/global-styles/hooks.js.map +1 -1
  392. package/build-module/components/global-styles/icon-with-current-color.js +2 -2
  393. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  394. package/build-module/components/global-styles/navigation-button.js +16 -11
  395. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  396. package/build-module/components/global-styles/palette.js +42 -34
  397. package/build-module/components/global-styles/palette.js.map +1 -1
  398. package/build-module/components/global-styles/preset-colors.js +3 -4
  399. package/build-module/components/global-styles/preset-colors.js.map +1 -1
  400. package/build-module/components/global-styles/preview-colors.js +22 -20
  401. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  402. package/build-module/components/global-styles/preview-iframe.js +36 -29
  403. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  404. package/build-module/components/global-styles/preview-styles.js +96 -90
  405. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  406. package/build-module/components/global-styles/root-menu.js +31 -22
  407. package/build-module/components/global-styles/root-menu.js.map +1 -1
  408. package/build-module/components/global-styles/screen-background.js +8 -4
  409. package/build-module/components/global-styles/screen-background.js.map +1 -1
  410. package/build-module/components/global-styles/screen-block-list.js +35 -27
  411. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  412. package/build-module/components/global-styles/screen-block.js +64 -53
  413. package/build-module/components/global-styles/screen-block.js.map +1 -1
  414. package/build-module/components/global-styles/screen-color-palette.js +31 -19
  415. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  416. package/build-module/components/global-styles/screen-colors.js +20 -14
  417. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  418. package/build-module/components/global-styles/screen-css.js +22 -14
  419. package/build-module/components/global-styles/screen-css.js.map +1 -1
  420. package/build-module/components/global-styles/screen-layout.js +11 -4
  421. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  422. package/build-module/components/global-styles/screen-revisions/index.js +54 -42
  423. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  424. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +82 -70
  425. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  426. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  427. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  428. package/build-module/components/global-styles/screen-root.js +78 -42
  429. package/build-module/components/global-styles/screen-root.js.map +1 -1
  430. package/build-module/components/global-styles/screen-shadows.js +13 -0
  431. package/build-module/components/global-styles/screen-shadows.js.map +1 -0
  432. package/build-module/components/global-styles/screen-style-variations.js +16 -9
  433. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  434. package/build-module/components/global-styles/screen-typography-element.js +52 -45
  435. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  436. package/build-module/components/global-styles/screen-typography.js +17 -11
  437. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  438. package/build-module/components/global-styles/shadow-utils.js +221 -0
  439. package/build-module/components/global-styles/shadow-utils.js.map +1 -0
  440. package/build-module/components/global-styles/shadows-edit-panel.js +452 -0
  441. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -0
  442. package/build-module/components/global-styles/shadows-panel.js +121 -0
  443. package/build-module/components/global-styles/shadows-panel.js.map +1 -0
  444. package/build-module/components/global-styles/style-variations-container.js +68 -19
  445. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  446. package/build-module/components/global-styles/subtitle.js +5 -4
  447. package/build-module/components/global-styles/subtitle.js.map +1 -1
  448. package/build-module/components/global-styles/typography-elements.js +54 -45
  449. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  450. package/build-module/components/global-styles/typography-example.js +12 -8
  451. package/build-module/components/global-styles/typography-example.js.map +1 -1
  452. package/build-module/components/global-styles/typography-panel.js +2 -2
  453. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  454. package/build-module/components/global-styles/typography-preview.js +5 -4
  455. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  456. package/build-module/components/global-styles/ui.js +126 -92
  457. package/build-module/components/global-styles/ui.js.map +1 -1
  458. package/build-module/components/global-styles/utils.js +27 -0
  459. package/build-module/components/global-styles/utils.js.map +1 -1
  460. package/build-module/components/global-styles/variations/variation.js +27 -22
  461. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  462. package/build-module/components/global-styles/variations/variations-color.js +19 -13
  463. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  464. package/build-module/components/global-styles/variations/variations-panel.js +28 -18
  465. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  466. package/build-module/components/global-styles/variations/variations-typography.js +38 -31
  467. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  468. package/build-module/components/global-styles-renderer/index.js +5 -1
  469. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  470. package/build-module/components/global-styles-sidebar/default-sidebar.js +24 -18
  471. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  472. package/build-module/components/global-styles-sidebar/index.js +35 -26
  473. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  474. package/build-module/components/layout/index.js +115 -96
  475. package/build-module/components/layout/index.js.map +1 -1
  476. package/build-module/components/layout/router.js +83 -103
  477. package/build-module/components/layout/router.js.map +1 -1
  478. package/build-module/components/media/index.js +2 -2
  479. package/build-module/components/media/index.js.map +1 -1
  480. package/build-module/components/{header-edit-mode/more-menu → more-menu}/index.js +9 -3
  481. package/build-module/components/more-menu/index.js.map +1 -0
  482. package/build-module/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
  483. package/build-module/components/more-menu/site-export.js.map +1 -0
  484. package/build-module/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
  485. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  486. package/build-module/components/page/header.js +25 -19
  487. package/build-module/components/page/header.js.map +1 -1
  488. package/build-module/components/page/index.js +14 -11
  489. package/build-module/components/page/index.js.map +1 -1
  490. package/build-module/components/page-pages/index.js +138 -55
  491. package/build-module/components/page-pages/index.js.map +1 -1
  492. package/build-module/components/page-patterns/delete-category-menu-item.js +25 -20
  493. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  494. package/build-module/components/page-patterns/header.js +48 -32
  495. package/build-module/components/page-patterns/header.js.map +1 -1
  496. package/build-module/components/page-patterns/index.js +115 -108
  497. package/build-module/components/page-patterns/index.js.map +1 -1
  498. package/build-module/components/page-patterns/rename-category-menu-item.js +16 -11
  499. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  500. package/build-module/components/page-patterns/use-patterns.js +7 -6
  501. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  502. package/build-module/components/page-templates/index.js +80 -59
  503. package/build-module/components/page-templates/index.js.map +1 -1
  504. package/build-module/components/pagination/index.js +51 -41
  505. package/build-module/components/pagination/index.js.map +1 -1
  506. package/build-module/components/plugin-template-setting-panel/index.js +4 -2
  507. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  508. package/build-module/components/resizable-frame/index.js +40 -32
  509. package/build-module/components/resizable-frame/index.js.map +1 -1
  510. package/build-module/components/revisions/index.js +27 -20
  511. package/build-module/components/revisions/index.js.map +1 -1
  512. package/build-module/components/routes/link.js +5 -4
  513. package/build-module/components/routes/link.js.map +1 -1
  514. package/build-module/components/save-button/index.js +5 -4
  515. package/build-module/components/save-button/index.js.map +1 -1
  516. package/build-module/components/save-hub/index.js +12 -11
  517. package/build-module/components/save-hub/index.js.map +1 -1
  518. package/build-module/components/save-panel/index.js +35 -28
  519. package/build-module/components/save-panel/index.js.map +1 -1
  520. package/build-module/components/sidebar/index.js +14 -11
  521. package/build-module/components/sidebar/index.js.map +1 -1
  522. package/build-module/components/sidebar-button/index.js +2 -2
  523. package/build-module/components/sidebar-button/index.js.map +1 -1
  524. package/build-module/components/sidebar-dataviews/add-new-view.js +58 -48
  525. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  526. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +108 -89
  527. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  528. package/build-module/components/sidebar-dataviews/dataview-item.js +13 -10
  529. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  530. package/build-module/components/sidebar-dataviews/default-views.js +49 -1
  531. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  532. package/build-module/components/sidebar-dataviews/index.js +23 -22
  533. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  534. package/build-module/components/sidebar-navigation-item/index.js +28 -25
  535. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-screen/index.js +53 -39
  537. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  538. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +25 -17
  539. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  540. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +10 -7
  541. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
  543. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  544. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +5 -5
  545. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  546. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
  547. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  548. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +56 -45
  549. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  550. package/build-module/components/sidebar-navigation-screen-main/index.js +47 -22
  551. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
  553. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  554. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +11 -10
  555. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  556. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +55 -42
  557. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
  559. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +43 -36
  561. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +17 -13
  563. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  565. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +27 -23
  567. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  568. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +52 -35
  569. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  570. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +14 -9
  571. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  572. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
  573. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  574. package/build-module/components/sidebar-navigation-screen-patterns/index.js +60 -63
  575. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  576. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +18 -17
  577. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +4 -4
  579. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  580. package/build-module/components/site-hub/index.js +83 -73
  581. package/build-module/components/site-hub/index.js.map +1 -1
  582. package/build-module/components/site-icon/index.js +8 -7
  583. package/build-module/components/site-icon/index.js.map +1 -1
  584. package/build-module/components/style-book/index.js +116 -99
  585. package/build-module/components/style-book/index.js.map +1 -1
  586. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +10 -30
  587. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  588. package/build-module/components/table/index.js +24 -15
  589. package/build-module/components/table/index.js.map +1 -1
  590. package/build-module/components/template-part-converter/convert-to-regular.js +5 -4
  591. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  592. package/build-module/components/template-part-converter/convert-to-template-part.js +25 -16
  593. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  594. package/build-module/components/template-part-converter/index.js +12 -10
  595. package/build-module/components/template-part-converter/index.js.map +1 -1
  596. package/build-module/components/welcome-guide/editor.js +22 -15
  597. package/build-module/components/welcome-guide/editor.js.map +1 -1
  598. package/build-module/components/welcome-guide/image.js +14 -12
  599. package/build-module/components/welcome-guide/image.js.map +1 -1
  600. package/build-module/components/welcome-guide/index.js +6 -2
  601. package/build-module/components/welcome-guide/index.js.map +1 -1
  602. package/build-module/components/welcome-guide/page.js +20 -13
  603. package/build-module/components/welcome-guide/page.js.map +1 -1
  604. package/build-module/components/welcome-guide/styles.js +47 -28
  605. package/build-module/components/welcome-guide/styles.js.map +1 -1
  606. package/build-module/components/welcome-guide/template.js +20 -13
  607. package/build-module/components/welcome-guide/template.js.map +1 -1
  608. package/build-module/deprecated.js +4 -4
  609. package/build-module/deprecated.js.map +1 -1
  610. package/build-module/hooks/commands/use-common-commands.js +12 -23
  611. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  612. package/build-module/hooks/commands/use-edit-mode-commands.js +4 -118
  613. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  614. package/build-module/hooks/index.js +0 -1
  615. package/build-module/hooks/index.js.map +1 -1
  616. package/build-module/hooks/push-changes-to-global-styles/index.js +27 -16
  617. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  618. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  619. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  620. package/build-module/index.js +3 -3
  621. package/build-module/index.js.map +1 -1
  622. package/build-module/store/private-actions.js +7 -1
  623. package/build-module/store/private-actions.js.map +1 -1
  624. package/build-module/store/selectors.js +2 -2
  625. package/build-module/store/selectors.js.map +1 -1
  626. package/build-module/utils/template-part-create.js +0 -52
  627. package/build-module/utils/template-part-create.js.map +1 -1
  628. package/build-module/utils/use-activate-theme.js +4 -5
  629. package/build-module/utils/use-activate-theme.js.map +1 -1
  630. package/build-style/style-rtl.css +289 -554
  631. package/build-style/style.css +289 -554
  632. package/package.json +43 -44
  633. package/src/components/add-new-pattern/index.js +46 -37
  634. package/src/components/add-new-template/index.js +2 -0
  635. package/src/components/add-new-template/utils.js +77 -39
  636. package/src/components/block-editor/style.scss +4 -139
  637. package/src/components/block-editor/use-editor-iframe-props.js +79 -0
  638. package/src/components/canvas-loader/index.js +5 -2
  639. package/src/components/dataviews-actions/index.js +7 -2
  640. package/src/components/editor/index.js +65 -211
  641. package/src/components/editor/style.scss +2 -13
  642. package/src/components/editor-canvas-container/index.js +30 -35
  643. package/src/components/editor-canvas-container/style.scss +16 -0
  644. package/src/components/global-styles/background-panel.js +3 -2
  645. package/src/components/global-styles/color-palette-panel.js +1 -1
  646. package/src/components/global-styles/font-families.js +25 -18
  647. package/src/components/global-styles/font-family-item.js +2 -2
  648. package/src/components/global-styles/font-library-modal/collection-font-variant.js +2 -1
  649. package/src/components/global-styles/font-library-modal/context.js +6 -44
  650. package/src/components/global-styles/font-library-modal/font-collection.js +3 -5
  651. package/src/components/global-styles/font-library-modal/installed-fonts.js +42 -12
  652. package/src/components/global-styles/font-library-modal/library-font-variant.js +2 -1
  653. package/src/components/global-styles/font-library-modal/upload-fonts.js +1 -4
  654. package/src/components/global-styles/font-library-modal/utils/index.js +1 -1
  655. package/src/components/global-styles/hooks.js +10 -37
  656. package/src/components/global-styles/palette.js +9 -18
  657. package/src/components/global-styles/root-menu.js +16 -12
  658. package/src/components/global-styles/screen-block.js +1 -1
  659. package/src/components/global-styles/screen-layout.js +9 -2
  660. package/src/components/global-styles/screen-revisions/index.js +6 -0
  661. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  662. package/src/components/global-styles/screen-shadows.js +13 -0
  663. package/src/components/global-styles/screen-typography.js +1 -1
  664. package/src/components/global-styles/shadow-utils.js +158 -0
  665. package/src/components/global-styles/shadows-edit-panel.js +555 -0
  666. package/src/components/global-styles/shadows-panel.js +147 -0
  667. package/src/components/global-styles/style-variations-container.js +73 -10
  668. package/src/components/global-styles/style.scss +54 -5
  669. package/src/components/global-styles/test/shadow-utils.spec.js +251 -0
  670. package/src/components/global-styles/test/utils.spec.js +59 -0
  671. package/src/components/global-styles/ui.js +10 -6
  672. package/src/components/global-styles/utils.js +27 -0
  673. package/src/components/global-styles/variations/style.scss +7 -4
  674. package/src/components/global-styles/variations/variation.js +2 -0
  675. package/src/components/global-styles/variations/variations-color.js +2 -1
  676. package/src/components/global-styles/variations/variations-panel.js +16 -5
  677. package/src/components/global-styles/variations/variations-typography.js +2 -1
  678. package/src/components/global-styles-renderer/index.js +7 -1
  679. package/src/components/layout/index.js +7 -2
  680. package/src/components/layout/router.js +64 -79
  681. package/src/components/layout/style.scss +11 -8
  682. package/src/components/{header-edit-mode/more-menu → more-menu}/index.js +1 -1
  683. package/src/components/page/header.js +17 -13
  684. package/src/components/page/index.js +1 -5
  685. package/src/components/page/style.scss +21 -7
  686. package/src/components/page-pages/index.js +154 -30
  687. package/src/components/page-pages/style.scss +15 -0
  688. package/src/components/page-patterns/delete-category-menu-item.js +1 -2
  689. package/src/components/page-patterns/header.js +45 -33
  690. package/src/components/page-patterns/index.js +14 -51
  691. package/src/components/page-patterns/style.scss +21 -14
  692. package/src/components/page-patterns/use-patterns.js +13 -6
  693. package/src/components/resizable-frame/index.js +1 -1
  694. package/src/components/save-panel/index.js +2 -4
  695. package/src/components/sidebar-dataviews/add-new-view.js +5 -5
  696. package/src/components/sidebar-dataviews/custom-dataviews-list.js +5 -7
  697. package/src/components/sidebar-dataviews/dataview-item.js +2 -2
  698. package/src/components/sidebar-dataviews/default-views.js +61 -1
  699. package/src/components/sidebar-dataviews/index.js +4 -9
  700. package/src/components/sidebar-navigation-item/index.js +7 -7
  701. package/src/components/sidebar-navigation-screen-global-styles/index.js +8 -2
  702. package/src/components/sidebar-navigation-screen-main/index.js +14 -4
  703. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  704. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  705. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -3
  706. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +0 -61
  707. package/src/components/sidebar-navigation-screen-patterns/category-item.js +5 -3
  708. package/src/components/sidebar-navigation-screen-patterns/index.js +6 -16
  709. package/src/components/sidebar-navigation-screen-templates-browse/content.js +1 -1
  710. package/src/components/sidebar-navigation-screen-templates-browse/index.js +1 -1
  711. package/src/components/site-hub/index.js +11 -12
  712. package/src/components/site-hub/style.scss +46 -9
  713. package/src/components/style-book/index.js +1 -1
  714. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +18 -23
  715. package/src/components/template-part-converter/convert-to-template-part.js +4 -1
  716. package/src/hooks/commands/use-common-commands.js +12 -23
  717. package/src/hooks/commands/use-edit-mode-commands.js +4 -118
  718. package/src/hooks/index.js +0 -1
  719. package/src/hooks/push-changes-to-global-styles/index.js +2 -1
  720. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
  721. package/src/index.js +1 -1
  722. package/src/store/private-actions.js +9 -1
  723. package/src/store/selectors.js +2 -2
  724. package/src/style.scss +0 -6
  725. package/src/utils/template-part-create.js +0 -67
  726. package/src/utils/use-activate-theme.js +2 -2
  727. package/build/components/block-editor/editor-canvas.js +0 -139
  728. package/build/components/block-editor/editor-canvas.js.map +0 -1
  729. package/build/components/block-editor/resizable-editor.js +0 -86
  730. package/build/components/block-editor/resizable-editor.js.map +0 -1
  731. package/build/components/block-editor/resize-handle.js +0 -57
  732. package/build/components/block-editor/resize-handle.js.map +0 -1
  733. package/build/components/block-editor/site-editor-canvas.js +0 -95
  734. package/build/components/block-editor/site-editor-canvas.js.map +0 -1
  735. package/build/components/code-editor/index.js +0 -111
  736. package/build/components/code-editor/index.js.map +0 -1
  737. package/build/components/create-template-part-modal/index.js +0 -151
  738. package/build/components/create-template-part-modal/index.js.map +0 -1
  739. package/build/components/header-edit-mode/index.js +0 -50
  740. package/build/components/header-edit-mode/index.js.map +0 -1
  741. package/build/components/header-edit-mode/more-menu/index.js.map +0 -1
  742. package/build/components/header-edit-mode/more-menu/site-export.js.map +0 -1
  743. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
  744. package/build/components/page-patterns/dataviews-pattern-actions.js +0 -311
  745. package/build/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
  746. package/build/components/pattern-modal/duplicate.js +0 -70
  747. package/build/components/pattern-modal/duplicate.js.map +0 -1
  748. package/build/components/pattern-modal/index.js +0 -23
  749. package/build/components/pattern-modal/index.js.map +0 -1
  750. package/build/components/pattern-modal/rename.js +0 -45
  751. package/build/components/pattern-modal/rename.js.map +0 -1
  752. package/build/components/rename-post-menu-item/index.js +0 -109
  753. package/build/components/rename-post-menu-item/index.js.map +0 -1
  754. package/build/components/sidebar-navigation-screen-page/index.js +0 -163
  755. package/build/components/sidebar-navigation-screen-page/index.js.map +0 -1
  756. package/build/components/sidebar-navigation-screen-page/page-details.js +0 -127
  757. package/build/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
  758. package/build/components/sidebar-navigation-screen-page/status-label.js +0 -65
  759. package/build/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
  760. package/build/components/sidebar-navigation-screen-pattern/index.js +0 -67
  761. package/build/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
  762. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -38
  763. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
  764. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -29
  765. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
  766. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -37
  767. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
  768. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -45
  769. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
  770. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -88
  771. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
  772. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -29
  773. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  774. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -138
  775. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
  776. package/build/components/sidebar-navigation-screen-template/home-template-details.js +0 -110
  777. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
  778. package/build/components/sidebar-navigation-screen-template/index.js +0 -121
  779. package/build/components/sidebar-navigation-screen-template/index.js.map +0 -1
  780. package/build/components/sidebar-navigation-screen-template/template-areas.js +0 -117
  781. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
  782. package/build/components/template-actions/index.js +0 -131
  783. package/build/components/template-actions/index.js.map +0 -1
  784. package/build/hooks/components.js +0 -10
  785. package/build/hooks/components.js.map +0 -1
  786. package/build/utils/get-is-list-page.js +0 -28
  787. package/build/utils/get-is-list-page.js.map +0 -1
  788. package/build-module/components/block-editor/editor-canvas.js +0 -131
  789. package/build-module/components/block-editor/editor-canvas.js.map +0 -1
  790. package/build-module/components/block-editor/resizable-editor.js +0 -79
  791. package/build-module/components/block-editor/resizable-editor.js.map +0 -1
  792. package/build-module/components/block-editor/resize-handle.js +0 -50
  793. package/build-module/components/block-editor/resize-handle.js.map +0 -1
  794. package/build-module/components/block-editor/site-editor-canvas.js +0 -86
  795. package/build-module/components/block-editor/site-editor-canvas.js.map +0 -1
  796. package/build-module/components/code-editor/index.js +0 -103
  797. package/build-module/components/code-editor/index.js.map +0 -1
  798. package/build-module/components/create-template-part-modal/index.js +0 -143
  799. package/build-module/components/create-template-part-modal/index.js.map +0 -1
  800. package/build-module/components/header-edit-mode/index.js +0 -42
  801. package/build-module/components/header-edit-mode/index.js.map +0 -1
  802. package/build-module/components/header-edit-mode/more-menu/index.js.map +0 -1
  803. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +0 -1
  804. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
  805. package/build-module/components/page-patterns/dataviews-pattern-actions.js +0 -304
  806. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
  807. package/build-module/components/pattern-modal/duplicate.js +0 -62
  808. package/build-module/components/pattern-modal/duplicate.js.map +0 -1
  809. package/build-module/components/pattern-modal/index.js +0 -14
  810. package/build-module/components/pattern-modal/index.js.map +0 -1
  811. package/build-module/components/pattern-modal/rename.js +0 -37
  812. package/build-module/components/pattern-modal/rename.js.map +0 -1
  813. package/build-module/components/rename-post-menu-item/index.js +0 -102
  814. package/build-module/components/rename-post-menu-item/index.js.map +0 -1
  815. package/build-module/components/sidebar-navigation-screen-page/index.js +0 -155
  816. package/build-module/components/sidebar-navigation-screen-page/index.js.map +0 -1
  817. package/build-module/components/sidebar-navigation-screen-page/page-details.js +0 -120
  818. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
  819. package/build-module/components/sidebar-navigation-screen-page/status-label.js +0 -57
  820. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
  821. package/build-module/components/sidebar-navigation-screen-pattern/index.js +0 -59
  822. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
  823. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -30
  824. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
  825. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -20
  826. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
  827. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -29
  828. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
  829. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
  830. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
  831. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -80
  832. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
  833. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -22
  834. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  835. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -130
  836. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
  837. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +0 -103
  838. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
  839. package/build-module/components/sidebar-navigation-screen-template/index.js +0 -113
  840. package/build-module/components/sidebar-navigation-screen-template/index.js.map +0 -1
  841. package/build-module/components/sidebar-navigation-screen-template/template-areas.js +0 -109
  842. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
  843. package/build-module/components/template-actions/index.js +0 -123
  844. package/build-module/components/template-actions/index.js.map +0 -1
  845. package/build-module/hooks/components.js +0 -7
  846. package/build-module/hooks/components.js.map +0 -1
  847. package/build-module/utils/get-is-list-page.js +0 -22
  848. package/build-module/utils/get-is-list-page.js.map +0 -1
  849. package/src/components/block-editor/editor-canvas.js +0 -158
  850. package/src/components/block-editor/resizable-editor.js +0 -82
  851. package/src/components/block-editor/resize-handle.js +0 -66
  852. package/src/components/block-editor/site-editor-canvas.js +0 -107
  853. package/src/components/code-editor/index.js +0 -94
  854. package/src/components/code-editor/style.scss +0 -95
  855. package/src/components/create-template-part-modal/index.js +0 -199
  856. package/src/components/create-template-part-modal/style.scss +0 -69
  857. package/src/components/header-edit-mode/index.js +0 -51
  858. package/src/components/header-edit-mode/style.scss +0 -3
  859. package/src/components/page-patterns/dataviews-pattern-actions.js +0 -350
  860. package/src/components/pattern-modal/duplicate.js +0 -55
  861. package/src/components/pattern-modal/index.js +0 -19
  862. package/src/components/pattern-modal/rename.js +0 -30
  863. package/src/components/rename-post-menu-item/index.js +0 -138
  864. package/src/components/sidebar-navigation-screen-page/index.js +0 -204
  865. package/src/components/sidebar-navigation-screen-page/page-details.js +0 -161
  866. package/src/components/sidebar-navigation-screen-page/status-label.js +0 -71
  867. package/src/components/sidebar-navigation-screen-page/style.scss +0 -69
  868. package/src/components/sidebar-navigation-screen-pattern/index.js +0 -57
  869. package/src/components/sidebar-navigation-screen-pattern/style.scss +0 -26
  870. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -31
  871. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -21
  872. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -33
  873. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
  874. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -98
  875. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -32
  876. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -205
  877. package/src/components/sidebar-navigation-screen-template/home-template-details.js +0 -144
  878. package/src/components/sidebar-navigation-screen-template/index.js +0 -134
  879. package/src/components/sidebar-navigation-screen-template/style.scss +0 -53
  880. package/src/components/sidebar-navigation-screen-template/template-areas.js +0 -135
  881. package/src/components/template-actions/index.js +0 -165
  882. package/src/hooks/components.js +0 -11
  883. package/src/utils/get-is-list-page.js +0 -23
  884. package/src/utils/test/template-part-create.js +0 -63
  885. /package/src/components/{header-edit-mode/more-menu → more-menu}/site-export.js +0 -0
  886. /package/src/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_components","require","_i18n","_blockEditor","_icons","_lockUnlock","_subtitle","_interopRequireDefault","_navigationButton","_header","_utils","_jsxRuntime","useGlobalSetting","unlock","blockEditorPrivateApis","defaultShadow","exports","ShadowsPanel","defaultShadows","defaultShadowsEnabled","themeShadows","customShadows","setCustomShadows","onCreateShadow","shadow","jsxs","Fragment","children","jsx","default","title","__","description","className","__experimentalVStack","spacing","ShadowList","label","shadows","category","length","canCreate","onCreate","handleAddShadow","newIndex","getNewIndexFromPresets","name","sprintf","slug","__experimentalHStack","justify","Flex","align","level","FlexItem","Button","size","icon","plus","onClick","__experimentalItemGroup","isBordered","isSeparated","map","ShadowItem","NavigationButtonAsItem","path","shadowIcon"],"sources":["@wordpress/edit-site/src/components/global-styles/shadows-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalItemGroup as ItemGroup,\n\tButton,\n\tFlex,\n\tFlexItem,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { plus, shadow as shadowIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport ScreenHeader from './header';\nimport { getNewIndexFromPresets } from './utils';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nexport const defaultShadow = '6px 6px 9px rgba(0, 0, 0, 0.2)';\n\nexport default function ShadowsPanel() {\n\tconst [ defaultShadows ] = useGlobalSetting( 'shadow.presets.default' );\n\tconst [ defaultShadowsEnabled ] = useGlobalSetting(\n\t\t'shadow.defaultPresets'\n\t);\n\tconst [ themeShadows ] = useGlobalSetting( 'shadow.presets.theme' );\n\tconst [ customShadows, setCustomShadows ] = useGlobalSetting(\n\t\t'shadow.presets.custom'\n\t);\n\n\tconst onCreateShadow = ( shadow ) => {\n\t\tsetCustomShadows( [ ...( customShadows || [] ), shadow ] );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Shadows' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage and create shadow styles for use across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel\"\n\t\t\t\t\tspacing={ 7 }\n\t\t\t\t>\n\t\t\t\t\t{ defaultShadowsEnabled && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\tshadows={ defaultShadows || [] }\n\t\t\t\t\t\t\tcategory=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ themeShadows && themeShadows.length > 0 && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Theme' ) }\n\t\t\t\t\t\t\tshadows={ themeShadows || [] }\n\t\t\t\t\t\t\tcategory=\"theme\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<ShadowList\n\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\tshadows={ customShadows || [] }\n\t\t\t\t\t\tcategory=\"custom\"\n\t\t\t\t\t\tcanCreate\n\t\t\t\t\t\tonCreate={ onCreateShadow }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nfunction ShadowList( { label, shadows, category, canCreate, onCreate } ) {\n\tconst handleAddShadow = () => {\n\t\tconst newIndex = getNewIndexFromPresets( shadows, 'shadow-' );\n\t\tonCreate( {\n\t\t\tname: sprintf(\n\t\t\t\t/* translators: %s: is an index for a preset */\n\t\t\t\t__( 'Shadow %s' ),\n\t\t\t\tnewIndex\n\t\t\t),\n\t\t\tshadow: defaultShadow,\n\t\t\tslug: `shadow-${ newIndex }`,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<Flex\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel__title\"\n\t\t\t\t>\n\t\t\t\t\t<Subtitle level={ 3 }>{ label }</Subtitle>\n\t\t\t\t</Flex>\n\t\t\t\t{ canCreate && (\n\t\t\t\t\t<FlexItem className=\"edit-site-global-styles__shadows-panel__options-container\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={ __( 'Add shadow' ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thandleAddShadow();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ shadows.length > 0 && (\n\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t{ shadows.map( ( shadow ) => (\n\t\t\t\t\t\t<ShadowItem\n\t\t\t\t\t\t\tkey={ shadow.slug }\n\t\t\t\t\t\t\tshadow={ shadow }\n\t\t\t\t\t\t\tcategory={ category }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</ItemGroup>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nfunction ShadowItem( { shadow, category } ) {\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ `/shadows/edit/${ category }/${ shadow.slug }` }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: name of the shadow\n\t\t\t\tsprintf( 'Edit shadow %s', shadow.name )\n\t\t\t}\n\t\t\ticon={ shadowIcon }\n\t\t>\n\t\t\t{ shadow.name }\n\t\t</NavigationButtonAsItem>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAF,sBAAA,CAAAN,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAAiD,IAAAU,WAAA,GAAAV,OAAA;AAtBjD;AACA;AACA;;AAaA;AACA;AACA;;AAOA,MAAM;EAAEW;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEtD,MAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,gCAAgC;AAE9C,SAASE,YAAYA,CAAA,EAAG;EACtC,MAAM,CAAEC,cAAc,CAAE,GAAGN,gBAAgB,CAAE,wBAAyB,CAAC;EACvE,MAAM,CAAEO,qBAAqB,CAAE,GAAGP,gBAAgB,CACjD,uBACD,CAAC;EACD,MAAM,CAAEQ,YAAY,CAAE,GAAGR,gBAAgB,CAAE,sBAAuB,CAAC;EACnE,MAAM,CAAES,aAAa,EAAEC,gBAAgB,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KAAK,EAAG,IAAAN,QAAE,EAAE,YAAa,CAAG;UAC5B4B,OAAO,EAAGA,CAAA,KAAM;YACfhB,eAAe,CAAC,CAAC;UAClB;QAAG,CACH;MAAC,CACO,CACV;IAAA,CACM,CAAC,EACPL,OAAO,CAACE,MAAM,GAAG,CAAC,iBACnB,IAAA7B,WAAA,CAAAiB,GAAA,EAAC5B,WAAA,CAAA4D,uBAAS;MAACC,UAAU;MAACC,WAAW;MAAAnC,QAAA,EAC9BW,OAAO,CAACyB,GAAG,CAAIvC,MAAM,iBACtB,IAAAb,WAAA,CAAAiB,GAAA,EAACoC,UAAU;QAEVxC,MAAM,EAAGA,MAAQ;QACjBe,QAAQ,EAAGA;MAAU,GAFff,MAAM,CAACwB,IAGb,CACA;IAAC,CACO,CACX;EAAA,CACM,CAAC;AAEX;AAEA,SAASgB,UAAUA,CAAE;EAAExC,MAAM;EAAEe;AAAS,CAAC,EAAG;EAC3C,oBACC,IAAA5B,WAAA,CAAAiB,GAAA,EAACpB,iBAAA,CAAAyD,sBAAsB;IACtBC,IAAI,EAAI,iBAAiB3B,QAAU,IAAIf,MAAM,CAACwB,IAAM,EAAG;IACvD;IACC;IACA,IAAAD,aAAO,EAAE,gBAAgB,EAAEvB,MAAM,CAACsB,IAAK,CACvC;IACDW,IAAI,EAAGU,aAAY;IAAAxC,QAAA,EAEjBH,MAAM,CAACsB;EAAI,CACU,CAAC;AAE3B","ignoreList":[]}
@@ -5,15 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = StyleVariationsContainer;
8
- var _react = require("react");
9
8
  var _coreData = require("@wordpress/core-data");
10
9
  var _data = require("@wordpress/data");
11
10
  var _element = require("@wordpress/element");
12
11
  var _components = require("@wordpress/components");
13
12
  var _i18n = require("@wordpress/i18n");
13
+ var _blockEditor = require("@wordpress/block-editor");
14
14
  var _previewStyles = _interopRequireDefault(require("./preview-styles"));
15
15
  var _variation = _interopRequireDefault(require("./variations/variation"));
16
16
  var _useThemeStyleVariationsByProperty = require("../../hooks/use-theme-style-variations/use-theme-style-variations-by-property");
17
+ var _lockUnlock = require("../../lock-unlock");
18
+ var _jsxRuntime = require("react/jsx-runtime");
17
19
  /**
18
20
  * WordPress dependencies
19
21
  */
@@ -22,9 +24,20 @@ var _useThemeStyleVariationsByProperty = require("../../hooks/use-theme-style-va
22
24
  * Internal dependencies
23
25
  */
24
26
 
27
+ const {
28
+ GlobalStylesContext
29
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
25
30
  function StyleVariationsContainer({
26
31
  gap = 2
27
32
  }) {
33
+ const {
34
+ user
35
+ } = (0, _element.useContext)(GlobalStylesContext);
36
+ const [currentUserStyles, setCurrentUserStyles] = (0, _element.useState)(user);
37
+ const userStyles = currentUserStyles?.styles;
38
+ (0, _element.useEffect)(() => {
39
+ setCurrentUserStyles(user);
40
+ }, [user]);
28
41
  const variations = (0, _data.useSelect)(select => {
29
42
  return select(_coreData.store).__experimentalGetCurrentThemeGlobalStylesVariations();
30
43
  }, []);
@@ -33,32 +46,68 @@ function StyleVariationsContainer({
33
46
  const multiplePropertyVariations = variations?.filter(variation => {
34
47
  return !(0, _useThemeStyleVariationsByProperty.isVariationWithSingleProperty)(variation, 'color') && !(0, _useThemeStyleVariationsByProperty.isVariationWithSingleProperty)(variation, 'typography');
35
48
  });
36
- const withEmptyVariation = (0, _element.useMemo)(() => {
37
- return [{
49
+ const themeVariations = (0, _element.useMemo)(() => {
50
+ const withEmptyVariation = [{
38
51
  title: (0, _i18n.__)('Default'),
39
52
  settings: {},
40
53
  styles: {}
41
- }, ...(multiplePropertyVariations !== null && multiplePropertyVariations !== void 0 ? multiplePropertyVariations : []).map(variation => {
42
- var _variation$settings, _variation$styles;
54
+ }, ...(multiplePropertyVariations !== null && multiplePropertyVariations !== void 0 ? multiplePropertyVariations : [])];
55
+ return [...withEmptyVariation.map(variation => {
56
+ var _variation$settings;
57
+ const blockStyles = {
58
+ ...variation?.styles?.blocks
59
+ } || {};
60
+
61
+ // We need to copy any user custom CSS to the variation to prevent it being lost
62
+ // when switching variations.
63
+ if (userStyles?.blocks) {
64
+ Object.keys(userStyles.blocks).forEach(blockName => {
65
+ // First get any block specific custom CSS from the current user styles and merge with any custom CSS for
66
+ // that block in the variation.
67
+ if (userStyles.blocks[blockName].css) {
68
+ const variationBlockStyles = blockStyles[blockName] || {};
69
+ const customCSS = {
70
+ css: `${blockStyles[blockName]?.css || ''} ${userStyles.blocks[blockName].css.trim() || ''}`
71
+ };
72
+ blockStyles[blockName] = {
73
+ ...variationBlockStyles,
74
+ ...customCSS
75
+ };
76
+ }
77
+ });
78
+ }
79
+ // Now merge any global custom CSS from current user styles with global custom CSS in the variation.
80
+ const css = userStyles?.css || variation.styles?.css ? {
81
+ css: `${variation.styles?.css || ''} ${userStyles?.css || ''}`
82
+ } : {};
83
+ const blocks = Object.keys(blockStyles).length > 0 ? {
84
+ blocks: blockStyles
85
+ } : {};
86
+ const styles = {
87
+ ...variation.styles,
88
+ ...css,
89
+ ...blocks
90
+ };
43
91
  return {
44
92
  ...variation,
45
93
  settings: (_variation$settings = variation.settings) !== null && _variation$settings !== void 0 ? _variation$settings : {},
46
- styles: (_variation$styles = variation.styles) !== null && _variation$styles !== void 0 ? _variation$styles : {}
94
+ styles
47
95
  };
48
96
  })];
49
- }, [multiplePropertyVariations]);
50
- return (0, _react.createElement)(_components.__experimentalGrid, {
97
+ }, [multiplePropertyVariations, userStyles?.blocks, userStyles?.css]);
98
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalGrid, {
51
99
  columns: 2,
52
100
  className: "edit-site-global-styles-style-variations-container",
53
- gap: gap
54
- }, withEmptyVariation.map((variation, index) => (0, _react.createElement)(_variation.default, {
55
- key: index,
56
- variation: variation
57
- }, isFocused => (0, _react.createElement)(_previewStyles.default, {
58
- label: variation?.title,
59
- withHoverView: true,
60
- isFocused: isFocused,
61
- variation: variation
62
- }))));
101
+ gap: gap,
102
+ children: themeVariations.map((variation, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_variation.default, {
103
+ variation: variation,
104
+ children: isFocused => /*#__PURE__*/(0, _jsxRuntime.jsx)(_previewStyles.default, {
105
+ label: variation?.title,
106
+ withHoverView: true,
107
+ isFocused: isFocused,
108
+ variation: variation
109
+ })
110
+ }, index))
111
+ });
63
112
  }
64
113
  //# sourceMappingURL=style-variations-container.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_coreData","require","_data","_element","_components","_i18n","_previewStyles","_interopRequireDefault","_variation","_useThemeStyleVariationsByProperty","StyleVariationsContainer","gap","variations","useSelect","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","multiplePropertyVariations","filter","variation","isVariationWithSingleProperty","withEmptyVariation","useMemo","title","__","settings","styles","map","_variation$settings","_variation$styles","_react","createElement","__experimentalGrid","columns","className","index","default","key","isFocused","label","withHoverView"],"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PreviewStyles from './preview-styles';\nimport Variation from './variations/variation';\nimport { isVariationWithSingleProperty } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\n\nexport default function StyleVariationsContainer( { gap = 2 } ) {\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\t// Filter out variations that are of single property type, i.e. color or typography variations.\n\tconst multiplePropertyVariations = variations?.filter( ( variation ) => {\n\t\treturn (\n\t\t\t! isVariationWithSingleProperty( variation, 'color' ) &&\n\t\t\t! isVariationWithSingleProperty( variation, 'typography' )\n\t\t);\n\t} );\n\n\tconst withEmptyVariation = useMemo( () => {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( multiplePropertyVariations ?? [] ).map( ( variation ) => ( {\n\t\t\t\t...variation,\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t} ) ),\n\t\t];\n\t}, [ multiplePropertyVariations ] );\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\tgap={ gap }\n\t\t>\n\t\t\t{ withEmptyVariation.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t<PreviewStyles\n\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\twithHoverView\n\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Variation>\n\t\t\t) ) }\n\t\t</Grid>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,UAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,kCAAA,GAAAR,OAAA;AAdA;AACA;AACA;;AAOA;AACA;AACA;;AAKe,SAASS,wBAAwBA,CAAE;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAC/D,MAAMC,UAAU,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC3C,OAAOA,MAAM,CACZC,eACD,CAAC,CAACC,mDAAmD,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,MAAA,CAAAC,aAAA,EAACzB,cAAA,CAAA8B,OAAa;IACbG,KAAK,EAAGpB,SAAS,EAAEI,KAAO;IAC1BiB,aAAa;IACbF,SAAS,EAAGA,SAAW;IACvBnB,SAAS,EAAGA;EAAW,CACvB,CAEQ,CACV,CACG,CAAC;AAET","ignoreList":[]}
1
+ {"version":3,"names":["_coreData","require","_data","_element","_components","_i18n","_blockEditor","_previewStyles","_interopRequireDefault","_variation","_useThemeStyleVariationsByProperty","_lockUnlock","_jsxRuntime","GlobalStylesContext","unlock","blockEditorPrivateApis","StyleVariationsContainer","gap","user","useContext","currentUserStyles","setCurrentUserStyles","useState","userStyles","styles","useEffect","variations","useSelect","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","multiplePropertyVariations","filter","variation","isVariationWithSingleProperty","themeVariations","useMemo","withEmptyVariation","title","__","settings","map","_variation$settings","blockStyles","blocks","Object","keys","forEach","blockName","css","variationBlockStyles","customCSS","trim","length","jsx","__experimentalGrid","columns","className","children","index","default","isFocused","label","withHoverView"],"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useEffect, useMemo, useState } from '@wordpress/element';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PreviewStyles from './preview-styles';\nimport Variation from './variations/variation';\nimport { isVariationWithSingleProperty } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\nexport default function StyleVariationsContainer( { gap = 2 } ) {\n\tconst { user } = useContext( GlobalStylesContext );\n\tconst [ currentUserStyles, setCurrentUserStyles ] = useState( user );\n\tconst userStyles = currentUserStyles?.styles;\n\n\tuseEffect( () => {\n\t\tsetCurrentUserStyles( user );\n\t}, [ user ] );\n\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\t// Filter out variations that are of single property type, i.e. color or typography variations.\n\tconst multiplePropertyVariations = variations?.filter( ( variation ) => {\n\t\treturn (\n\t\t\t! isVariationWithSingleProperty( variation, 'color' ) &&\n\t\t\t! isVariationWithSingleProperty( variation, 'typography' )\n\t\t);\n\t} );\n\n\tconst themeVariations = useMemo( () => {\n\t\tconst withEmptyVariation = [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( multiplePropertyVariations ?? [] ),\n\t\t];\n\t\treturn [\n\t\t\t...withEmptyVariation.map( ( variation ) => {\n\t\t\t\tconst blockStyles = { ...variation?.styles?.blocks } || {};\n\n\t\t\t\t// We need to copy any user custom CSS to the variation to prevent it being lost\n\t\t\t\t// when switching variations.\n\t\t\t\tif ( userStyles?.blocks ) {\n\t\t\t\t\tObject.keys( userStyles.blocks ).forEach( ( blockName ) => {\n\t\t\t\t\t\t// First get any block specific custom CSS from the current user styles and merge with any custom CSS for\n\t\t\t\t\t\t// that block in the variation.\n\t\t\t\t\t\tif ( userStyles.blocks[ blockName ].css ) {\n\t\t\t\t\t\t\tconst variationBlockStyles =\n\t\t\t\t\t\t\t\tblockStyles[ blockName ] || {};\n\t\t\t\t\t\t\tconst customCSS = {\n\t\t\t\t\t\t\t\tcss: `${\n\t\t\t\t\t\t\t\t\tblockStyles[ blockName ]?.css || ''\n\t\t\t\t\t\t\t\t} ${\n\t\t\t\t\t\t\t\t\tuserStyles.blocks[ blockName ].css.trim() ||\n\t\t\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tblockStyles[ blockName ] = {\n\t\t\t\t\t\t\t\t...variationBlockStyles,\n\t\t\t\t\t\t\t\t...customCSS,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\t// Now merge any global custom CSS from current user styles with global custom CSS in the variation.\n\t\t\t\tconst css =\n\t\t\t\t\tuserStyles?.css || variation.styles?.css\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tcss: `${ variation.styles?.css || '' } ${\n\t\t\t\t\t\t\t\t\tuserStyles?.css || ''\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst blocks =\n\t\t\t\t\tObject.keys( blockStyles ).length > 0\n\t\t\t\t\t\t? { blocks: blockStyles }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst styles = {\n\t\t\t\t\t...variation.styles,\n\t\t\t\t\t...css,\n\t\t\t\t\t...blocks,\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\t...variation,\n\t\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\t\tstyles,\n\t\t\t\t};\n\t\t\t} ),\n\t\t];\n\t}, [ multiplePropertyVariations, userStyles?.blocks, userStyles?.css ] );\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\tgap={ gap }\n\t\t>\n\t\t\t{ themeVariations.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t<PreviewStyles\n\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\twithHoverView\n\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Variation>\n\t\t\t) ) }\n\t\t</Grid>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IA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
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = require("react");
8
7
  var _components = require("@wordpress/components");
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
9
  /**
10
10
  * WordPress dependencies
11
11
  */
@@ -14,10 +14,11 @@ function Subtitle({
14
14
  children,
15
15
  level
16
16
  }) {
17
- return (0, _react.createElement)(_components.__experimentalHeading, {
17
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalHeading, {
18
18
  className: "edit-site-global-styles-subtitle",
19
- level: level !== null && level !== void 0 ? level : 2
20
- }, children);
19
+ level: level !== null && level !== void 0 ? level : 2,
20
+ children: children
21
+ });
21
22
  }
22
23
  var _default = exports.default = Subtitle;
23
24
  //# sourceMappingURL=subtitle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","Subtitle","children","level","_react","createElement","__experimentalHeading","className","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/subtitle.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n\nfunction Subtitle( { children, level } ) {\n\treturn (\n\t\t<Heading\n\t\t\tclassName=\"edit-site-global-styles-subtitle\"\n\t\t\tlevel={ level ?? 2 }\n\t\t>\n\t\t\t{ children }\n\t\t</Heading>\n\t);\n}\n\nexport default Subtitle;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,SAASC,QAAQA,CAAE;EAAEC,QAAQ;EAAEC;AAAM,CAAC,EAAG;EACxC,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACN,WAAA,CAAAO,qBAAO;IACPC,SAAS,EAAC,kCAAkC;IAC5CJ,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI;EAAG,GAElBD,QACM,CAAC;AAEZ;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcT,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_jsxRuntime","Subtitle","children","level","jsx","__experimentalHeading","className","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/subtitle.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n\nfunction Subtitle( { children, level } ) {\n\treturn (\n\t\t<Heading\n\t\t\tclassName=\"edit-site-global-styles-subtitle\"\n\t\t\tlevel={ level ?? 2 }\n\t\t>\n\t\t\t{ children }\n\t\t</Heading>\n\t);\n}\n\nexport default Subtitle;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAyE,IAAAC,WAAA,GAAAD,OAAA;AAHzE;AACA;AACA;;AAGA,SAASE,QAAQA,CAAE;EAAEC,QAAQ;EAAEC;AAAM,CAAC,EAAG;EACxC,oBACC,IAAAH,WAAA,CAAAI,GAAA,EAACN,WAAA,CAAAO,qBAAO;IACPC,SAAS,EAAC,kCAAkC;IAC5CH,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,CAAG;IAAAD,QAAA,EAElBA;EAAQ,CACF,CAAC;AAEZ;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcR,QAAQ","ignoreList":[]}
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = require("react");
9
8
  var _i18n = require("@wordpress/i18n");
10
9
  var _components = require("@wordpress/components");
11
10
  var _blockEditor = require("@wordpress/block-editor");
12
11
  var _navigationButton = require("./navigation-button");
13
12
  var _subtitle = _interopRequireDefault(require("./subtitle"));
14
13
  var _lockUnlock = require("../../lock-unlock");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
15
  /**
16
16
  * WordPress dependencies
17
17
  */
@@ -44,54 +44,62 @@ function ElementItem({
44
44
  const navigationButtonLabel = (0, _i18n.sprintf)(
45
45
  // translators: %s: is a subset of Typography, e.g., 'text' or 'links'.
46
46
  (0, _i18n.__)('Typography %s styles'), label);
47
- return (0, _react.createElement)(_navigationButton.NavigationButtonAsItem, {
47
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_navigationButton.NavigationButtonAsItem, {
48
48
  path: parentMenu + '/typography/' + element,
49
- "aria-label": navigationButtonLabel
50
- }, (0, _react.createElement)(_components.__experimentalHStack, {
51
- justify: "flex-start"
52
- }, (0, _react.createElement)(_components.FlexItem, {
53
- className: "edit-site-global-styles-screen-typography__indicator",
54
- style: {
55
- fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'serif',
56
- background: (_ref = gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor) !== null && _ref !== void 0 ? _ref : fallbackBackgroundColor,
57
- color,
58
- fontStyle,
59
- fontWeight,
60
- letterSpacing,
61
- ...extraStyles
62
- }
63
- }, (0, _i18n.__)('Aa')), (0, _react.createElement)(_components.FlexItem, null, label)));
49
+ "aria-label": navigationButtonLabel,
50
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
51
+ justify: "flex-start",
52
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
53
+ className: "edit-site-global-styles-screen-typography__indicator",
54
+ style: {
55
+ fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'serif',
56
+ background: (_ref = gradientValue !== null && gradientValue !== void 0 ? gradientValue : backgroundColor) !== null && _ref !== void 0 ? _ref : fallbackBackgroundColor,
57
+ color,
58
+ fontStyle,
59
+ fontWeight,
60
+ letterSpacing,
61
+ ...extraStyles
62
+ },
63
+ children: (0, _i18n.__)('Aa')
64
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
65
+ children: label
66
+ })]
67
+ })
68
+ });
64
69
  }
65
70
  function TypographyElements() {
66
71
  const parentMenu = '';
67
- return (0, _react.createElement)(_components.__experimentalVStack, {
68
- spacing: 3
69
- }, (0, _react.createElement)(_subtitle.default, {
70
- level: 3
71
- }, (0, _i18n.__)('Elements')), (0, _react.createElement)(_components.__experimentalItemGroup, {
72
- isBordered: true,
73
- isSeparated: true
74
- }, (0, _react.createElement)(ElementItem, {
75
- parentMenu: parentMenu,
76
- element: "text",
77
- label: (0, _i18n.__)('Text')
78
- }), (0, _react.createElement)(ElementItem, {
79
- parentMenu: parentMenu,
80
- element: "link",
81
- label: (0, _i18n.__)('Links')
82
- }), (0, _react.createElement)(ElementItem, {
83
- parentMenu: parentMenu,
84
- element: "heading",
85
- label: (0, _i18n.__)('Headings')
86
- }), (0, _react.createElement)(ElementItem, {
87
- parentMenu: parentMenu,
88
- element: "caption",
89
- label: (0, _i18n.__)('Captions')
90
- }), (0, _react.createElement)(ElementItem, {
91
- parentMenu: parentMenu,
92
- element: "button",
93
- label: (0, _i18n.__)('Buttons')
94
- })));
72
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
73
+ spacing: 3,
74
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_subtitle.default, {
75
+ level: 3,
76
+ children: (0, _i18n.__)('Elements')
77
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalItemGroup, {
78
+ isBordered: true,
79
+ isSeparated: true,
80
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ElementItem, {
81
+ parentMenu: parentMenu,
82
+ element: "text",
83
+ label: (0, _i18n.__)('Text')
84
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementItem, {
85
+ parentMenu: parentMenu,
86
+ element: "link",
87
+ label: (0, _i18n.__)('Links')
88
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementItem, {
89
+ parentMenu: parentMenu,
90
+ element: "heading",
91
+ label: (0, _i18n.__)('Headings')
92
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementItem, {
93
+ parentMenu: parentMenu,
94
+ element: "caption",
95
+ label: (0, _i18n.__)('Captions')
96
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ElementItem, {
97
+ parentMenu: parentMenu,
98
+ element: "button",
99
+ label: (0, _i18n.__)('Buttons')
100
+ })]
101
+ })]
102
+ });
95
103
  }
96
104
  var _default = exports.default = TypographyElements;
97
105
  //# sourceMappingURL=typography-elements.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_blockEditor","_navigationButton","_subtitle","_interopRequireDefault","_lockUnlock","useGlobalStyle","unlock","blockEditorPrivateApis","ElementItem","parentMenu","element","label","_ref","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","fallbackBackgroundColor","gradientValue","color","navigationButtonLabel","sprintf","__","_react","createElement","NavigationButtonAsItem","path","__experimentalHStack","justify","FlexItem","className","style","background","TypographyElements","__experimentalVStack","spacing","default","level","__experimentalItemGroup","isBordered","isSeparated","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-elements.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\n\nimport { unlock } from '../../lock-unlock';\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ElementItem( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing'\n\t);\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\tbackgroundColor ??\n\t\t\t\t\t\t\tfallbackBackgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\tletterSpacing,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction TypographyElements() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"text\"\n\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"link\"\n\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"heading\"\n\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"caption\"\n\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"button\"\n\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t/>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default TypographyElements;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AAlBA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAM;EAAEO;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE3D,SAASC,WAAWA,CAAE;EAAEC,UAAU;EAAEC,OAAO;EAAEC;AAAM,CAAC,EAAG;EAAA,IAAAC,IAAA;EACtD,MAAMC,MAAM,GACXH,OAAO,KAAK,MAAM,IAAI,CAAEA,OAAO,GAAG,EAAE,GAAI,YAAYA,OAAS,GAAE;EAChE,MAAMI,WAAW,GAChBJ,OAAO,KAAK,MAAM,GACf;IACAK,cAAc,EAAE;EAChB,CAAC,GACD,CAAC,CAAC;EACN,MAAM,CAAEC,UAAU,CAA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EACF,IAAAC,MAAA,CAAAC,aAAA,EAACpB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,QAAQ;IAChBC,KAAK,EAAG,IAAAe,QAAE,EAAE,SAAU;EAAG,CACzB,CACS,CACJ,CAAC;AAEX;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEcH,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_components","_blockEditor","_navigationButton","_subtitle","_interopRequireDefault","_lockUnlock","_jsxRuntime","useGlobalStyle","unlock","blockEditorPrivateApis","ElementItem","parentMenu","element","label","_ref","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","fallbackBackgroundColor","gradientValue","color","navigationButtonLabel","sprintf","__","jsx","NavigationButtonAsItem","path","children","jsxs","__experimentalHStack","justify","FlexItem","className","style","background","TypographyElements","__experimentalVStack","spacing","default","level","__experimentalItemGroup","isBordered","isSeparated","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-elements.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\n\nimport { unlock } from '../../lock-unlock';\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ElementItem( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing'\n\t);\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\tbackgroundColor ??\n\t\t\t\t\t\t\tfallbackBackgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\tletterSpacing,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction TypographyElements() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"text\"\n\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"link\"\n\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"heading\"\n\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"caption\"\n\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"button\"\n\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t/>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default TypographyElements;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AAA2C,IAAAO,WAAA,GAAAP,OAAA;AAlB3C;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAM;EAAEQ;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE3D,SAASC,WAAWA,CAAE;EAAEC,UAAU;EAAEC,OAAO;EAAEC;AAAM,CAAC,EAAG;EAAA,IAAAC,IAAA;EACtD,MAAMC,MAAM,GACXH,OAAO,KAAK,MAAM,IAAI,CAAEA,OAAO,GAAG,EAAE,GAAI,YAAYA,OAAS,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WAAW;QACXC,UAAU,EAAGA,UAAY;QACzBC,OAAO,EAAC,SAAS;QACjBC,KAAK,EAAG,IAAAe,QAAE,EAAE,UAAW;MAAG,CAC1B,CAAC,eACF,IAAAtB,WAAA,CAAAuB,GAAA,EAACnB,WAAW;QACXC,UAAU,EAAGA,UAAY;QACzBC,OAAO,EAAC,SAAS;QACjBC,KAAK,EAAG,IAAAe,QAAE,EAAE,UAAW;MAAG,CAC1B,CAAC,eACF,IAAAtB,WAAA,CAAAuB,GAAA,EAACnB,WAAW;QACXC,UAAU,EAAGA,UAAY;QACzBC,OAAO,EAAC,QAAQ;QAChBC,KAAK,EAAG,IAAAe,QAAE,EAAE,SAAU;MAAG,CACzB,CAAC;IAAA,CACQ,CAAC;EAAA,CACL,CAAC;AAEX;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEcH,kBAAkB","ignoreList":[]}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = PreviewTypography;
7
- var _react = require("react");
8
7
  var _element = require("@wordpress/element");
9
8
  var _components = require("@wordpress/components");
10
9
  var _i18n = require("@wordpress/i18n");
@@ -13,6 +12,7 @@ var _editor = require("@wordpress/editor");
13
12
  var _lockUnlock = require("../../lock-unlock");
14
13
  var _previewStyles = require("./font-library-modal/utils/preview-styles");
15
14
  var _utils = require("./utils");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
16
  /**
17
17
  * WordPress dependencies
18
18
  */
@@ -45,7 +45,7 @@ function PreviewTypography({
45
45
  bodyPreviewStyle.fontSize = fontSize;
46
46
  headingPreviewStyle.fontSize = fontSize;
47
47
  }
48
- return (0, _react.createElement)(_components.__unstableMotion.div, {
48
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__unstableMotion.div, {
49
49
  animate: {
50
50
  scale: 1,
51
51
  opacity: 1
@@ -60,11 +60,14 @@ function PreviewTypography({
60
60
  },
61
61
  style: {
62
62
  textAlign: 'center'
63
- }
64
- }, (0, _react.createElement)("span", {
65
- style: headingPreviewStyle
66
- }, (0, _i18n._x)('A', 'Uppercase letter A')), (0, _react.createElement)("span", {
67
- style: bodyPreviewStyle
68
- }, (0, _i18n._x)('a', 'Lowercase letter A')));
63
+ },
64
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
65
+ style: headingPreviewStyle,
66
+ children: (0, _i18n._x)('A', 'Uppercase letter A')
67
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
68
+ style: bodyPreviewStyle,
69
+ children: (0, _i18n._x)('a', 'Lowercase letter A')
70
+ })]
71
+ });
69
72
  }
70
73
  //# sourceMappingURL=typography-example.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_components","_i18n","_blockEditor","_editor","_lockUnlock","_previewStyles","_utils","GlobalStylesContext","unlock","blockEditorPrivateApis","mergeBaseAndUserConfigs","editorPrivateApis","PreviewTypography","fontSize","variation","base","useContext","config","bodyFontFamilies","headingFontFamilies","getFontFamilies","bodyPreviewStyle","getFamilyPreviewStyle","headingPreviewStyle","_react","createElement","__unstableMotion","div","animate","scale","opacity","initial","transition","delay","type","style","textAlign","_x"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-example.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\nimport { getFontFamilies } from './utils';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nexport default function PreviewTypography( { fontSize, variation } ) {\n\tconst { base } = useContext( GlobalStylesContext );\n\tlet config = base;\n\tif ( variation ) {\n\t\tconfig = mergeBaseAndUserConfigs( base, variation );\n\t}\n\tconst [ bodyFontFamilies, headingFontFamilies ] = getFontFamilies( config );\n\tconst bodyPreviewStyle = bodyFontFamilies\n\t\t? getFamilyPreviewStyle( bodyFontFamilies )\n\t\t: {};\n\tconst headingPreviewStyle = headingFontFamilies\n\t\t? getFamilyPreviewStyle( headingFontFamilies )\n\t\t: {};\n\n\tif ( fontSize ) {\n\t\tbodyPreviewStyle.fontSize = fontSize;\n\t\theadingPreviewStyle.fontSize = fontSize;\n\t}\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: 0.3,\n\t\t\t\ttype: 'tween',\n\t\t\t} }\n\t\t\tstyle={ {\n\t\t\t\ttextAlign: 'center',\n\t\t\t} }\n\t\t>\n\t\t\t<span style={ headingPreviewStyle }>\n\t\t\t\t{ _x( 'A', 'Uppercase letter A' ) }\n\t\t\t</span>\n\t\t\t<span style={ bodyPreviewStyle }>\n\t\t\t\t{ _x( 'a', 'Lowercase letter A' ) }\n\t\t\t</span>\n\t\t</motion.div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAdA;AACA;AACA;;AAOA;AACA;AACA;;AAKA,MAAM;EAAEQ;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAChE,MAAM;EAAE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AAK,EAAGd;EAAkB,GAC7B,IAAAgB,QAAE,EAAE,GAAG,EAAE,oBAAqB,CAC3B,CACK,CAAC;AAEf","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_components","_i18n","_blockEditor","_editor","_lockUnlock","_previewStyles","_utils","_jsxRuntime","GlobalStylesContext","unlock","blockEditorPrivateApis","mergeBaseAndUserConfigs","editorPrivateApis","PreviewTypography","fontSize","variation","base","useContext","config","bodyFontFamilies","headingFontFamilies","getFontFamilies","bodyPreviewStyle","getFamilyPreviewStyle","headingPreviewStyle","jsxs","__unstableMotion","div","animate","scale","opacity","initial","transition","delay","type","style","textAlign","children","jsx","_x"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-example.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\nimport { getFontFamilies } from './utils';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nexport default function PreviewTypography( { fontSize, variation } ) {\n\tconst { base } = useContext( GlobalStylesContext );\n\tlet config = base;\n\tif ( variation ) {\n\t\tconfig = mergeBaseAndUserConfigs( base, variation );\n\t}\n\tconst [ bodyFontFamilies, headingFontFamilies ] = getFontFamilies( config );\n\tconst bodyPreviewStyle = bodyFontFamilies\n\t\t? getFamilyPreviewStyle( bodyFontFamilies )\n\t\t: {};\n\tconst headingPreviewStyle = headingFontFamilies\n\t\t? getFamilyPreviewStyle( headingFontFamilies )\n\t\t: {};\n\n\tif ( fontSize ) {\n\t\tbodyPreviewStyle.fontSize = fontSize;\n\t\theadingPreviewStyle.fontSize = fontSize;\n\t}\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: 0.3,\n\t\t\t\ttype: 'tween',\n\t\t\t} }\n\t\t\tstyle={ {\n\t\t\t\ttextAlign: 'center',\n\t\t\t} }\n\t\t>\n\t\t\t<span style={ headingPreviewStyle }>\n\t\t\t\t{ _x( 'A', 'Uppercase letter A' ) }\n\t\t\t</span>\n\t\t\t<span style={ bodyPreviewStyle }>\n\t\t\t\t{ _x( 'a', 'Lowercase letter A' ) }\n\t\t\t</span>\n\t\t</motion.div>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAA0C,IAAAQ,WAAA,GAAAR,OAAA;AAd1C;AACA;AACA;;AAOA;AACA;AACA;;AAKA,MAAM;EAAES;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAChE,MAAM;EAAEC;AAAwB,CAAC,GAAG,IAAAF,kBAAM,EAAEG,mBAAkB,CAAC;AAEhD,SAASC,iBAAiBA,CAAE;EAAEC,QAAQ;EAAEC;AAAU,CAAC,EAAG;EACpE,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,mBAAU,EAAET,mBAAoB,CAAC;EAClD,IAAIU,MAAM,GAAGF,IAAI;EACjB,IAAKD,SAAS,EAAG;IAChBG,MAAM,GAAGP,uBAAuB,CAAEK,IAAI,EAAED,SAAU,CAAC;EACpD;EACA,MAAM,CAAEI,gBAAgB,EAAEC,mBAAmB,CAAE,GAAG,IAAAC,sBAAe,EAAEH,MAAO,CAAC;EAC3E,MAAMI,gBAAgB,GAAGH,gBAAgB,GACtC,IAAAI,oCAAqB,EAAEJ,gBAAiB,CAAC,GACzC,CAAC,CAAC;EACL,MAAMK,mBAAmB,GAAGJ,mBAAmB,GAC5C,IAAAG,oCAAqB,EAAEH,mBAAoB,CAAC,GAC5C,CAAC,CAAC;EAEL,IAAKN,QAAQ,EAAG;IACfQ,gBAAgB,CAACR,QAAQ,GAAGA,QAAQ;IACpCU,mBAAmB,CAACV,QAAQ,GAAGA,QAAQ;EACxC;EAEA,oBACC,IAAAP,WAAA,CAAAkB,IAAA,EAACzB,WAAA,CAAA0B,gBAAM,CAACC,GAAG;IACVC,OAAO,EAAG;MACTC,KAAK,EAAE,CAAC;MACRC,OAAO,EAAE;IACV,CAAG;IACHC,OAAO,EAAG;MACTF,KAAK,EAAE,GAAG;MACVC,OAAO,EAAE;IACV,CAAG;IACHE,UAAU,EAAG;MACZC,KAAK,EAAE,GAAG;MACVC,IAAI,EAAE;IACP,CAAG;IACHC,KAAK,EAAG;MACPC,SAAS,EAAE;IACZ,CAAG;IAAAC,QAAA,gBAEH,IAAA9B,WAAA,CAAA+B,GAAA;MAAMH,KAAK,EAAGX,mBAAqB;MAAAa,QAAA,EAChC,IAAAE,QAAE,EAAE,GAAG,EAAE,oBAAqB;IAAC,CAC5B,CAAC,eACP,IAAAhC,WAAA,CAAA+B,GAAA;MAAMH,KAAK,EAAGb,gBAAkB;MAAAe,QAAA,EAC7B,IAAAE,QAAE,EAAE,GAAG,EAAE,oBAAqB;IAAC,CAC5B,CAAC;EAAA,CACI,CAAC;AAEf","ignoreList":[]}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = TypographyPanel;
7
- var _react = require("react");
8
7
  var _blockEditor = require("@wordpress/block-editor");
9
8
  var _lockUnlock = require("../../lock-unlock");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
10
  /**
11
11
  * WordPress dependencies
12
12
  */
@@ -41,7 +41,7 @@ function TypographyPanel({
41
41
  const [rawSettings] = useGlobalSetting('');
42
42
  const usedElement = element === 'heading' ? headingLevel : element;
43
43
  const settings = useSettingsForBlockElement(rawSettings, undefined, usedElement);
44
- return (0, _react.createElement)(StylesTypographyPanel, {
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StylesTypographyPanel, {
45
45
  inheritedValue: inheritedStyle,
46
46
  value: style,
47
47
  onChange: setStyle,
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_lockUnlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","unlock","blockEditorPrivateApis","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings","_react","createElement","inheritedValue","value","onChange"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tTypographyPanel: StylesTypographyPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPanel( { element, headingLevel } ) {\n\tlet prefixParts = [];\n\tif ( element === 'heading' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', headingLevel ] );\n\t} else if ( element && element !== 'text' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', element ] );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle(\n\t\tprefix,\n\t\tundefined,\n\t\t'all',\n\t\t{\n\t\t\tshouldDecodeEncode: false,\n\t\t}\n\t);\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst usedElement = element === 'heading' ? headingLevel : element;\n\tconst settings = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tundefined,\n\t\tusedElement\n\t);\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAM;EACLE,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,eAAe,EAAEC;AAClB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAErB,SAASH,eAAeA,CAAE;EAAEI,OAAO;EAAEC;AAAa,CAAC,EAAG;EACpE,IAAIC,WAAW,GAAG,EAAE;EACpB,IAAKF,OAAO,KAAK,SAAS,EAAG;IAC5BE,WAAW,GAAGA,WAAW,CAACC,MAAM,CAAE,CAAE,UAAU,EAAEF,YAAY,CAAG,CAAC;EACjE,CAAC,MAAM,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAAM,EAAG;IAC3CE,WAAW,GAAGA,WAAW,CAACC,MAAM,CAAE,CAAE,UAAU,EAAEH,OAAO,CAAG,CAAC;EAC5D;EACA,MAAMI,MAAM,GAAGF,WAAW,CAACG,IAAI,CAAE,GAAI,CAAC;EAEtC,MAAM,CAAEC,KAAK,CAAE,GAAGb,cAAc,CAAEW,MAAM,EAAEG,SAAS,EAAE,MAAM,EAAE;IAC5DC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGjB,cAAc,CAClDW,MAAM,EACNG,SAAS,EACT,KAAK,EACL;IACCC,kBAAkB,EAAE;EACrB,CACD,CAAC;EACD,MAAM,CAAEG,WAAW,CAAE,GAAGjB,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMkB,WAAW,GAAGZ,OAAO,KAAK,SAAS,GAAGC,YAAY,GAAGD,OAAO;EAClE,MAAMa,QAAQ,GAAGlB,0BAA0B,CAC1CgB,WAAW,EACXJ,SAAS,EACTK,WACD,CAAC;EAED,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAClB,qBAAqB;IACrBmB,cAAc,EAAGP,cAAgB;IACjCQ,KAAK,EAAGX,KAAO;IACfY,QAAQ,EAAGR,QAAU;IACrBG,QAAQ,EAAGA;EAAU,CACrB,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["_blockEditor","require","_lockUnlock","_jsxRuntime","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","unlock","blockEditorPrivateApis","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings","jsx","inheritedValue","value","onChange"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tTypographyPanel: StylesTypographyPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPanel( { element, headingLevel } ) {\n\tlet prefixParts = [];\n\tif ( element === 'heading' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', headingLevel ] );\n\t} else if ( element && element !== 'text' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', element ] );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle(\n\t\tprefix,\n\t\tundefined,\n\t\t'all',\n\t\t{\n\t\t\tshouldDecodeEncode: false,\n\t\t}\n\t);\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst usedElement = element === 'heading' ? headingLevel : element;\n\tconst settings = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tundefined,\n\t\tusedElement\n\t);\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAA2C,IAAAE,WAAA,GAAAF,OAAA;AAR3C;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAM;EACLG,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,eAAe,EAAEC;AAClB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAErB,SAASH,eAAeA,CAAE;EAAEI,OAAO;EAAEC;AAAa,CAAC,EAAG;EACpE,IAAIC,WAAW,GAAG,EAAE;EACpB,IAAKF,OAAO,KAAK,SAAS,EAAG;IAC5BE,WAAW,GAAGA,WAAW,CAACC,MAAM,CAAE,CAAE,UAAU,EAAEF,YAAY,CAAG,CAAC;EACjE,CAAC,MAAM,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAAM,EAAG;IAC3CE,WAAW,GAAGA,WAAW,CAACC,MAAM,CAAE,CAAE,UAAU,EAAEH,OAAO,CAAG,CAAC;EAC5D;EACA,MAAMI,MAAM,GAAGF,WAAW,CAACG,IAAI,CAAE,GAAI,CAAC;EAEtC,MAAM,CAAEC,KAAK,CAAE,GAAGb,cAAc,CAAEW,MAAM,EAAEG,SAAS,EAAE,MAAM,EAAE;IAC5DC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGjB,cAAc,CAClDW,MAAM,EACNG,SAAS,EACT,KAAK,EACL;IACCC,kBAAkB,EAAE;EACrB,CACD,CAAC;EACD,MAAM,CAAEG,WAAW,CAAE,GAAGjB,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMkB,WAAW,GAAGZ,OAAO,KAAK,SAAS,GAAGC,YAAY,GAAGD,OAAO;EAClE,MAAMa,QAAQ,GAAGlB,0BAA0B,CAC1CgB,WAAW,EACXJ,SAAS,EACTK,WACD,CAAC;EAED,oBACC,IAAApB,WAAA,CAAAsB,GAAA,EAACjB,qBAAqB;IACrBkB,cAAc,EAAGN,cAAgB;IACjCO,KAAK,EAAGV,KAAO;IACfW,QAAQ,EAAGP,QAAU;IACrBG,QAAQ,EAAGA;EAAU,CACrB,CAAC;AAEJ","ignoreList":[]}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = TypographyPreview;
7
- var _react = require("react");
8
7
  var _blockEditor = require("@wordpress/block-editor");
9
8
  var _lockUnlock = require("../../lock-unlock");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
10
  /**
11
11
  * WordPress dependencies
12
12
  */
@@ -42,7 +42,7 @@ function TypographyPreview({
42
42
  const extraStyles = element === 'link' ? {
43
43
  textDecoration: 'underline'
44
44
  } : {};
45
- return (0, _react.createElement)("div", {
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
46
46
  className: "edit-site-typography-preview",
47
47
  style: {
48
48
  fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'serif',
@@ -53,7 +53,8 @@ function TypographyPreview({
53
53
  fontWeight,
54
54
  letterSpacing,
55
55
  ...extraStyles
56
- }
57
- }, "Aa");
56
+ },
57
+ children: "Aa"
58
+ });
58
59
  }
59
60
  //# sourceMappingURL=typography-preview.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_lockUnlock","useGlobalStyle","unlock","blockEditorPrivateApis","TypographyPreview","name","element","headingLevel","_ref","prefix","fontFamily","gradientValue","backgroundColor","fallbackBackgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","_react","createElement","className","style","background"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-preview.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPreview( { name, element, headingLevel } ) {\n\tlet prefix = '';\n\tif ( element === 'heading' ) {\n\t\tprefix = `elements.${ headingLevel }.`;\n\t} else if ( element && element !== 'text' ) {\n\t\tprefix = `elements.${ element }.`;\n\t}\n\n\tconst [ fontFamily ] = useGlobalStyle(\n\t\tprefix + 'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient', name );\n\tconst [ backgroundColor ] = useGlobalStyle(\n\t\tprefix + 'color.background',\n\t\tname\n\t);\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text', name );\n\tconst [ fontSize ] = useGlobalStyle( prefix + 'typography.fontSize', name );\n\tconst [ fontStyle ] = useGlobalStyle(\n\t\tprefix + 'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight ] = useGlobalStyle(\n\t\tprefix + 'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing',\n\t\tname\n\t);\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"edit-site-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\tbackground:\n\t\t\t\t\tgradientValue ?? backgroundColor ?? fallbackBackgroundColor,\n\t\t\t\tcolor,\n\t\t\t\tfontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tletterSpacing,\n\t\t\t\t...extraStyles,\n\t\t\t} }\n\t\t>\n\t\t\tAa\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAM;EAAEE;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE5C,SAASC,iBAAiBA,CAAE;EAAEC,IAAI;EAAEC,OAAO;EAAEC;AAAa,CAAC,EAAG;EAAA,IAAAC,IAAA;EAC5E,IAAIC,MAAM,GAAG,EAAE;EACf,IAAKH,OAAO,KAAK,SAAS,EAAG;IAC5BG,MAAM,GAAI,YAAYF,YAAc,GAAE;EACvC,CAAC,MAAM,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAAM,EAAG;IAC3CG,MAAM,GAAI,YAAYH,OAAS,GAAE;EAClC;EAEA,MAAM,CAAEI,UAAU,CAAE,GAAGT,cAAc,CACpCQ,MAAM,GAAG,uBAAuB,EAChCJ,IACD,CAAC;EACD,MAAM,CAAEM,aAAa,CAAE,GAAGV,cAAc,CAAEQ,MAAM,GAAG,gBAAgB,EAAEJ,IAAK,CAAC;EAC3E,MAAM,CAAEO,eAAe,CAAE,GAAGX,cAAc,CACzCQ,MAAM,GAAG,kBAAkB,EAC3BJ,IACD,CAAC;EACD,MAAM,CAAEQ,uBAAuB,CAAE,GAAGZ,cAAc,CAAE,kBAAmB,CAAC;EACxE,MAAM,CAAEa,KAAK,CAAE,GAAGb,cAAc,CAAEQ,MAAM,GAAG,YAAY,EAAEJ,IAAK,CAAC;EAC/D,MAAM,CAAEU,QAAQ,CAAE,GAAGd,cAAc,CAAEQ,MAAM,GAAG,qBAAqB,EAAEJ,IAAK,CAAC;EAC3E,MAAM,CAAEW,SAAS,CAAE,GAAGf,cAAc,CACnCQ,MAAM,GAAG,sBAAsB,EAC/BJ,IACD,CAAC;EACD,MAAM,CAAEY,UAAU,CAAE,GAAGhB,cAAc,CACpCQ,MAAM,GAAG,uBAAuB,EAChCJ,IACD,CAAC;EACD,MAAM,CAAEa,aAAa,CAAE,GAAGjB,cAAc,CACvCQ,MAAM,GAAG,0BAA0B,EACnCJ,IACD,CAAC;EACD,MAAMc,WAAW,GAChBb,OAAO,KAAK,MAAM,GACf;IACAc,cAAc,EAAE;EAChB,CAAC,GACD,CAAC,CAAC;EAEN,OACC,IAAAC,MAAA,CAAAC,aAAA;IACCC,SAAS,EAAC,8BAA8B;IACxCC,KAAK,EAAG;MACPd,UAAU,EAAEA,UAAU,aAAVA,UAAU,cAAVA,UAAU,GAAI,OAAO;MACjCe,UAAU,GAAAjB,IAAA,GACTG,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAIC,eAAe,cAAAJ,IAAA,cAAAA,IAAA,GAAIK,uBAAuB;MAC5DC,KAAK;MACLC,QAAQ;MACRC,SAAS;MACTC,UAAU;MACVC,aAAa;MACb,GAAGC;IACJ;EAAG,GACH,IAEI,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_blockEditor","require","_lockUnlock","_jsxRuntime","useGlobalStyle","unlock","blockEditorPrivateApis","TypographyPreview","name","element","headingLevel","_ref","prefix","fontFamily","gradientValue","backgroundColor","fallbackBackgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","jsx","className","style","background","children"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-preview.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPreview( { name, element, headingLevel } ) {\n\tlet prefix = '';\n\tif ( element === 'heading' ) {\n\t\tprefix = `elements.${ headingLevel }.`;\n\t} else if ( element && element !== 'text' ) {\n\t\tprefix = `elements.${ element }.`;\n\t}\n\n\tconst [ fontFamily ] = useGlobalStyle(\n\t\tprefix + 'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient', name );\n\tconst [ backgroundColor ] = useGlobalStyle(\n\t\tprefix + 'color.background',\n\t\tname\n\t);\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text', name );\n\tconst [ fontSize ] = useGlobalStyle( prefix + 'typography.fontSize', name );\n\tconst [ fontStyle ] = useGlobalStyle(\n\t\tprefix + 'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight ] = useGlobalStyle(\n\t\tprefix + 'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing',\n\t\tname\n\t);\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"edit-site-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\tbackground:\n\t\t\t\t\tgradientValue ?? backgroundColor ?? fallbackBackgroundColor,\n\t\t\t\tcolor,\n\t\t\t\tfontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tletterSpacing,\n\t\t\t\t...extraStyles,\n\t\t\t} }\n\t\t>\n\t\t\tAa\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAA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