@wordpress/edit-site 5.31.0 → 5.33.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 (906) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-page/index.js.map +1 -1
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  5. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  6. package/build/components/add-new-template/index.js +282 -13
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/add-new-template/utils.js +22 -11
  9. package/build/components/add-new-template/utils.js.map +1 -1
  10. package/build/components/app/index.js.map +1 -1
  11. package/build/components/async/index.js +51 -0
  12. package/build/components/async/index.js.map +1 -0
  13. package/build/components/block-editor/block-inspector-button.js +10 -9
  14. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  15. package/build/components/block-editor/editor-canvas.js +23 -7
  16. package/build/components/block-editor/editor-canvas.js.map +1 -1
  17. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  18. package/build/components/block-editor/resizable-editor.js.map +1 -1
  19. package/build/components/block-editor/resize-handle.js.map +1 -1
  20. package/build/components/block-editor/site-editor-canvas.js +20 -5
  21. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  22. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  23. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  24. package/build/components/canvas-loader/index.js.map +1 -1
  25. package/build/components/code-editor/index.js.map +1 -1
  26. package/build/components/create-template-part-modal/index.js.map +1 -1
  27. package/build/components/editor/index.js +47 -11
  28. package/build/components/editor/index.js.map +1 -1
  29. package/build/components/editor-canvas-container/index.js +1 -2
  30. package/build/components/editor-canvas-container/index.js.map +1 -1
  31. package/build/components/error-boundary/index.js.map +1 -1
  32. package/build/components/error-boundary/warning.js.map +1 -1
  33. package/build/components/global-styles/background-panel.js +50 -0
  34. package/build/components/global-styles/background-panel.js.map +1 -0
  35. package/build/components/global-styles/block-preview-panel.js +6 -1
  36. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  37. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  38. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  39. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  40. package/build/components/global-styles/font-families.js +2 -2
  41. package/build/components/global-styles/font-families.js.map +1 -1
  42. package/build/components/global-styles/font-family-item.js.map +1 -1
  43. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  44. package/build/components/global-styles/font-library-modal/context.js +88 -31
  45. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  46. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  47. package/build/components/global-styles/font-library-modal/font-collection.js +11 -4
  48. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  49. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  51. package/build/components/global-styles/font-library-modal/index.js +1 -1
  52. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  53. package/build/components/global-styles/font-library-modal/installed-fonts.js +10 -9
  54. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  55. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  57. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  59. package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  61. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/utils/index.js +20 -2
  63. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  65. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  67. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  68. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  69. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  70. package/build/components/global-styles/header.js.map +1 -1
  71. package/build/components/global-styles/highlighted-colors.js +1 -1
  72. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  73. package/build/components/global-styles/hooks.js +11 -3
  74. package/build/components/global-styles/hooks.js.map +1 -1
  75. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  76. package/build/components/global-styles/index.js.map +1 -1
  77. package/build/components/global-styles/navigation-button.js.map +1 -1
  78. package/build/components/global-styles/palette.js +3 -1
  79. package/build/components/global-styles/palette.js.map +1 -1
  80. package/build/components/global-styles/preview-colors.js +2 -2
  81. package/build/components/global-styles/preview-colors.js.map +1 -1
  82. package/build/components/global-styles/preview-iframe.js.map +1 -1
  83. package/build/components/global-styles/preview-styles.js.map +1 -1
  84. package/build/components/global-styles/root-menu.js +8 -2
  85. package/build/components/global-styles/root-menu.js.map +1 -1
  86. package/build/components/global-styles/screen-background.js +34 -0
  87. package/build/components/global-styles/screen-background.js.map +1 -0
  88. package/build/components/global-styles/screen-block-list.js.map +1 -1
  89. package/build/components/global-styles/screen-block.js.map +1 -1
  90. package/build/components/global-styles/screen-color-palette.js +2 -2
  91. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  92. package/build/components/global-styles/screen-colors.js +6 -4
  93. package/build/components/global-styles/screen-colors.js.map +1 -1
  94. package/build/components/global-styles/screen-css.js.map +1 -1
  95. package/build/components/global-styles/screen-layout.js.map +1 -1
  96. package/build/components/global-styles/screen-revisions/index.js +1 -1
  97. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  98. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  99. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  100. package/build/components/global-styles/screen-root.js.map +1 -1
  101. package/build/components/global-styles/screen-style-variations.js +3 -37
  102. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  103. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  104. package/build/components/global-styles/screen-typography.js +6 -6
  105. package/build/components/global-styles/screen-typography.js.map +1 -1
  106. package/build/components/global-styles/style-variations-container.js +5 -2
  107. package/build/components/global-styles/style-variations-container.js.map +1 -1
  108. package/build/components/global-styles/subtitle.js.map +1 -1
  109. package/build/components/global-styles/typography-elements.js.map +1 -1
  110. package/build/components/global-styles/typography-example.js.map +1 -1
  111. package/build/components/global-styles/typography-panel.js.map +1 -1
  112. package/build/components/global-styles/typography-preview.js.map +1 -1
  113. package/build/components/global-styles/ui.js +5 -2
  114. package/build/components/global-styles/ui.js.map +1 -1
  115. package/build/components/global-styles/utils.js.map +1 -1
  116. package/build/components/global-styles/variations/variation.js.map +1 -1
  117. package/build/components/global-styles/variations/variations-color.js +10 -3
  118. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  119. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  120. package/build/components/global-styles/variations/variations-typography.js +9 -2
  121. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  122. package/build/components/global-styles-renderer/index.js.map +1 -1
  123. package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
  124. package/build/components/header-edit-mode/index.js +4 -4
  125. package/build/components/header-edit-mode/index.js.map +1 -1
  126. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  127. package/build/components/header-edit-mode/more-menu/index.js +10 -12
  128. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  129. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  130. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  131. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  132. package/build/components/keyboard-shortcuts/edit-mode.js +0 -23
  133. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  134. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  135. package/build/components/keyboard-shortcuts/register.js +0 -18
  136. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  137. package/build/components/layout/animation.js +130 -0
  138. package/build/components/layout/animation.js.map +1 -0
  139. package/build/components/layout/hooks.js.map +1 -1
  140. package/build/components/layout/index.js +21 -64
  141. package/build/components/layout/index.js.map +1 -1
  142. package/build/components/layout/router.js +92 -23
  143. package/build/components/layout/router.js.map +1 -1
  144. package/build/components/media/index.js.map +1 -1
  145. package/build/components/page/header.js.map +1 -1
  146. package/build/components/page/index.js +5 -2
  147. package/build/components/page/index.js.map +1 -1
  148. package/build/components/page-pages/index.js +33 -33
  149. package/build/components/page-pages/index.js.map +1 -1
  150. package/build/components/page-patterns/dataviews-pattern-actions.js +5 -4
  151. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  152. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  153. package/build/components/page-patterns/header.js +2 -2
  154. package/build/components/page-patterns/header.js.map +1 -1
  155. package/build/components/page-patterns/index.js +136 -39
  156. package/build/components/page-patterns/index.js.map +1 -1
  157. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  158. package/build/components/page-patterns/search-items.js +18 -59
  159. package/build/components/page-patterns/search-items.js.map +1 -1
  160. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  161. package/build/components/page-patterns/use-patterns.js +5 -10
  162. package/build/components/page-patterns/use-patterns.js.map +1 -1
  163. package/build/components/page-patterns/utils.js.map +1 -1
  164. package/build/components/page-templates-template-parts/add-new-template-part.js +2 -1
  165. package/build/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  166. package/build/components/page-templates-template-parts/hooks.js.map +1 -1
  167. package/build/components/page-templates-template-parts/index.js +35 -80
  168. package/build/components/page-templates-template-parts/index.js.map +1 -1
  169. package/build/components/pagination/index.js.map +1 -1
  170. package/build/components/pattern-modal/duplicate.js +6 -3
  171. package/build/components/pattern-modal/duplicate.js.map +1 -1
  172. package/build/components/pattern-modal/index.js.map +1 -1
  173. package/build/components/pattern-modal/rename.js +6 -3
  174. package/build/components/pattern-modal/rename.js.map +1 -1
  175. package/build/components/plugin-template-setting-panel/index.js +12 -1
  176. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  177. package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
  178. package/build/components/rename-post-menu-item/index.js.map +1 -0
  179. package/build/components/resizable-frame/index.js +1 -5
  180. package/build/components/resizable-frame/index.js.map +1 -1
  181. package/build/components/revisions/index.js.map +1 -1
  182. package/build/components/routes/link.js.map +1 -1
  183. package/build/components/routes/use-title.js.map +1 -1
  184. package/build/components/save-button/index.js +45 -16
  185. package/build/components/save-button/index.js.map +1 -1
  186. package/build/components/save-hub/index.js +8 -112
  187. package/build/components/save-hub/index.js.map +1 -1
  188. package/build/components/save-panel/index.js +3 -3
  189. package/build/components/save-panel/index.js.map +1 -1
  190. package/build/components/sidebar/index.js +41 -79
  191. package/build/components/sidebar/index.js.map +1 -1
  192. package/build/components/sidebar-button/index.js.map +1 -1
  193. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  194. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  195. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  196. package/build/components/sidebar-dataviews/default-views.js +2 -2
  197. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  198. package/build/components/sidebar-dataviews/index.js +2 -2
  199. package/build/components/sidebar-dataviews/index.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
  201. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  202. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  203. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  204. package/build/components/sidebar-edit-mode/index.js +30 -56
  205. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  206. package/build/components/sidebar-edit-mode/page-panels/index.js +26 -15
  207. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  208. package/build/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
  209. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  210. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  211. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +2 -2
  212. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  213. package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
  214. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  215. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  216. package/build/components/sidebar-edit-mode/template-panel/index.js +11 -17
  217. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  218. package/build/components/sidebar-navigation-item/index.js +31 -0
  219. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  220. package/build/components/sidebar-navigation-screen/index.js +36 -9
  221. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen-details-footer/index.js +5 -1
  223. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  224. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  225. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  226. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  227. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-global-styles/index.js +11 -7
  229. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-main/index.js +6 -15
  231. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  232. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  233. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
  235. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  237. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  239. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  240. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  241. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  242. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  243. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  245. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  246. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  247. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  248. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  249. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-page/index.js +22 -12
  251. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  253. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-pattern/index.js +14 -5
  255. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  257. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  259. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  261. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  263. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  264. package/build/components/sidebar-navigation-screen-patterns/index.js +34 -32
  265. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  266. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  267. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  268. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  269. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  270. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  271. package/build/components/sidebar-navigation-screen-template/index.js +10 -7
  272. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  273. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  274. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  275. package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  276. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  277. package/build/components/site-hub/index.js +22 -21
  278. package/build/components/site-hub/index.js.map +1 -1
  279. package/build/components/site-icon/index.js.map +1 -1
  280. package/build/components/start-template-options/index.js.map +1 -1
  281. package/build/components/style-book/index.js +1 -1
  282. package/build/components/style-book/index.js.map +1 -1
  283. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -7
  284. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  285. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  286. package/build/components/table/index.js.map +1 -1
  287. package/build/components/template-actions/index.js +7 -8
  288. package/build/components/template-actions/index.js.map +1 -1
  289. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  290. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  291. package/build/components/template-part-converter/index.js.map +1 -1
  292. package/build/components/use-edited-entity-record/index.js.map +1 -1
  293. package/build/components/welcome-guide/editor.js.map +1 -1
  294. package/build/components/welcome-guide/image.js.map +1 -1
  295. package/build/components/welcome-guide/index.js.map +1 -1
  296. package/build/components/welcome-guide/page.js.map +1 -1
  297. package/build/components/welcome-guide/styles.js +6 -3
  298. package/build/components/welcome-guide/styles.js.map +1 -1
  299. package/build/components/welcome-guide/template.js.map +1 -1
  300. package/build/hooks/commands/use-common-commands.js.map +1 -1
  301. package/build/hooks/commands/use-edit-mode-commands.js +10 -28
  302. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  303. package/build/hooks/components.js.map +1 -1
  304. package/build/hooks/index.js +0 -1
  305. package/build/hooks/index.js.map +1 -1
  306. package/build/hooks/push-changes-to-global-styles/index.js +3 -40
  307. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  308. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  309. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  310. package/build/index.js +3 -8
  311. package/build/index.js.map +1 -1
  312. package/build/lock-unlock.js.map +1 -1
  313. package/build/store/actions.js +21 -96
  314. package/build/store/actions.js.map +1 -1
  315. package/build/store/constants.js.map +1 -1
  316. package/build/store/index.js +1 -1
  317. package/build/store/index.js.map +1 -1
  318. package/build/store/private-actions.js +1 -85
  319. package/build/store/private-actions.js.map +1 -1
  320. package/build/store/private-selectors.js.map +1 -1
  321. package/build/store/reducer.js.map +1 -1
  322. package/build/store/selectors.js +1 -9
  323. package/build/store/selectors.js.map +1 -1
  324. package/build/utils/clone-deep.js.map +1 -1
  325. package/build/utils/constants.js +2 -1
  326. package/build/utils/constants.js.map +1 -1
  327. package/build/utils/get-is-list-page.js.map +1 -1
  328. package/build/utils/is-previewing-theme.js.map +1 -1
  329. package/build/utils/is-template-removable.js.map +1 -1
  330. package/build/utils/is-template-revertable.js.map +1 -1
  331. package/build/utils/math.js.map +1 -1
  332. package/build/utils/set-nested-value.js +44 -0
  333. package/build/utils/set-nested-value.js.map +1 -0
  334. package/build/utils/template-part-create.js.map +1 -1
  335. package/build/utils/use-activate-theme.js.map +1 -1
  336. package/build/utils/use-actual-current-theme.js.map +1 -1
  337. package/build-module/components/add-new-page/index.js.map +1 -1
  338. package/build-module/components/add-new-pattern/index.js.map +1 -1
  339. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  340. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  341. package/build-module/components/add-new-template/index.js +283 -14
  342. package/build-module/components/add-new-template/index.js.map +1 -1
  343. package/build-module/components/add-new-template/utils.js +21 -11
  344. package/build-module/components/add-new-template/utils.js.map +1 -1
  345. package/build-module/components/app/index.js.map +1 -1
  346. package/build-module/components/async/index.js +44 -0
  347. package/build-module/components/async/index.js.map +1 -0
  348. package/build-module/components/block-editor/block-inspector-button.js +9 -8
  349. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  350. package/build-module/components/block-editor/editor-canvas.js +24 -8
  351. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  352. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  353. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  354. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  355. package/build-module/components/block-editor/site-editor-canvas.js +20 -5
  356. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  357. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  358. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  359. package/build-module/components/canvas-loader/index.js.map +1 -1
  360. package/build-module/components/code-editor/index.js.map +1 -1
  361. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  362. package/build-module/components/editor/index.js +48 -12
  363. package/build-module/components/editor/index.js.map +1 -1
  364. package/build-module/components/editor-canvas-container/index.js +1 -2
  365. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  366. package/build-module/components/error-boundary/index.js.map +1 -1
  367. package/build-module/components/error-boundary/warning.js.map +1 -1
  368. package/build-module/components/global-styles/background-panel.js +44 -0
  369. package/build-module/components/global-styles/background-panel.js.map +1 -0
  370. package/build-module/components/global-styles/block-preview-panel.js +6 -1
  371. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  372. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  373. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  374. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  375. package/build-module/components/global-styles/font-families.js +1 -1
  376. package/build-module/components/global-styles/font-families.js.map +1 -1
  377. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  379. package/build-module/components/global-styles/font-library-modal/context.js +87 -31
  380. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  381. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  382. package/build-module/components/global-styles/font-library-modal/font-collection.js +12 -5
  383. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  384. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  385. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  386. package/build-module/components/global-styles/font-library-modal/index.js +2 -2
  387. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  388. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +11 -10
  389. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  390. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  391. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  392. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  393. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  394. package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  395. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  396. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  397. package/build-module/components/global-styles/font-library-modal/utils/index.js +20 -2
  398. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  399. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  400. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  401. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  402. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  403. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  404. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  405. package/build-module/components/global-styles/header.js.map +1 -1
  406. package/build-module/components/global-styles/highlighted-colors.js +1 -1
  407. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  408. package/build-module/components/global-styles/hooks.js +11 -3
  409. package/build-module/components/global-styles/hooks.js.map +1 -1
  410. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  411. package/build-module/components/global-styles/index.js.map +1 -1
  412. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  413. package/build-module/components/global-styles/palette.js +3 -1
  414. package/build-module/components/global-styles/palette.js.map +1 -1
  415. package/build-module/components/global-styles/preview-colors.js +2 -2
  416. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  417. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  418. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  419. package/build-module/components/global-styles/root-menu.js +9 -3
  420. package/build-module/components/global-styles/root-menu.js.map +1 -1
  421. package/build-module/components/global-styles/screen-background.js +26 -0
  422. package/build-module/components/global-styles/screen-background.js.map +1 -0
  423. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  424. package/build-module/components/global-styles/screen-block.js.map +1 -1
  425. package/build-module/components/global-styles/screen-color-palette.js +2 -2
  426. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  427. package/build-module/components/global-styles/screen-colors.js +6 -4
  428. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  429. package/build-module/components/global-styles/screen-css.js.map +1 -1
  430. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  431. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  432. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  433. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  434. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  435. package/build-module/components/global-styles/screen-root.js.map +1 -1
  436. package/build-module/components/global-styles/screen-style-variations.js +4 -38
  437. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  438. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  439. package/build-module/components/global-styles/screen-typography.js +6 -6
  440. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  441. package/build-module/components/global-styles/style-variations-container.js +5 -2
  442. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  443. package/build-module/components/global-styles/subtitle.js.map +1 -1
  444. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  445. package/build-module/components/global-styles/typography-example.js.map +1 -1
  446. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  447. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  448. package/build-module/components/global-styles/ui.js +4 -1
  449. package/build-module/components/global-styles/ui.js.map +1 -1
  450. package/build-module/components/global-styles/utils.js.map +1 -1
  451. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  452. package/build-module/components/global-styles/variations/variations-color.js +10 -3
  453. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  454. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  455. package/build-module/components/global-styles/variations/variations-typography.js +9 -2
  456. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  457. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  458. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
  459. package/build-module/components/header-edit-mode/index.js +3 -3
  460. package/build-module/components/header-edit-mode/index.js.map +1 -1
  461. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  462. package/build-module/components/header-edit-mode/more-menu/index.js +8 -8
  463. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  464. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  465. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  466. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  467. package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -23
  468. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  469. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  470. package/build-module/components/keyboard-shortcuts/register.js +0 -18
  471. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  472. package/build-module/components/layout/animation.js +123 -0
  473. package/build-module/components/layout/animation.js.map +1 -0
  474. package/build-module/components/layout/hooks.js.map +1 -1
  475. package/build-module/components/layout/index.js +21 -64
  476. package/build-module/components/layout/index.js.map +1 -1
  477. package/build-module/components/layout/router.js +92 -23
  478. package/build-module/components/layout/router.js.map +1 -1
  479. package/build-module/components/media/index.js.map +1 -1
  480. package/build-module/components/page/header.js.map +1 -1
  481. package/build-module/components/page/index.js +5 -2
  482. package/build-module/components/page/index.js.map +1 -1
  483. package/build-module/components/page-pages/index.js +32 -32
  484. package/build-module/components/page-pages/index.js.map +1 -1
  485. package/build-module/components/page-patterns/dataviews-pattern-actions.js +5 -4
  486. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  487. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  488. package/build-module/components/page-patterns/header.js +2 -2
  489. package/build-module/components/page-patterns/header.js.map +1 -1
  490. package/build-module/components/page-patterns/index.js +139 -42
  491. package/build-module/components/page-patterns/index.js.map +1 -1
  492. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  493. package/build-module/components/page-patterns/search-items.js +17 -57
  494. package/build-module/components/page-patterns/search-items.js.map +1 -1
  495. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  496. package/build-module/components/page-patterns/use-patterns.js +2 -6
  497. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  498. package/build-module/components/page-patterns/utils.js.map +1 -1
  499. package/build-module/components/page-templates-template-parts/add-new-template-part.js +3 -2
  500. package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  501. package/build-module/components/page-templates-template-parts/hooks.js.map +1 -1
  502. package/build-module/components/page-templates-template-parts/index.js +36 -81
  503. package/build-module/components/page-templates-template-parts/index.js.map +1 -1
  504. package/build-module/components/pagination/index.js.map +1 -1
  505. package/build-module/components/pattern-modal/duplicate.js +4 -1
  506. package/build-module/components/pattern-modal/duplicate.js.map +1 -1
  507. package/build-module/components/pattern-modal/index.js.map +1 -1
  508. package/build-module/components/pattern-modal/rename.js +4 -1
  509. package/build-module/components/pattern-modal/rename.js.map +1 -1
  510. package/build-module/components/plugin-template-setting-panel/index.js +12 -1
  511. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  512. package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
  513. package/build-module/components/rename-post-menu-item/index.js.map +1 -0
  514. package/build-module/components/resizable-frame/index.js +1 -5
  515. package/build-module/components/resizable-frame/index.js.map +1 -1
  516. package/build-module/components/revisions/index.js.map +1 -1
  517. package/build-module/components/routes/link.js.map +1 -1
  518. package/build-module/components/routes/use-title.js.map +1 -1
  519. package/build-module/components/save-button/index.js +46 -17
  520. package/build-module/components/save-button/index.js.map +1 -1
  521. package/build-module/components/save-hub/index.js +10 -114
  522. package/build-module/components/save-hub/index.js.map +1 -1
  523. package/build-module/components/save-panel/index.js +2 -2
  524. package/build-module/components/save-panel/index.js.map +1 -1
  525. package/build-module/components/sidebar/index.js +42 -79
  526. package/build-module/components/sidebar/index.js.map +1 -1
  527. package/build-module/components/sidebar-button/index.js.map +1 -1
  528. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  529. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  530. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  531. package/build-module/components/sidebar-dataviews/default-views.js +2 -2
  532. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  533. package/build-module/components/sidebar-dataviews/index.js +2 -2
  534. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  535. package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
  536. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  537. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  538. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  539. package/build-module/components/sidebar-edit-mode/index.js +29 -55
  540. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  541. package/build-module/components/sidebar-edit-mode/page-panels/index.js +29 -18
  542. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  543. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
  544. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  545. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  546. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
  547. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  548. package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
  549. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  550. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  551. package/build-module/components/sidebar-edit-mode/template-panel/index.js +12 -18
  552. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  553. package/build-module/components/sidebar-navigation-item/index.js +31 -0
  554. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  555. package/build-module/components/sidebar-navigation-screen/index.js +37 -10
  556. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  557. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +5 -1
  558. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  559. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  561. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  563. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +12 -8
  564. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  565. package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
  566. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  567. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  568. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  569. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
  570. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  571. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  572. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  573. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  574. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  575. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  576. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  577. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  579. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  580. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  581. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  582. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  583. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  584. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  585. package/build-module/components/sidebar-navigation-screen-page/index.js +24 -14
  586. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  587. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  588. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  589. package/build-module/components/sidebar-navigation-screen-pattern/index.js +14 -5
  590. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  591. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  592. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  593. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  594. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  595. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  596. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  597. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  598. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  599. package/build-module/components/sidebar-navigation-screen-patterns/index.js +35 -33
  600. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  601. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  602. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  603. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  604. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  605. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  606. package/build-module/components/sidebar-navigation-screen-template/index.js +12 -8
  607. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  608. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  609. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  610. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  611. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  612. package/build-module/components/site-hub/index.js +22 -21
  613. package/build-module/components/site-hub/index.js.map +1 -1
  614. package/build-module/components/site-icon/index.js.map +1 -1
  615. package/build-module/components/start-template-options/index.js.map +1 -1
  616. package/build-module/components/style-book/index.js +1 -1
  617. package/build-module/components/style-book/index.js.map +1 -1
  618. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -7
  619. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  620. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  621. package/build-module/components/table/index.js.map +1 -1
  622. package/build-module/components/template-actions/index.js +7 -8
  623. package/build-module/components/template-actions/index.js.map +1 -1
  624. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  625. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  626. package/build-module/components/template-part-converter/index.js.map +1 -1
  627. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  628. package/build-module/components/welcome-guide/editor.js.map +1 -1
  629. package/build-module/components/welcome-guide/image.js.map +1 -1
  630. package/build-module/components/welcome-guide/index.js.map +1 -1
  631. package/build-module/components/welcome-guide/page.js.map +1 -1
  632. package/build-module/components/welcome-guide/styles.js +6 -3
  633. package/build-module/components/welcome-guide/styles.js.map +1 -1
  634. package/build-module/components/welcome-guide/template.js.map +1 -1
  635. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  636. package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
  637. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  638. package/build-module/hooks/components.js.map +1 -1
  639. package/build-module/hooks/index.js +0 -1
  640. package/build-module/hooks/index.js.map +1 -1
  641. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
  642. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  643. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  644. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  645. package/build-module/index.js +4 -6
  646. package/build-module/index.js.map +1 -1
  647. package/build-module/lock-unlock.js.map +1 -1
  648. package/build-module/store/actions.js +16 -92
  649. package/build-module/store/actions.js.map +1 -1
  650. package/build-module/store/constants.js.map +1 -1
  651. package/build-module/store/index.js.map +1 -1
  652. package/build-module/store/private-actions.js +0 -83
  653. package/build-module/store/private-actions.js.map +1 -1
  654. package/build-module/store/private-selectors.js.map +1 -1
  655. package/build-module/store/reducer.js.map +1 -1
  656. package/build-module/store/selectors.js +1 -9
  657. package/build-module/store/selectors.js.map +1 -1
  658. package/build-module/utils/clone-deep.js.map +1 -1
  659. package/build-module/utils/constants.js +1 -0
  660. package/build-module/utils/constants.js.map +1 -1
  661. package/build-module/utils/get-is-list-page.js.map +1 -1
  662. package/build-module/utils/is-previewing-theme.js.map +1 -1
  663. package/build-module/utils/is-template-removable.js.map +1 -1
  664. package/build-module/utils/is-template-revertable.js.map +1 -1
  665. package/build-module/utils/math.js.map +1 -1
  666. package/build-module/utils/set-nested-value.js +38 -0
  667. package/build-module/utils/set-nested-value.js.map +1 -0
  668. package/build-module/utils/template-part-create.js.map +1 -1
  669. package/build-module/utils/use-activate-theme.js.map +1 -1
  670. package/build-module/utils/use-actual-current-theme.js.map +1 -1
  671. package/build-style/style-rtl.css +287 -688
  672. package/build-style/style.css +287 -688
  673. package/package.json +44 -45
  674. package/src/components/add-new-template/index.js +412 -12
  675. package/src/components/add-new-template/style.scss +0 -22
  676. package/src/components/add-new-template/utils.js +44 -24
  677. package/src/components/async/index.js +43 -0
  678. package/src/components/block-editor/block-inspector-button.js +9 -11
  679. package/src/components/block-editor/editor-canvas.js +59 -23
  680. package/src/components/block-editor/site-editor-canvas.js +16 -8
  681. package/src/components/editor/index.js +61 -17
  682. package/src/components/editor-canvas-container/index.js +0 -1
  683. package/src/components/global-styles/background-panel.js +50 -0
  684. package/src/components/global-styles/block-preview-panel.js +6 -1
  685. package/src/components/global-styles/font-families.js +1 -1
  686. package/src/components/global-styles/font-library-modal/context.js +104 -50
  687. package/src/components/global-styles/font-library-modal/font-collection.js +247 -223
  688. package/src/components/global-styles/font-library-modal/index.js +2 -2
  689. package/src/components/global-styles/font-library-modal/installed-fonts.js +156 -147
  690. package/src/components/global-styles/font-library-modal/style.scss +32 -14
  691. package/src/components/global-styles/font-library-modal/utils/index.js +17 -4
  692. package/src/components/global-styles/highlighted-colors.js +1 -1
  693. package/src/components/global-styles/hooks.js +20 -3
  694. package/src/components/global-styles/palette.js +3 -1
  695. package/src/components/global-styles/preview-colors.js +2 -2
  696. package/src/components/global-styles/root-menu.js +12 -1
  697. package/src/components/global-styles/screen-background.js +29 -0
  698. package/src/components/global-styles/screen-color-palette.js +2 -2
  699. package/src/components/global-styles/screen-colors.js +4 -4
  700. package/src/components/global-styles/screen-revisions/index.js +1 -1
  701. package/src/components/global-styles/screen-style-variations.js +4 -36
  702. package/src/components/global-styles/screen-typography.js +6 -9
  703. package/src/components/global-styles/style-variations-container.js +2 -1
  704. package/src/components/global-styles/style.scss +14 -12
  705. package/src/components/global-styles/ui.js +5 -0
  706. package/src/components/global-styles/variations/style.scss +32 -17
  707. package/src/components/global-styles/variations/variations-color.js +4 -2
  708. package/src/components/global-styles/variations/variations-typography.js +4 -1
  709. package/src/components/header-edit-mode/index.js +3 -5
  710. package/src/components/header-edit-mode/more-menu/index.js +6 -17
  711. package/src/components/header-edit-mode/style.scss +29 -18
  712. package/src/components/keyboard-shortcuts/edit-mode.js +0 -29
  713. package/src/components/keyboard-shortcuts/register.js +0 -20
  714. package/src/components/layout/animation.js +125 -0
  715. package/src/components/layout/index.js +21 -74
  716. package/src/components/layout/router.js +99 -30
  717. package/src/components/layout/style.scss +17 -37
  718. package/src/components/page/index.js +7 -2
  719. package/src/components/page-pages/index.js +59 -65
  720. package/src/components/page-pages/style.scss +29 -22
  721. package/src/components/page-patterns/dataviews-pattern-actions.js +5 -6
  722. package/src/components/page-patterns/header.js +4 -2
  723. package/src/components/page-patterns/index.js +182 -78
  724. package/src/components/page-patterns/search-items.js +16 -58
  725. package/src/components/page-patterns/style.scss +7 -6
  726. package/src/components/page-patterns/use-patterns.js +2 -6
  727. package/src/components/page-templates-template-parts/add-new-template-part.js +4 -2
  728. package/src/components/page-templates-template-parts/index.js +44 -103
  729. package/src/components/page-templates-template-parts/style.scss +5 -0
  730. package/src/components/pattern-modal/duplicate.js +2 -1
  731. package/src/components/pattern-modal/rename.js +2 -1
  732. package/src/components/plugin-template-setting-panel/index.js +14 -1
  733. package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
  734. package/src/components/resizable-frame/index.js +2 -6
  735. package/src/components/save-button/index.js +55 -26
  736. package/src/components/save-hub/index.js +20 -164
  737. package/src/components/save-panel/index.js +2 -2
  738. package/src/components/sidebar/index.js +52 -105
  739. package/src/components/sidebar/style.scss +41 -6
  740. package/src/components/sidebar-dataviews/default-views.js +2 -2
  741. package/src/components/sidebar-dataviews/index.js +2 -2
  742. package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
  743. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
  744. package/src/components/sidebar-edit-mode/index.js +39 -77
  745. package/src/components/sidebar-edit-mode/page-panels/index.js +52 -60
  746. package/src/components/sidebar-edit-mode/page-panels/page-content.js +10 -10
  747. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +20 -12
  748. package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -6
  749. package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
  750. package/src/components/sidebar-edit-mode/style.scss +1 -1
  751. package/src/components/sidebar-edit-mode/template-panel/index.js +24 -34
  752. package/src/components/sidebar-edit-mode/template-panel/style.scss +1 -29
  753. package/src/components/sidebar-navigation-item/index.js +29 -0
  754. package/src/components/sidebar-navigation-screen/index.js +29 -12
  755. package/src/components/sidebar-navigation-screen/style.scss +13 -30
  756. package/src/components/sidebar-navigation-screen-details-footer/index.js +6 -2
  757. package/src/components/sidebar-navigation-screen-global-styles/index.js +9 -24
  758. package/src/components/sidebar-navigation-screen-main/index.js +11 -23
  759. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  760. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
  761. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  762. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
  763. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  764. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
  765. package/src/components/sidebar-navigation-screen-page/index.js +23 -13
  766. package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
  767. package/src/components/sidebar-navigation-screen-pattern/index.js +9 -6
  768. package/src/components/sidebar-navigation-screen-patterns/index.js +70 -67
  769. package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
  770. package/src/components/sidebar-navigation-screen-template/index.js +8 -12
  771. package/src/components/sidebar-navigation-screen-templates-browse/index.js +2 -7
  772. package/src/components/site-hub/index.js +80 -90
  773. package/src/components/site-hub/style.scss +14 -34
  774. package/src/components/style-book/index.js +1 -3
  775. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +52 -37
  776. package/src/components/template-actions/index.js +8 -11
  777. package/src/components/welcome-guide/style.scss +1 -1
  778. package/src/components/welcome-guide/styles.js +6 -5
  779. package/src/hooks/commands/use-edit-mode-commands.js +12 -33
  780. package/src/hooks/index.js +0 -1
  781. package/src/hooks/push-changes-to-global-styles/index.js +1 -40
  782. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
  783. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
  784. package/src/index.js +9 -10
  785. package/src/store/actions.js +25 -141
  786. package/src/store/private-actions.js +0 -133
  787. package/src/store/selectors.js +3 -15
  788. package/src/store/test/actions.js +7 -2
  789. package/src/style.scss +0 -3
  790. package/src/utils/constants.js +1 -0
  791. package/src/utils/set-nested-value.js +39 -0
  792. package/build/components/actions/index.js +0 -319
  793. package/build/components/actions/index.js.map +0 -1
  794. package/build/components/add-new-template/new-template.js +0 -298
  795. package/build/components/add-new-template/new-template.js.map +0 -1
  796. package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
  797. package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  798. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
  799. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  800. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
  801. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  802. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  803. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  804. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
  805. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  806. package/build/components/keyboard-shortcut-help-modal/index.js +0 -116
  807. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  808. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
  809. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  810. package/build/components/page-actions/index.js +0 -35
  811. package/build/components/page-actions/index.js.map +0 -1
  812. package/build/components/page-actions/trash-page-menu-item.js +0 -54
  813. package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
  814. package/build/components/page-templates-template-parts/actions.js +0 -194
  815. package/build/components/page-templates-template-parts/actions.js.map +0 -1
  816. package/build/components/preferences-modal/index.js +0 -38
  817. package/build/components/preferences-modal/index.js.map +0 -1
  818. package/build/components/sidebar-edit-mode/constants.js +0 -9
  819. package/build/components/sidebar-edit-mode/constants.js.map +0 -1
  820. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
  821. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  822. package/build/components/sidebar-edit-mode/sidebar-card/index.js +0 -48
  823. package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
  824. package/build/components/sidebar-edit-mode/template-panel/template-areas.js +0 -70
  825. package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
  826. package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
  827. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  828. package/build/components/sidebar-navigation-screen-pages/index.js +0 -175
  829. package/build/components/sidebar-navigation-screen-pages/index.js.map +0 -1
  830. package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
  831. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  832. package/build/components/template-actions/rename-menu-item.js.map +0 -1
  833. package/build/hooks/template-part-edit.js +0 -82
  834. package/build/hooks/template-part-edit.js.map +0 -1
  835. package/build/store/utils.js +0 -71
  836. package/build/store/utils.js.map +0 -1
  837. package/build-module/components/actions/index.js +0 -308
  838. package/build-module/components/actions/index.js.map +0 -1
  839. package/build-module/components/add-new-template/new-template.js +0 -290
  840. package/build-module/components/add-new-template/new-template.js.map +0 -1
  841. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
  842. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  843. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  844. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  845. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
  846. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  847. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  848. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  849. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
  850. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  851. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -107
  852. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  853. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
  854. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  855. package/build-module/components/page-actions/index.js +0 -27
  856. package/build-module/components/page-actions/index.js.map +0 -1
  857. package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
  858. package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
  859. package/build-module/components/page-templates-template-parts/actions.js +0 -185
  860. package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
  861. package/build-module/components/preferences-modal/index.js +0 -30
  862. package/build-module/components/preferences-modal/index.js.map +0 -1
  863. package/build-module/components/sidebar-edit-mode/constants.js +0 -3
  864. package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
  865. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
  866. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  867. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +0 -40
  868. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
  869. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +0 -63
  870. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
  871. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
  872. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  873. package/build-module/components/sidebar-navigation-screen-pages/index.js +0 -167
  874. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +0 -1
  875. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
  876. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  877. package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
  878. package/build-module/hooks/template-part-edit.js +0 -75
  879. package/build-module/hooks/template-part-edit.js.map +0 -1
  880. package/build-module/store/utils.js +0 -64
  881. package/build-module/store/utils.js.map +0 -1
  882. package/src/components/actions/index.js +0 -409
  883. package/src/components/add-new-template/new-template.js +0 -429
  884. package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
  885. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  886. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
  887. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  888. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  889. package/src/components/keyboard-shortcut-help-modal/index.js +0 -147
  890. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
  891. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  892. package/src/components/page-actions/index.js +0 -30
  893. package/src/components/page-actions/trash-page-menu-item.js +0 -63
  894. package/src/components/page-templates-template-parts/actions.js +0 -262
  895. package/src/components/preferences-modal/index.js +0 -29
  896. package/src/components/sidebar-edit-mode/constants.js +0 -2
  897. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
  898. package/src/components/sidebar-edit-mode/sidebar-card/index.js +0 -53
  899. package/src/components/sidebar-edit-mode/sidebar-card/style.scss +0 -36
  900. package/src/components/sidebar-edit-mode/template-panel/template-areas.js +0 -86
  901. package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
  902. package/src/components/sidebar-navigation-screen-pages/index.js +0 -238
  903. package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
  904. package/src/hooks/template-part-edit.js +0 -89
  905. package/src/store/test/utils.js +0 -191
  906. package/src/store/utils.js +0 -69
@@ -18,14 +18,14 @@ function ScreenTypography() {
18
18
  const fontLibraryEnabled = useSelect(select => select(editorStore).getEditorSettings().fontLibraryEnabled, []);
19
19
  return createElement(Fragment, null, createElement(ScreenHeader, {
20
20
  title: __('Typography'),
21
- description: __('Manage the typography settings for different elements.')
21
+ description: __('Typography styles and the application of those styles on site elements.')
22
22
  }), createElement("div", {
23
- className: "edit-site-global-styles-screen-typography"
23
+ className: "edit-site-global-styles-screen"
24
24
  }, createElement(VStack, {
25
- spacing: 6
26
- }, createElement(TypographyVariations, null), !window.__experimentalDisableFontLibrary && createElement(VStack, {
27
- spacing: 3
28
- }, fontLibraryEnabled && createElement(FontFamilies, null)), createElement(TypographyElements, null))));
25
+ spacing: 7
26
+ }, createElement(TypographyVariations, {
27
+ title: __('Presets')
28
+ }), !window.__experimentalDisableFontLibrary && fontLibraryEnabled && createElement(FontFamilies, null), createElement(TypographyElements, null))));
29
29
  }
30
30
  export default ScreenTypography;
31
31
  //# sourceMappingURL=screen-typography.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","__experimentalVStack","VStack","store","editorStore","useSelect","TypographyElements","TypographyVariations","FontFamilies","ScreenHeader","ScreenTypography","fontLibraryEnabled","select","getEditorSettings","createElement","Fragment","title","description","className","spacing","window","__experimentalDisableFontLibrary"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport TypographyElements from './typography-elements';\nimport TypographyVariations from './variations/variations-typography';\nimport FontFamilies from './font-families';\nimport ScreenHeader from './header';\n\nfunction ScreenTypography() {\n\tconst fontLibraryEnabled = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().fontLibraryEnabled,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage the typography settings for different elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-typography\">\n\t\t\t\t<VStack spacing={ 6 }>\n\t\t\t\t\t<TypographyVariations />\n\t\t\t\t\t{ ! window.__experimentalDisableFontLibrary && (\n\t\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t\t{ fontLibraryEnabled && <FontFamilies /> }\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t) }\n\t\t\t\t\t<TypographyElements />\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,uBAAuB;AACtD,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,YAAY,MAAM,UAAU;AAEnC,SAASC,gBAAgBA,CAAA,EAAG;EAC3B,MAAMC,kBAAkB,GAAGN,SAAS,CACjCO,MAAM,IACPA,MAAM,CAAER,WAAY,CAAC,CAACS,iBAAiB,CAAC,CAAC,CAACF,kBAAkB,EAC7D,EACD,CAAC;EAED,OACCG,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACL,YAAY;IACZO,KAAK,EAAGhB,EAAE,CAAE,YAAa,CAAG;IAC5BiB,WAAW,EAAGjB,EAAE,CACf,wDACD;EAAG,CACH,CAAC,EACFc,aAAA;IAAKI,SAAS,EAAC;EAA2C,GACzDJ,aAAA,CAACZ,MAAM;IAACiB,OAAO,EAAG;EAAG,GACpBL,aAAA,CAACP,oBAAoB,MAAE,CAAC,EACtB,CAAEa,MAAM,CAACC,gCAAgC,IAC1CP,aAAA,CAACZ,MAAM;IAACiB,OAAO,EAAG;EAAG,GAClBR,kBAAkB,IAAIG,aAAA,CAACN,YAAY,MAAE,CAChC,CACR,EACDM,aAAA,CAACR,kBAAkB,MAAE,CACd,CACJ,CACJ,CAAC;AAEL;AAEA,eAAeI,gBAAgB"}
1
+ {"version":3,"names":["__","__experimentalVStack","VStack","store","editorStore","useSelect","TypographyElements","TypographyVariations","FontFamilies","ScreenHeader","ScreenTypography","fontLibraryEnabled","select","getEditorSettings","createElement","Fragment","title","description","className","spacing","window","__experimentalDisableFontLibrary"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport TypographyElements from './typography-elements';\nimport TypographyVariations from './variations/variations-typography';\nimport FontFamilies from './font-families';\nimport ScreenHeader from './header';\n\nfunction ScreenTypography() {\n\tconst fontLibraryEnabled = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().fontLibraryEnabled,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Typography styles and the application of those styles on site elements.'\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 spacing={ 7 }>\n\t\t\t\t\t<TypographyVariations title={ __( 'Presets' ) } />\n\t\t\t\t\t{ ! window.__experimentalDisableFontLibrary &&\n\t\t\t\t\t\tfontLibraryEnabled && <FontFamilies /> }\n\t\t\t\t\t<TypographyElements />\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,uBAAuB;AACtD,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,YAAY,MAAM,UAAU;AAEnC,SAASC,gBAAgBA,CAAA,EAAG;EAC3B,MAAMC,kBAAkB,GAAGN,SAAS,CACjCO,MAAM,IACPA,MAAM,CAAER,WAAY,CAAC,CAACS,iBAAiB,CAAC,CAAC,CAACF,kBAAkB,EAC7D,EACD,CAAC;EAED,OACCG,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACL,YAAY;IACZO,KAAK,EAAGhB,EAAE,CAAE,YAAa,CAAG;IAC5BiB,WAAW,EAAGjB,EAAE,CACf,yEACD;EAAG,CACH,CAAC,EACFc,aAAA;IAAKI,SAAS,EAAC;EAAgC,GAC9CJ,aAAA,CAACZ,MAAM;IAACiB,OAAO,EAAG;EAAG,GACpBL,aAAA,CAACP,oBAAoB;IAACS,KAAK,EAAGhB,EAAE,CAAE,SAAU;EAAG,CAAE,CAAC,EAChD,CAAEoB,MAAM,CAACC,gCAAgC,IAC1CV,kBAAkB,IAAIG,aAAA,CAACN,YAAY,MAAE,CAAC,EACvCM,aAAA,CAACR,kBAAkB,MAAE,CACd,CACJ,CACJ,CAAC;AAEL;AAEA,eAAeI,gBAAgB","ignoreList":[]}
@@ -13,7 +13,9 @@ import { __ } from '@wordpress/i18n';
13
13
  */
14
14
  import PreviewStyles from './preview-styles';
15
15
  import Variation from './variations/variation';
16
- export default function StyleVariationsContainer() {
16
+ export default function StyleVariationsContainer({
17
+ gap = 2
18
+ }) {
17
19
  const variations = useSelect(select => {
18
20
  return select(coreStore).__experimentalGetCurrentThemeGlobalStylesVariations();
19
21
  }, []);
@@ -33,7 +35,8 @@ export default function StyleVariationsContainer() {
33
35
  }, [variations]);
34
36
  return createElement(Grid, {
35
37
  columns: 2,
36
- className: "edit-site-global-styles-style-variations-container"
38
+ className: "edit-site-global-styles-style-variations-container",
39
+ gap: gap
37
40
  }, withEmptyVariation.map((variation, index) => createElement(Variation, {
38
41
  key: index,
39
42
  variation: variation
@@ -1 +1 @@
1
- {"version":3,"names":["store","coreStore","useSelect","useMemo","__experimentalGrid","Grid","__","PreviewStyles","Variation","StyleVariationsContainer","variations","select","__experimentalGetCurrentThemeGlobalStylesVariations","withEmptyVariation","title","settings","styles","map","variation","_variation$settings","_variation$styles","createElement","columns","className","index","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';\n\nexport default function StyleVariationsContainer() {\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\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...( variations ?? [] ).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}, [ variations ] );\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>\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":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;AAClE,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,SAAS,MAAM,wBAAwB;AAE9C,eAAe,SAASC,wBAAwBA,CAAA,EAAG;EAClD,MAAMC,UAAU,GAAGR,SAAS,CAAIS,MAAM,IAAM;IAC3C,OAAOA,MAAM,CACZV,SACD,CAAC,CAACW,mDAAmD,CAAC,CAAC;EACxD,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,kBAAkB,GAAGV,OAAO,CAAE,MAAM;IACzC,OAAO,CACN;MACCW,KAAK,EAAER,EAAE,CAAE,SAAU,CAAC;MACtBS,QAAQ,EAAE,CAAC,CAAC;MACZC,MAAM,EAAE,CAAC;IACV,CAAC,EACD,GAAG,CAAEN,UAAU,aAAVA,UAAU,cAAVA,UAAU,GAAI,EAAE,EAAGO,GAAG,CAAIC,SAAS;MAAA,IAAAC,mBAAA,EAAAC,iBAAA;MAAA,OAAQ;QAC/C,GAAGF,SAAS;QACZH,QAAQ,GAAAI,mBAAA,GAAED,SAAS,CAACH,QAAQ,cAAAI,mBAAA,cAAAA,mBAAA,GAAI,CAAC,CAAC;QAClCH,MAAM,GAAAI,iBAAA,GAAEF,SAAS,CAACF,MAAM,cAAAI,iBAAA,cAAAA,iBAAA,GAAI,CAAC;MAC9B,CAAC;IAAA,CAAG,CAAC,CACL;EACF,CAAC,EAAE,CAAEV,UAAU,CAAG,CAAC;EAEnB,OACCW,aAAA,CAAChB,IAAI;IACJiB,OAAO,EAAG,CAAG;IACbC,SAAS,EAAC;EAAoD,GAE5DV,kBAAkB,CAACI,GAAG,CAAE,CAAEC,SAAS,EAAEM,KAAK,KAC3CH,aAAA,CAACb,SAAS;IAACiB,GAAG,EAAGD,KAAO;IAACN,SAAS,EAAGA;EAAW,GAC3CQ,SAAS,IACZL,aAAA,CAACd,aAAa;IACboB,KAAK,EAAGT,SAAS,EAAEJ,KAAO;IAC1Bc,aAAa;IACbF,SAAS,EAAGA,SAAW;IACvBR,SAAS,EAAGA;EAAW,CACvB,CAEQ,CACV,CACG,CAAC;AAET"}
1
+ {"version":3,"names":["store","coreStore","useSelect","useMemo","__experimentalGrid","Grid","__","PreviewStyles","Variation","StyleVariationsContainer","gap","variations","select","__experimentalGetCurrentThemeGlobalStylesVariations","withEmptyVariation","title","settings","styles","map","variation","_variation$settings","_variation$styles","createElement","columns","className","index","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';\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\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...( variations ?? [] ).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}, [ variations ] );\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":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,SAAS,QAAQ,sB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KAAK,KAC3CH,aAAA,CAACd,SAAS;IAACkB,GAAG,EAAGD,KAAO;IAACN,SAAS,EAAGA;EAAW,GAC3CQ,SAAS,IACZL,aAAA,CAACf,aAAa;IACbqB,KAAK,EAAGT,SAAS,EAAEJ,KAAO;IAC1Bc,aAAa;IACbF,SAAS,EAAGA,SAAW;IACvBR,SAAS,EAAGA;EAAW,CACvB,CAEQ,CACV,CACG,CAAC;AAET","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalHeading","Heading","Subtitle","children","level","createElement","className"],"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":";AAAA;AACA;AACA;AACA,SAASA,qBAAqB,IAAIC,OAAO,QAAQ,uBAAuB;AAExE,SAASC,QAAQA,CAAE;EAAEC,QAAQ;EAAEC;AAAM,CAAC,EAAG;EACxC,OACCC,aAAA,CAACJ,OAAO;IACPK,SAAS,EAAC,kCAAkC;IAC5CF,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI;EAAG,GAElBD,QACM,CAAC;AAEZ;AAEA,eAAeD,QAAQ"}
1
+ {"version":3,"names":["__experimentalHeading","Heading","Subtitle","children","level","createElement","className"],"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":";AAAA;AACA;AACA;AACA,SAASA,qBAAqB,IAAIC,OAAO,QAAQ,uBAAuB;AAExE,SAASC,QAAQA,CAAE;EAAEC,QAAQ;EAAEC;AAAM,CAAC,EAAG;EACxC,OACCC,aAAA,CAACJ,OAAO;IACPK,SAAS,EAAC,kCAAkC;IAC5CF,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI;EAAG,GAElBD,QACM,CAAC;AAEZ;AAEA,eAAeD,QAAQ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","sprintf","__experimentalItemGroup","ItemGroup","__experimentalVStack","VStack","__experimentalHStack","HStack","FlexItem","privateApis","blockEditorPrivateApis","NavigationButtonAsItem","Subtitle","unlock","useGlobalStyle","ElementItem","parentMenu","element","label","_ref","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","fallbackBackgroundColor","gradientValue","color","navigationButtonLabel","createElement","path","justify","className","style","background","TypographyElements","spacing","level","isBordered","isSeparated"],"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":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,uBAAuB,IAAIC,SAAS,EACpCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,QAAQ,QACF,uBAAuB;AAC9B,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,qBAAqB;AAC5D,OAAOC,QAAQ,MAAM,YAAY;AAEjC,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,MAAM;EAAEC;AAAe,CAAC,GAAGD,MAAM,CAAEH,sBAAuB,CAAC;AAE3D,SAASK,WAAWA,CAAE;EAAEC,UAAU;EAAEC,OAAO;EAAEC;AAAM,CAAC,EAAG;EA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ACzB,CACS,CACJ,CAAC;AAEX;AAEA,eAAesC,kBAAkB"}
1
+ {"version":3,"names":["__","sprintf","__experimentalItemGroup","ItemGroup","__experimentalVStack","VStack","__experimentalHStack","HStack","FlexItem","privateApis","blockEditorPrivateApis","NavigationButtonAsItem","Subtitle","unlock","useGlobalStyle","ElementItem","parentMenu","element","label","_ref","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","fallbackBackgroundColor","gradientValue","color","navigationButtonLabel","createElement","path","justify","className","style","background","TypographyElements","spacing","level","isBordered","isSeparated"],"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":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,uBAAuB,IAAIC,SAAS,EACpCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,QAAQ,QACF,uBAAuB;AAC9B,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,qBAAqB;AAC5D,OAAOC,QAAQ,MAAM,YAAY;AAEjC,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,MAAM;EAAEC;AAAe,CAAC,GAAGD,MAAM,CAAEH,sBAAuB,CAAC;AAE3D,SAASK,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,CAAE,GAAGT,cAAc,CAAEM,MAAM,GAAG,uBAAwB,CAAC;EACzE,MAA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BAAkBA,CAAA,EAAG;EAC7B,MAAMtB,UAAU,GAAG,EAAE;EAErB,OACCgB,aAAA,CAAC3B,MAAM;IAACkC,OAAO,EAAG;EAAG,GACpBP,aAAA,CAACpB,QAAQ;IAAC4B,KAAK,EAAG;EAAG,GAAGxC,EAAE,CAAE,UAAW,CAAa,CAAC,EACrDgC,aAAA,CAAC7B,SAAS;IAACsC,UAAU;IAACC,WAAW;EAAA,GAChCV,aAAA,CAACjB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,MAAM;IACdC,KAAK,EAAGlB,EAAE,CAAE,MAAO;EAAG,CACtB,CAAC,EACFgC,aAAA,CAACjB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,MAAM;IACdC,KAAK,EAAGlB,EAAE,CAAE,OAAQ;EAAG,CACvB,CAAC,EACFgC,aAAA,CAACjB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,SAAS;IACjBC,KAAK,EAAGlB,EAAE,CAAE,UAAW;EAAG,CAC1B,CAAC,EACFgC,aAAA,CAACjB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,SAAS;IACjBC,KAAK,EAAGlB,EAAE,CAAE,UAAW;EAAG,CAC1B,CAAC,EACFgC,aAAA,CAACjB,WAAW;IACXC,UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,QAAQ;IAChBC,KAAK,EAAGlB,EAAE,CAAE,SAAU;EAAG,CACzB,CACS,CACJ,CAAC;AAEX;AAEA,eAAesC,kBAAkB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","__unstableMotion","motion","_x","privateApis","blockEditorPrivateApis","mergeBaseAndUserConfigs","unlock","getFamilyPreviewStyle","getFontFamilies","GlobalStylesContext","PreviewTypography","fontSize","variation","base","config","bodyFontFamilies","headingFontFamilies","bodyPreviewStyle","headingPreviewStyle","createElement","div","animate","scale","opacity","initial","transition","delay","type","style","textAlign"],"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';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport { unlock } from '../../lock-unlock';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\nimport { getFontFamilies } from './utils';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\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(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E;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;EAAG,GAEHV,aAAA;IAAMS,KAAK,EAAGV;EAAqB,GAChChB,EAAE,CAAE,GAAG,EAAE,oBAAqB,CAC3B,CAAC,EACPiB,aAAA;IAAMS,KAAK,EAAGX;EAAkB,GAC7Bf,EAAE,CAAE,GAAG,EAAE,oBAAqB,CAC3B,CACK,CAAC;AAEf"}
1
+ {"version":3,"names":["useContext","__unstableMotion","motion","_x","privateApis","blockEditorPrivateApis","mergeBaseAndUserConfigs","unlock","getFamilyPreviewStyle","getFontFamilies","GlobalStylesContext","PreviewTypography","fontSize","variation","base","config","bodyFontFamilies","headingFontFamilies","bodyPreviewStyle","headingPreviewStyle","createElement","div","animate","scale","opacity","initial","transition","delay","type","style","textAlign"],"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';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport { unlock } from '../../lock-unlock';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\nimport { getFontFamilies } from './utils';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\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":";AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAClE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,qBAAqB,QAAQ,2CAA2C;AACjF,SAASC,eAAe,QAAQ,SAAS;AAEzC,MAAM;EAAEC;AAAoB,CAAC,GAAGH,MAAM,CAAEF,sBAAuB,CAAC;AAEhE,eAAe,SAASM,iBAAiBA,CAAE;EAAEC,QAAQ;EAAEC;AAAU,CAAC,EAAG;EACpE,MAAM;IAAEC;EAAK,CAAC,GAAGd,UAAU,CAAEU,mBAAoB,CAAC;EAClD,IAAIK,MAAM,GAAGD,IAAI;EACjB,IAAKD,SAAS,EAAG;IAChBE,MAAM,GAAGT,uBAAuB,CAAEQ,IAAI,EAAED,SAAU,CAAC;EACpD;EACA,MAAM,CAAEG,gBAAgB,EAAEC,mBAAmB,CAAE,GAAGR,eAAe,CAAEM,MAAO,CAAC;EAC3E,MAAMG,gBAAgB,GAAGF,gBAAgB,GACtCR,qBAAqB,CAAEQ,gBAAiB,CAAC,GACzC,CAAC,CAAC;EACL,MAAMG,mBAAmB,GAAGF,mBAAmB,GAC5CT,qBAAqB,CAAES,mBAAoB,CAAC,GAC5C,CAAC,CAAC;EAEL,IAAKL,QAAQ,EAAG;IACfM,gBAAgB,CAACN,QAAQ,GAAGA,QAAQ;IACpCO,mBAAmB,CAACP,QAAQ,GAAGA,QAAQ;EACxC;EAEA,OACCQ,aAAA,CAAClB,MAAM,CAACmB,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;EAAG,GAEHV,aAAA;IAAMS,KAAK,EAAGV;EAAqB,GAChChB,EAAE,CAAE,GAAG,EAAE,oBAAqB,CAC3B,CAAC,EACPiB,aAAA;IAAMS,KAAK,EAAGX;EAAkB,GAC7Bf,EAAE,CAAE,GAAG,EAAE,oBAAqB,CAC3B,CACK,CAAC;AAEf","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["privateApis","blockEditorPrivateApis","unlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings","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":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EACLC,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,eAAe,EAAEC;AAClB,CAAC,GAAGL,MAAM,CAAED,sBAAuB,CAAC;AAEpC,eAAe,SAASK,eAAeA,CAAE;EAAEE,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,GAAGX,cAAc,CAAES,MAAM,EAAEG,SAAS,EAAE,MAAM,EAAE;IAC5DC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGf,cAAc,CAClDS,MAAM,EACNG,SAAS,EACT,KAAK,EACL;IACCC,kBAAkB,EAAE;EACrB,CACD,CAAC;EACD,MAAM,CAAEG,WAAW,CAAE,GAAGf,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMgB,WAAW,GAAGZ,OAAO,KAAK,SAAS,GAAGC,YAAY,GAAGD,OAAO;EAClE,MAAMa,QAAQ,GAAGhB,0BAA0B,CAC1Cc,WAAW,EACXJ,SAAS,EACTK,WACD,CAAC;EAED,OACCE,aAAA,CAACf,qBAAqB;IACrBgB,cAAc,EAAGN,cAAgB;IACjCO,KAAK,EAAGV,KAAO;IACfW,QAAQ,EAAGP,QAAU;IACrBG,QAAQ,EAAGA;EAAU,CACrB,CAAC;AAEJ"}
1
+ {"version":3,"names":["privateApis","blockEditorPrivateApis","unlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings","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":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EACLC,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,eAAe,EAAEC;AAClB,CAAC,GAAGL,MAAM,CAAED,sBAAuB,CAAC;AAEpC,eAAe,SAASK,eAAeA,CAAE;EAAEE,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,GAAGX,cAAc,CAAES,MAAM,EAAEG,SAAS,EAAE,MAAM,EAAE;IAC5DC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGf,cAAc,CAClDS,MAAM,EACNG,SAAS,EACT,KAAK,EACL;IACCC,kBAAkB,EAAE;EACrB,CACD,CAAC;EACD,MAAM,CAAEG,WAAW,CAAE,GAAGf,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMgB,WAAW,GAAGZ,OAAO,KAAK,SAAS,GAAGC,YAAY,GAAGD,OAAO;EAClE,MAAMa,QAAQ,GAAGhB,0BAA0B,CAC1Cc,WAAW,EACXJ,SAAS,EACTK,WACD,CAAC;EAED,OACCE,aAAA,CAACf,qBAAqB;IACrBgB,cAAc,EAAGN,cAAgB;IACjCO,KAAK,EAAGV,KAAO;IACfW,QAAQ,EAAGP,QAAU;IACrBG,QAAQ,EAAGA;EAAU,CACrB,CAAC;AAEJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["privateApis","blockEditorPrivateApis","unlock","useGlobalStyle","TypographyPreview","name","element","headingLevel","_ref","prefix","fontFamily","gradientValue","backgroundColor","fallbackBackgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","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 ?? fallback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AM,CAAEW,SAAS,CAAE,GAAGb,cAAc,CACnCM,MAAM,GAAG,sBAAsB,EAC/BJ,IACD,CAAC;EACD,MAAM,CAAEY,UAAU,CAAE,GAAGd,cAAc,CACpCM,MAAM,GAAG,uBAAuB,EAChCJ,IACD,CAAC;EACD,MAAM,CAAEa,aAAa,CAAE,GAAGf,cAAc,CACvCM,MAAM,GAAG,0BAA0B,EACnCJ,IACD,CAAC;EACD,MAAMc,WAAW,GAChBb,OAAO,KAAK,MAAM,GACf;IACAc,cAAc,EAAE;EAChB,CAAC,GACD,CAAC,CAAC;EAEN,OACCC,aAAA;IACCC,SAAS,EAAC,8BAA8B;IACxCC,KAAK,EAAG;MACPb,UAAU,EAAEA,UAAU,aAAVA,UAAU,cAAVA,UAAU,GAAI,OAAO;MACjCc,UAAU,GAAAhB,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"}
1
+ {"version":3,"names":["privateApis","blockEditorPrivateApis","unlock","useGlobalStyle","TypographyPreview","name","element","headingLevel","_ref","prefix","fontFamily","gradientValue","backgroundColor","fallbackBackgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","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":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAAe,CAAC,GAAGD,MAAM,CAAED,sBAAuB,CAAC;AAE3D,eAAe,SAASG,iBAAiBA,CAAE;EAAEC,IAAI;EAA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G;MACPb,UAAU,EAAEA,UAAU,aAAVA,UAAU,cAAVA,UAAU,GAAI,OAAO;MACjCc,UAAU,GAAAhB,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":[]}
@@ -27,6 +27,7 @@ import ScreenStyleVariations from './screen-style-variations';
27
27
  import StyleBook from '../style-book';
28
28
  import ScreenCSS from './screen-css';
29
29
  import ScreenRevisions from './screen-revisions';
30
+ import ScreenBackground from './screen-background';
30
31
  import { unlock } from '../../lock-unlock';
31
32
  import { store as editSiteStore } from '../../store';
32
33
  const SLOT_FILL_NAME = 'GlobalStylesMenu';
@@ -271,7 +272,9 @@ function GlobalStylesUI() {
271
272
  path: "/css"
272
273
  }, createElement(ScreenCSS, null)), createElement(GlobalStylesNavigationScreen, {
273
274
  path: '/revisions'
274
- }, createElement(ScreenRevisions, null)), blocks.map(block => createElement(GlobalStylesNavigationScreen, {
275
+ }, createElement(ScreenRevisions, null)), createElement(GlobalStylesNavigationScreen, {
276
+ path: '/background'
277
+ }, createElement(ScreenBackground, null)), blocks.map(block => createElement(GlobalStylesNavigationScreen, {
275
278
  key: 'menu-block-' + block.name,
276
279
  path: '/blocks/' + encodeURIComponent(block.name)
277
280
  }, createElement(ScreenBlock, {
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalNavigatorProvider","NavigatorProvider","__experimentalNavigatorScreen","NavigatorScreen","__experimentalUseNavigator","useNavigator","createSlotFill","DropdownMenu","MenuGroup","MenuItem","getBlockTypes","store","blocksStore","useSelect","useDispatch","privateApis","blockEditorPrivateApis","blockEditorStore","__","preferencesStore","moreVertical","coreStore","useEffect","ScreenRoot","useBlockHasGlobalStyles","default","ScreenBlockList","ScreenBlock","ScreenTypography","ScreenTypographyElement","ScreenColors","ScreenColorPalette","ScreenLayout","ScreenStyleVariations","StyleBook","ScreenCSS","ScreenRevisions","unlock","editSiteStore","SLOT_FILL_NAME","useGlobalStylesReset","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","GlobalStylesActionMenu","canReset","onReset","toggle","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","setEditorCanvasContainerView","goTo","loadCustomCSS","createElement","icon","label","onClose","Fragment","onClick","disabled","GlobalStylesNavigationScreen","className","props","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","key","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","clientId","blockHasGlobalStyles","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","isRevisionsOpen","GlobalStylesUI","blocks","initialPath","element","block"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\tgoTo( '/css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tgoTo( '/revisions' );\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\tcase 'style-book':\n\t\t\t\t/*\n\t\t\t\t * The stand-alone style book is open\n\t\t\t\t * and the revisions panel is open,\n\t\t\t\t * close the revisions panel.\n\t\t\t\t * Otherwise keep the style book open while\n\t\t\t\t * browsing global styles panel.\n\t\t\t\t */\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/*\n\t\t\t\t * Example: the user has navigated to \"Browse styles\" or elsewhere\n\t\t\t\t * and changes the editorCanvasContainerView, e.g., closes the style book.\n\t\t\t\t * The panel should not be affected.\n\t\t\t\t * Exclude revisions panel from this behavior,\n\t\t\t\t * as it should close when the editorCanvasContainerView doesn't correspond.\n\t\t\t\t */\n\t\t\t\tif ( path !== '/' && ! isRevisionsOpen ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgoTo( '/' );\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,+BAA+B,IAAIC,iBAAiB,EACpDC,6BAA6B,IAAIC,eAAe,EAChDC,0BAA0B,IAAIC,YAAY,EAC1CC,cAAc,EACdC,YAAY,EACZC,SAAS,EACTC,QAAQ,QACF,uBAAuB;AAC9B,SAASC,aAAa,EAAEC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACvE,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,WAAW,IAAIC,sBAAsB,EACrCL,KAAK,IAAIM,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAAST,KAAK,IAAIU,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;AACA,OAAOC,UAAU,MAAM,eAAe;AACtC,SACCC,uBAAuB,EACvBC,OAAO,IAAIC,eAAe,QACpB,qBAAqB;AAC5B,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,uBAAuB,MAAM,6BAA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AC3CrB,aAAA,CAAC5B,YAAY,MAAE,CACc,CAAC,EAE/B4B,aAAA,CAACO,4BAA4B;IAACc,IAAI,EAAC;EAAM,GACxCrB,aAAA,CAACzB,SAAS,MAAE,CACiB,CAAC,EAE/ByB,aAAA,CAACO,4BAA4B;IAACc,IAAI,EAAG;EAAc,GAClDrB,aAAA,CAACxB,eAAe,MAAE,CACW,CAAC,EAE7B0E,MAAM,CAACjC,GAAG,CAAIoC,KAAK,IACpBrD,aAAA,CAACO,4BAA4B;IAC5Ba,GAAG,EAAG,aAAa,GAAGiC,KAAK,CAAC/B,IAAM;IAClCD,IAAI,EAAG,UAAU,GAAGW,kBAAkB,CAAEqB,KAAK,CAAC/B,IAAK;EAAG,GAEtDtB,aAAA,CAACjC,WAAW;IAACuD,IAAI,EAAG+B,KAAK,CAAC/B;EAAM,CAAE,CACL,CAC7B,CAAC,EAEHtB,aAAA,CAACwB,cAAc,MAAE,CAAC,EAEhB0B,MAAM,CAACjC,GAAG,CAAIoC,KAAK,IACpBrD,aAAA,CAACwB,cAAc;IACdJ,GAAG,EAAG,gBAAgB,GAAGiC,KAAK,CAAC/B,IAAM;IACrCA,IAAI,EAAG+B,KAAK,CAAC/B,IAAM;IACnBR,UAAU,EAAG,UAAU,GAAGkB,kBAAkB,CAAEqB,KAAK,CAAC/B,IAAK;EAAG,CAC5D,CACA,CAAC,EAED,YAAY,KAAKwB,yBAAyB,IAC3C9C,aAAA,CAAC4B,qBAAqB,MAAE,CACxB,EAED5B,aAAA,CAACf,sBAAsB,MAAE,CAAC,EAC1Be,aAAA,CAACmC,qBAAqB,MAAE,CAAC,EACzBnC,aAAA,CAAC6C,qCAAqC,MAAE,CACtB,CAAC;AAEtB;AACA,SAAS/D,oBAAoB;AAC7B,eAAemE,cAAc"}
1
+ {"version":3,"names":["__experimentalNavigatorProvider","NavigatorProvider","__experimentalNavigatorScreen","NavigatorScreen","__experimentalUseNavigator","useNavigator","createSlotFill","DropdownMenu","MenuGroup","MenuItem","getBlockTypes","store","blocksStore","useSelect","useDispatch","privateApis","blockEditorPrivateApis","blockEditorStore","__","preferencesStore","moreVertical","coreStore","useEffect","ScreenRoot","useBlockHasGlobalStyles","default","ScreenBlockList","ScreenBlock","ScreenTypography","ScreenTypographyElement","ScreenColors","ScreenColorPalette","ScreenLayout","ScreenStyleVariations","StyleBook","ScreenCSS","ScreenRevisions","ScreenBackground","unlock","editSiteStore","SLOT_FILL_NAME","useGlobalStylesReset","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","GlobalStylesActionMenu","canReset","onReset","toggle","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","setEditorCanvasContainerView","goTo","loadCustomCSS","createElement","icon","label","onClose","Fragment","onClick","disabled","GlobalStylesNavigationScreen","className","props","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","key","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","clientId","blockHasGlobalStyles","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","isRevisionsOpen","GlobalStylesUI","blocks","initialPath","element","block"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport ScreenBackground from './screen-background';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\tgoTo( '/css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tgoTo( '/revisions' );\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\tcase 'style-book':\n\t\t\t\t/*\n\t\t\t\t * The stand-alone style book is open\n\t\t\t\t * and the revisions panel is open,\n\t\t\t\t * close the revisions panel.\n\t\t\t\t * Otherwise keep the style book open while\n\t\t\t\t * browsing global styles panel.\n\t\t\t\t */\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/*\n\t\t\t\t * Example: the user has navigated to \"Browse styles\" or elsewhere\n\t\t\t\t * and changes the editorCanvasContainerView, e.g., closes the style book.\n\t\t\t\t * The panel should not be affected.\n\t\t\t\t * Exclude revisions panel from this behavior,\n\t\t\t\t * as it should close when the editorCanvasContainerView doesn't correspond.\n\t\t\t\t */\n\t\t\t\tif ( path !== '/' && ! isRevisionsOpen ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgoTo( '/' );\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/background' }>\n\t\t\t\t<ScreenBackground />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,+BAA+B,IAAIC,iBAAiB,EACpDC,6BAA6B,IAAIC,eAAe,EAChDC,0BAA0B,IAAIC,YAAY,EAC1CC,cAAc,EACdC,YAAY,EACZC,SAAS,EACTC,QAAQ,QACF,uBAAuB;AAC9B,SAASC,aAAa,EAAEC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACvE,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,WAAW,IAAIC,sBAAsB,EACrCL,KAAK,IAAIM,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAAST,KAAK,IA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EAAG,CAC5D,CACA,CAAC,EAED,YAAY,KAAKwB,yBAAyB,IAC3C9C,aAAA,CAAC4B,qBAAqB,MAAE,CACxB,EAED5B,aAAA,CAACf,sBAAsB,MAAE,CAAC,EAC1Be,aAAA,CAACmC,qBAAqB,MAAE,CAAC,EACzBnC,aAAA,CAAC6C,qCAAqC,MAAE,CACtB,CAAC;AAEtB;AACA,SAAS/D,oBAAoB;AAC7B,eAAemE,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getVariationClassName","variation","getFontFamilyFromSetting","fontFamilies","setting","Array","isArray","fontFamilyVariable","replace","fontFamilySlug","split","slice","find","fontFamily","slug","getFontFamilies","themeJson","settings","typography","theme","bodyFontFamilySetting","styles","bodyFontFamily","headingFontFamilySetting","elements","heading","headingFontFamily"],"sources":["@wordpress/edit-site/src/components/global-styles/utils.js"],"sourcesContent":["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst fontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; // TODO this could not be under theme.\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,qBAAqBA,CAAEC,SAAS,EAAG;EAClD,IAAK,CAAEA,SAAS,EAAG;IAClB,OAAO,EAAE;EACV;EACA,OAAQ,YAAYA,SAAW,EAAC;AACjC;AAEA,SAASC,wBAAwBA,CAAEC,YAAY,EAAEC,OAAO,EAAG;EAC1D,IAAK,CAAEC,KAAK,CAACC,OAAO,CAAEH,YAAa,CAAC,IAAI,CAAEC,OAAO,EAAG;IACnD,OAAO,IAAI;EACZ;EAEA,MAAMG,kBAAkB,GAAGH,OAAO,CAACI,OAAO,CAAE,MAAM,EAAE,EAAG,CAAC,CAACA,OAAO,CAAE,GAAG,EAAE,EAAG,CAAC;EAC3E,MAAMC,cAAc,GAAGF,kBAAkB,EAAEG,KAAK,CAAE,IAAK,CAAC,CAACC,KAAK,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE;EAEzE,OAAOR,YAAY,CAACS,IAAI,CACrBC,UAAU,IAAMA,UAAU,CAACC,IAAI,KAAKL,cACvC,CAAC;AACF;AAEA,OAAO,SAASM,eAAeA,CAAEC,SAAS,EAAG;EAC5C,MAAMb,YAAY,GAAGa,SAAS,EAAEC,QAAQ,EAAEC,UAAU,EAAEf,YAAY,EAAEgB,KAAK,CAAC,CAAC;EAC3E,MAAMC,qBAAqB,GAAGJ,SAAS,EAAEK,MAAM,EAAEH,UAAU,EAAEL,UAAU;EACvE,MAAMS,cAAc,GAAGpB,wBAAwB,CAC9CC,YAAY,EACZiB,qBACD,CAAC;EAED,MAAMG,wBAAwB,GAC7BP,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UAAU;EAE7D,IAAIa,iBAAiB;EACrB,IAAK,CAAEH,wBAAwB,EAAG;IACjCG,iBAAiB,GAAGJ,cAAc;EACnC,CAAC,MAAM;IACNI,iBAAiB,GAAGxB,wBAAwB,CAC3CC,YAAY,EACZa,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UACnD,CAAC;EACF;EAEA,OAAO,CAAES,cAAc,EAAEI,iBAAiB,CAAE;AAC7C"}
1
+ {"version":3,"names":["getVariationClassName","variation","getFontFamilyFromSetting","fontFamilies","setting","Array","isArray","fontFamilyVariable","replace","fontFamilySlug","split","slice","find","fontFamily","slug","getFontFamilies","themeJson","settings","typography","theme","bodyFontFamilySetting","styles","bodyFontFamily","headingFontFamilySetting","elements","heading","headingFontFamily"],"sources":["@wordpress/edit-site/src/components/global-styles/utils.js"],"sourcesContent":["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst fontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; // TODO this could not be under theme.\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,qBAAqBA,CAAEC,SAAS,EAAG;EAClD,IAAK,CAAEA,SAAS,EAAG;IAClB,OAAO,EAAE;EACV;EACA,OAAQ,YAAYA,SAAW,EAAC;AACjC;AAEA,SAASC,wBAAwBA,CAAEC,YAAY,EAAEC,OAAO,EAAG;EAC1D,IAAK,CAAEC,KAAK,CAACC,OAAO,CAAEH,YAAa,CAAC,IAAI,CAAEC,OAAO,EAAG;IACnD,OAAO,IAAI;EACZ;EAEA,MAAMG,kBAAkB,GAAGH,OAAO,CAACI,OAAO,CAAE,MAAM,EAAE,EAAG,CAAC,CAACA,OAAO,CAAE,GAAG,EAAE,EAAG,CAAC;EAC3E,MAAMC,cAAc,GAAGF,kBAAkB,EAAEG,KAAK,CAAE,IAAK,CAAC,CAACC,KAAK,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE;EAEzE,OAAOR,YAAY,CAACS,IAAI,CACrBC,UAAU,IAAMA,UAAU,CAACC,IAAI,KAAKL,cACvC,CAAC;AACF;AAEA,OAAO,SAASM,eAAeA,CAAEC,SAAS,EAAG;EAC5C,MAAMb,YAAY,GAAGa,SAAS,EAAEC,QAAQ,EAAEC,UAAU,EAAEf,YAAY,EAAEgB,KAAK,CAAC,CAAC;EAC3E,MAAMC,qBAAqB,GAAGJ,SAAS,EAAEK,MAAM,EAAEH,UAAU,EAAEL,UAAU;EACvE,MAAMS,cAAc,GAAGpB,wBAAwB,CAC9CC,YAAY,EACZiB,qBACD,CAAC;EAED,MAAMG,wBAAwB,GAC7BP,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UAAU;EAE7D,IAAIa,iBAAiB;EACrB,IAAK,CAAEH,wBAAwB,EAAG;IACjCG,iBAAiB,GAAGJ,cAAc;EACnC,CAAC,MAAM;IACNI,iBAAiB,GAAGxB,wBAAwB,CAC3CC,YAAY,EACZa,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UACnD,CAAC;EACF;EAEA,OAAO,CAAES,cAAc,EAAEI,iBAAiB,CAAE;AAC7C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useMemo","useContext","useState","ENTER","__","sprintf","privateApis","blockEditorPrivateApis","mergeBaseAndUserConfigs","unlock","GlobalStylesContext","areGlobalStyleConfigsEqual","Variation","variation","children","isFocused","setIsFocused","base","user","setUserConfig","context","_variation$settings","_variation$styles","settings","styles","merged","selectVariation","selectOnEnter","event","keyCode","preventDefault","isActive","label","title","description","createElement","Provider","value","className","role","onClick","onKeyDown","tabIndex","onFocus","onBlur"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variation.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../global-styles-provider';\nimport { unlock } from '../../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( { variation, children } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo(\n\t\t() => ( {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t} ),\n\t\t[ variation, base ]\n\t);\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => ( {\n\t\t\tsettings: variation.settings,\n\t\t\tstyles: variation.styles,\n\t\t} ) );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ label }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t{ children( isFocused ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA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AACU,QAAQ;MAC5BC,MAAM,EAAEX,SAAS,CAACW;IACnB,CAAC,CAAG,CAAC;EACN,CAAC;EAED,MAAMG,aAAa,GAAKC,KAAK,IAAM;IAClC,IAAKA,KAAK,CAACC,OAAO,KAAK1B,KAAK,EAAG;MAC9ByB,KAAK,CAACE,cAAc,CAAC,CAAC;MACtBJ,eAAe,CAAC,CAAC;IAClB;EACD,CAAC;EAED,MAAMK,QAAQ,GAAG/B,OAAO,CACvB,MAAMW,0BAA0B,CAAEO,IAAI,EAAEL,SAAU,CAAC,EACnD,CAAEK,IAAI,EAAEL,SAAS,CAClB,CAAC;EAED,IAAImB,KAAK,GAAGnB,SAAS,EAAEoB,KAAK;EAC5B,IAAKpB,SAAS,EAAEqB,WAAW,EAAG;IAC7BF,KAAK,GAAG3B,OAAO,EACd;IACAD,EAAE,CAAE,aAAc,CAAC,EACnBS,SAAS,EAAEoB,KAAK,EAChBpB,SAAS,EAAEqB,WACZ,CAAC;EACF;EAEA,OACCC,aAAA,CAACzB,mBAAmB,CAAC0B,QAAQ;IAACC,KAAK,EAAGjB;EAAS,GAC9Ce,aAAA;IACCG,SAAS,EAAGvC,UAAU,CACrB,yCAAyC,EACzC;MACC,WAAW,EAAEgC;IACd,CACD,CAAG;IACHQ,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAGd,eAAiB;IAC3Be,SAAS,EAAGd,aAAe;IAC3Be,QAAQ,EAAC,GAAG;IACZ,cAAaV,KAAO;IACpB,gBAAeD,QAAU;IACzBY,OAAO,EAAGA,CAAA,KAAM3B,YAAY,CAAE,IAAK,CAAG;IACtC4B,MAAM,EAAGA,CAAA,KAAM5B,YAAY,CAAE,KAAM;EAAG,GAEtCmB,aAAA;IAAKG,SAAS,EAAC;EAAiD,GAC7DxB,QAAQ,CAAEC,SAAU,CAClB,CACD,CACwB,CAAC;AAEjC"}
1
+ {"version":3,"names":["classnames","useMemo","useContext","useState","ENTER","__","sprintf","privateApis","blockEditorPrivateApis","mergeBaseAndUserConfigs","unlock","GlobalStylesContext","areGlobalStyleConfigsEqual","Variation","variation","children","isFocused","setIsFocused","base","user","setUserConfig","context","_variation$settings","_variation$styles","settings","styles","merged","selectVariation","selectOnEnter","event","keyCode","preventDefault","isActive","label","title","description","createElement","Provider","value","className","role","onClick","onKeyDown","tabIndex","onFocus","onBlur"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variation.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../global-styles-provider';\nimport { unlock } from '../../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( { variation, children } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo(\n\t\t() => ( {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t} ),\n\t\t[ variation, base ]\n\t);\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => ( {\n\t\t\tsettings: variation.settings,\n\t\t\tstyles: variation.styles,\n\t\t} ) );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ label }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t{ children( isFocused ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;AAClE,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC,mBAAmB;EAAEC;AAA2B,CAAC,GAAGF,MAAM,CACjEF,sBACD,CAAC;AAED,eAAe,SAASK,SAASA,CAAE;EAAEC,SAAS;EAAEC;AAAS,CAAC,EAAG;EAC5D,MAAM,CAAEC,SAAS,EAAEC,Y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IACAD,EAAE,CAAE,aAAc,CAAC,EACnBS,SAAS,EAAEoB,KAAK,EAChBpB,SAAS,EAAEqB,WACZ,CAAC;EACF;EAEA,OACCC,aAAA,CAACzB,mBAAmB,CAAC0B,QAAQ;IAACC,KAAK,EAAGjB;EAAS,GAC9Ce,aAAA;IACCG,SAAS,EAAGvC,UAAU,CACrB,yCAAyC,EACzC;MACC,WAAW,EAAEgC;IACd,CACD,CAAG;IACHQ,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAGd,eAAiB;IAC3Be,SAAS,EAAGd,aAAe;IAC3Be,QAAQ,EAAC,GAAG;IACZ,cAAaV,KAAO;IACpB,gBAAeD,QAAU;IACzBY,OAAO,EAAGA,CAAA,KAAM3B,YAAY,CAAE,IAAK,CAAG;IACtC4B,MAAM,EAAGA,CAAA,KAAM5B,YAAY,CAAE,KAAM;EAAG,GAEtCmB,aAAA;IAAKG,SAAS,EAAC;EAAiD,GAC7DxB,QAAQ,CAAEC,SAAU,CAClB,CACD,CACwB,CAAC;AAEjC","ignoreList":[]}
@@ -10,15 +10,22 @@ import { __experimentalGrid as Grid, __experimentalVStack as VStack } from '@wor
10
10
  import Variation from './variation';
11
11
  import StylesPreviewColors from '../preview-colors';
12
12
  import { useColorVariations } from '../hooks';
13
- export default function ColorVariations() {
13
+ import Subtitle from '../subtitle';
14
+ export default function ColorVariations({
15
+ title,
16
+ gap = 2
17
+ }) {
14
18
  const colorVariations = useColorVariations();
15
19
  if (!colorVariations?.length) {
16
20
  return null;
17
21
  }
18
22
  return createElement(VStack, {
19
23
  spacing: 3
20
- }, createElement(Grid, {
21
- columns: 3
24
+ }, title && createElement(Subtitle, {
25
+ level: 3
26
+ }, title), createElement(Grid, {
27
+ columns: 3,
28
+ gap: gap
22
29
  }, colorVariations.map((variation, index) => createElement(Variation, {
23
30
  key: index,
24
31
  variation: variation
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalGrid","Grid","__experimentalVStack","VStack","Variation","StylesPreviewColors","useColorVariations","ColorVariations","colorVariations","length","createElement","spacing","columns","map","variation","index","key"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Variation from './variation';\nimport StylesPreviewColors from '../preview-colors';\nimport { useColorVariations } from '../hooks';\n\nexport default function ColorVariations() {\n\tconst colorVariations = useColorVariations();\n\n\tif ( ! colorVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Grid columns={ 3 }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,kBAAkB,IAAIC,IAAI,EAC1BC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;;AAE9B;AACA;AACA;AACA,OAAOC,SAAS,MAAM,aAAa;AACnC,OAAOC,mBAAmB,MAAM,mBAAmB;AACnD,SAASC,kBAAkB,QAAQ,UAAU;AAE7C,eAAe,SAASC,eAAeA,CAAA,EAAG;EACzC,MAAMC,eAAe,GAAGF,kBAAkB,CAAC,CAAC;EAE5C,IAAK,CAAEE,eAAe,EAAEC,MAAM,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,OACCC,aAAA,CAACP,MAAM;IAACQ,OAAO,EAAG;EAAG,GACpBD,aAAA,CAACT,IAAI;IAACW,OAAO,EAAG;EAAG,GAChBJ,eAAe,CAACK,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KACxCL,aAAA,CAACN,SAAS;IAACY,GAAG,EAAGD,KAAO;IAACD,SAAS,EAAGA;EAAW,GAC7C,MAAMJ,aAAA,CAACL,mBAAmB,MAAE,CACpB,CACV,CACG,CACC,CAAC;AAEX"}
1
+ {"version":3,"names":["__experimentalGrid","Grid","__experimentalVStack","VStack","Variation","StylesPreviewColors","useColorVariations","Subtitle","ColorVariations","title","gap","colorVariations","length","createElement","spacing","level","columns","map","variation","index","key"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Variation from './variation';\nimport StylesPreviewColors from '../preview-colors';\nimport { useColorVariations } from '../hooks';\nimport Subtitle from '../subtitle';\n\nexport default function ColorVariations( { title, gap = 2 } ) {\n\tconst colorVariations = useColorVariations();\n\n\tif ( ! colorVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid columns={ 3 } gap={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,kBAAkB,IAAIC,IAAI,EAC1BC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;;AAE9B;AACA;AACA;AACA,OAAOC,SAAS,MAAM,aAAa;AACnC,OAAOC,mBAAmB,MAAM,mBAAmB;AACnD,SAASC,kBAAkB,QAAQ,UAAU;AAC7C,OAAOC,QAAQ,MAAM,aAAa;AAElC,eAAe,SAASC,eAAeA,CAAE;EAAEC,KAAK;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAC7D,MAAMC,eAAe,GAAGL,kBAAkB,CAAC,CAAC;EAE5C,IAAK,CAAEK,eAAe,EAAEC,MAAM,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,OACCC,aAAA,CAACV,MAAM;IAACW,OAAO,EAAG;EAAG,GAClBL,KAAK,IAAII,aAAA,CAACN,QAAQ;IAACQ,KAAK,EAAG;EAAG,GAAGN,KAAiB,CAAC,EACrDI,aAAA,CAACZ,IAAI;IAACe,OAAO,EAAG,CAAG;IAACN,GAAG,EAAGA;EAAK,GAC5BC,eAAe,CAACM,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KACxCN,aAAA,CAACT,SAAS;IAACgB,GAAG,EAAGD,KAAO;IAACD,SAAS,EAAGA;EAAW,GAC7C,MAAML,aAAA,CAACR,mBAAmB,MAAE,CACpB,CACV,CACG,CACC,CAAC;AAEX","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","useSelect","__experimentalItemGroup","ItemGroup","NavigationButtonAsItem","getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","select","getBlockStyles","coreBlockStyles","VariationsPanel","createElement","isBordered","isSeparated","map","index","isDefault","key","path","encodeURIComponent","label"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from '../navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,uBAAuB,IAAIC,SAAS,QAAQ,uBAAuB;AAC5E;AACA;AACA;;AAEA,SAASC,sBAAsB,QAAQ,sBAAsB;AAE7D,SAASC,kBAAkBA,CAAEC,WAAW,EAAG;EAC1C,OAAOA,WAAW,EAAEC,MAAM,CAAIC,KAAK,IAAMA,KAAK,CAACC,MAAM,KAAK,OAAQ,CAAC;AACpE;AAEA,OAAO,SAASC,kBAAkBA,CAAEC,IAAI,EAAG;EAC1C,MAAML,WAAW,GAAGL,SAAS,CAC1BW,MAAM,IAAM;IACb,MAAM;MAAEC;IAAe,CAAC,GAAGD,MAAM,CAAEZ,WAAY,CAAC;IAChD,OAAOa,cAAc,CAAEF,IAAK,CAAC;EAC9B,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EACD,MAAMG,eAAe,GAAGT,kBAAkB,CAAEC,WAAY,CAAC;EACzD,OAAOQ,eAAe;AACvB;AAEA,OAAO,SAASC,eAAeA,CAAE;EAAEJ;AAAK,CAAC,EAAG;EAC3C,MAAMG,eAAe,GAAGJ,kBAAkB,CAAEC,IAAK,CAAC;EAElD,OACCK,aAAA,CAACb,SAAS;IAACc,UAAU;IAACC,WAAW;EAAA,GAC9BJ,eAAe,CAACK,GAAG,CAAE,CAAEX,KAAK,EAAEY,KAAK,KAAM;IAC1C,IAAKZ,KAAK,EAAEa,SAAS,EAAG;MACvB,OAAO,IAAI;IACZ;IACA,OACCL,aAAA,CAACZ,sBAAsB;MACtBkB,GAAG,EAAGF,KAAO;MACbG,IAAI,EACH,UAAU,GACVC,kBAAkB,CAAEb,IAAK,CAAC,GAC1B,cAAc,GACda,kBAAkB,CAAEhB,KAAK,CAACG,IAAK,CAC/B;MACD,cAAaH,KAAK,CAACiB;IAAO,GAExBjB,KAAK,CAACiB,KACe,CAAC;EAE3B,CAAE,CACQ,CAAC;AAEd"}
1
+ {"version":3,"names":["store","blocksStore","useSelect","__experimentalItemGroup","ItemGroup","NavigationButtonAsItem","getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","select","getBlockStyles","coreBlockStyles","VariationsPanel","createElement","isBordered","isSeparated","map","index","isDefault","key","path","encodeURIComponent","label"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from '../navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,uBAAuB,IAAIC,SAAS,QAAQ,uBAAuB;AAC5E;AACA;AACA;;AAEA,SAASC,sBAAsB,QAAQ,sBAAsB;AAE7D,SAASC,kBAAkBA,CAAEC,WAAW,EAAG;EAC1C,OAAOA,WAAW,EAAEC,MAAM,CAAIC,KAAK,IAAMA,KAAK,CAACC,MAAM,KAAK,OAAQ,CAAC;AACpE;AAEA,OAAO,SAASC,kBAAkBA,CAAEC,IAAI,EAAG;EAC1C,MAAML,WAAW,GAAGL,SAAS,CAC1BW,MAAM,IAAM;IACb,MAAM;MAAEC;IAAe,CAAC,GAAGD,MAAM,CAAEZ,WAAY,CAAC;IAChD,OAAOa,cAAc,CAAEF,IAAK,CAAC;EAC9B,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EACD,MAAMG,eAAe,GAAGT,kBAAkB,CAAEC,WAAY,CAAC;EACzD,OAAOQ,eAAe;AACvB;AAEA,OAAO,SAASC,eAAeA,CAAE;EAAEJ;AAAK,CAAC,EAAG;EAC3C,MAAMG,eAAe,GAAGJ,kBAAkB,CAAEC,IAAK,CAAC;EAElD,OACCK,aAAA,CAACb,SAAS;IAACc,UAAU;IAACC,WAAW;EAAA,GAC9BJ,eAAe,CAACK,GAAG,CAAE,CAAEX,KAAK,EAAEY,KAAK,KAAM;IAC1C,IAAKZ,KAAK,EAAEa,SAAS,EAAG;MACvB,OAAO,IAAI;IACZ;IACA,OACCL,aAAA,CAACZ,sBAAsB;MACtBkB,GAAG,EAAGF,KAAO;MACbG,IAAI,EACH,UAAU,GACVC,kBAAkB,CAAEb,IAAK,CAAC,GAC1B,cAAc,GACda,kBAAkB,CAAEhB,KAAK,CAACG,IAAK,CAC/B;MACD,cAAaH,KAAK,CAACiB;IAAO,GAExBjB,KAAK,CAACiB,KACe,CAAC;EAE3B,CAAE,CACQ,CAAC;AAEd","ignoreList":[]}
@@ -11,15 +11,22 @@ import { useTypographyVariations } from '../hooks';
11
11
  import TypographyExample from '../typography-example';
12
12
  import PreviewIframe from '../preview-iframe';
13
13
  import Variation from './variation';
14
- export default function TypographyVariations() {
14
+ import Subtitle from '../subtitle';
15
+ export default function TypographyVariations({
16
+ title,
17
+ gap = 2
18
+ }) {
15
19
  const typographyVariations = useTypographyVariations();
16
20
  if (!typographyVariations?.length) {
17
21
  return null;
18
22
  }
19
23
  return createElement(VStack, {
20
24
  spacing: 3
21
- }, createElement(Grid, {
25
+ }, title && createElement(Subtitle, {
26
+ level: 3
27
+ }, title), createElement(Grid, {
22
28
  columns: 3,
29
+ gap: gap,
23
30
  className: "edit-site-global-styles-style-variations-container"
24
31
  }, typographyVariations && typographyVariations.length && typographyVariations.map((variation, index) => createElement(Variation, {
25
32
  key: index,
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalGrid","Grid","__experimentalVStack","HStack","VStack","useTypographyVariations","TypographyExample","PreviewIframe","Variation","TypographyVariations","typographyVariations","length","createElement","spacing","columns","className","map","variation","index","key","isFocused","label","title","ratio","justify","style","height","overflow","fontSize"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useTypographyVariations } from '../hooks';\nimport TypographyExample from '../typography-example';\nimport PreviewIframe from '../preview-iframe';\nimport Variation from './variation';\n\nexport default function TypographyVariations() {\n\tconst typographyVariations = useTypographyVariations();\n\n\tif ( ! typographyVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations &&\n\t\t\t\t\ttypographyVariations.length &&\n\t\t\t\t\ttypographyVariations.map( ( variation, index ) => (\n\t\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t\t\t<PreviewIframe\n\t\t\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\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CAAE;IAAEG,KAAK;IAAEJ;EAAI,CAAC,KACjBP,aAAA,CAACT,MAAM;IACNgB,GAAG,EAAGA,GAAK;IACXN,OAAO,EAAG,EAAE,GAAGU,KAAO;IACtBC,OAAO,EAAC,QAAQ;IAChBC,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEHf,aAAA,CAACN,iBAAiB;IACjBW,SAAS,EAAGA,SAAW;IACvBW,QAAQ,EAAG,EAAE,GAAGL;EAAO,CACvB,CACM,CAEK,CAEN,CACV,CACE,CACC,CAAC;AAEX"}
1
+ {"version":3,"names":["__experimentalGrid","Grid","__experimentalVStack","HStack","VStack","useTypographyVariations","TypographyExample","PreviewIframe","Variation","Subtitle","TypographyVariations","title","gap","typographyVariations","length","createElement","spacing","level","columns","className","map","variation","index","key","isFocused","label","ratio","justify","style","height","overflow","fontSize"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useTypographyVariations } from '../hooks';\nimport TypographyExample from '../typography-example';\nimport PreviewIframe from '../preview-iframe';\nimport Variation from './variation';\nimport Subtitle from '../subtitle';\n\nexport default function TypographyVariations( { title, gap = 2 } ) {\n\tconst typographyVariations = useTypographyVariations();\n\n\tif ( ! typographyVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tgap={ gap }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations &&\n\t\t\t\t\ttypographyVariations.length &&\n\t\t\t\t\ttypographyVariations.map( ( variation, index ) => (\n\t\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t\t\t<PreviewIframe\n\t\t\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t\t\t\t\t\tfontSize={ 85 * ratio }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</PreviewIframe>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Variation>\n\t\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,kBAAkB,IAAIC,IAAI,EAC1BC,oBAAoB,IAAIC,MAAM,EAC9BD,oBAAoB,IAAIE,MAAM,QACxB,uBAAuB;;AAE9B;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,UAAU;AAClD,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,SAAS,MAAM,aAAa;AACnC,OAAOC,QAAQ,MAAM,aAAa;AAElC,eAAe,SAASC,oBAAoBA,CAAE;EAAEC,KAAK;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAClE,MAAMC,oBAAoB,GAAGR,uBAAuB,CAAC,CAAC;EAEtD,IAAK,CAAEQ,oBAAoB,EAAEC,MAAM,EAAG;IACrC,OAAO,IAAI;EACZ;EAEA,OACCC,aAAA,CAACX,MAAM;IAACY,OAAO,EAAG;EAAG,GAClBL,KAAK,IAAII,aAAA,CAACN,QAAQ;IAACQ,KAAK,EAAG;EAAG,GAAGN,KAAiB,CAAC,EACrDI,aAAA,CAACd,IAAI;IACJiB,OAAO,EAAG,CAAG;IACbN,GAAG,EAAGA,GAAK;IACXO,SAAS,EAAC;EAAoD,GAE5DN,oBAAoB,IACrBA,oBAAoB,CAACC,MAAM,IAC3BD,oBAAoB,CAACO,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KAC3CP,aAAA,CAACP,SAAS;IAACe,GAAG,EAAGD,KAAO;IAACD,SAAS,EAAGA;EAAW,GAC3CG,SAAS,IACZT,aAAA,CAACR,aAAa;IACbkB,KAAK,EAAGJ,SAAS,EAAEV,KAAO;IAC1Ba,SAAS,EAAGA;EAAW,GAErB,CAAE;IAAEE,KAAK;IAAEH;EAAI,CAAC,KACjBR,aAAA,CAACZ,MAAM;IACNoB,GAAG,EAAGA,GAAK;IACXP,OAAO,EAAG,EAAE,GAAGU,KAAO;IACtBC,OAAO,EAAC,QAAQ;IAChBC,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEHf,aAAA,CAACT,iBAAiB;IACjBe,SAAS,EAAGA,SAAW;IACvBU,QAAQ,EAAG,EAAE,GAAGL;EAAO,CACvB,CACM,CAEK,CAEN,CACV,CACE,CACC,CAAC;AAEX","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useSelect","useDispatch","privateApis","blockEditorPrivateApis","store","editSiteStore","unlock","useGlobalStylesOutput","useGlobalStylesRenderer","styles","settings","getSettings","updateSettings","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings, updateSettings, getSettings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AACpD,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAAsB,CAAC,GAAGD,MAAM,CAAEH,sBAAuB,CAAC;AAElE,SAASK,uBAAuBA,CAAA,EAAG;EAClC,MAAM,CAAEC,MAAM,EAAEC,QAAQ,CAAE,GAAGH,qBAAqB,CAAC,CAAC;EACpD,MAAM;IAAEI;EAAY,CAAC,GAAGX,SAAS,CAAEK,aAAc,CAAC;EAClD,MAAM;IAAEO;EAAe,CAAC,GAAGX,WAAW,CAAEI,aAAc,CAAC;EAEvDN,SAAS,CAAE,MAAM;IAAA,IAAAc,qBAAA;IAChB,IAAK,CAAEJ,MAAM,IAAI,CAAEC,QAAQ,EAAG;MAC7B;IACD;IAEA,MAAMI,oBAAoB,GAAGH,WAAW,CAAC,CAAC;IAC1C,MAAMI,eAAe,GAAGC,MAAM,CAACC,MAAM,EAAAJ,qBAAA,GACpCC,oBAAoB,CAACL,MAAM,cAAAI,qBAAA,cAAAA,qBAAA,GAAI,EAChC,CAAC,CAACK,MAAM,CAAIC,KAAK,IAAM,CAAEA,KAAK,CAACC,cAAe,CAAC;IAC/CR,cAAc,CAAE;MACf,GAAGE,oBAAoB;MACvBL,MAAM,EAAE,CAAE,GAAGM,eAAe,EAAE,GAAGN,MAAM,CAAE;MACzCY,sBAAsB,EAAEX;IACzB,CAAE,CAAC;EACJ,CAAC,EAAE,CAAED,MAAM,EAAEC,QAAQ,EAAEE,cAAc,EAAED,WAAW,CAAG,CAAC;AACvD;AAEA,OAAO,SAASW,oBAAoBA,CAAA,EAAG;EACtCd,uBAAuB,CAAC,CAAC;EAEzB,OAAO,IAAI;AACZ"}
1
+ {"version":3,"names":["useEffect","useSelect","useDispatch","privateApis","blockEditorPrivateApis","store","editSiteStore","unlock","useGlobalStylesOutput","useGlobalStylesRenderer","styles","settings","getSettings","updateSettings","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings, updateSettings, getSettings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AACpD,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAAsB,CAAC,GAAGD,MAAM,CAAEH,sBAAuB,CAAC;AAElE,SAASK,uBAAuBA,CAAA,EAAG;EAClC,MAAM,CAAEC,MAAM,EAAEC,QAAQ,CAAE,GAAGH,qBAAqB,CAAC,CAAC;EACpD,MAAM;IAAEI;EAAY,CAAC,GAAGX,SAAS,CAAEK,aAAc,CAAC;EAClD,MAAM;IAAEO;EAAe,CAAC,GAAGX,WAAW,CAAEI,aAAc,CAAC;EAEvDN,SAAS,CAAE,MAAM;IAAA,IAAAc,qBAAA;IAChB,IAAK,CAAEJ,MAAM,IAAI,CAAEC,QAAQ,EAAG;MAC7B;IACD;IAEA,MAAMI,oBAAoB,GAAGH,WAAW,CAAC,CAAC;IAC1C,MAAMI,eAAe,GAAGC,MAAM,CAACC,MAAM,EAAAJ,qBAAA,GACpCC,oBAAoB,CAACL,MAAM,cAAAI,qBAAA,cAAAA,qBAAA,GAAI,EAChC,CAAC,CAACK,MAAM,CAAIC,KAAK,IAAM,CAAEA,KAAK,CAACC,cAAe,CAAC;IAC/CR,cAAc,CAAE;MACf,GAAGE,oBAAoB;MACvBL,MAAM,EAAE,CAAE,GAAGM,eAAe,EAAE,GAAGN,MAAM,CAAE;MACzCY,sBAAsB,EAAEX;IACzB,CAAE,CAAC;EACJ,CAAC,EAAE,CAAED,MAAM,EAAEC,QAAQ,EAAEE,cAAc,EAAED,WAAW,CAAG,CAAC;AACvD;AAEA,OAAO,SAASW,oBAAoBA,CAAA,EAAG;EACtCd,uBAAuB,CAAC,CAAC;EAEzB,OAAO,IAAI;AACZ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useViewportMatch","store","blockEditorStore","useSelect","useDispatch","__","chevronUpDown","Button","ToolbarItem","editorStore","privateApis","editorPrivateApis","unlock","DocumentTools","EditorDocumentTools","blockEditorMode","hasFixedToolbar","isDistractionFree","isVisualMode","select","getEditorMode","__unstableSetEditorMode","setDeviceType","isLargeViewport","isZoomedOutViewExperimentEnabled","window","__experimentalEnableZoomedOutView","isZoomedOutView","createElement","disableBlockTools","listViewLabel","as","className","icon","isPressed","label","onClick","size"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronUpDown } from '@wordpress/icons';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { DocumentTools: EditorDocumentTools } = unlock( editorPrivateApis );\n\nexport default function DocumentTools( {\n\tblockEditorMode,\n\thasFixedToolbar,\n\tisDistractionFree,\n} ) {\n\tconst { isVisualMode } = useSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\treturn (\n\t\t<EditorDocumentTools\n\t\t\tdisableBlockTools={ ! isVisualMode }\n\t\t\tlistViewLabel={ __( 'List View' ) }\n\t\t>\n\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetDeviceType( 'Desktop' );\n\t\t\t\t\t\t\t__unstableSetEditorMode(\n\t\t\t\t\t\t\t\tisZ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AAK,UAAU;EAEtD,OACCa,aAAA,CAACd,mBAAmB;IACnBe,iBAAiB,EAAG,CAAEX,YAAc;IACpCY,aAAa,EAAGzB,EAAE,CAAE,WAAY;EAAG,GAEjCmB,gCAAgC,IACjCD,eAAe,IACf,CAAEN,iBAAiB,IACnB,CAAED,eAAe,IAChBY,aAAA,CAACpB,WAAW;IACXuB,EAAE,EAAGxB,MAAQ;IACbyB,SAAS,EAAC,kDAAkD;IAC5DC,IAAI,EAAG3B,aAAe;IACtB4B,SAAS,EAAGP;IACZ;IACAQ,KAAK,EAAG9B,EAAE,CAAE,eAAgB,CAAG;IAC/B+B,OAAO,EAAGA,CAAA,KAAM;MACfd,aAAa,CAAE,SAAU,CAAC;MAC1BD,uBAAuB,CACtBM,eAAe,GAAG,MAAM,GAAG,UAC5B,CAAC;IACF,CAAG;IACHU,IAAI,EAAC;EAAS,CACd,CAEiB,CAAC;AAExB"}
1
+ {"version":3,"names":["useViewportMatch","store","blockEditorStore","useSelect","useDispatch","__","chevronUpDown","Button","ToolbarItem","editorStore","privateApis","editorPrivateApis","unlock","DocumentTools","EditorDocumentTools","blockEditorMode","hasFixedToolbar","isDistractionFree","isVisualMode","select","getEditorMode","__unstableSetEditorMode","setDeviceType","isLargeViewport","isZoomedOutViewExperimentEnabled","window","__experimentalEnableZoomedOutView","isZoomedOutView","createElement","disableBlockTools","listViewLabel","as","className","icon","isPressed","label","onClick","size"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronUpDown } from '@wordpress/icons';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { DocumentTools: EditorDocumentTools } = unlock( editorPrivateApis );\n\nexport default function DocumentTools( {\n\tblockEditorMode,\n\thasFixedToolbar,\n\tisDistractionFree,\n} ) {\n\tconst { isVisualMode } = useSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\treturn (\n\t\t<EditorDocumentTools\n\t\t\tdisableBlockTools={ ! isVisualMode }\n\t\t\tlistViewLabel={ __( 'List View' ) }\n\t\t>\n\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetDeviceType( 'Desktop' );\n\t\t\t\t\t\t\t__unstableSetEditorMode(\n\t\t\t\t\t\t\t\tisZoomedOutView ? 'edit' : 'zoom-out'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</EditorDocumentTools>\n\t);\n}\n"],"mappings":";AAAA;AACA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IACnB,CAAED,eAAe,IAChBY,aAAA,CAACpB,WAAW;IACXuB,EAAE,EAAGxB,MAAQ;IACbyB,SAAS,EAAC,kDAAkD;IAC5DC,IAAI,EAAG3B,aAAe;IACtB4B,SAAS,EAAGP;IACZ;IACAQ,KAAK,EAAG9B,EAAE,CAAE,eAAgB,CAAG;IAC/B+B,OAAO,EAAGA,CAAA,KAAM;MACfd,aAAa,CAAE,SAAU,CAAC;MAC1BD,uBAAuB,CACtBM,eAAe,GAAG,MAAM,GAAG,UAC5B,CAAC;IACF,CAAG;IACHU,IAAI,EAAC;EAAS,CACd,CAEiB,CAAC;AAExB","ignoreList":[]}
@@ -11,7 +11,6 @@ import { useViewportMatch, useReducedMotion } from '@wordpress/compose';
11
11
  import { BlockToolbar, privateApis as blockEditorPrivateApis, store as blockEditorStore } from '@wordpress/block-editor';
12
12
  import { useSelect } from '@wordpress/data';
13
13
  import { useEffect, useRef, useState } from '@wordpress/element';
14
- import { PinnedItems } from '@wordpress/interface';
15
14
  import { __ } from '@wordpress/i18n';
16
15
  import { next, previous } from '@wordpress/icons';
17
16
  import { Button, __unstableMotion as motion, Popover } from '@wordpress/components';
@@ -33,7 +32,8 @@ const {
33
32
  } = unlock(blockEditorPrivateApis);
34
33
  const {
35
34
  PostViewLink,
36
- PreviewDropdown
35
+ PreviewDropdown,
36
+ PinnedItems
37
37
  } = unlock(editorPrivateApis);
38
38
  export default function HeaderEditMode() {
39
39
  const {
@@ -150,7 +150,7 @@ export default function HeaderEditMode() {
150
150
  })), createElement(PostViewLink, null), createElement(SaveButton, {
151
151
  size: "compact"
152
152
  }), !isDistractionFree && createElement(PinnedItems.Slot, {
153
- scope: "core/edit-site"
153
+ scope: "core"
154
154
  }), createElement(MoreMenu, {
155
155
  showIconLabels: showIconLabels
156
156
  }))));