@wordpress/edit-site 5.12.0 → 5.12.1

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 (883) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/build/components/add-new-pattern/index.js +99 -0
  3. package/build/components/add-new-pattern/index.js.map +1 -0
  4. package/build/components/add-new-template/add-custom-template-modal-content.js +9 -23
  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 +2 -10
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/add-new-template/new-template.js +6 -8
  9. package/build/components/add-new-template/new-template.js.map +1 -1
  10. package/build/components/app/index.js +2 -2
  11. package/build/components/app/index.js.map +1 -1
  12. package/build/components/block-editor/back-button.js +5 -3
  13. package/build/components/block-editor/back-button.js.map +1 -1
  14. package/build/components/block-editor/constants.js +9 -0
  15. package/build/components/block-editor/constants.js.map +1 -0
  16. package/build/components/block-editor/editor-canvas.js +8 -8
  17. package/build/components/block-editor/editor-canvas.js.map +1 -1
  18. package/build/components/block-editor/get-block-editor-provider.js +42 -0
  19. package/build/components/block-editor/get-block-editor-provider.js.map +1 -0
  20. package/build/components/block-editor/index.js +6 -132
  21. package/build/components/block-editor/index.js.map +1 -1
  22. package/build/components/block-editor/providers/default-block-editor-provider.js +58 -0
  23. package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
  24. package/build/components/block-editor/providers/navigation-block-editor-provider.js +117 -0
  25. package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
  26. package/build/components/block-editor/site-editor-canvas.js +137 -0
  27. package/build/components/block-editor/site-editor-canvas.js.map +1 -0
  28. package/build/components/block-editor/use-site-editor-settings.js +82 -0
  29. package/build/components/block-editor/use-site-editor-settings.js.map +1 -0
  30. package/build/components/canvas-spinner/index.js +18 -1
  31. package/build/components/canvas-spinner/index.js.map +1 -1
  32. package/build/components/create-pattern-modal/index.js +125 -0
  33. package/build/components/create-pattern-modal/index.js.map +1 -0
  34. package/build/components/create-template-part-modal/index.js +49 -5
  35. package/build/components/create-template-part-modal/index.js.map +1 -1
  36. package/build/components/editor/index.js +23 -13
  37. package/build/components/editor/index.js.map +1 -1
  38. package/build/components/editor-canvas-container/index.js +22 -4
  39. package/build/components/editor-canvas-container/index.js.map +1 -1
  40. package/build/components/global-styles/color-indicator-wrapper.js +4 -5
  41. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  42. package/build/components/global-styles/color-palette-panel.js +2 -2
  43. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  44. package/build/components/global-styles/dimensions-panel.js +2 -2
  45. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  46. package/build/components/global-styles/global-styles-provider.js +12 -16
  47. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  48. package/build/components/global-styles/gradients-palette-panel.js +2 -2
  49. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  50. package/build/components/global-styles/hooks.js +3 -3
  51. package/build/components/global-styles/hooks.js.map +1 -1
  52. package/build/components/global-styles/icon-with-current-color.js +4 -5
  53. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  54. package/build/components/global-styles/navigation-button.js +10 -11
  55. package/build/components/global-styles/navigation-button.js.map +1 -1
  56. package/build/components/global-styles/palette.js +3 -3
  57. package/build/components/global-styles/palette.js.map +1 -1
  58. package/build/components/global-styles/preview.js +2 -2
  59. package/build/components/global-styles/preview.js.map +1 -1
  60. package/build/components/global-styles/root-menu.js +2 -2
  61. package/build/components/global-styles/root-menu.js.map +1 -1
  62. package/build/components/global-styles/screen-block-list.js +2 -2
  63. package/build/components/global-styles/screen-block-list.js.map +1 -1
  64. package/build/components/global-styles/screen-block.js +2 -2
  65. package/build/components/global-styles/screen-block.js.map +1 -1
  66. package/build/components/global-styles/screen-colors.js +2 -2
  67. package/build/components/global-styles/screen-colors.js.map +1 -1
  68. package/build/components/global-styles/screen-css.js +2 -2
  69. package/build/components/global-styles/screen-css.js.map +1 -1
  70. package/build/components/global-styles/screen-layout.js +2 -2
  71. package/build/components/global-styles/screen-layout.js.map +1 -1
  72. package/build/components/global-styles/screen-revisions/index.js +4 -4
  73. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  74. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +2 -2
  75. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  76. package/build/components/global-styles/screen-root.js +2 -2
  77. package/build/components/global-styles/screen-root.js.map +1 -1
  78. package/build/components/global-styles/screen-typography.js +2 -2
  79. package/build/components/global-styles/screen-typography.js.map +1 -1
  80. package/build/components/global-styles/style-variations-container.js +11 -3
  81. package/build/components/global-styles/style-variations-container.js.map +1 -1
  82. package/build/components/global-styles/typography-panel.js +2 -2
  83. package/build/components/global-styles/typography-panel.js.map +1 -1
  84. package/build/components/global-styles/typography-preview.js +2 -2
  85. package/build/components/global-styles/typography-preview.js.map +1 -1
  86. package/build/components/global-styles/ui.js +90 -36
  87. package/build/components/global-styles/ui.js.map +1 -1
  88. package/build/components/global-styles-renderer/index.js +2 -2
  89. package/build/components/global-styles-renderer/index.js.map +1 -1
  90. package/build/components/header-edit-mode/document-actions/index.js +55 -22
  91. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  92. package/build/components/header-edit-mode/index.js +6 -8
  93. package/build/components/header-edit-mode/index.js.map +1 -1
  94. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -7
  95. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  96. package/build/components/header-edit-mode/undo-redo/redo.js +2 -6
  97. package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  98. package/build/components/header-edit-mode/undo-redo/undo.js +2 -6
  99. package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  100. package/build/components/keyboard-shortcut-help-modal/index.js +2 -1
  101. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  102. package/build/components/keyboard-shortcuts/edit-mode.js +7 -2
  103. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  104. package/build/components/keyboard-shortcuts/index.js +7 -2
  105. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  106. package/build/components/keyboard-shortcuts/register.js +1 -1
  107. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  108. package/build/components/layout/hooks.js +21 -0
  109. package/build/components/layout/hooks.js.map +1 -1
  110. package/build/components/layout/index.js +40 -22
  111. package/build/components/layout/index.js.map +1 -1
  112. package/build/components/list/index.js +2 -2
  113. package/build/components/list/index.js.map +1 -1
  114. package/build/components/page/header.js +41 -0
  115. package/build/components/page/header.js.map +1 -0
  116. package/build/components/page/index.js +49 -0
  117. package/build/components/page/index.js.map +1 -0
  118. package/build/components/page-content-focus-manager/back-to-page-notification.js +67 -0
  119. package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
  120. package/build/components/page-content-focus-manager/constants.js +9 -0
  121. package/build/components/page-content-focus-manager/constants.js.map +1 -0
  122. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +60 -0
  123. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
  124. package/build/components/page-content-focus-manager/edit-template-notification.js +121 -0
  125. package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
  126. package/build/components/page-content-focus-manager/index.js +37 -0
  127. package/build/components/page-content-focus-manager/index.js.map +1 -0
  128. package/build/components/page-library/grid-item.js +165 -0
  129. package/build/components/page-library/grid-item.js.map +1 -0
  130. package/build/components/page-library/grid.js +49 -0
  131. package/build/components/page-library/grid.js.map +1 -0
  132. package/build/components/page-library/index.js +61 -0
  133. package/build/components/page-library/index.js.map +1 -0
  134. package/build/components/page-library/no-patterns.js +20 -0
  135. package/build/components/page-library/no-patterns.js.map +1 -0
  136. package/build/components/page-library/patterns-list.js +108 -0
  137. package/build/components/page-library/patterns-list.js.map +1 -0
  138. package/build/components/page-library/search-items.js +172 -0
  139. package/build/components/page-library/search-items.js.map +1 -0
  140. package/build/components/page-library/use-library-settings.js +53 -0
  141. package/build/components/page-library/use-library-settings.js.map +1 -0
  142. package/build/components/page-library/use-patterns.js +194 -0
  143. package/build/components/page-library/use-patterns.js.map +1 -0
  144. package/build/components/page-library/utils.js +30 -0
  145. package/build/components/page-library/utils.js.map +1 -0
  146. package/build/components/page-main/index.js +46 -0
  147. package/build/components/page-main/index.js.map +1 -0
  148. package/build/components/page-templates/index.js +101 -0
  149. package/build/components/page-templates/index.js.map +1 -0
  150. package/build/components/preferences-modal/enable-feature.js +4 -7
  151. package/build/components/preferences-modal/enable-feature.js.map +1 -1
  152. package/build/components/resizable-frame/index.js +6 -4
  153. package/build/components/resizable-frame/index.js.map +1 -1
  154. package/build/components/revisions/index.js +2 -2
  155. package/build/components/revisions/index.js.map +1 -1
  156. package/build/components/routes/link.js +7 -10
  157. package/build/components/routes/link.js.map +1 -1
  158. package/build/components/routes/use-title.js +2 -2
  159. package/build/components/routes/use-title.js.map +1 -1
  160. package/build/components/save-button/index.js +15 -11
  161. package/build/components/save-button/index.js.map +1 -1
  162. package/build/components/save-hub/index.js +2 -2
  163. package/build/components/save-hub/index.js.map +1 -1
  164. package/build/components/save-panel/index.js +5 -7
  165. package/build/components/save-panel/index.js.map +1 -1
  166. package/build/components/secondary-sidebar/inserter-sidebar.js +4 -8
  167. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  168. package/build/components/secondary-sidebar/list-view-sidebar.js +47 -10
  169. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  170. package/build/components/sidebar/index.js +12 -8
  171. package/build/components/sidebar/index.js.map +1 -1
  172. package/build/components/sidebar-button/index.js +2 -4
  173. package/build/components/sidebar-button/index.js.map +1 -1
  174. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +22 -8
  175. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  176. package/build/components/sidebar-edit-mode/index.js +5 -5
  177. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  178. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +84 -0
  179. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
  180. package/build/components/sidebar-edit-mode/page-panels/index.js +51 -38
  181. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  182. package/build/components/sidebar-edit-mode/page-panels/page-content.js +35 -0
  183. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
  184. package/build/components/sidebar-edit-mode/page-panels/page-status.js +192 -0
  185. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
  186. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +45 -0
  187. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
  188. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +98 -0
  189. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
  190. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +4 -7
  191. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  192. package/build/components/sidebar-edit-mode/settings-header/index.js +19 -6
  193. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  194. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +2 -2
  195. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  196. package/build/components/sidebar-edit-mode/template-panel/index.js +10 -6
  197. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  198. package/build/components/sidebar-navigation-item/index.js +11 -7
  199. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  200. package/build/components/sidebar-navigation-screen/index.js +18 -7
  201. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  202. package/build/components/sidebar-navigation-screen-details-footer/index.js +36 -0
  203. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
  204. package/build/components/sidebar-navigation-screen-details-panel/index.js +58 -0
  205. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
  206. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +22 -0
  207. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
  208. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +35 -0
  209. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
  210. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +22 -0
  211. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
  212. package/build/components/sidebar-navigation-screen-global-styles/index.js +13 -13
  213. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  214. package/build/components/sidebar-navigation-screen-library/category-item.js +48 -0
  215. package/build/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
  216. package/build/components/sidebar-navigation-screen-library/index.js +112 -0
  217. package/build/components/sidebar-navigation-screen-library/index.js.map +1 -0
  218. package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +36 -0
  219. package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
  220. package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js +76 -0
  221. package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
  222. package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js +41 -0
  223. package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
  224. package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js +40 -0
  225. package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
  226. package/build/components/sidebar-navigation-screen-main/index.js +12 -13
  227. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-navigation-item/index.js +2 -2
  229. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +42 -0
  231. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
  232. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +41 -0
  233. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
  234. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +47 -92
  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 +84 -0
  237. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
  238. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +71 -0
  239. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
  240. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +54 -0
  241. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
  242. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +49 -0
  243. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
  244. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +163 -0
  245. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
  246. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  247. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +46 -7
  249. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +57 -10
  251. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +21 -50
  253. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-page/index.js +14 -34
  255. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-page/page-details.js +29 -27
  257. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-page/status-label.js +8 -7
  259. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-pages/index.js +9 -8
  261. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-pattern/index.js +66 -0
  263. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
  264. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +41 -0
  265. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
  266. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +33 -0
  267. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
  268. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +40 -0
  269. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
  270. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +47 -0
  271. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
  272. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +82 -0
  273. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
  274. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +80 -0
  275. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
  276. package/build/components/sidebar-navigation-screen-template/home-template-details.js +212 -0
  277. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
  278. package/build/components/sidebar-navigation-screen-template/index.js +21 -7
  279. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  280. package/build/components/sidebar-navigation-screen-templates/index.js +11 -11
  281. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  282. package/build/components/site-hub/index.js +10 -12
  283. package/build/components/site-hub/index.js.map +1 -1
  284. package/build/components/style-book/index.js +10 -11
  285. package/build/components/style-book/index.js.map +1 -1
  286. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -4
  287. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  288. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +4 -4
  289. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  290. package/build/components/sync-state-with-url/use-sync-path-with-url.js +12 -2
  291. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  292. package/build/components/table/index.js +29 -0
  293. package/build/components/table/index.js.map +1 -0
  294. package/build/components/template-part-converter/convert-to-template-part.js +3 -21
  295. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  296. package/build/components/welcome-guide/editor.js +1 -1
  297. package/build/components/welcome-guide/editor.js.map +1 -1
  298. package/build/components/welcome-guide/styles.js +4 -3
  299. package/build/components/welcome-guide/styles.js.map +1 -1
  300. package/build/hooks/commands/use-common-commands.js +190 -0
  301. package/build/hooks/commands/use-common-commands.js.map +1 -0
  302. package/build/hooks/commands/use-edit-mode-commands.js +67 -23
  303. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  304. package/build/hooks/index.js +2 -0
  305. package/build/hooks/index.js.map +1 -1
  306. package/build/hooks/navigation-menu-edit.js +95 -0
  307. package/build/hooks/navigation-menu-edit.js.map +1 -0
  308. package/build/hooks/push-changes-to-global-styles/index.js +5 -3
  309. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  310. package/build/hooks/template-part-edit.js +6 -9
  311. package/build/hooks/template-part-edit.js.map +1 -1
  312. package/build/{private-apis.js → lock-unlock.js} +1 -1
  313. package/build/lock-unlock.js.map +1 -0
  314. package/build/store/actions.js +45 -9
  315. package/build/store/actions.js.map +1 -1
  316. package/build/store/index.js +3 -3
  317. package/build/store/index.js.map +1 -1
  318. package/build/store/reducer.js +7 -6
  319. package/build/store/reducer.js.map +1 -1
  320. package/build/store/selectors.js +40 -16
  321. package/build/store/selectors.js.map +1 -1
  322. package/build/utils/get-is-list-page.js +12 -5
  323. package/build/utils/get-is-list-page.js.map +1 -1
  324. package/build/utils/is-previewing-theme.js +2 -2
  325. package/build/utils/is-previewing-theme.js.map +1 -1
  326. package/build/utils/use-activate-theme.js +3 -3
  327. package/build/utils/use-activate-theme.js.map +1 -1
  328. package/build/utils/use-debounced-input.js +26 -0
  329. package/build/utils/use-debounced-input.js.map +1 -0
  330. package/build-module/components/add-new-pattern/index.js +82 -0
  331. package/build-module/components/add-new-pattern/index.js.map +1 -0
  332. package/build-module/components/add-new-template/add-custom-template-modal-content.js +7 -20
  333. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  334. package/build-module/components/add-new-template/index.js +2 -8
  335. package/build-module/components/add-new-template/index.js.map +1 -1
  336. package/build-module/components/add-new-template/new-template.js +4 -5
  337. package/build-module/components/add-new-template/new-template.js.map +1 -1
  338. package/build-module/components/app/index.js +1 -1
  339. package/build-module/components/app/index.js.map +1 -1
  340. package/build-module/components/block-editor/back-button.js +4 -2
  341. package/build-module/components/block-editor/back-button.js.map +1 -1
  342. package/build-module/components/block-editor/constants.js +2 -0
  343. package/build-module/components/block-editor/constants.js.map +1 -0
  344. package/build-module/components/block-editor/editor-canvas.js +6 -5
  345. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  346. package/build-module/components/block-editor/get-block-editor-provider.js +31 -0
  347. package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -0
  348. package/build-module/components/block-editor/index.js +9 -127
  349. package/build-module/components/block-editor/index.js.map +1 -1
  350. package/build-module/components/block-editor/providers/default-block-editor-provider.js +42 -0
  351. package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
  352. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +102 -0
  353. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
  354. package/build-module/components/block-editor/site-editor-canvas.js +115 -0
  355. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -0
  356. package/build-module/components/block-editor/use-site-editor-settings.js +67 -0
  357. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -0
  358. package/build-module/components/canvas-spinner/index.js +15 -1
  359. package/build-module/components/canvas-spinner/index.js.map +1 -1
  360. package/build-module/components/create-pattern-modal/index.js +113 -0
  361. package/build-module/components/create-pattern-modal/index.js.map +1 -0
  362. package/build-module/components/create-template-part-modal/index.js +46 -6
  363. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  364. package/build-module/components/editor/index.js +23 -13
  365. package/build-module/components/editor/index.js.map +1 -1
  366. package/build-module/components/editor-canvas-container/index.js +19 -2
  367. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  368. package/build-module/components/global-styles/color-indicator-wrapper.js +4 -4
  369. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  370. package/build-module/components/global-styles/color-palette-panel.js +1 -1
  371. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  372. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  373. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  374. package/build-module/components/global-styles/global-styles-provider.js +10 -15
  375. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  376. package/build-module/components/global-styles/gradients-palette-panel.js +1 -1
  377. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  378. package/build-module/components/global-styles/hooks.js +1 -1
  379. package/build-module/components/global-styles/hooks.js.map +1 -1
  380. package/build-module/components/global-styles/icon-with-current-color.js +4 -4
  381. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  382. package/build-module/components/global-styles/navigation-button.js +10 -8
  383. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  384. package/build-module/components/global-styles/palette.js +2 -2
  385. package/build-module/components/global-styles/palette.js.map +1 -1
  386. package/build-module/components/global-styles/preview.js +1 -1
  387. package/build-module/components/global-styles/preview.js.map +1 -1
  388. package/build-module/components/global-styles/root-menu.js +1 -1
  389. package/build-module/components/global-styles/root-menu.js.map +1 -1
  390. package/build-module/components/global-styles/screen-block-list.js +1 -1
  391. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  392. package/build-module/components/global-styles/screen-block.js +1 -1
  393. package/build-module/components/global-styles/screen-block.js.map +1 -1
  394. package/build-module/components/global-styles/screen-colors.js +1 -1
  395. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  396. package/build-module/components/global-styles/screen-css.js +1 -1
  397. package/build-module/components/global-styles/screen-css.js.map +1 -1
  398. package/build-module/components/global-styles/screen-layout.js +1 -1
  399. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  400. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  401. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  402. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -1
  403. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  404. package/build-module/components/global-styles/screen-root.js +1 -1
  405. package/build-module/components/global-styles/screen-root.js.map +1 -1
  406. package/build-module/components/global-styles/screen-typography.js +1 -1
  407. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  408. package/build-module/components/global-styles/style-variations-container.js +11 -3
  409. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  410. package/build-module/components/global-styles/typography-panel.js +1 -1
  411. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  412. package/build-module/components/global-styles/typography-preview.js +1 -1
  413. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  414. package/build-module/components/global-styles/ui.js +89 -35
  415. package/build-module/components/global-styles/ui.js.map +1 -1
  416. package/build-module/components/global-styles-renderer/index.js +1 -1
  417. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  418. package/build-module/components/header-edit-mode/document-actions/index.js +55 -22
  419. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  420. package/build-module/components/header-edit-mode/index.js +4 -6
  421. package/build-module/components/header-edit-mode/index.js.map +1 -1
  422. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -4
  423. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  424. package/build-module/components/header-edit-mode/undo-redo/redo.js +2 -3
  425. package/build-module/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  426. package/build-module/components/header-edit-mode/undo-redo/undo.js +2 -3
  427. package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  428. package/build-module/components/keyboard-shortcut-help-modal/index.js +2 -1
  429. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  430. package/build-module/components/keyboard-shortcuts/edit-mode.js +7 -2
  431. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  432. package/build-module/components/keyboard-shortcuts/index.js +7 -2
  433. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  434. package/build-module/components/keyboard-shortcuts/register.js +1 -1
  435. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  436. package/build-module/components/layout/hooks.js +21 -0
  437. package/build-module/components/layout/hooks.js.map +1 -1
  438. package/build-module/components/layout/index.js +33 -16
  439. package/build-module/components/layout/index.js.map +1 -1
  440. package/build-module/components/list/index.js +1 -1
  441. package/build-module/components/list/index.js.map +1 -1
  442. package/build-module/components/page/header.js +33 -0
  443. package/build-module/components/page/header.js.map +1 -0
  444. package/build-module/components/page/index.js +37 -0
  445. package/build-module/components/page/index.js.map +1 -0
  446. package/build-module/components/page-content-focus-manager/back-to-page-notification.js +53 -0
  447. package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
  448. package/build-module/components/page-content-focus-manager/constants.js +2 -0
  449. package/build-module/components/page-content-focus-manager/constants.js.map +1 -0
  450. package/build-module/components/{page-content-lock/use-disable-non-content-blocks.js → page-content-focus-manager/disable-non-page-content-blocks.js} +18 -9
  451. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
  452. package/build-module/components/page-content-focus-manager/edit-template-notification.js +110 -0
  453. package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
  454. package/build-module/components/page-content-focus-manager/index.js +23 -0
  455. package/build-module/components/page-content-focus-manager/index.js.map +1 -0
  456. package/build-module/components/page-library/grid-item.js +145 -0
  457. package/build-module/components/page-library/grid-item.js.map +1 -0
  458. package/build-module/components/page-library/grid.js +38 -0
  459. package/build-module/components/page-library/grid.js.map +1 -0
  460. package/build-module/components/page-library/index.js +43 -0
  461. package/build-module/components/page-library/index.js.map +1 -0
  462. package/build-module/components/page-library/no-patterns.js +12 -0
  463. package/build-module/components/page-library/no-patterns.js.map +1 -0
  464. package/build-module/components/page-library/patterns-list.js +87 -0
  465. package/build-module/components/page-library/patterns-list.js.map +1 -0
  466. package/build-module/components/page-library/search-items.js +156 -0
  467. package/build-module/components/page-library/search-items.js.map +1 -0
  468. package/build-module/components/page-library/use-library-settings.js +40 -0
  469. package/build-module/components/page-library/use-library-settings.js.map +1 -0
  470. package/build-module/components/page-library/use-patterns.js +176 -0
  471. package/build-module/components/page-library/use-patterns.js.map +1 -0
  472. package/build-module/components/page-library/utils.js +13 -0
  473. package/build-module/components/page-library/utils.js.map +1 -0
  474. package/build-module/components/page-main/index.js +32 -0
  475. package/build-module/components/page-main/index.js.map +1 -0
  476. package/build-module/components/page-templates/index.js +80 -0
  477. package/build-module/components/page-templates/index.js.map +1 -0
  478. package/build-module/components/preferences-modal/enable-feature.js +4 -4
  479. package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
  480. package/build-module/components/resizable-frame/index.js +5 -3
  481. package/build-module/components/resizable-frame/index.js.map +1 -1
  482. package/build-module/components/revisions/index.js +1 -1
  483. package/build-module/components/revisions/index.js.map +1 -1
  484. package/build-module/components/routes/link.js +6 -6
  485. package/build-module/components/routes/link.js.map +1 -1
  486. package/build-module/components/routes/use-title.js +1 -1
  487. package/build-module/components/routes/use-title.js.map +1 -1
  488. package/build-module/components/save-button/index.js +15 -11
  489. package/build-module/components/save-button/index.js.map +1 -1
  490. package/build-module/components/save-hub/index.js +1 -1
  491. package/build-module/components/save-hub/index.js.map +1 -1
  492. package/build-module/components/save-panel/index.js +3 -4
  493. package/build-module/components/save-panel/index.js.map +1 -1
  494. package/build-module/components/secondary-sidebar/inserter-sidebar.js +4 -5
  495. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  496. package/build-module/components/secondary-sidebar/list-view-sidebar.js +44 -10
  497. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  498. package/build-module/components/sidebar/index.js +10 -7
  499. package/build-module/components/sidebar/index.js.map +1 -1
  500. package/build-module/components/sidebar-button/index.js +2 -3
  501. package/build-module/components/sidebar-button/index.js.map +1 -1
  502. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +19 -6
  503. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  504. package/build-module/components/sidebar-edit-mode/index.js +5 -5
  505. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  506. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +71 -0
  507. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
  508. package/build-module/components/sidebar-edit-mode/page-panels/index.js +51 -40
  509. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  510. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +23 -0
  511. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
  512. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +176 -0
  513. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
  514. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +33 -0
  515. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
  516. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +85 -0
  517. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
  518. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +4 -4
  519. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  520. package/build-module/components/sidebar-edit-mode/settings-header/index.js +20 -7
  521. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  522. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
  523. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  524. package/build-module/components/sidebar-edit-mode/template-panel/index.js +9 -6
  525. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  526. package/build-module/components/sidebar-navigation-item/index.js +11 -7
  527. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  528. package/build-module/components/sidebar-navigation-screen/index.js +18 -7
  529. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  530. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +27 -0
  531. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
  532. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +30 -0
  533. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
  534. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
  535. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
  536. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +24 -0
  537. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
  538. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
  539. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
  540. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +9 -8
  541. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-library/category-item.js +37 -0
  543. package/build-module/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
  544. package/build-module/components/sidebar-navigation-screen-library/index.js +87 -0
  545. package/build-module/components/sidebar-navigation-screen-library/index.js.map +1 -0
  546. package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +25 -0
  547. package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
  548. package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js +61 -0
  549. package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
  550. package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js +34 -0
  551. package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
  552. package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js +27 -0
  553. package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
  554. package/build-module/components/sidebar-navigation-screen-main/index.js +13 -13
  555. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  556. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  557. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +33 -0
  559. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
  560. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +26 -0
  561. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
  562. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +45 -90
  563. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +70 -0
  565. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
  566. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +58 -0
  567. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
  568. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +46 -0
  569. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
  570. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +35 -0
  571. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
  572. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +151 -0
  573. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
  574. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  575. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  576. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +45 -7
  577. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +55 -7
  579. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  580. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +22 -50
  581. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  582. package/build-module/components/sidebar-navigation-screen-page/index.js +14 -34
  583. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  584. package/build-module/components/sidebar-navigation-screen-page/page-details.js +28 -28
  585. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  586. package/build-module/components/sidebar-navigation-screen-page/status-label.js +9 -8
  587. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  588. package/build-module/components/sidebar-navigation-screen-pages/index.js +8 -6
  589. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  590. package/build-module/components/sidebar-navigation-screen-pattern/index.js +46 -0
  591. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
  592. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
  593. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
  594. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +22 -0
  595. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
  596. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +27 -0
  597. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
  598. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +34 -0
  599. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
  600. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
  601. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
  602. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +64 -0
  603. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
  604. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +192 -0
  605. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
  606. package/build-module/components/sidebar-navigation-screen-template/index.js +18 -6
  607. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  608. package/build-module/components/sidebar-navigation-screen-templates/index.js +11 -10
  609. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  610. package/build-module/components/site-hub/index.js +8 -9
  611. package/build-module/components/site-hub/index.js.map +1 -1
  612. package/build-module/components/style-book/index.js +9 -9
  613. package/build-module/components/style-book/index.js.map +1 -1
  614. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +13 -3
  615. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  616. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  617. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  618. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +11 -1
  619. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  620. package/build-module/components/table/index.js +21 -0
  621. package/build-module/components/table/index.js.map +1 -0
  622. package/build-module/components/template-part-converter/convert-to-template-part.js +4 -20
  623. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  624. package/build-module/components/welcome-guide/editor.js +1 -1
  625. package/build-module/components/welcome-guide/editor.js.map +1 -1
  626. package/build-module/components/welcome-guide/styles.js +5 -3
  627. package/build-module/components/welcome-guide/styles.js.map +1 -1
  628. package/build-module/hooks/commands/use-common-commands.js +172 -0
  629. package/build-module/hooks/commands/use-common-commands.js.map +1 -0
  630. package/build-module/hooks/commands/use-edit-mode-commands.js +68 -24
  631. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  632. package/build-module/hooks/index.js +1 -0
  633. package/build-module/hooks/index.js.map +1 -1
  634. package/build-module/hooks/navigation-menu-edit.js +77 -0
  635. package/build-module/hooks/navigation-menu-edit.js.map +1 -0
  636. package/build-module/hooks/push-changes-to-global-styles/index.js +4 -2
  637. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  638. package/build-module/hooks/template-part-edit.js +5 -5
  639. package/build-module/hooks/template-part-edit.js.map +1 -1
  640. package/build-module/{private-apis.js → lock-unlock.js} +1 -1
  641. package/build-module/lock-unlock.js.map +1 -0
  642. package/build-module/store/actions.js +39 -7
  643. package/build-module/store/actions.js.map +1 -1
  644. package/build-module/store/index.js +1 -1
  645. package/build-module/store/index.js.map +1 -1
  646. package/build-module/store/reducer.js +6 -5
  647. package/build-module/store/reducer.js.map +1 -1
  648. package/build-module/store/selectors.js +35 -14
  649. package/build-module/store/selectors.js.map +1 -1
  650. package/build-module/utils/get-is-list-page.js +12 -5
  651. package/build-module/utils/get-is-list-page.js.map +1 -1
  652. package/build-module/utils/is-previewing-theme.js +2 -2
  653. package/build-module/utils/is-previewing-theme.js.map +1 -1
  654. package/build-module/utils/use-activate-theme.js +2 -2
  655. package/build-module/utils/use-activate-theme.js.map +1 -1
  656. package/build-module/utils/use-debounced-input.js +17 -0
  657. package/build-module/utils/use-debounced-input.js.map +1 -0
  658. package/build-style/style-rtl.css +323 -29
  659. package/build-style/style.css +323 -29
  660. package/package.json +44 -40
  661. package/src/components/add-new-pattern/index.js +94 -0
  662. package/src/components/add-new-template/add-custom-template-modal-content.js +1 -13
  663. package/src/components/add-new-template/index.js +0 -3
  664. package/src/components/add-new-template/new-template.js +1 -2
  665. package/src/components/app/index.js +1 -1
  666. package/src/components/block-editor/back-button.js +5 -2
  667. package/src/components/block-editor/constants.js +1 -0
  668. package/src/components/block-editor/editor-canvas.js +1 -1
  669. package/src/components/block-editor/get-block-editor-provider.js +29 -0
  670. package/src/components/block-editor/index.js +15 -199
  671. package/src/components/block-editor/providers/default-block-editor-provider.js +44 -0
  672. package/src/components/block-editor/providers/navigation-block-editor-provider.js +114 -0
  673. package/src/components/block-editor/site-editor-canvas.js +155 -0
  674. package/src/components/block-editor/style.scss +6 -0
  675. package/src/components/block-editor/use-site-editor-settings.js +91 -0
  676. package/src/components/canvas-spinner/index.js +11 -1
  677. package/src/components/create-pattern-modal/index.js +134 -0
  678. package/src/components/create-pattern-modal/style.scss +3 -0
  679. package/src/components/create-template-part-modal/index.js +63 -3
  680. package/src/components/editor/index.js +24 -15
  681. package/src/components/editor-canvas-container/index.js +21 -4
  682. package/src/components/global-styles/color-palette-panel.js +1 -1
  683. package/src/components/global-styles/dimensions-panel.js +1 -1
  684. package/src/components/global-styles/global-styles-provider.js +10 -14
  685. package/src/components/global-styles/gradients-palette-panel.js +1 -1
  686. package/src/components/global-styles/hooks.js +1 -1
  687. package/src/components/global-styles/palette.js +2 -2
  688. package/src/components/global-styles/preview.js +1 -1
  689. package/src/components/global-styles/root-menu.js +1 -1
  690. package/src/components/global-styles/screen-block-list.js +1 -1
  691. package/src/components/global-styles/screen-block.js +1 -1
  692. package/src/components/global-styles/screen-colors.js +1 -1
  693. package/src/components/global-styles/screen-css.js +1 -1
  694. package/src/components/global-styles/screen-layout.js +1 -1
  695. package/src/components/global-styles/screen-revisions/index.js +1 -1
  696. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -1
  697. package/src/components/global-styles/screen-root.js +1 -1
  698. package/src/components/global-styles/screen-typography.js +1 -1
  699. package/src/components/global-styles/stories/index.js +1 -1
  700. package/src/components/global-styles/style-variations-container.js +13 -3
  701. package/src/components/global-styles/style.scss +11 -0
  702. package/src/components/global-styles/typography-panel.js +1 -1
  703. package/src/components/global-styles/typography-preview.js +1 -1
  704. package/src/components/global-styles/ui.js +105 -46
  705. package/src/components/global-styles-renderer/index.js +1 -1
  706. package/src/components/header-edit-mode/document-actions/index.js +51 -26
  707. package/src/components/header-edit-mode/document-actions/style.scss +9 -5
  708. package/src/components/header-edit-mode/index.js +4 -4
  709. package/src/components/keyboard-shortcuts/edit-mode.js +5 -1
  710. package/src/components/keyboard-shortcuts/index.js +5 -1
  711. package/src/components/keyboard-shortcuts/register.js +1 -1
  712. package/src/components/layout/hooks.js +21 -0
  713. package/src/components/layout/index.js +92 -64
  714. package/src/components/layout/style.scss +7 -0
  715. package/src/components/list/index.js +1 -1
  716. package/src/components/page/header.js +38 -0
  717. package/src/components/page/index.js +38 -0
  718. package/src/components/page/style.scss +38 -0
  719. package/src/components/page-content-focus-manager/back-to-page-notification.js +65 -0
  720. package/src/components/{page-content-lock → page-content-focus-manager}/constants.js +1 -1
  721. package/src/components/{page-content-lock/use-disable-non-content-blocks.js → page-content-focus-manager/disable-non-page-content-blocks.js} +15 -7
  722. package/src/components/page-content-focus-manager/edit-template-notification.js +108 -0
  723. package/src/components/page-content-focus-manager/index.js +26 -0
  724. package/src/components/page-library/grid-item.js +179 -0
  725. package/src/components/page-library/grid.js +39 -0
  726. package/src/components/page-library/index.js +39 -0
  727. package/src/components/page-library/no-patterns.js +12 -0
  728. package/src/components/page-library/patterns-list.js +114 -0
  729. package/src/components/page-library/search-items.js +171 -0
  730. package/src/components/page-library/style.scss +105 -0
  731. package/src/components/page-library/use-library-settings.js +51 -0
  732. package/src/components/page-library/use-patterns.js +238 -0
  733. package/src/components/page-library/utils.js +21 -0
  734. package/src/components/page-main/index.js +27 -0
  735. package/src/components/page-templates/index.js +104 -0
  736. package/src/components/resizable-frame/index.js +3 -1
  737. package/src/components/revisions/index.js +1 -1
  738. package/src/components/routes/link.js +2 -2
  739. package/src/components/routes/use-title.js +1 -1
  740. package/src/components/save-button/index.js +14 -11
  741. package/src/components/save-hub/index.js +1 -1
  742. package/src/components/save-panel/index.js +1 -1
  743. package/src/components/secondary-sidebar/list-view-sidebar.js +53 -6
  744. package/src/components/sidebar/index.js +11 -7
  745. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +42 -29
  746. package/src/components/sidebar-edit-mode/index.js +5 -5
  747. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +69 -0
  748. package/src/components/sidebar-edit-mode/page-panels/index.js +53 -53
  749. package/src/components/sidebar-edit-mode/page-panels/page-content.js +27 -0
  750. package/src/components/sidebar-edit-mode/page-panels/page-status.js +233 -0
  751. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +35 -0
  752. package/src/components/sidebar-edit-mode/page-panels/publish-date.js +94 -0
  753. package/src/components/sidebar-edit-mode/page-panels/style.scss +31 -0
  754. package/src/components/sidebar-edit-mode/settings-header/index.js +18 -9
  755. package/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
  756. package/src/components/sidebar-edit-mode/template-panel/index.js +9 -6
  757. package/src/components/sidebar-navigation-item/index.js +6 -2
  758. package/src/components/sidebar-navigation-item/style.scss +7 -0
  759. package/src/components/sidebar-navigation-screen/index.js +19 -7
  760. package/src/components/sidebar-navigation-screen/style.scss +28 -8
  761. package/src/components/sidebar-navigation-screen-details-footer/index.js +45 -0
  762. package/src/components/sidebar-navigation-screen-details-footer/style.scss +5 -0
  763. package/src/components/sidebar-navigation-screen-details-panel/index.js +40 -0
  764. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
  765. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +29 -0
  766. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
  767. package/src/components/sidebar-navigation-screen-details-panel/style.scss +25 -0
  768. package/src/components/sidebar-navigation-screen-global-styles/index.js +9 -3
  769. package/src/components/sidebar-navigation-screen-global-styles/style.scss +0 -3
  770. package/src/components/sidebar-navigation-screen-library/category-item.js +43 -0
  771. package/src/components/sidebar-navigation-screen-library/index.js +136 -0
  772. package/src/components/sidebar-navigation-screen-library/style.scss +7 -0
  773. package/src/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +32 -0
  774. package/src/components/sidebar-navigation-screen-library/use-pattern-categories.js +64 -0
  775. package/src/components/sidebar-navigation-screen-library/use-template-part-areas.js +33 -0
  776. package/src/components/sidebar-navigation-screen-library/use-theme-patterns.js +44 -0
  777. package/src/components/sidebar-navigation-screen-main/index.js +11 -14
  778. package/src/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  779. package/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +45 -0
  780. package/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js +24 -0
  781. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +50 -96
  782. package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +89 -0
  783. package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +51 -0
  784. package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +51 -0
  785. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +39 -0
  786. package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +15 -0
  787. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +175 -0
  788. package/src/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  789. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +43 -7
  790. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +61 -2
  791. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +25 -47
  792. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +4 -0
  793. package/src/components/sidebar-navigation-screen-page/index.js +19 -58
  794. package/src/components/sidebar-navigation-screen-page/page-details.js +42 -39
  795. package/src/components/sidebar-navigation-screen-page/status-label.js +23 -19
  796. package/src/components/sidebar-navigation-screen-page/style.scss +1 -18
  797. package/src/components/sidebar-navigation-screen-pages/index.js +30 -29
  798. package/src/components/sidebar-navigation-screen-pattern/index.js +44 -0
  799. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
  800. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +21 -0
  801. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +30 -0
  802. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +33 -0
  803. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
  804. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +86 -0
  805. package/src/components/sidebar-navigation-screen-template/home-template-details.js +230 -0
  806. package/src/components/sidebar-navigation-screen-template/index.js +19 -5
  807. package/src/components/sidebar-navigation-screen-template/style.scss +23 -0
  808. package/src/components/sidebar-navigation-screen-templates/index.js +18 -25
  809. package/src/components/site-hub/index.js +13 -9
  810. package/src/components/style-book/index.js +1 -1
  811. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -3
  812. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  813. package/src/components/sync-state-with-url/use-sync-path-with-url.js +11 -1
  814. package/src/components/table/index.js +33 -0
  815. package/src/components/table/style.scss +37 -0
  816. package/src/components/template-part-converter/convert-to-template-part.js +4 -27
  817. package/src/components/welcome-guide/editor.js +1 -1
  818. package/src/components/welcome-guide/styles.js +5 -3
  819. package/src/hooks/commands/use-common-commands.js +167 -0
  820. package/src/hooks/commands/use-edit-mode-commands.js +61 -25
  821. package/src/hooks/index.js +1 -0
  822. package/src/hooks/navigation-menu-edit.js +95 -0
  823. package/src/hooks/push-changes-to-global-styles/index.js +1 -1
  824. package/src/hooks/template-part-edit.js +1 -1
  825. package/src/store/actions.js +40 -8
  826. package/src/store/index.js +1 -1
  827. package/src/store/reducer.js +6 -5
  828. package/src/store/selectors.js +34 -9
  829. package/src/store/test/actions.js +8 -8
  830. package/src/store/test/reducer.js +11 -11
  831. package/src/store/test/selectors.js +8 -8
  832. package/src/style.scss +12 -2
  833. package/src/utils/get-is-list-page.js +16 -4
  834. package/src/utils/is-previewing-theme.js +4 -2
  835. package/src/utils/use-activate-theme.js +3 -2
  836. package/src/utils/use-debounced-input.js +17 -0
  837. package/build/components/add-new-template/new-template-part.js +0 -113
  838. package/build/components/add-new-template/new-template-part.js.map +0 -1
  839. package/build/components/page-content-lock/constants.js +0 -9
  840. package/build/components/page-content-lock/constants.js.map +0 -1
  841. package/build/components/page-content-lock/index.js +0 -29
  842. package/build/components/page-content-lock/index.js.map +0 -1
  843. package/build/components/page-content-lock/use-disable-non-content-blocks.js +0 -49
  844. package/build/components/page-content-lock/use-disable-non-content-blocks.js.map +0 -1
  845. package/build/components/page-content-lock/use-page-content-lock-notifications.js +0 -112
  846. package/build/components/page-content-lock/use-page-content-lock-notifications.js.map +0 -1
  847. package/build/components/sidebar-edit-mode/page-panels/content-blocks-list.js +0 -79
  848. package/build/components/sidebar-edit-mode/page-panels/content-blocks-list.js.map +0 -1
  849. package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -52
  850. package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
  851. package/build/components/sidebar-navigation-screen-template-part/index.js +0 -105
  852. package/build/components/sidebar-navigation-screen-template-part/index.js.map +0 -1
  853. package/build/components/sidebar-navigation-subtitle/index.js +0 -17
  854. package/build/components/sidebar-navigation-subtitle/index.js.map +0 -1
  855. package/build/private-apis.js.map +0 -1
  856. package/build-module/components/add-new-template/new-template-part.js +0 -93
  857. package/build-module/components/add-new-template/new-template-part.js.map +0 -1
  858. package/build-module/components/page-content-lock/constants.js +0 -2
  859. package/build-module/components/page-content-lock/constants.js.map +0 -1
  860. package/build-module/components/page-content-lock/index.js +0 -14
  861. package/build-module/components/page-content-lock/index.js.map +0 -1
  862. package/build-module/components/page-content-lock/use-disable-non-content-blocks.js.map +0 -1
  863. package/build-module/components/page-content-lock/use-page-content-lock-notifications.js +0 -98
  864. package/build-module/components/page-content-lock/use-page-content-lock-notifications.js.map +0 -1
  865. package/build-module/components/sidebar-edit-mode/page-panels/content-blocks-list.js +0 -67
  866. package/build-module/components/sidebar-edit-mode/page-panels/content-blocks-list.js.map +0 -1
  867. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -39
  868. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
  869. package/build-module/components/sidebar-navigation-screen-template-part/index.js +0 -86
  870. package/build-module/components/sidebar-navigation-screen-template-part/index.js.map +0 -1
  871. package/build-module/components/sidebar-navigation-subtitle/index.js +0 -9
  872. package/build-module/components/sidebar-navigation-subtitle/index.js.map +0 -1
  873. package/build-module/private-apis.js.map +0 -1
  874. package/src/components/add-new-template/new-template-part.js +0 -109
  875. package/src/components/page-content-lock/index.js +0 -14
  876. package/src/components/page-content-lock/use-page-content-lock-notifications.js +0 -128
  877. package/src/components/sidebar-edit-mode/page-panels/content-blocks-list.js +0 -77
  878. package/src/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -47
  879. package/src/components/sidebar-navigation-screen-template-part/index.js +0 -103
  880. package/src/components/sidebar-navigation-screen-templates/style.scss +0 -4
  881. package/src/components/sidebar-navigation-subtitle/index.js +0 -5
  882. package/src/components/sidebar-navigation-subtitle/style.scss +0 -7
  883. /package/src/{private-apis.js → lock-unlock.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-root.js"],"names":["ScreenRoot","useGlobalStyle","blockEditorPrivateApis","customCSS","hasVariations","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","__experimentalGetCurrentThemeGlobalStylesVariations","coreStore","globalStylesId","globalStyles","undefined","length","_links","chevronLeft","chevronRight"],"mappings":";;;;;;;;;;;AAGA;;AAWA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AA3BA;AACA;AACA;;AAkBA;AACA;AACA;AAOA,SAASA,UAAT,GAAsB;AACrB,QAAM;AAAEC,IAAAA;AAAF,MAAqB,yBAAQC,wBAAR,CAA3B;AACA,QAAM,CAAEC,SAAF,IAAgBF,cAAc,CAAE,KAAF,CAApC;AAEA,QAAM;AAAEG,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,MAAgC,qBAAaC,MAAF,IAAc;AAAA;;AAC9D,UAAM;AACLC,MAAAA,eADK;AAELC,MAAAA,sCAFK;AAGLC,MAAAA;AAHK,QAIFH,MAAM,CAAEI,eAAF,CAJV;;AAMA,UAAMC,cAAc,GAAGH,sCAAsC,EAA7D;;AACA,UAAMI,YAAY,GAAGD,cAAc,GAChCJ,eAAe,CAAE,MAAF,EAAU,cAAV,EAA0BI,cAA1B,CADiB,GAEhCE,SAFH;AAIA,WAAO;AACNT,MAAAA,aAAa,EACZ,CAAC,CAAEK,mDAAmD,IACnDK,MAHE;AAINT,MAAAA,UAAU,2BACT,CAAC,CAAEO,YAAY,EAAEG,MAAd,GAAwB,oBAAxB,CADM,yEAC4C;AALhD,KAAP;AAOA,GAnBqC,EAmBnC,EAnBmC,CAAtC;AAqBA,SACC,4BAAC,gBAAD;AAAM,IAAA,IAAI,EAAC,OAAX;AAAmB,IAAA,SAAS,EAAC;AAA7B,KACC,4BAAC,oBAAD,QACC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAG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ADD,EAWC,4BAAC,mCAAD,QACC,4BAAC,wCAAD;AACC,IAAA,IAAI,EAAC,MADN;AAEC,kBAAa,cAAI,gBAAJ;AAFd,KAIC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACC,4BAAC,oBAAD,QACG,cAAI,gBAAJ,CADH,CADD,EAIC,4BAAC,0CAAD;AACC,IAAA,IAAI,EACH,qBAAUa,kBAAV,GAAwBC;AAF1B,IAJD,CAJD,CADD,CAXD,CAFD,CAjEF,CADD;AAqGA;;eAEcjB,U","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport StylesPreview from './preview';\nimport { unlock } from '../../private-apis';\n\nfunction ScreenRoot() {\n\tconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( 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\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card size=\"small\" className=\"edit-site-global-styles-screen-root\">\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardMedia>\n\t\t\t\t\t\t\t<StylesPreview />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/variations\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tpath=\"/blocks\"\n\t\t\t\t\t\taria-label={ __( 'Blocks styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/css\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</CardBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Card>\n\t);\n}\n\nexport default ScreenRoot;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-root.js"],"names":["ScreenRoot","useGlobalStyle","blockEditorPrivateApis","customCSS","hasVariations","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","__experimentalGetCurrentThemeGlobalStylesVariations","coreStore","globalStylesId","globalStyles","undefined","length","_links","chevronLeft","chevronRight"],"mappings":";;;;;;;;;;;AAGA;;AAWA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AA3BA;AACA;AACA;;AAkBA;AACA;AACA;AAOA,SAASA,UAAT,GAAsB;AACrB,QAAM;AAAEC,IAAAA;AAAF,MAAqB,wBAAQC,wBAAR,CAA3B;AACA,QAAM,CAAEC,SAAF,IAAgBF,cAAc,CAAE,KAAF,CAApC;AAEA,QAAM;AAAEG,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,MAAgC,qBAAaC,MAAF,IAAc;AAAA;;AAC9D,UAAM;AACLC,MAAAA,eADK;AAELC,MAAAA,sCAFK;AAGLC,MAAAA;AAHK,QAIFH,MAAM,CAAEI,eAAF,CAJV;;AAMA,UAAMC,cAAc,GA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AAa,cAAI,eAAJ;AAFd,KAIC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACC,4BAAC,oBAAD,QAAY,cAAI,QAAJ,CAAZ,CADD,EAEC,4BAAC,0CAAD;AACC,IAAA,IAAI,EAAG,qBAAUD,kBAAV,GAAwBC;AADhC,IAFD,CAJD,CADD,CAhBD,CAjCD,EAgEGZ,UAAU,IAAI,CAAC,CAAEF,SAAjB,IACD,qDACC,4BAAC,uBAAD,OADD,EAEC,4BAAC,oBAAD,QACC,4BAAC,gCAAD;AACC,IAAA,EAAE,EAAC,GADJ;AAEC,IAAA,UAAU,EAAG,CAFd;AAGC,IAAA,QAAQ,EAAC,MAHV;AAIC,IAAA,YAAY,EAAG;AAJhB,KAMG,cACD,uEADC,CANH,CADD,EAWC,4BAAC,mCAAD,QACC,4BAAC,wCAAD;AACC,IAAA,IAAI,EAAC,MADN;AAEC,kBAAa,cAAI,gBAAJ;AAFd,KAIC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACC,4BAAC,oBAAD,QACG,cAAI,gBAAJ,CADH,CADD,EAIC,4BAAC,0CAAD;AACC,IAAA,IAAI,EACH,qBAAUa,kBAAV,GAAwBC;AAF1B,IAJD,CAJD,CADD,CAXD,CAFD,CAjEF,CADD;AAqGA;;eAEcjB,U","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport StylesPreview from './preview';\nimport { unlock } from '../../lock-unlock';\n\nfunction ScreenRoot() {\n\tconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( 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\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card size=\"small\" className=\"edit-site-global-styles-screen-root\">\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardMedia>\n\t\t\t\t\t\t\t<StylesPreview />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/variations\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tpath=\"/blocks\"\n\t\t\t\t\t\taria-label={ __( 'Blocks styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/css\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</CardBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Card>\n\t);\n}\n\nexport default ScreenRoot;\n"]}
@@ -23,7 +23,7 @@ var _subtitle = _interopRequireDefault(require("./subtitle"));
23
23
 
24
24
  var _blockPreviewPanel = _interopRequireDefault(require("./block-preview-panel"));
25
25
 
26
- var _privateApis = require("../../private-apis");
26
+ var _lockUnlock = require("../../lock-unlock");
27
27
 
28
28
  /**
29
29
  * WordPress dependencies
@@ -34,7 +34,7 @@ var _privateApis = require("../../private-apis");
34
34
  */
35
35
  const {
36
36
  useGlobalStyle
37
- } = (0, _privateApis.unlock)(_blockEditor.privateApis);
37
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
38
38
 
39
39
  function Item({
40
40
  parentMenu,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["useGlobalStyle","blockEditorPrivateApis","Item","parentMenu","element","label","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","gradientValue","color","navigationButtonLabel","background","ScreenTypography"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAMA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;;AAUA;AACA;AACA;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAqB,yBAAQC,wBAAR,CAA3B;;AAEA,SAASC,IAAT,CAAe;AAAEC,EAAAA,UAAF;AAAcC,EAAAA,OAAd;AAAuBC,EAAAA;AAAvB,CAAf,EAAgD;AAC/C,QAAMC,MAAM,GACXF,OAAO,KAAK,MAAZ,IAAsB,CAAEA,OAAxB,GAAkC,EAAlC,GAAwC,YAAYA,OAAS,GAD9D;AAEA,QAAMG,WAAW,GAChBH,OAAO,KAAK,MAAZ,GACG;AACAI,IAAAA,cAAc,EAAE;AADhB,GADH,GAIG,EALJ;AAMA,QAAM,CAAEC,UAAF,IAAiBT,cAAc,CAAEM,MAAM,GAAG,uBAAX,CAArC;AACA,QAAM,CAAEI,SAAF,IAAgBV,cAAc,CAAEM,MAAM,GAAG,sBAAX,CAApC;AACA,QAAM,CAAEK,UAAF,IAAiBX,cAAc,CAAEM,MAAM,GAAG,uBAAX,CAArC;AACA,QAAM,CAAEM,aAAF,IAAoBZ,cAAc,CACvCM,MAAM,GAAG,0BAD8B,CAAxC;AAGA,QAAM,CAAEO,eAAF,IAAsBb,cAAc,CAAEM,MAAM,GAAG,kBAAX,CAA1C;AACA,QAAM,CAAEQ,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AC,IAAD;AACC,IAAA,UAAU,EAAGA,UADd;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,IAAA,KAAK,EAAG,cAAI,MAAJ;AAHT,IADD,EAMC,4BAAC,IAAD;AACC,IAAA,UAAU,EAAGA,UADd;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,IAAA,KAAK,EAAG,cAAI,OAAJ;AAHT,IAND,EAWC,4BAAC,IAAD;AACC,IAAA,UAAU,EAAGA,UADd;AAEC,IAAA,OAAO,EAAC,SAFT;AAGC,IAAA,KAAK,EAAG,cAAI,UAAJ;AAHT,IAXD,EAgBC,4BAAC,IAAD;AACC,IAAA,UAAU,EAAGA,UADd;AAEC,IAAA,OAAO,EAAC,SAFT;AAGC,IAAA,KAAK,EAAG,cAAI,UAAJ;AAHT,IAhBD,EAqBC,4BAAC,IAAD;AACC,IAAA,UAAU,EAAGA,UADd;AAEC,IAAA,OAAO,EAAC,QAFT;AAGC,IAAA,KAAK,EAAG,cAAI,SAAJ;AAHT,IArBD,CAFD,CADD,CAVD,CADD;AA6CA;;eAEce,gB","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 ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../private-apis';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction Item( { 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 [ 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: gradientValue ?? backgroundColor,\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 ScreenTypography() {\n\tconst parentMenu = '';\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\n\t\t\t<BlockPreviewPanel />\n\n\t\t\t<div className=\"edit-site-global-styles-screen-typography\">\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"text\"\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"link\"\n\t\t\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"heading\"\n\t\t\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"caption\"\n\t\t\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"button\"\n\t\t\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["useGlobalStyle","blockEditorPrivateApis","Item","parentMenu","element","label","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","gradientValue","color","navigationButtonLabel","background","ScreenTypography"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAMA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AA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FT;AAGC,IAAA,KAAK,EAAG,cAAI,UAAJ;AAHT,IAhBD,EAqBC,4BAAC,IAAD;AACC,IAAA,UAAU,EAAGA,UADd;AAEC,IAAA,OAAO,EAAC,QAFT;AAGC,IAAA,KAAK,EAAG,cAAI,SAAJ;AAHT,IArBD,CAFD,CADD,CAVD,CADD;AA6CA;;eAEce,gB","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 ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction Item( { 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 [ 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: gradientValue ?? backgroundColor,\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 ScreenTypography() {\n\tconst parentMenu = '';\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\n\t\t\t<BlockPreviewPanel />\n\n\t\t\t<div className=\"edit-site-global-styles-screen-typography\">\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"text\"\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"link\"\n\t\t\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"heading\"\n\t\t\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"caption\"\n\t\t\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"button\"\n\t\t\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"]}
@@ -27,7 +27,7 @@ var _globalStylesProvider = require("./global-styles-provider");
27
27
 
28
28
  var _preview = _interopRequireDefault(require("./preview"));
29
29
 
30
- var _privateApis = require("../../private-apis");
30
+ var _lockUnlock = require("../../lock-unlock");
31
31
 
32
32
  /**
33
33
  * External dependencies
@@ -43,7 +43,7 @@ var _privateApis = require("../../private-apis");
43
43
  const {
44
44
  GlobalStylesContext,
45
45
  areGlobalStyleConfigsEqual
46
- } = (0, _privateApis.unlock)(_blockEditor.privateApis);
46
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
47
47
 
48
48
  function Variation({
49
49
  variation
@@ -87,6 +87,14 @@ function Variation({
87
87
  const isActive = (0, _element.useMemo)(() => {
88
88
  return areGlobalStyleConfigsEqual(user, variation);
89
89
  }, [user, variation]);
90
+ let label = variation?.title;
91
+
92
+ if (variation?.description) {
93
+ label = (0, _i18n.sprintf)(
94
+ /* translators: %1$s: variation title. %2$s variation description. */
95
+ (0, _i18n.__)('%1$s (%2$s)'), variation?.title, variation?.description);
96
+ }
97
+
90
98
  return (0, _element.createElement)(GlobalStylesContext.Provider, {
91
99
  value: context
92
100
  }, (0, _element.createElement)("div", {
@@ -97,7 +105,7 @@ function Variation({
97
105
  onClick: selectVariation,
98
106
  onKeyDown: selectOnEnter,
99
107
  tabIndex: "0",
100
- "aria-label": variation?.title,
108
+ "aria-label": label,
101
109
  "aria-current": isActive,
102
110
  onFocus: () => setIsFocused(true),
103
111
  onBlur: () => setIsFocused(false)
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"names":["GlobalStylesContext","areGlobalStyleConfigsEqual","blockEditorPrivateApis","Variation","variation","isFocused","setIsFocused","base","user","setUserConfig","context","settings","styles","merged","selectVariation","selectOnEnter","event","keyCode","ENTER","preventDefault","isActive","title","StyleVariationsContainer","variations","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","withEmptyVariation","map","index"],"mappings":";;;;;;;;;AAUA;;AAPA;;AAKA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AArBA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;AAKA,MAAM;AAAEA,EAAAA,mBAAF;AAAuBC,EAAAA;AAAvB,IAAsD,yBAC3DC,wBAD2D,CAA5D;;AAIA,SAASC,SAAT,CAAoB;AAAEC,EAAAA;AAAF,CAApB,EAAoC;AACnC,QAAM,CAAEC,SAAF,EAAaC,YAAb,IAA8B,uBAAU,KAAV,CAApC;AACA,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA;AAAd,MAAgC,yBAAYT,mBAAZ,CAAtC;AACA,QAAMU,OAAO,GAAG,sBAAS,MAAM;AAAA;;AAC9B,WAAO;AACNF,MAAAA,IAAI,EAAE;AACLG,QAAAA,QAAQ,yBAAEP,SAAS,CAACO,QAAZ,qEAAwB,EAD3B;AAELC,QAAAA,MAAM,uBAAER,SAAS,CAACQ,MAAZ,iEAAsB;AAFvB,OADA;AAKNL,MAAAA,IALM;AAMNM,MAAAA,MAAM,EAAE,mDAAyBN,IAAzB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A,aAAa;AAHd,IADD,CAhBD,CADD,CADD;AA4BA;;AAEc,SAASiB,wBAAT,GAAoC;AAClD,QAAMC,UAAU,GAAG,qBAAaC,MAAF,IAAc;AAC3C,WAAOA,MAAM,CACZC,eADY,CAAN,CAELC,mDAFK,EAAP;AAGA,GAJkB,EAIhB,EAJgB,CAAnB;AAMA,QAAMC,kBAAkB,GAAG,sBAAS,MAAM;AACzC,WAAO,CACN;AACCN,MAAAA,KAAK,EAAE,cAAI,SAAJ,CADR;AAECV,MAAAA,QAAQ,EAAE,EAFX;AAGCC,MAAAA,MAAM,EAAE;AAHT,KADM,EAMN,GAAG,CAAEW,UAAF,aAAEA,UAAF,cAAEA,UAAF,GAAgB,EAAhB,EAAqBK,GAArB,CAA4BxB,SAAF;AAAA;;AAAA,aAAmB,EAC/C,GAAGA,SAD4C;AAE/CO,QAAAA,QAAQ,0BAAEP,SAAS,CAACO,QAAZ,uEAAwB,EAFe;AAG/CC,QAAAA,MAAM,wBAAER,SAAS,CAACQ,MAAZ,mEAAsB;AAHmB,OAAnB;AAAA,KAA1B,CANG,CAAP;AAYA,GAb0B,EAaxB,CAAEW,UAAF,CAbwB,CAA3B;AAeA,SACC,4BAAC,8BAAD;AACC,IAAA,OAAO,EAAG,CADX;AAEC,IAAA,SAAS,EAAC;AAFX,KAIGI,kBAAkB,CAACC,GAAnB,CAAwB,CAAExB,SAAF,EAAayB,KAAb,KACzB,4BAAC,SAAD;AAAW,IAAA,GAAG,EAAGA,KAAjB;AAAyB,IAAA,SAAS,EAAGzB;AAArC,IADC,CAJH,CADD;AAUA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport StylesPreview from './preview';\nimport { unlock } from '../../private-apis';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction Variation( { variation } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo( () => {\n\t\treturn {\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}, [ variation, base ] );\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => {\n\t\t\treturn {\n\t\t\t\tsettings: variation.settings,\n\t\t\t\tstyles: variation.styles,\n\t\t\t};\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\treturn areGlobalStyleConfigsEqual( user, variation );\n\t}, [ user, variation ] );\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={ variation?.title }\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<StylesPreview\n\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\twithHoverView\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\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) ) }\n\t\t</Grid>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"names":["GlobalStylesContext","areGlobalStyleConfigsEqual","blockEditorPrivateApis","Variation","variation","isFocused","setIsFocused","base","user","setUserConfig","context","settings","styles","merged","selectVariation","selectOnEnter","event","keyCode","ENTER","preventDefault","isActive","label","title","description","StyleVariationsContainer","variations","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","withEmptyVariation","map","index"],"mappings":";;;;;;;;;AAUA;;AAPA;;AAKA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AArBA;AACA;AACA;;AAGA;AAC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AEA,UAAF,cAAEA,UAAF,GAAgB,EAAhB,EAAqBK,GAArB,CAA4B1B,SAAF;AAAA;;AAAA,aAAmB,EAC/C,GAAGA,SAD4C;AAE/CO,QAAAA,QAAQ,0BAAEP,SAAS,CAACO,QAAZ,uEAAwB,EAFe;AAG/CC,QAAAA,MAAM,wBAAER,SAAS,CAACQ,MAAZ,mEAAsB;AAHmB,OAAnB;AAAA,KAA1B,CANG,CAAP;AAYA,GAb0B,EAaxB,CAAEa,UAAF,CAbwB,CAA3B;AAeA,SACC,4BAAC,8BAAD;AACC,IAAA,OAAO,EAAG,CADX;AAEC,IAAA,SAAS,EAAC;AAFX,KAIGI,kBAAkB,CAACC,GAAnB,CAAwB,CAAE1B,SAAF,EAAa2B,KAAb,KACzB,4BAAC,SAAD;AAAW,IAAA,GAAG,EAAGA,KAAjB;AAAyB,IAAA,SAAS,EAAG3B;AAArC,IADC,CAJH,CADD;AAUA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\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 StylesPreview from './preview';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction Variation( { variation } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo( () => {\n\t\treturn {\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}, [ variation, base ] );\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => {\n\t\t\treturn {\n\t\t\t\tsettings: variation.settings,\n\t\t\t\tstyles: variation.styles,\n\t\t\t};\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\treturn areGlobalStyleConfigsEqual( user, variation );\n\t}, [ user, variation ] );\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<StylesPreview\n\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\twithHoverView\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\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) ) }\n\t\t</Grid>\n\t);\n}\n"]}
@@ -9,7 +9,7 @@ var _element = require("@wordpress/element");
9
9
 
10
10
  var _blockEditor = require("@wordpress/block-editor");
11
11
 
12
- var _privateApis = require("../../private-apis");
12
+ var _lockUnlock = require("../../lock-unlock");
13
13
 
14
14
  /**
15
15
  * WordPress dependencies
@@ -23,7 +23,7 @@ const {
23
23
  useGlobalSetting,
24
24
  useSettingsForBlockElement,
25
25
  TypographyPanel: StylesTypographyPanel
26
- } = (0, _privateApis.unlock)(_blockEditor.privateApis);
26
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
27
27
 
28
28
  function TypographyPanel({
29
29
  element,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"names":["useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","blockEditorPrivateApis","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings"],"mappings":";;;;;;;;;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;AAEC,IAAA,KAAK,EAAGH,KAFT;AAGC,IAAA,QAAQ,EAAGI,QAHZ;AAIC,IAAA,QAAQ,EAAGG;AAJZ,IADD;AAQA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../private-apis';\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"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"names":["useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","blockEditorPrivateApis","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","used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,IAAA,cAAc,EAAGH,cADlB;AAEC,IAAA,KAAK,EAAGH,KAFT;AAGC,IAAA,QAAQ,EAAGI,QAHZ;AAIC,IAAA,QAAQ,EAAGG;AAJZ,IADD;AAQA","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"]}
@@ -9,7 +9,7 @@ var _element = require("@wordpress/element");
9
9
 
10
10
  var _blockEditor = require("@wordpress/block-editor");
11
11
 
12
- var _privateApis = require("../../private-apis");
12
+ var _lockUnlock = require("../../lock-unlock");
13
13
 
14
14
  /**
15
15
  * WordPress dependencies
@@ -20,7 +20,7 @@ var _privateApis = require("../../private-apis");
20
20
  */
21
21
  const {
22
22
  useGlobalStyle
23
- } = (0, _privateApis.unlock)(_blockEditor.privateApis);
23
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
24
24
 
25
25
  function TypographyPreview({
26
26
  name,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-preview.js"],"names":["useGlobalStyle","blockEditorPrivateApis","TypographyPreview","name","element","headingLevel","prefix","fontFamily","gradientValue","backgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","background"],"mappings":";;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAM;AAAEA,EAAAA;AAAF,IAAqB,yBAAQC,wBAAR,CAA3B;;AAEe,SAASC,iBAAT,CAA4B;AAAEC,EAAAA,IAAF;AAAQC,EAAAA,OAAR;AAAiBC,EAAAA;AAAjB,CAA5B,EAA8D;AAC5E,MAAIC,MAAM,GAAG,EAAb;;AACA,MAAKF,OAAO,KAAK,SAAjB,EAA6B;AAC5BE,IAAAA,MAAM,GAAI,YAAYD,YAAc,GAApC;AACA,GAFD,MAEO,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAA5B,EAAqC;AAC3CE,IAAAA,MAAM,GAAI,YAAYF,OAAS,GAA/B;AACA;;AAED,QAAM,CAAEG,UAAF,IAAiBP,cAAc,CACpCM,MAAM,GAAG,uBAD2B,EAEpCH,IAFoC,CAArC;AAIA,QAAM,CAAEK,aAAF,IAAoBR,cAAc,CAAEM,MAAM,GAAG,gBAAX,EAA6BH,IAA7B,CAAxC;AACA,QAAM,CAAEM,eAAF,IAAsBT,cAAc,CACzCM,MAAM,GAAG,kBADgC,EAEzCH,IAFyC,CAA1C;AAIA,QAAM,CAAEO,KAAF,IAAYV,cAAc,CAAEM,MAAM,GAAG,YAAX,EAAyBH,IAAzB,CAAhC;AACA,QAAM,CAAEQ,QAAF,IAAeX,cAAc,CAAEM,MAAM,GAAG,qBAAX,EAAkCH,IAAlC,CAAnC;AACA,QAAM,CAAES,SAAF,IAAgBZ,cAAc,CACnCM,MAAM,GAAG,sBAD0B,EAEnCH,IAFmC,CAApC;AAIA,QAAM,CAAEU,UAAF,IAAiBb,cAAc,CACpCM,MAAM,GAAG,uBAD2B,EAEpCH,IAFoC,CAArC;AAIA,QAAM,CAAEW,aAAF,IAAoBd,cAAc,CACvCM,MAAM,GAAG,0BAD8B,EAEvCH,IAFuC,CAAxC;AAIA,QAAMY,WAAW,GAChBX,OAAO,KAAK,MAAZ,GACG;AACAY,IAAAA,cAAc,EAAE;AADhB,GADH,GAIG,EALJ;AAOA,SACC;AACC,IAAA,SAAS,EAAC,8BADX;AAEC,IAAA,KAAK,EAAG;AACPT,MAAAA,UAAU,EAAEA,UAAF,aAAEA,UAAF,cAAEA,UAAF,GAAgB,OADnB;AAEPU,MAAAA,UAAU,EAAET,aAAF,aAAEA,aAAF,cAAEA,aAAF,GAAmBC,eAFtB;AAGPC,MAAAA,KAHO;AAIPC,MAAAA,QAJO;AAKPC,MAAAA,SALO;AAMPC,MAAAA,UANO;AAOPC,MAAAA,aAPO;AAQP,SAAGC;AARI;AAFT,UADD;AAiBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../private-apis';\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 [ 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: gradientValue ?? backgroundColor,\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"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-preview.js"],"names":["useGlobalStyle","blockEditorPrivateApis","TypographyPreview","name","element","headingLevel","prefix","fontFamily","gradientValue","backgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","background"],"mappings":";;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAM;AAAEA,EAAAA;AAAF,IAAqB,wBAAQC,wBAAR,CAA3B;;AAEe,SAASC,iBAAT,CAA4B;AAAEC,EAAAA,IAAF;AAAQC,EAAAA,OAAR;AAAiBC,EAAAA;AAAjB,CAA5B,EAA8D;AAC5E,MAAIC,MAAM,GAAG,EAAb;;AACA,MAAKF,OAAO,KAAK,SAAjB,EAA6B;AAC5BE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;AAMPC,MAAAA,UANO;AAOPC,MAAAA,aAPO;AAQP,SAAGC;AARI;AAFT,UADD;AAiBA","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 [ 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: gradientValue ?? backgroundColor,\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"]}
@@ -9,7 +9,7 @@ exports.default = exports.GlobalStylesMenuSlot = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
14
  var _components = require("@wordpress/components");
15
15
 
@@ -51,7 +51,7 @@ var _screenCss = _interopRequireDefault(require("./screen-css"));
51
51
 
52
52
  var _screenRevisions = _interopRequireDefault(require("./screen-revisions"));
53
53
 
54
- var _privateApis = require("../../private-apis");
54
+ var _lockUnlock = require("../../lock-unlock");
55
55
 
56
56
  var _store = require("../../store");
57
57
 
@@ -59,6 +59,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
59
59
 
60
60
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
61
61
 
62
+ /**
63
+ * External dependencies
64
+ */
65
+
62
66
  /**
63
67
  * WordPress dependencies
64
68
  */
@@ -78,10 +82,60 @@ function GlobalStylesActionMenu() {
78
82
  toggle
79
83
  } = (0, _data.useDispatch)(_preferences.store);
80
84
  const {
81
- canEditCSS,
85
+ canEditCSS
86
+ } = (0, _data.useSelect)(select => {
87
+ var _globalStyles$_links$;
88
+
89
+ const {
90
+ getEntityRecord,
91
+ __experimentalGetCurrentGlobalStylesId
92
+ } = select(_coreData.store);
93
+
94
+ const globalStylesId = __experimentalGetCurrentGlobalStylesId();
95
+
96
+ const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
97
+ return {
98
+ canEditCSS: (_globalStyles$_links$ = !!globalStyles?._links?.['wp:action-edit-css']) !== null && _globalStyles$_links$ !== void 0 ? _globalStyles$_links$ : false
99
+ };
100
+ }, []);
101
+ const {
102
+ goTo
103
+ } = (0, _components.__experimentalUseNavigator)();
104
+
105
+ const loadCustomCSS = () => goTo('/css');
106
+
107
+ return (0, _element.createElement)(GlobalStylesMenuFill, null, (0, _element.createElement)(_components.DropdownMenu, {
108
+ icon: _icons.moreVertical,
109
+ label: (0, _i18n.__)('More')
110
+ }, ({
111
+ onClose
112
+ }) => (0, _element.createElement)(_components.MenuGroup, null, canEditCSS && (0, _element.createElement)(_components.MenuItem, {
113
+ onClick: loadCustomCSS
114
+ }, (0, _i18n.__)('Additional CSS')), (0, _element.createElement)(_components.MenuItem, {
115
+ onClick: () => {
116
+ toggle('core/edit-site', 'welcomeGuideStyles');
117
+ onClose();
118
+ }
119
+ }, (0, _i18n.__)('Welcome Guide')))));
120
+ }
121
+
122
+ function RevisionsCountBadge({
123
+ className,
124
+ children
125
+ }) {
126
+ return (0, _element.createElement)("span", {
127
+ className: (0, _classnames.default)(className, 'edit-site-global-styles-sidebar__revisions-count-badge')
128
+ }, children);
129
+ }
130
+
131
+ function GlobalStylesRevisionsMenu() {
132
+ const {
133
+ setIsListViewOpened
134
+ } = (0, _data.useDispatch)(_store.store);
135
+ const {
82
136
  revisionsCount
83
137
  } = (0, _data.useSelect)(select => {
84
- var _globalStyles$_links$, _globalStyles$_links$2;
138
+ var _globalStyles$_links$2;
85
139
 
86
140
  const {
87
141
  getEntityRecord,
@@ -92,58 +146,52 @@ function GlobalStylesActionMenu() {
92
146
 
93
147
  const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
94
148
  return {
95
- canEditCSS: (_globalStyles$_links$ = !!globalStyles?._links?.['wp:action-edit-css']) !== null && _globalStyles$_links$ !== void 0 ? _globalStyles$_links$ : false,
96
149
  revisionsCount: (_globalStyles$_links$2 = globalStyles?._links?.['version-history']?.[0]?.count) !== null && _globalStyles$_links$2 !== void 0 ? _globalStyles$_links$2 : 0
97
150
  };
98
151
  }, []);
99
152
  const {
100
153
  useGlobalStylesReset
101
- } = (0, _privateApis.unlock)(_blockEditor.privateApis);
154
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
102
155
  const [canReset, onReset] = useGlobalStylesReset();
103
156
  const {
104
157
  goTo
105
158
  } = (0, _components.__experimentalUseNavigator)();
106
159
  const {
107
160
  setEditorCanvasContainerView
108
- } = (0, _privateApis.unlock)((0, _data.useDispatch)(_store.store));
109
-
110
- const loadCustomCSS = () => goTo('/css');
161
+ } = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
111
162
 
112
163
  const loadRevisions = () => {
164
+ setIsListViewOpened(false);
113
165
  goTo('/revisions');
114
166
  setEditorCanvasContainerView('global-styles-revisions');
115
167
  };
116
168
 
117
169
  const hasRevisions = revisionsCount >= 2;
118
170
  return (0, _element.createElement)(GlobalStylesMenuFill, null, (0, _element.createElement)(_components.DropdownMenu, {
119
- icon: _icons.moreVertical,
120
- label: (0, _i18n.__)('Styles actions'),
121
- controls: [{
122
- title: (0, _i18n.__)('Reset to defaults'),
123
- onClick: onReset,
124
- isDisabled: !canReset
125
- }, {
126
- title: (0, _i18n.__)('Welcome Guide'),
127
- onClick: () => toggle('core/edit-site', 'welcomeGuideStyles')
128
- }, ...(canEditCSS ? [{
129
- title: (0, _i18n.__)('Additional CSS'),
130
- onClick: loadCustomCSS
131
- }] : []), ...(hasRevisions ? [{
132
- title: (0, _i18n.sprintf)(
133
- /* translators: %d: number of revisions */
134
- (0, _i18n._n)('%d Revision', '%d Revisions', revisionsCount), revisionsCount),
135
- onClick: loadRevisions
136
- }] : [])]
137
- }));
171
+ icon: _icons.backup,
172
+ label: (0, _i18n.__)('Revisions')
173
+ }, ({
174
+ onClose
175
+ }) => (0, _element.createElement)(_components.MenuGroup, null, hasRevisions && (0, _element.createElement)(_components.MenuItem, {
176
+ onClick: loadRevisions,
177
+ icon: (0, _element.createElement)(RevisionsCountBadge, null, revisionsCount)
178
+ }, (0, _i18n.__)('Revision history')), (0, _element.createElement)(_components.MenuItem, {
179
+ onClick: () => {
180
+ onReset();
181
+ onClose();
182
+ },
183
+ disabled: !canReset
184
+ }, (0, _i18n.__)('Reset to defaults')))));
138
185
  }
139
186
 
140
187
  function GlobalStylesNavigationScreen({
141
188
  className,
142
189
  ...props
143
190
  }) {
144
- return (0, _element.createElement)(_components.__experimentalNavigatorScreen, (0, _extends2.default)({
145
- className: ['edit-site-global-styles-sidebar__navigator-screen', className].filter(Boolean).join(' ')
146
- }, props));
191
+ return (0, _element.createElement)(_components.__experimentalNavigatorScreen, {
192
+ className: ['edit-site-global-styles-sidebar__navigator-screen', className].filter(Boolean).join(' '),
193
+ ...props
194
+ });
147
195
  }
148
196
 
149
197
  function BlockStylesNavigationScreens({
@@ -243,7 +291,7 @@ function GlobalStylesEditorCanvasContainerLink() {
243
291
  goTo,
244
292
  location
245
293
  } = (0, _components.__experimentalUseNavigator)();
246
- const editorCanvasContainerView = (0, _data.useSelect)(select => (0, _privateApis.unlock)(select(_store.store)).getEditorCanvasContainerView(), []); // If the user switches the editor canvas container view, redirect
294
+ const editorCanvasContainerView = (0, _data.useSelect)(select => (0, _lockUnlock.unlock)(select(_store.store)).getEditorCanvasContainerView(), []); // If the user switches the editor canvas container view, redirect
247
295
  // to the appropriate screen. This effectively allows deep linking to the
248
296
  // desired screens from outside the global styles navigation provider.
249
297
 
@@ -256,13 +304,19 @@ function GlobalStylesEditorCanvasContainerLink() {
256
304
  // Switching to any container other than revisions should
257
305
  // redirect from the revisions screen to the root global styles screen.
258
306
  goTo('/');
259
- }
260
- }, [editorCanvasContainerView, location?.path, goTo]);
307
+ } else if (editorCanvasContainerView === 'global-styles-css') {
308
+ goTo('/css');
309
+ } // location?.path is not a dependency because we don't want to track it.
310
+ // Doing so will cause an infinite loop. We could abstract logic to avoid
311
+ // having to disable the check later.
312
+ // eslint-disable-next-line react-hooks/exhaustive-deps
313
+
314
+ }, [editorCanvasContainerView, goTo]);
261
315
  }
262
316
 
263
317
  function GlobalStylesUI() {
264
318
  const blocks = (0, _blocks.getBlockTypes)();
265
- const editorCanvasContainerView = (0, _data.useSelect)(select => (0, _privateApis.unlock)(select(_store.store)).getEditorCanvasContainerView(), []);
319
+ const editorCanvasContainerView = (0, _data.useSelect)(select => (0, _lockUnlock.unlock)(select(_store.store)).getEditorCanvasContainerView(), []);
266
320
  return (0, _element.createElement)(_components.__experimentalNavigatorProvider, {
267
321
  className: "edit-site-global-styles-sidebar__navigator-provider",
268
322
  initialPath: "/"
@@ -311,7 +365,7 @@ function GlobalStylesUI() {
311
365
  key: 'screens-block-' + block.name,
312
366
  name: block.name,
313
367
  parentMenu: '/blocks/' + encodeURIComponent(block.name)
314
- })), 'style-book' === editorCanvasContainerView && (0, _element.createElement)(GlobalStylesStyleBook, null), (0, _element.createElement)(GlobalStylesActionMenu, null), (0, _element.createElement)(GlobalStylesBlockLink, null), (0, _element.createElement)(GlobalStylesEditorCanvasContainerLink, null));
368
+ })), 'style-book' === editorCanvasContainerView && (0, _element.createElement)(GlobalStylesStyleBook, null), (0, _element.createElement)(GlobalStylesRevisionsMenu, null), (0, _element.createElement)(GlobalStylesActionMenu, null), (0, _element.createElement)(GlobalStylesBlockLink, null), (0, _element.createElement)(GlobalStylesEditorCanvasContainerLink, null));
315
369
  }
316
370
 
317
371
  var _default = GlobalStylesUI;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"names":["SLOT_FILL_NAME","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","GlobalStylesActionMenu","toggle","preferencesStore","canEditCSS","revisionsCount","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","count","useGlobalStylesReset","blockEditorPrivateApis","canReset","onReset","goTo","setEditorCanvasContainerView","editSiteStore","loadCustomCSS","loadRevisions","hasRevisions","moreVertical","title","onClick","isDisabled","GlobalStylesNavigationScreen","className","props","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","name","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","length","GlobalStylesStyleBook","navigator","path","location","encodeURIComponent","startsWith","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","GlobalStylesUI","blocks","block"],"mappings":";;;;;;;;;AAoBA;;;;AAjBA;;AAOA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAzCA;AACA;AACA;;AAoBA;AACA;AACA;AAmBA,MAAMA,cAAc,GAAG,kBAAvB;AACA,MAAM;AAAEC,EAAAA,IAAI,EAAEC,oBAAR;AAA8BC,EAAAA,IAAI,EAAEC;AAApC,IACL,gCAAgBJ,cAAhB,CADD;;;AAGA,SAASK,sBAAT,GAAkC;AACjC,QAAM;AAAEC,IAAAA;AAAF,MAAa,uBAAaC,kBAAb,CAAnB;AACA,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAAiC,qBAAaC,MAAF,IAAc;AAAA;;AAC/D,UAAM;AAAEC,MAAAA,eAAF;AAAmBC,MAAAA;AAAnB,QACLF,MAAM,CAAEG,eAAF,CADP;;AAGA,UAAMC,cAAc,GAAGF,sCAAsC,EAA7D;;AACA,UAAMG,YAAY,GAAGD,cA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C;AAAnC,KACC,4BAAC,qBAAD,OADD,CAxCD,EA4CC,4BAAC,4BAAD;AAA8B,IAAA,IAAI,EAAC;AAAnC,KACC,4BAAC,qBAAD,OADD,CA5CD,EAgDC,4BAAC,4BAAD;AAA8B,IAAA,IAAI,EAAC;AAAnC,KACC,4BAAC,kBAAD,OADD,CAhDD,EAoDC,4BAAC,4BAAD;AAA8B,IAAA,IAAI,EAAG;AAArC,KACC,4BAAC,wBAAD,OADD,CApDD,EAwDGE,MAAM,CAAC9B,GAAP,CAAc+B,KAAF,IACb,4BAAC,4BAAD;AACC,IAAA,GAAG,EAAG,gBAAgBA,KAAK,CAAC5B,IAD7B;AAEC,IAAA,IAAI,EAAG,aAAaU,kBAAkB,CAAEkB,KAAK,CAAC5B,IAAR;AAFvC,KAIC,4BAAC,oBAAD;AAAa,IAAA,IAAI,EAAG4B,KAAK,CAAC5B;AAA1B,IAJD,CADC,CAxDH,EAiEC,4BAAC,cAAD,OAjED,EAmEG2B,MAAM,CAAC9B,GAAP,CAAc+B,KAAF,IACb,4BAAC,cAAD;AACC,IAAA,GAAG,EAAG,mBAAmBA,KAAK,CAAC5B,IADhC;AAEC,IAAA,IAAI,EAAG4B,KAAK,CAAC5B,IAFd;AAGC,IAAA,UAAU,EAAG,aAAaU,kBAAkB,CAAEkB,KAAK,CAAC5B,IAAR;AAH7C,IADC,CAnEH,EA2EG,iBAAiBwB,yBAAjB,IACD,4BAAC,qBAAD,OA5EF,EA+EC,4BAAC,sBAAD,OA/ED,EAgFC,4BAAC,qBAAD,OAhFD,EAiFC,4BAAC,qCAAD,OAjFD,CADD;AAqFA;;eAEcE,c","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} 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 { __, sprintf, _n } 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 '../../private-apis';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS, revisionsCount } = 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:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t\trevisionsCount:\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0,\n\t\t};\n\t}, [] );\n\tconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { goTo } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadCustomCSS = () => goTo( '/css' );\n\tconst loadRevisions = () => {\n\t\tgoTo( '/revisions' );\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t};\n\tconst hasRevisions = revisionsCount >= 2;\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Styles actions' ) }\n\t\t\t\tcontrols={ [\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle: __( 'Reset to defaults' ),\n\t\t\t\t\t\tonClick: onReset,\n\t\t\t\t\t\tisDisabled: ! canReset,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle: __( 'Welcome Guide' ),\n\t\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\t\ttoggle( 'core/edit-site', 'welcomeGuideStyles' ),\n\t\t\t\t\t},\n\t\t\t\t\t...( canEditCSS\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttitle: __( 'Additional CSS' ),\n\t\t\t\t\t\t\t\t\tonClick: loadCustomCSS,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: [] ),\n\t\t\t\t\t...( hasRevisions\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttitle: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %d: number of revisions */\n\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t'%d Revision',\n\t\t\t\t\t\t\t\t\t\t\t'%d Revisions',\n\t\t\t\t\t\t\t\t\t\t\trevisionsCount\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\trevisionsCount\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tonClick: loadRevisions,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: [] ),\n\t\t\t\t] }\n\t\t\t/>\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\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\tif ( editorCanvasContainerView === 'global-styles-revisions' ) {\n\t\t\t// Switching to the revisions container view should\n\t\t\t// redirect to the revisions screen.\n\t\t\tgoTo( '/revisions' );\n\t\t} else if (\n\t\t\t!! editorCanvasContainerView &&\n\t\t\tlocation?.path === '/revisions'\n\t\t) {\n\t\t\t// Switching to any container other than revisions should\n\t\t\t// redirect from the revisions screen to the root global styles screen.\n\t\t\tgoTo( '/' );\n\t\t}\n\t}, [ editorCanvasContainerView, location?.path, 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"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"names":["SLOT_FILL_NAME","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","GlobalStylesActionMenu","toggle","preferencesStore","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","goTo","loadCustomCSS","moreVertical","onClose","RevisionsCountBadge","className","children","GlobalStylesRevisionsMenu","setIsListViewOpened","editSiteStore","revisionsCount","count","useGlobalStylesReset","blockEditorPrivateApis","canReset","onReset","setEditorCanvasContainerView","loadRevisions","hasRevisions","backup","GlobalStylesNavigationScreen","props","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","name","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","length","GlobalStylesStyleBook","navigator","path","location","encodeURIComponent","startsWith","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","GlobalStylesUI","blocks","block"],"mappings":";;;;;;;;;AA2BA;;AAxBA;;AAKA;;AASA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AAIA;;AACA;;AACA;;AACA;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BAAjB,IACD,4BAAC,qBAAD,OA5EF,EA+EC,4BAAC,yBAAD,OA/ED,EAgFC,4BAAC,sBAAD,OAhFD,EAiFC,4BAAC,qBAAD,OAjFD,EAkFC,4BAAC,qCAAD,OAlFD,CADD;AAsFA;;eAEcE,c","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\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 { backup, 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 { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\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:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => goTo( '/css' );\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<MenuGroup>\n\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction RevisionsCountBadge( { className, children } ) {\n\treturn (\n\t\t<span\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-sidebar__revisions-count-badge'\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</span>\n\t);\n}\nfunction GlobalStylesRevisionsMenu() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\tconst { revisionsCount } = 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\trevisionsCount:\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0,\n\t\t};\n\t}, [] );\n\tconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { goTo } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadRevisions = () => {\n\t\tsetIsListViewOpened( false );\n\t\tgoTo( '/revisions' );\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t};\n\tconst hasRevisions = revisionsCount >= 2;\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ backup } label={ __( 'Revisions' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ hasRevisions && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ loadRevisions }\n\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t<RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t\t{ revisionsCount }\n\t\t\t\t\t\t\t\t\t</RevisionsCountBadge>\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{ __( 'Revision history' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset to defaults' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\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\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\tif ( editorCanvasContainerView === 'global-styles-revisions' ) {\n\t\t\t// Switching to the revisions container view should\n\t\t\t// redirect to the revisions screen.\n\t\t\tgoTo( '/revisions' );\n\t\t} else if (\n\t\t\t!! editorCanvasContainerView &&\n\t\t\tlocation?.path === '/revisions'\n\t\t) {\n\t\t\t// Switching to any container other than revisions should\n\t\t\t// redirect from the revisions screen to the root global styles screen.\n\t\t\tgoTo( '/' );\n\t\t} else if ( editorCanvasContainerView === 'global-styles-css' ) {\n\t\t\tgoTo( '/css' );\n\t\t}\n\n\t\t// location?.path is not a dependency because we don't want to track it.\n\t\t// Doing so will cause an infinite loop. We could abstract logic to avoid\n\t\t// having to disable the check later.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ editorCanvasContainerView, 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<GlobalStylesRevisionsMenu />\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"]}
@@ -13,7 +13,7 @@ var _blockEditor = require("@wordpress/block-editor");
13
13
 
14
14
  var _store = require("../../store");
15
15
 
16
- var _privateApis = require("../../private-apis");
16
+ var _lockUnlock = require("../../lock-unlock");
17
17
 
18
18
  /**
19
19
  * WordPress dependencies
@@ -24,7 +24,7 @@ var _privateApis = require("../../private-apis");
24
24
  */
25
25
  const {
26
26
  useGlobalStylesOutput
27
- } = (0, _privateApis.unlock)(_blockEditor.privateApis);
27
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
28
28
 
29
29
  function useGlobalStylesRenderer() {
30
30
  const [styles, settings] = useGlobalStylesOutput();
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"names":["useGlobalStylesOutput","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","editSiteStore","updateSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AAKA;;AACA;;AAXA;AACA;AACA;;AAKA;AACA;AACA;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAA4B,yBAAQC,wBAAR,CAAlC;;AAEA,SAASC,uBAAT,GAAmC;AAClC,QAAM,CAAEC,MAAF,EAAUC,QAAV,IAAuBJ,qBAAqB,EAAlD;AACA,QAAM;AAAEK,IAAAA;AAAF,MAAkB,qBAAWC,YAAX,CAAxB;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAqB,uBAAaD,YAAb,CAA3B;AAEA,0BAAW,MAAM;AAAA;;AAChB,QAAK,CAAEH,MAAF,IAAY,CAAEC,QAAnB,EAA8B;AAC7B;AACA;;AAED,UAAMI,oBAAoB,GAAGH,WAAW,EAAxC;AACA,UAAMI,eAAe,GAAGC,MAAM,CAACC,MAAP,0BACvBH,oBAAoB,CAACL,MADE,yEACQ,EADR,EAEtBS,MAFsB,CAEZC,KAAF,IAAa,CAAEA,KAAK,CAACC,cAFP,CAAxB;AAGAP,IAAAA,cAAc,CAAE,EACf,GAAGC,oBADY;AAEfL,MAAAA,MAAM,EAAE,CAAE,GAAGM,eAAL,EAAsB,GAAGN,MAAzB,CAFO;AAGfY,MAAAA,sBAAsB,EAAEX;AAHT,KAAF,CAAd;AAKA,GAdD,EAcG,CAAED,MAAF,EAAUC,QAAV,CAdH;AAeA;;AAEM,SAASY,oBAAT,GAAgC;AACtCd,EAAAA,uBAAuB;AAEvB,SAAO,IAAP;AACA","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 '../../private-apis';\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 ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"names":["useGlobalStylesOutput","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","editSiteStore","updateSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AAKA;;AACA;;AAXA;AACA;AACA;;AAKA;AACA;AACA;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAA4B,wBAAQC,wBAAR,CAAlC;;AAEA,SAASC,uBAAT,GAAmC;AAClC,QAAM,CAAEC,MAAF,EAAUC,QAAV,IAAuBJ,qBAAqB,EAAlD;AACA,QAAM;AAAEK,IAAAA;AAAF,MAAkB,qBAAWC,YAAX,CAAxB;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAqB,uBAAaD,YAAb,CAA3B;AAEA,0BAAW,MAAM;AAAA;;AAChB,QAAK,CAAEH,MAAF,IAAY,CAAEC,QAAnB,EAA8B;AAC7B;AACA;;AAED,UAAMI,oBAAoB,GAAGH,WAAW,EAAxC;AACA,UAAMI,eAAe,GAAGC,MAAM,CAACC,MAAP,0BACvBH,oBAAoB,CAACL,MADE,yEACQ,EADR,EAEtBS,MAFsB,CAEZC,KAAF,IAAa,CAAEA,KAAK,CAACC,cAFP,CAAxB;AAGAP,IAAAA,cAAc,CAAE,EACf,GAAGC,oBADY;AAEfL,MAAAA,MAAM,EAAE,CAAE,GAAGM,eAAL,EAAsB,GAAGN,MAAzB,CAFO;AAGfY,MAAAA,sBAAsB,EAAEX;AAHT,KAAF,CAAd;AAKA,GAdD,EAcG,CAAED,MAAF,EAAUC,QAAV,CAdH;AAeA;;AAEM,SAASY,oBAAT,GAAgC;AACtCd,EAAAA,uBAAuB;AAEvB,SAAO,IAAP;AACA","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 ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"]}