@wordpress/edit-site 5.31.0 → 5.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (906) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-page/index.js.map +1 -1
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  5. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  6. package/build/components/add-new-template/index.js +282 -13
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/add-new-template/utils.js +22 -11
  9. package/build/components/add-new-template/utils.js.map +1 -1
  10. package/build/components/app/index.js.map +1 -1
  11. package/build/components/async/index.js +51 -0
  12. package/build/components/async/index.js.map +1 -0
  13. package/build/components/block-editor/block-inspector-button.js +10 -9
  14. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  15. package/build/components/block-editor/editor-canvas.js +23 -7
  16. package/build/components/block-editor/editor-canvas.js.map +1 -1
  17. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  18. package/build/components/block-editor/resizable-editor.js.map +1 -1
  19. package/build/components/block-editor/resize-handle.js.map +1 -1
  20. package/build/components/block-editor/site-editor-canvas.js +20 -5
  21. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  22. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  23. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  24. package/build/components/canvas-loader/index.js.map +1 -1
  25. package/build/components/code-editor/index.js.map +1 -1
  26. package/build/components/create-template-part-modal/index.js.map +1 -1
  27. package/build/components/editor/index.js +47 -11
  28. package/build/components/editor/index.js.map +1 -1
  29. package/build/components/editor-canvas-container/index.js +1 -2
  30. package/build/components/editor-canvas-container/index.js.map +1 -1
  31. package/build/components/error-boundary/index.js.map +1 -1
  32. package/build/components/error-boundary/warning.js.map +1 -1
  33. package/build/components/global-styles/background-panel.js +50 -0
  34. package/build/components/global-styles/background-panel.js.map +1 -0
  35. package/build/components/global-styles/block-preview-panel.js +6 -1
  36. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  37. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  38. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  39. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  40. package/build/components/global-styles/font-families.js +2 -2
  41. package/build/components/global-styles/font-families.js.map +1 -1
  42. package/build/components/global-styles/font-family-item.js.map +1 -1
  43. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  44. package/build/components/global-styles/font-library-modal/context.js +88 -31
  45. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  46. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  47. package/build/components/global-styles/font-library-modal/font-collection.js +11 -4
  48. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  49. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  51. package/build/components/global-styles/font-library-modal/index.js +1 -1
  52. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  53. package/build/components/global-styles/font-library-modal/installed-fonts.js +10 -9
  54. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  55. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  57. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  59. package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  61. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/utils/index.js +20 -2
  63. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  65. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  67. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  68. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  69. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  70. package/build/components/global-styles/header.js.map +1 -1
  71. package/build/components/global-styles/highlighted-colors.js +1 -1
  72. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  73. package/build/components/global-styles/hooks.js +11 -3
  74. package/build/components/global-styles/hooks.js.map +1 -1
  75. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  76. package/build/components/global-styles/index.js.map +1 -1
  77. package/build/components/global-styles/navigation-button.js.map +1 -1
  78. package/build/components/global-styles/palette.js +3 -1
  79. package/build/components/global-styles/palette.js.map +1 -1
  80. package/build/components/global-styles/preview-colors.js +2 -2
  81. package/build/components/global-styles/preview-colors.js.map +1 -1
  82. package/build/components/global-styles/preview-iframe.js.map +1 -1
  83. package/build/components/global-styles/preview-styles.js.map +1 -1
  84. package/build/components/global-styles/root-menu.js +8 -2
  85. package/build/components/global-styles/root-menu.js.map +1 -1
  86. package/build/components/global-styles/screen-background.js +34 -0
  87. package/build/components/global-styles/screen-background.js.map +1 -0
  88. package/build/components/global-styles/screen-block-list.js.map +1 -1
  89. package/build/components/global-styles/screen-block.js.map +1 -1
  90. package/build/components/global-styles/screen-color-palette.js +2 -2
  91. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  92. package/build/components/global-styles/screen-colors.js +6 -4
  93. package/build/components/global-styles/screen-colors.js.map +1 -1
  94. package/build/components/global-styles/screen-css.js.map +1 -1
  95. package/build/components/global-styles/screen-layout.js.map +1 -1
  96. package/build/components/global-styles/screen-revisions/index.js +1 -1
  97. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  98. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  99. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  100. package/build/components/global-styles/screen-root.js.map +1 -1
  101. package/build/components/global-styles/screen-style-variations.js +3 -37
  102. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  103. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  104. package/build/components/global-styles/screen-typography.js +6 -6
  105. package/build/components/global-styles/screen-typography.js.map +1 -1
  106. package/build/components/global-styles/style-variations-container.js +5 -2
  107. package/build/components/global-styles/style-variations-container.js.map +1 -1
  108. package/build/components/global-styles/subtitle.js.map +1 -1
  109. package/build/components/global-styles/typography-elements.js.map +1 -1
  110. package/build/components/global-styles/typography-example.js.map +1 -1
  111. package/build/components/global-styles/typography-panel.js.map +1 -1
  112. package/build/components/global-styles/typography-preview.js.map +1 -1
  113. package/build/components/global-styles/ui.js +5 -2
  114. package/build/components/global-styles/ui.js.map +1 -1
  115. package/build/components/global-styles/utils.js.map +1 -1
  116. package/build/components/global-styles/variations/variation.js.map +1 -1
  117. package/build/components/global-styles/variations/variations-color.js +10 -3
  118. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  119. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  120. package/build/components/global-styles/variations/variations-typography.js +9 -2
  121. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  122. package/build/components/global-styles-renderer/index.js.map +1 -1
  123. package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
  124. package/build/components/header-edit-mode/index.js +4 -4
  125. package/build/components/header-edit-mode/index.js.map +1 -1
  126. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  127. package/build/components/header-edit-mode/more-menu/index.js +10 -12
  128. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  129. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  130. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  131. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  132. package/build/components/keyboard-shortcuts/edit-mode.js +0 -23
  133. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  134. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  135. package/build/components/keyboard-shortcuts/register.js +0 -18
  136. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  137. package/build/components/layout/animation.js +130 -0
  138. package/build/components/layout/animation.js.map +1 -0
  139. package/build/components/layout/hooks.js.map +1 -1
  140. package/build/components/layout/index.js +21 -64
  141. package/build/components/layout/index.js.map +1 -1
  142. package/build/components/layout/router.js +92 -23
  143. package/build/components/layout/router.js.map +1 -1
  144. package/build/components/media/index.js.map +1 -1
  145. package/build/components/page/header.js.map +1 -1
  146. package/build/components/page/index.js +5 -2
  147. package/build/components/page/index.js.map +1 -1
  148. package/build/components/page-pages/index.js +33 -33
  149. package/build/components/page-pages/index.js.map +1 -1
  150. package/build/components/page-patterns/dataviews-pattern-actions.js +5 -4
  151. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  152. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  153. package/build/components/page-patterns/header.js +2 -2
  154. package/build/components/page-patterns/header.js.map +1 -1
  155. package/build/components/page-patterns/index.js +136 -39
  156. package/build/components/page-patterns/index.js.map +1 -1
  157. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  158. package/build/components/page-patterns/search-items.js +18 -59
  159. package/build/components/page-patterns/search-items.js.map +1 -1
  160. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  161. package/build/components/page-patterns/use-patterns.js +5 -10
  162. package/build/components/page-patterns/use-patterns.js.map +1 -1
  163. package/build/components/page-patterns/utils.js.map +1 -1
  164. package/build/components/page-templates-template-parts/add-new-template-part.js +2 -1
  165. package/build/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  166. package/build/components/page-templates-template-parts/hooks.js.map +1 -1
  167. package/build/components/page-templates-template-parts/index.js +35 -80
  168. package/build/components/page-templates-template-parts/index.js.map +1 -1
  169. package/build/components/pagination/index.js.map +1 -1
  170. package/build/components/pattern-modal/duplicate.js +6 -3
  171. package/build/components/pattern-modal/duplicate.js.map +1 -1
  172. package/build/components/pattern-modal/index.js.map +1 -1
  173. package/build/components/pattern-modal/rename.js +6 -3
  174. package/build/components/pattern-modal/rename.js.map +1 -1
  175. package/build/components/plugin-template-setting-panel/index.js +12 -1
  176. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  177. package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
  178. package/build/components/rename-post-menu-item/index.js.map +1 -0
  179. package/build/components/resizable-frame/index.js +1 -5
  180. package/build/components/resizable-frame/index.js.map +1 -1
  181. package/build/components/revisions/index.js.map +1 -1
  182. package/build/components/routes/link.js.map +1 -1
  183. package/build/components/routes/use-title.js.map +1 -1
  184. package/build/components/save-button/index.js +45 -16
  185. package/build/components/save-button/index.js.map +1 -1
  186. package/build/components/save-hub/index.js +8 -112
  187. package/build/components/save-hub/index.js.map +1 -1
  188. package/build/components/save-panel/index.js +3 -3
  189. package/build/components/save-panel/index.js.map +1 -1
  190. package/build/components/sidebar/index.js +41 -79
  191. package/build/components/sidebar/index.js.map +1 -1
  192. package/build/components/sidebar-button/index.js.map +1 -1
  193. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  194. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  195. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  196. package/build/components/sidebar-dataviews/default-views.js +2 -2
  197. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  198. package/build/components/sidebar-dataviews/index.js +2 -2
  199. package/build/components/sidebar-dataviews/index.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
  201. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  202. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  203. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  204. package/build/components/sidebar-edit-mode/index.js +30 -56
  205. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  206. package/build/components/sidebar-edit-mode/page-panels/index.js +26 -15
  207. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  208. package/build/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
  209. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  210. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  211. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +2 -2
  212. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  213. package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
  214. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  215. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  216. package/build/components/sidebar-edit-mode/template-panel/index.js +11 -17
  217. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  218. package/build/components/sidebar-navigation-item/index.js +31 -0
  219. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  220. package/build/components/sidebar-navigation-screen/index.js +36 -9
  221. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen-details-footer/index.js +5 -1
  223. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  224. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  225. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  226. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  227. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-global-styles/index.js +11 -7
  229. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-main/index.js +6 -15
  231. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  232. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  233. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
  235. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  237. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  239. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  240. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  241. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  242. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  243. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  245. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  246. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  247. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  248. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  249. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-page/index.js +22 -12
  251. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  253. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-pattern/index.js +14 -5
  255. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  257. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  259. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  261. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  263. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  264. package/build/components/sidebar-navigation-screen-patterns/index.js +34 -32
  265. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  266. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  267. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  268. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  269. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  270. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  271. package/build/components/sidebar-navigation-screen-template/index.js +10 -7
  272. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  273. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  274. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  275. package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  276. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  277. package/build/components/site-hub/index.js +22 -21
  278. package/build/components/site-hub/index.js.map +1 -1
  279. package/build/components/site-icon/index.js.map +1 -1
  280. package/build/components/start-template-options/index.js.map +1 -1
  281. package/build/components/style-book/index.js +1 -1
  282. package/build/components/style-book/index.js.map +1 -1
  283. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -7
  284. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  285. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  286. package/build/components/table/index.js.map +1 -1
  287. package/build/components/template-actions/index.js +7 -8
  288. package/build/components/template-actions/index.js.map +1 -1
  289. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  290. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  291. package/build/components/template-part-converter/index.js.map +1 -1
  292. package/build/components/use-edited-entity-record/index.js.map +1 -1
  293. package/build/components/welcome-guide/editor.js.map +1 -1
  294. package/build/components/welcome-guide/image.js.map +1 -1
  295. package/build/components/welcome-guide/index.js.map +1 -1
  296. package/build/components/welcome-guide/page.js.map +1 -1
  297. package/build/components/welcome-guide/styles.js +6 -3
  298. package/build/components/welcome-guide/styles.js.map +1 -1
  299. package/build/components/welcome-guide/template.js.map +1 -1
  300. package/build/hooks/commands/use-common-commands.js.map +1 -1
  301. package/build/hooks/commands/use-edit-mode-commands.js +10 -28
  302. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  303. package/build/hooks/components.js.map +1 -1
  304. package/build/hooks/index.js +0 -1
  305. package/build/hooks/index.js.map +1 -1
  306. package/build/hooks/push-changes-to-global-styles/index.js +3 -40
  307. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  308. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  309. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  310. package/build/index.js +3 -8
  311. package/build/index.js.map +1 -1
  312. package/build/lock-unlock.js.map +1 -1
  313. package/build/store/actions.js +21 -96
  314. package/build/store/actions.js.map +1 -1
  315. package/build/store/constants.js.map +1 -1
  316. package/build/store/index.js +1 -1
  317. package/build/store/index.js.map +1 -1
  318. package/build/store/private-actions.js +1 -85
  319. package/build/store/private-actions.js.map +1 -1
  320. package/build/store/private-selectors.js.map +1 -1
  321. package/build/store/reducer.js.map +1 -1
  322. package/build/store/selectors.js +1 -9
  323. package/build/store/selectors.js.map +1 -1
  324. package/build/utils/clone-deep.js.map +1 -1
  325. package/build/utils/constants.js +2 -1
  326. package/build/utils/constants.js.map +1 -1
  327. package/build/utils/get-is-list-page.js.map +1 -1
  328. package/build/utils/is-previewing-theme.js.map +1 -1
  329. package/build/utils/is-template-removable.js.map +1 -1
  330. package/build/utils/is-template-revertable.js.map +1 -1
  331. package/build/utils/math.js.map +1 -1
  332. package/build/utils/set-nested-value.js +44 -0
  333. package/build/utils/set-nested-value.js.map +1 -0
  334. package/build/utils/template-part-create.js.map +1 -1
  335. package/build/utils/use-activate-theme.js.map +1 -1
  336. package/build/utils/use-actual-current-theme.js.map +1 -1
  337. package/build-module/components/add-new-page/index.js.map +1 -1
  338. package/build-module/components/add-new-pattern/index.js.map +1 -1
  339. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  340. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  341. package/build-module/components/add-new-template/index.js +283 -14
  342. package/build-module/components/add-new-template/index.js.map +1 -1
  343. package/build-module/components/add-new-template/utils.js +21 -11
  344. package/build-module/components/add-new-template/utils.js.map +1 -1
  345. package/build-module/components/app/index.js.map +1 -1
  346. package/build-module/components/async/index.js +44 -0
  347. package/build-module/components/async/index.js.map +1 -0
  348. package/build-module/components/block-editor/block-inspector-button.js +9 -8
  349. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  350. package/build-module/components/block-editor/editor-canvas.js +24 -8
  351. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  352. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  353. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  354. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  355. package/build-module/components/block-editor/site-editor-canvas.js +20 -5
  356. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  357. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  358. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  359. package/build-module/components/canvas-loader/index.js.map +1 -1
  360. package/build-module/components/code-editor/index.js.map +1 -1
  361. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  362. package/build-module/components/editor/index.js +48 -12
  363. package/build-module/components/editor/index.js.map +1 -1
  364. package/build-module/components/editor-canvas-container/index.js +1 -2
  365. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  366. package/build-module/components/error-boundary/index.js.map +1 -1
  367. package/build-module/components/error-boundary/warning.js.map +1 -1
  368. package/build-module/components/global-styles/background-panel.js +44 -0
  369. package/build-module/components/global-styles/background-panel.js.map +1 -0
  370. package/build-module/components/global-styles/block-preview-panel.js +6 -1
  371. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  372. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  373. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  374. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  375. package/build-module/components/global-styles/font-families.js +1 -1
  376. package/build-module/components/global-styles/font-families.js.map +1 -1
  377. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  379. package/build-module/components/global-styles/font-library-modal/context.js +87 -31
  380. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  381. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  382. package/build-module/components/global-styles/font-library-modal/font-collection.js +12 -5
  383. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  384. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  385. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  386. package/build-module/components/global-styles/font-library-modal/index.js +2 -2
  387. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  388. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +11 -10
  389. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  390. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  391. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  392. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  393. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  394. package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  395. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  396. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  397. package/build-module/components/global-styles/font-library-modal/utils/index.js +20 -2
  398. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  399. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  400. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  401. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  402. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  403. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  404. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  405. package/build-module/components/global-styles/header.js.map +1 -1
  406. package/build-module/components/global-styles/highlighted-colors.js +1 -1
  407. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  408. package/build-module/components/global-styles/hooks.js +11 -3
  409. package/build-module/components/global-styles/hooks.js.map +1 -1
  410. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  411. package/build-module/components/global-styles/index.js.map +1 -1
  412. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  413. package/build-module/components/global-styles/palette.js +3 -1
  414. package/build-module/components/global-styles/palette.js.map +1 -1
  415. package/build-module/components/global-styles/preview-colors.js +2 -2
  416. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  417. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  418. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  419. package/build-module/components/global-styles/root-menu.js +9 -3
  420. package/build-module/components/global-styles/root-menu.js.map +1 -1
  421. package/build-module/components/global-styles/screen-background.js +26 -0
  422. package/build-module/components/global-styles/screen-background.js.map +1 -0
  423. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  424. package/build-module/components/global-styles/screen-block.js.map +1 -1
  425. package/build-module/components/global-styles/screen-color-palette.js +2 -2
  426. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  427. package/build-module/components/global-styles/screen-colors.js +6 -4
  428. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  429. package/build-module/components/global-styles/screen-css.js.map +1 -1
  430. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  431. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  432. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  433. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  434. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  435. package/build-module/components/global-styles/screen-root.js.map +1 -1
  436. package/build-module/components/global-styles/screen-style-variations.js +4 -38
  437. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  438. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  439. package/build-module/components/global-styles/screen-typography.js +6 -6
  440. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  441. package/build-module/components/global-styles/style-variations-container.js +5 -2
  442. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  443. package/build-module/components/global-styles/subtitle.js.map +1 -1
  444. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  445. package/build-module/components/global-styles/typography-example.js.map +1 -1
  446. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  447. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  448. package/build-module/components/global-styles/ui.js +4 -1
  449. package/build-module/components/global-styles/ui.js.map +1 -1
  450. package/build-module/components/global-styles/utils.js.map +1 -1
  451. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  452. package/build-module/components/global-styles/variations/variations-color.js +10 -3
  453. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  454. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  455. package/build-module/components/global-styles/variations/variations-typography.js +9 -2
  456. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  457. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  458. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
  459. package/build-module/components/header-edit-mode/index.js +3 -3
  460. package/build-module/components/header-edit-mode/index.js.map +1 -1
  461. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  462. package/build-module/components/header-edit-mode/more-menu/index.js +8 -8
  463. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  464. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  465. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  466. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  467. package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -23
  468. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  469. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  470. package/build-module/components/keyboard-shortcuts/register.js +0 -18
  471. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  472. package/build-module/components/layout/animation.js +123 -0
  473. package/build-module/components/layout/animation.js.map +1 -0
  474. package/build-module/components/layout/hooks.js.map +1 -1
  475. package/build-module/components/layout/index.js +21 -64
  476. package/build-module/components/layout/index.js.map +1 -1
  477. package/build-module/components/layout/router.js +92 -23
  478. package/build-module/components/layout/router.js.map +1 -1
  479. package/build-module/components/media/index.js.map +1 -1
  480. package/build-module/components/page/header.js.map +1 -1
  481. package/build-module/components/page/index.js +5 -2
  482. package/build-module/components/page/index.js.map +1 -1
  483. package/build-module/components/page-pages/index.js +32 -32
  484. package/build-module/components/page-pages/index.js.map +1 -1
  485. package/build-module/components/page-patterns/dataviews-pattern-actions.js +5 -4
  486. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  487. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  488. package/build-module/components/page-patterns/header.js +2 -2
  489. package/build-module/components/page-patterns/header.js.map +1 -1
  490. package/build-module/components/page-patterns/index.js +139 -42
  491. package/build-module/components/page-patterns/index.js.map +1 -1
  492. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  493. package/build-module/components/page-patterns/search-items.js +17 -57
  494. package/build-module/components/page-patterns/search-items.js.map +1 -1
  495. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  496. package/build-module/components/page-patterns/use-patterns.js +2 -6
  497. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  498. package/build-module/components/page-patterns/utils.js.map +1 -1
  499. package/build-module/components/page-templates-template-parts/add-new-template-part.js +3 -2
  500. package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  501. package/build-module/components/page-templates-template-parts/hooks.js.map +1 -1
  502. package/build-module/components/page-templates-template-parts/index.js +36 -81
  503. package/build-module/components/page-templates-template-parts/index.js.map +1 -1
  504. package/build-module/components/pagination/index.js.map +1 -1
  505. package/build-module/components/pattern-modal/duplicate.js +4 -1
  506. package/build-module/components/pattern-modal/duplicate.js.map +1 -1
  507. package/build-module/components/pattern-modal/index.js.map +1 -1
  508. package/build-module/components/pattern-modal/rename.js +4 -1
  509. package/build-module/components/pattern-modal/rename.js.map +1 -1
  510. package/build-module/components/plugin-template-setting-panel/index.js +12 -1
  511. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  512. package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
  513. package/build-module/components/rename-post-menu-item/index.js.map +1 -0
  514. package/build-module/components/resizable-frame/index.js +1 -5
  515. package/build-module/components/resizable-frame/index.js.map +1 -1
  516. package/build-module/components/revisions/index.js.map +1 -1
  517. package/build-module/components/routes/link.js.map +1 -1
  518. package/build-module/components/routes/use-title.js.map +1 -1
  519. package/build-module/components/save-button/index.js +46 -17
  520. package/build-module/components/save-button/index.js.map +1 -1
  521. package/build-module/components/save-hub/index.js +10 -114
  522. package/build-module/components/save-hub/index.js.map +1 -1
  523. package/build-module/components/save-panel/index.js +2 -2
  524. package/build-module/components/save-panel/index.js.map +1 -1
  525. package/build-module/components/sidebar/index.js +42 -79
  526. package/build-module/components/sidebar/index.js.map +1 -1
  527. package/build-module/components/sidebar-button/index.js.map +1 -1
  528. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  529. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  530. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  531. package/build-module/components/sidebar-dataviews/default-views.js +2 -2
  532. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  533. package/build-module/components/sidebar-dataviews/index.js +2 -2
  534. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  535. package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
  536. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  537. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  538. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  539. package/build-module/components/sidebar-edit-mode/index.js +29 -55
  540. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  541. package/build-module/components/sidebar-edit-mode/page-panels/index.js +29 -18
  542. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  543. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
  544. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  545. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  546. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
  547. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  548. package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
  549. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  550. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  551. package/build-module/components/sidebar-edit-mode/template-panel/index.js +12 -18
  552. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  553. package/build-module/components/sidebar-navigation-item/index.js +31 -0
  554. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  555. package/build-module/components/sidebar-navigation-screen/index.js +37 -10
  556. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  557. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +5 -1
  558. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  559. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  561. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  563. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +12 -8
  564. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  565. package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
  566. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  567. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  568. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  569. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
  570. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  571. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  572. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  573. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  574. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  575. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  576. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  577. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  579. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  580. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  581. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  582. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  583. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  584. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  585. package/build-module/components/sidebar-navigation-screen-page/index.js +24 -14
  586. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  587. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  588. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  589. package/build-module/components/sidebar-navigation-screen-pattern/index.js +14 -5
  590. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  591. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  592. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  593. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  594. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  595. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  596. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  597. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  598. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  599. package/build-module/components/sidebar-navigation-screen-patterns/index.js +35 -33
  600. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  601. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  602. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  603. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  604. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  605. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  606. package/build-module/components/sidebar-navigation-screen-template/index.js +12 -8
  607. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  608. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  609. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  610. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  611. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  612. package/build-module/components/site-hub/index.js +22 -21
  613. package/build-module/components/site-hub/index.js.map +1 -1
  614. package/build-module/components/site-icon/index.js.map +1 -1
  615. package/build-module/components/start-template-options/index.js.map +1 -1
  616. package/build-module/components/style-book/index.js +1 -1
  617. package/build-module/components/style-book/index.js.map +1 -1
  618. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -7
  619. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  620. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  621. package/build-module/components/table/index.js.map +1 -1
  622. package/build-module/components/template-actions/index.js +7 -8
  623. package/build-module/components/template-actions/index.js.map +1 -1
  624. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  625. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  626. package/build-module/components/template-part-converter/index.js.map +1 -1
  627. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  628. package/build-module/components/welcome-guide/editor.js.map +1 -1
  629. package/build-module/components/welcome-guide/image.js.map +1 -1
  630. package/build-module/components/welcome-guide/index.js.map +1 -1
  631. package/build-module/components/welcome-guide/page.js.map +1 -1
  632. package/build-module/components/welcome-guide/styles.js +6 -3
  633. package/build-module/components/welcome-guide/styles.js.map +1 -1
  634. package/build-module/components/welcome-guide/template.js.map +1 -1
  635. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  636. package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
  637. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  638. package/build-module/hooks/components.js.map +1 -1
  639. package/build-module/hooks/index.js +0 -1
  640. package/build-module/hooks/index.js.map +1 -1
  641. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
  642. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  643. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  644. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  645. package/build-module/index.js +4 -6
  646. package/build-module/index.js.map +1 -1
  647. package/build-module/lock-unlock.js.map +1 -1
  648. package/build-module/store/actions.js +16 -92
  649. package/build-module/store/actions.js.map +1 -1
  650. package/build-module/store/constants.js.map +1 -1
  651. package/build-module/store/index.js.map +1 -1
  652. package/build-module/store/private-actions.js +0 -83
  653. package/build-module/store/private-actions.js.map +1 -1
  654. package/build-module/store/private-selectors.js.map +1 -1
  655. package/build-module/store/reducer.js.map +1 -1
  656. package/build-module/store/selectors.js +1 -9
  657. package/build-module/store/selectors.js.map +1 -1
  658. package/build-module/utils/clone-deep.js.map +1 -1
  659. package/build-module/utils/constants.js +1 -0
  660. package/build-module/utils/constants.js.map +1 -1
  661. package/build-module/utils/get-is-list-page.js.map +1 -1
  662. package/build-module/utils/is-previewing-theme.js.map +1 -1
  663. package/build-module/utils/is-template-removable.js.map +1 -1
  664. package/build-module/utils/is-template-revertable.js.map +1 -1
  665. package/build-module/utils/math.js.map +1 -1
  666. package/build-module/utils/set-nested-value.js +38 -0
  667. package/build-module/utils/set-nested-value.js.map +1 -0
  668. package/build-module/utils/template-part-create.js.map +1 -1
  669. package/build-module/utils/use-activate-theme.js.map +1 -1
  670. package/build-module/utils/use-actual-current-theme.js.map +1 -1
  671. package/build-style/style-rtl.css +287 -688
  672. package/build-style/style.css +287 -688
  673. package/package.json +44 -45
  674. package/src/components/add-new-template/index.js +412 -12
  675. package/src/components/add-new-template/style.scss +0 -22
  676. package/src/components/add-new-template/utils.js +44 -24
  677. package/src/components/async/index.js +43 -0
  678. package/src/components/block-editor/block-inspector-button.js +9 -11
  679. package/src/components/block-editor/editor-canvas.js +59 -23
  680. package/src/components/block-editor/site-editor-canvas.js +16 -8
  681. package/src/components/editor/index.js +61 -17
  682. package/src/components/editor-canvas-container/index.js +0 -1
  683. package/src/components/global-styles/background-panel.js +50 -0
  684. package/src/components/global-styles/block-preview-panel.js +6 -1
  685. package/src/components/global-styles/font-families.js +1 -1
  686. package/src/components/global-styles/font-library-modal/context.js +104 -50
  687. package/src/components/global-styles/font-library-modal/font-collection.js +247 -223
  688. package/src/components/global-styles/font-library-modal/index.js +2 -2
  689. package/src/components/global-styles/font-library-modal/installed-fonts.js +156 -147
  690. package/src/components/global-styles/font-library-modal/style.scss +32 -14
  691. package/src/components/global-styles/font-library-modal/utils/index.js +17 -4
  692. package/src/components/global-styles/highlighted-colors.js +1 -1
  693. package/src/components/global-styles/hooks.js +20 -3
  694. package/src/components/global-styles/palette.js +3 -1
  695. package/src/components/global-styles/preview-colors.js +2 -2
  696. package/src/components/global-styles/root-menu.js +12 -1
  697. package/src/components/global-styles/screen-background.js +29 -0
  698. package/src/components/global-styles/screen-color-palette.js +2 -2
  699. package/src/components/global-styles/screen-colors.js +4 -4
  700. package/src/components/global-styles/screen-revisions/index.js +1 -1
  701. package/src/components/global-styles/screen-style-variations.js +4 -36
  702. package/src/components/global-styles/screen-typography.js +6 -9
  703. package/src/components/global-styles/style-variations-container.js +2 -1
  704. package/src/components/global-styles/style.scss +14 -12
  705. package/src/components/global-styles/ui.js +5 -0
  706. package/src/components/global-styles/variations/style.scss +32 -17
  707. package/src/components/global-styles/variations/variations-color.js +4 -2
  708. package/src/components/global-styles/variations/variations-typography.js +4 -1
  709. package/src/components/header-edit-mode/index.js +3 -5
  710. package/src/components/header-edit-mode/more-menu/index.js +6 -17
  711. package/src/components/header-edit-mode/style.scss +29 -18
  712. package/src/components/keyboard-shortcuts/edit-mode.js +0 -29
  713. package/src/components/keyboard-shortcuts/register.js +0 -20
  714. package/src/components/layout/animation.js +125 -0
  715. package/src/components/layout/index.js +21 -74
  716. package/src/components/layout/router.js +99 -30
  717. package/src/components/layout/style.scss +17 -37
  718. package/src/components/page/index.js +7 -2
  719. package/src/components/page-pages/index.js +59 -65
  720. package/src/components/page-pages/style.scss +29 -22
  721. package/src/components/page-patterns/dataviews-pattern-actions.js +5 -6
  722. package/src/components/page-patterns/header.js +4 -2
  723. package/src/components/page-patterns/index.js +182 -78
  724. package/src/components/page-patterns/search-items.js +16 -58
  725. package/src/components/page-patterns/style.scss +7 -6
  726. package/src/components/page-patterns/use-patterns.js +2 -6
  727. package/src/components/page-templates-template-parts/add-new-template-part.js +4 -2
  728. package/src/components/page-templates-template-parts/index.js +44 -103
  729. package/src/components/page-templates-template-parts/style.scss +5 -0
  730. package/src/components/pattern-modal/duplicate.js +2 -1
  731. package/src/components/pattern-modal/rename.js +2 -1
  732. package/src/components/plugin-template-setting-panel/index.js +14 -1
  733. package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
  734. package/src/components/resizable-frame/index.js +2 -6
  735. package/src/components/save-button/index.js +55 -26
  736. package/src/components/save-hub/index.js +20 -164
  737. package/src/components/save-panel/index.js +2 -2
  738. package/src/components/sidebar/index.js +52 -105
  739. package/src/components/sidebar/style.scss +41 -6
  740. package/src/components/sidebar-dataviews/default-views.js +2 -2
  741. package/src/components/sidebar-dataviews/index.js +2 -2
  742. package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
  743. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
  744. package/src/components/sidebar-edit-mode/index.js +39 -77
  745. package/src/components/sidebar-edit-mode/page-panels/index.js +52 -60
  746. package/src/components/sidebar-edit-mode/page-panels/page-content.js +10 -10
  747. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +20 -12
  748. package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -6
  749. package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
  750. package/src/components/sidebar-edit-mode/style.scss +1 -1
  751. package/src/components/sidebar-edit-mode/template-panel/index.js +24 -34
  752. package/src/components/sidebar-edit-mode/template-panel/style.scss +1 -29
  753. package/src/components/sidebar-navigation-item/index.js +29 -0
  754. package/src/components/sidebar-navigation-screen/index.js +29 -12
  755. package/src/components/sidebar-navigation-screen/style.scss +13 -30
  756. package/src/components/sidebar-navigation-screen-details-footer/index.js +6 -2
  757. package/src/components/sidebar-navigation-screen-global-styles/index.js +9 -24
  758. package/src/components/sidebar-navigation-screen-main/index.js +11 -23
  759. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  760. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
  761. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  762. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
  763. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  764. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
  765. package/src/components/sidebar-navigation-screen-page/index.js +23 -13
  766. package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
  767. package/src/components/sidebar-navigation-screen-pattern/index.js +9 -6
  768. package/src/components/sidebar-navigation-screen-patterns/index.js +70 -67
  769. package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
  770. package/src/components/sidebar-navigation-screen-template/index.js +8 -12
  771. package/src/components/sidebar-navigation-screen-templates-browse/index.js +2 -7
  772. package/src/components/site-hub/index.js +80 -90
  773. package/src/components/site-hub/style.scss +14 -34
  774. package/src/components/style-book/index.js +1 -3
  775. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +52 -37
  776. package/src/components/template-actions/index.js +8 -11
  777. package/src/components/welcome-guide/style.scss +1 -1
  778. package/src/components/welcome-guide/styles.js +6 -5
  779. package/src/hooks/commands/use-edit-mode-commands.js +12 -33
  780. package/src/hooks/index.js +0 -1
  781. package/src/hooks/push-changes-to-global-styles/index.js +1 -40
  782. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
  783. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
  784. package/src/index.js +9 -10
  785. package/src/store/actions.js +25 -141
  786. package/src/store/private-actions.js +0 -133
  787. package/src/store/selectors.js +3 -15
  788. package/src/store/test/actions.js +7 -2
  789. package/src/style.scss +0 -3
  790. package/src/utils/constants.js +1 -0
  791. package/src/utils/set-nested-value.js +39 -0
  792. package/build/components/actions/index.js +0 -319
  793. package/build/components/actions/index.js.map +0 -1
  794. package/build/components/add-new-template/new-template.js +0 -298
  795. package/build/components/add-new-template/new-template.js.map +0 -1
  796. package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
  797. package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  798. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
  799. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  800. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
  801. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  802. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  803. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  804. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
  805. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  806. package/build/components/keyboard-shortcut-help-modal/index.js +0 -116
  807. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  808. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
  809. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  810. package/build/components/page-actions/index.js +0 -35
  811. package/build/components/page-actions/index.js.map +0 -1
  812. package/build/components/page-actions/trash-page-menu-item.js +0 -54
  813. package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
  814. package/build/components/page-templates-template-parts/actions.js +0 -194
  815. package/build/components/page-templates-template-parts/actions.js.map +0 -1
  816. package/build/components/preferences-modal/index.js +0 -38
  817. package/build/components/preferences-modal/index.js.map +0 -1
  818. package/build/components/sidebar-edit-mode/constants.js +0 -9
  819. package/build/components/sidebar-edit-mode/constants.js.map +0 -1
  820. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
  821. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  822. package/build/components/sidebar-edit-mode/sidebar-card/index.js +0 -48
  823. package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
  824. package/build/components/sidebar-edit-mode/template-panel/template-areas.js +0 -70
  825. package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
  826. package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
  827. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  828. package/build/components/sidebar-navigation-screen-pages/index.js +0 -175
  829. package/build/components/sidebar-navigation-screen-pages/index.js.map +0 -1
  830. package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
  831. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  832. package/build/components/template-actions/rename-menu-item.js.map +0 -1
  833. package/build/hooks/template-part-edit.js +0 -82
  834. package/build/hooks/template-part-edit.js.map +0 -1
  835. package/build/store/utils.js +0 -71
  836. package/build/store/utils.js.map +0 -1
  837. package/build-module/components/actions/index.js +0 -308
  838. package/build-module/components/actions/index.js.map +0 -1
  839. package/build-module/components/add-new-template/new-template.js +0 -290
  840. package/build-module/components/add-new-template/new-template.js.map +0 -1
  841. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
  842. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  843. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  844. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  845. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
  846. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  847. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  848. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  849. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
  850. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  851. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -107
  852. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  853. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
  854. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  855. package/build-module/components/page-actions/index.js +0 -27
  856. package/build-module/components/page-actions/index.js.map +0 -1
  857. package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
  858. package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
  859. package/build-module/components/page-templates-template-parts/actions.js +0 -185
  860. package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
  861. package/build-module/components/preferences-modal/index.js +0 -30
  862. package/build-module/components/preferences-modal/index.js.map +0 -1
  863. package/build-module/components/sidebar-edit-mode/constants.js +0 -3
  864. package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
  865. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
  866. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  867. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +0 -40
  868. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
  869. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +0 -63
  870. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
  871. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
  872. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  873. package/build-module/components/sidebar-navigation-screen-pages/index.js +0 -167
  874. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +0 -1
  875. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
  876. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  877. package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
  878. package/build-module/hooks/template-part-edit.js +0 -75
  879. package/build-module/hooks/template-part-edit.js.map +0 -1
  880. package/build-module/store/utils.js +0 -64
  881. package/build-module/store/utils.js.map +0 -1
  882. package/src/components/actions/index.js +0 -409
  883. package/src/components/add-new-template/new-template.js +0 -429
  884. package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
  885. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  886. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
  887. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  888. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  889. package/src/components/keyboard-shortcut-help-modal/index.js +0 -147
  890. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
  891. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  892. package/src/components/page-actions/index.js +0 -30
  893. package/src/components/page-actions/trash-page-menu-item.js +0 -63
  894. package/src/components/page-templates-template-parts/actions.js +0 -262
  895. package/src/components/preferences-modal/index.js +0 -29
  896. package/src/components/sidebar-edit-mode/constants.js +0 -2
  897. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
  898. package/src/components/sidebar-edit-mode/sidebar-card/index.js +0 -53
  899. package/src/components/sidebar-edit-mode/sidebar-card/style.scss +0 -36
  900. package/src/components/sidebar-edit-mode/template-panel/template-areas.js +0 -86
  901. package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
  902. package/src/components/sidebar-navigation-screen-pages/index.js +0 -238
  903. package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
  904. package/src/hooks/template-part-edit.js +0 -89
  905. package/src/store/test/utils.js +0 -191
  906. package/src/store/utils.js +0 -69
@@ -27,10 +27,11 @@ var _screenStyleVariations = _interopRequireDefault(require("./screen-style-vari
27
27
  var _styleBook = _interopRequireDefault(require("../style-book"));
28
28
  var _screenCss = _interopRequireDefault(require("./screen-css"));
29
29
  var _screenRevisions = _interopRequireDefault(require("./screen-revisions"));
30
+ var _screenBackground = _interopRequireDefault(require("./screen-background"));
30
31
  var _lockUnlock = require("../../lock-unlock");
31
32
  var _store = require("../../store");
32
33
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
33
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
34
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
34
35
  /**
35
36
  * WordPress dependencies
36
37
  */
@@ -282,7 +283,9 @@ function GlobalStylesUI() {
282
283
  path: "/css"
283
284
  }, (0, _react.createElement)(_screenCss.default, null)), (0, _react.createElement)(GlobalStylesNavigationScreen, {
284
285
  path: '/revisions'
285
- }, (0, _react.createElement)(_screenRevisions.default, null)), blocks.map(block => (0, _react.createElement)(GlobalStylesNavigationScreen, {
286
+ }, (0, _react.createElement)(_screenRevisions.default, null)), (0, _react.createElement)(GlobalStylesNavigationScreen, {
287
+ path: '/background'
288
+ }, (0, _react.createElement)(_screenBackground.default, null)), blocks.map(block => (0, _react.createElement)(GlobalStylesNavigationScreen, {
286
289
  key: 'menu-block-' + block.name,
287
290
  path: '/blocks/' + encodeURIComponent(block.name)
288
291
  }, (0, _react.createElement)(_screenBlock.default, {
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_blocks","_data","_blockEditor","_i18n","_preferences","_icons","_coreData","_element","_screenRoot","_interopRequireDefault","_screenBlockList","_interopRequireWildcard","_screenBlock","_screenTypography","_screenTypographyElement","_screenColors","_screenColorPalette","_screenLayout","_screenStyleVariations","_styleBook","_screenCss","_screenRevisions","_lockUnlock","_store","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","SLOT_FILL_NAME","useGlobalStylesReset","unlock","blockEditorPrivateApis","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","createSlotFill","exports","GlobalStylesActionMenu","canReset","onReset","toggle","useDispatch","preferencesStore","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","setEditorCanvasContainerView","editSiteStore","goTo","useNavigator","loadCustomCSS","_react","createElement","DropdownMenu","icon","moreVertical","label","__","onClose","Fragment","MenuGroup","MenuItem","onClick","disabled","GlobalStylesNavigationScreen","className","props","__experimentalNavigatorScreen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","key","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","useBlockHasGlobalStyles","useEffect","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","isRevisionsOpen","GlobalStylesUI","blocks","getBlockTypes","__experimentalNavigatorProvider","initialPath","element","block","_default"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\tgoTo( '/css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tgoTo( '/revisions' );\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\tcase 'style-book':\n\t\t\t\t/*\n\t\t\t\t * The stand-alone style book is open\n\t\t\t\t * and the revisions panel is open,\n\t\t\t\t * close the revisions panel.\n\t\t\t\t * Otherwise keep the style book open while\n\t\t\t\t * browsing global styles panel.\n\t\t\t\t */\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/*\n\t\t\t\t * Example: the user has navigated to \"Browse styles\" or elsewhere\n\t\t\t\t * and changes the editorCanvasContainerView, e.g., closes the style book.\n\t\t\t\t * The panel should not be affected.\n\t\t\t\t * Exclude revisions panel from this behavior,\n\t\t\t\t * as it should close when the editorCanvasContainerView doesn't correspond.\n\t\t\t\t */\n\t\t\t\tif ( path !== '/' && ! isRevisionsOpen ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgoTo( '/' );\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,gBAAA,GAAAC,uBAAA,CAAAZ,OAAA;AAIA,IAAAa,YAAA,GAAAH,sBAAA,CAAAV,OAAA;AACA,IAAAc,iBAAA,GAAAJ,sBAAA,CAAAV,OAAA;AACA,IAAAe,wBAAA,GAAAL,sBAAA,CAAAV,OAAA;AACA,IAAAgB,aAAA,GAAAN,sBAAA,CAAAV,OAAA;AACA,IAAAiB,mBAAA,GAAAP,sBAAA,CAAAV,OAAA;AACA,IAAAkB,aAAA,GAAAR,sBAAA,CAAAV,OAAA;AACA,IAAAmB,sBAAA,GAAAT,sBAAA,CAAAV,OAAA;AACA,IAAAoB,UAAA,GAAAV,sBAAA,CAAAV,OAAA;AACA,IAAAqB,UAAA,GAAAX,sBAAA,CAAAV,OAAA;AACA,IAAAsB,gBAAA,GAAAZ,sBAAA,CAAAV,OAAA;AACA,IAAAuB,WAA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S,OAAe,MAAE,CACW,CAAC,EAE7B2G,MAAM,CAACrC,GAAG,CAAI0C,KAAK,IACpB,IAAAlE,MAAA,CAAAC,aAAA,EAACY,4BAA4B;IAC5Bc,GAAG,EAAG,aAAa,GAAGuC,KAAK,CAACrC,IAAM;IAClCD,IAAI,EAAG,UAAU,GAAGY,kBAAkB,CAAE0B,KAAK,CAACrC,IAAK;EAAG,GAEtD,IAAA7B,MAAA,CAAAC,aAAA,EAACjE,YAAA,CAAAkB,OAAW;IAAC2E,IAAI,EAAGqC,KAAK,CAACrC;EAAM,CAAE,CACL,CAC7B,CAAC,EAEH,IAAA7B,MAAA,CAAAC,aAAA,EAAC8B,cAAc,MAAE,CAAC,EAEhB8B,MAAM,CAACrC,GAAG,CAAI0C,KAAK,IACpB,IAAAlE,MAAA,CAAAC,aAAA,EAAC8B,cAAc;IACdJ,GAAG,EAAG,gBAAgB,GAAGuC,KAAK,CAACrC,IAAM;IACrCA,IAAI,EAAGqC,KAAK,CAACrC,IAAM;IACnBR,UAAU,EAAG,UAAU,GAAGmB,kBAAkB,CAAE0B,KAAK,CAACrC,IAAK;EAAG,CAC5D,CACA,CAAC,EAED,YAAY,KAAK4B,yBAAyB,IAC3C,IAAAzD,MAAA,CAAAC,aAAA,EAACmC,qBAAqB,MAAE,CACxB,EAED,IAAApC,MAAA,CAAAC,aAAA,EAACtB,sBAAsB,MAAE,CAAC,EAC1B,IAAAqB,MAAA,CAAAC,aAAA,EAAC0C,qBAAqB,MAAE,CAAC,EACzB,IAAA3C,MAAA,CAAAC,aAAA,EAACuD,qCAAqC,MAAE,CACtB,CAAC;AAEtB;AAAC,IAAAW,QAAA,GAAAzF,OAAA,CAAAxB,OAAA,GAEc0G,cAAc"}
1
+ {"version":3,"names":["_components","require","_blocks","_data","_blockEditor","_i18n","_preferences","_icons","_coreData","_element","_screenRoot","_interopRequireDefault","_screenBlockList","_interopRequireWildcard","_screenBlock","_screenTypography","_screenTypographyElement","_screenColors","_screenColorPalette","_screenLayout","_screenStyleVariations","_styleBook","_screenCss","_screenRevisions","_screenBackground","_lockUnlock","_store","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SLOT_FILL_NAME","useGlobalStylesReset","unlock","blockEditorPrivateApis","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","createSlotFill","exports","GlobalStylesActionMenu","canReset","onReset","toggle","useDispatch","preferencesStore","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","setEditorCanvasContainerView","editSiteStore","goTo","useNavigator","loadCustomCSS","_react","createElement","DropdownMenu","icon","moreVertical","label","__","onClose","Fragment","MenuGroup","MenuItem","onClick","disabled","GlobalStylesNavigationScreen","className","props","__experimentalNavigatorScreen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","key","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","useBlockHasGlobalStyles","useEffect","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","isRevisionsOpen","GlobalStylesUI","blocks","getBlockTypes","__experimentalNavigatorProvider","initialPath","element","block","_default"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport ScreenBackground from './screen-background';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\tgoTo( '/css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tgoTo( '/revisions' );\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\tcase 'style-book':\n\t\t\t\t/*\n\t\t\t\t * The stand-alone style book is open\n\t\t\t\t * and the revisions panel is open,\n\t\t\t\t * close the revisions panel.\n\t\t\t\t * Otherwise keep the style book open while\n\t\t\t\t * browsing global styles panel.\n\t\t\t\t */\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/*\n\t\t\t\t * Example: the user has navigated to \"Browse styles\" or elsewhere\n\t\t\t\t * and changes the editorCanvasContainerView, e.g., closes the style book.\n\t\t\t\t * The panel should not be affected.\n\t\t\t\t * Exclude revisions panel from this behavior,\n\t\t\t\t * as it should close when the editorCanvasContainerView doesn't correspond.\n\t\t\t\t */\n\t\t\t\tif ( path !== '/' && ! isRevisionsOpen ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgoTo( '/' );\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/background' }>\n\t\t\t\t<ScreenBackground />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,gBAAA,GAAAC,uBAAA,CAAAZ,OAAA;AAI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AACrC,IAAM;IACrCA,IAAI,EAAGqC,KAAK,CAACrC,IAAM;IACnBR,UAAU,EAAG,UAAU,GAAGmB,kBAAkB,CAAE0B,KAAK,CAACrC,IAAK;EAAG,CAC5D,CACA,CAAC,EAED,YAAY,KAAK4B,yBAAyB,IAC3C,IAAAzD,MAAA,CAAAC,aAAA,EAACmC,qBAAqB,MAAE,CACxB,EAED,IAAApC,MAAA,CAAAC,aAAA,EAACtB,sBAAsB,MAAE,CAAC,EAC1B,IAAAqB,MAAA,CAAAC,aAAA,EAAC0C,qBAAqB,MAAE,CAAC,EACzB,IAAA3C,MAAA,CAAAC,aAAA,EAACuD,qCAAqC,MAAE,CACtB,CAAC;AAEtB;AAAC,IAAAW,QAAA,GAAAzF,OAAA,CAAAvB,OAAA,GAEcyG,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getVariationClassName","variation","getFontFamilyFromSetting","fontFamilies","setting","Array","isArray","fontFamilyVariable","replace","fontFamilySlug","split","slice","find","fontFamily","slug","getFontFamilies","themeJson","settings","typography","theme","bodyFontFamilySetting","styles","bodyFontFamily","headingFontFamilySetting","elements","heading","headingFontFamily"],"sources":["@wordpress/edit-site/src/components/global-styles/utils.js"],"sourcesContent":["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst fontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; // TODO this could not be under theme.\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAqBA,CAAEC,SAAS,EAAG;EAClD,IAAK,CAAEA,SAAS,EAAG;IAClB,OAAO,EAAE;EACV;EACA,OAAQ,YAAYA,SAAW,EAAC;AACjC;AAEA,SAASC,wBAAwBA,CAAEC,YAAY,EAAEC,OAAO,EAAG;EAC1D,IAAK,CAAEC,KAAK,CAACC,OAAO,CAAEH,YAAa,CAAC,IAAI,CAAEC,OAAO,EAAG;IACnD,OAAO,IAAI;EACZ;EAEA,MAAMG,kBAAkB,GAAGH,OAAO,CAACI,OAAO,CAAE,MAAM,EAAE,EAAG,CAAC,CAACA,OAAO,CAAE,GAAG,EAAE,EAAG,CAAC;EAC3E,MAAMC,cAAc,GAAGF,kBAAkB,EAAEG,KAAK,CAAE,IAAK,CAAC,CAACC,KAAK,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE;EAEzE,OAAOR,YAAY,CAACS,IAAI,CACrBC,UAAU,IAAMA,UAAU,CAACC,IAAI,KAAKL,cACvC,CAAC;AACF;AAEO,SAASM,eAAeA,CAAEC,SAAS,EAAG;EAC5C,MAAMb,YAAY,GAAGa,SAAS,EAAEC,QAAQ,EAAEC,UAAU,EAAEf,YAAY,EAAEgB,KAAK,CAAC,CAAC;EAC3E,MAAMC,qBAAqB,GAAGJ,SAAS,EAAEK,MAAM,EAAEH,UAAU,EAAEL,UAAU;EACvE,MAAMS,cAAc,GAAGpB,wBAAwB,CAC9CC,YAAY,EACZiB,qBACD,CAAC;EAED,MAAMG,wBAAwB,GAC7BP,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UAAU;EAE7D,IAAIa,iBAAiB;EACrB,IAAK,CAAEH,wBAAwB,EAAG;IACjCG,iBAAiB,GAAGJ,cAAc;EACnC,CAAC,MAAM;IACNI,iBAAiB,GAAGxB,wBAAwB,CAC3CC,YAAY,EACZa,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UACnD,CAAC;EACF;EAEA,OAAO,CAAES,cAAc,EAAEI,iBAAiB,CAAE;AAC7C"}
1
+ {"version":3,"names":["getVariationClassName","variation","getFontFamilyFromSetting","fontFamilies","setting","Array","isArray","fontFamilyVariable","replace","fontFamilySlug","split","slice","find","fontFamily","slug","getFontFamilies","themeJson","settings","typography","theme","bodyFontFamilySetting","styles","bodyFontFamily","headingFontFamilySetting","elements","heading","headingFontFamily"],"sources":["@wordpress/edit-site/src/components/global-styles/utils.js"],"sourcesContent":["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst fontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; // TODO this could not be under theme.\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAqBA,CAAEC,SAAS,EAAG;EAClD,IAAK,CAAEA,SAAS,EAAG;IAClB,OAAO,EAAE;EACV;EACA,OAAQ,YAAYA,SAAW,EAAC;AACjC;AAEA,SAASC,wBAAwBA,CAAEC,YAAY,EAAEC,OAAO,EAAG;EAC1D,IAAK,CAAEC,KAAK,CAACC,OAAO,CAAEH,YAAa,CAAC,IAAI,CAAEC,OAAO,EAAG;IACnD,OAAO,IAAI;EACZ;EAEA,MAAMG,kBAAkB,GAAGH,OAAO,CAACI,OAAO,CAAE,MAAM,EAAE,EAAG,CAAC,CAACA,OAAO,CAAE,GAAG,EAAE,EAAG,CAAC;EAC3E,MAAMC,cAAc,GAAGF,kBAAkB,EAAEG,KAAK,CAAE,IAAK,CAAC,CAACC,KAAK,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE;EAEzE,OAAOR,YAAY,CAACS,IAAI,CACrBC,UAAU,IAAMA,UAAU,CAACC,IAAI,KAAKL,cACvC,CAAC;AACF;AAEO,SAASM,eAAeA,CAAEC,SAAS,EAAG;EAC5C,MAAMb,YAAY,GAAGa,SAAS,EAAEC,QAAQ,EAAEC,UAAU,EAAEf,YAAY,EAAEgB,KAAK,CAAC,CAAC;EAC3E,MAAMC,qBAAqB,GAAGJ,SAAS,EAAEK,MAAM,EAAEH,UAAU,EAAEL,UAAU;EACvE,MAAMS,cAAc,GAAGpB,wBAAwB,CAC9CC,YAAY,EACZiB,qBACD,CAAC;EAED,MAAMG,wBAAwB,GAC7BP,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UAAU;EAE7D,IAAIa,iBAAiB;EACrB,IAAK,CAAEH,wBAAwB,EAAG;IACjCG,iBAAiB,GAAGJ,cAAc;EACnC,CAAC,MAAM;IACNI,iBAAiB,GAAGxB,wBAAwB,CAC3CC,YAAY,EACZa,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UACnD,CAAC;EACF;EAEA,OAAO,CAAES,cAAc,EAAEI,iBAAiB,CAAE;AAC7C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_keycodes","_i18n","_blockEditor","_globalStylesProvider","_lockUnlock","GlobalStylesContext","areGlobalStyleConfigsEqual","unlock","blockEditorPrivateApis","Variation","variation","children","isFocused","setIsFocused","useState","base","user","setUserConfig","useContext","context","useMemo","_variation$settings","_variation$styles","settings","styles","merged","mergeBaseAndUserConfigs","selectVariation","selectOnEnter","event","keyCode","ENTER","preventDefault","isActive","label","title","description","sprintf","__","_react","createElement","Provider","value","className","classnames","role","onClick","onKeyDown","tabIndex","onFocus","onBlur"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variation.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../global-styles-provider';\nimport { unlock } from '../../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( { variation, children } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo(\n\t\t() => ( {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t} ),\n\t\t[ variation, base ]\n\t);\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => ( {\n\t\t\tsettings: variation.settings,\n\t\t\tstyles: variation.styles,\n\t\t} ) );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ label }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t{ children( isFocused ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAjBA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EAAEO,mBAAmB;EAAEC;AAA2B,CAAC,GAAG,IAAAC,kBAAM,EACjEC,wBACD,CAAC;AAEc,SAASC,SAASA,CAAE;EAAEC,SAAS;EAAEC;AAAS,CAAC,EAAG;EAC5D,MAAM,CAAEC,SAAS,EAAEC,YAAY,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACrD,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC;EAAc,CAAC,GAAG,IAAAC,mBAAU,EAAEb,mBAAoB,CAAC;EACvE,MAAMc,OAAO,GAAG,IAAAC,gBAAO,EACtB;IAAA,IAAAC,mBAAA,EAAAC,iBAAA;IAAA,OAAQ;MACPN,IAAI,EAAE;QACLO,QAAQ,GAAAF,mBAAA,GAAEX,SAAS,CAACa,QAAQ,cAAAF,mBAAA,cAAAA,mBAAA,GAAI,CAAC,CAAC;QAClCG,MAAM,GAAAF,iBAAA,GAAEZ,SAAS,CAACc,MAAM,cAAAF,iBAAA,cAAAA,iBAAA,GAAI,CAAC;MAC9B,CAAC;MACDP,IAAI;MACJU,M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BAAeD,QAAU;IACzBgB,OAAO,EAAGA,CAAA,KAAMpC,YAAY,CAAE,IAAK,CAAG;IACtCqC,MAAM,EAAGA,CAAA,KAAMrC,YAAY,CAAE,KAAM;EAAG,GAEtC,IAAA0B,MAAA,CAAAC,aAAA;IAAKG,SAAS,EAAC;EAAiD,GAC7DhC,QAAQ,CAAEC,SAAU,CAClB,CACD,CACwB,CAAC;AAEjC"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_keycodes","_i18n","_blockEditor","_globalStylesProvider","_lockUnlock","GlobalStylesContext","areGlobalStyleConfigsEqual","unlock","blockEditorPrivateApis","Variation","variation","children","isFocused","setIsFocused","useState","base","user","setUserConfig","useContext","context","useMemo","_variation$settings","_variation$styles","settings","styles","merged","mergeBaseAndUserConfigs","selectVariation","selectOnEnter","event","keyCode","ENTER","preventDefault","isActive","label","title","description","sprintf","__","_react","createElement","Provider","value","className","classnames","role","onClick","onKeyDown","tabIndex","onFocus","onBlur"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variation.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../global-styles-provider';\nimport { unlock } from '../../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( { variation, children } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo(\n\t\t() => ( {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t} ),\n\t\t[ variation, base ]\n\t);\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => ( {\n\t\t\tsettings: variation.settings,\n\t\t\tstyles: variation.styles,\n\t\t} ) );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ label }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t{ children( isFocused ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA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ClC,IAAKA,KAAK,CAACC,OAAO,KAAKC,eAAK,EAAG;MAC9BF,KAAK,CAACG,cAAc,CAAC,CAAC;MACtBL,eAAe,CAAC,CAAC;IAClB;EACD,CAAC;EAED,MAAMM,QAAQ,GAAG,IAAAb,gBAAO,EACvB,MAAMd,0BAA0B,CAAEU,IAAI,EAAEN,SAAU,CAAC,EACnD,CAAEM,IAAI,EAAEN,SAAS,CAClB,CAAC;EAED,IAAIwB,KAAK,GAAGxB,SAAS,EAAEyB,KAAK;EAC5B,IAAKzB,SAAS,EAAE0B,WAAW,EAAG;IAC7BF,KAAK,GAAG,IAAAG,aAAO,GACd;IACA,IAAAC,QAAE,EAAE,aAAc,CAAC,EACnB5B,SAAS,EAAEyB,KAAK,EAChBzB,SAAS,EAAE0B,WACZ,CAAC;EACF;EAEA,OACC,IAAAG,MAAA,CAAAC,aAAA,EAACnC,mBAAmB,CAACoC,QAAQ;IAACC,KAAK,EAAGvB;EAAS,GAC9C,IAAAoB,MAAA,CAAAC,aAAA;IACCG,SAAS,EAAG,IAAAC,mBAAU,EACrB,yCAAyC,EACzC;MACC,WAAW,EAAEX;IACd,CACD,CAAG;IACHY,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAGnB,eAAiB;IAC3BoB,SAAS,EAAGnB,aAAe;IAC3BoB,QAAQ,EAAC,GAAG;IACZ,cAAad,KAAO;IACpB,gBAAeD,QAAU;IACzBgB,OAAO,EAAGA,CAAA,KAAMpC,YAAY,CAAE,IAAK,CAAG;IACtCqC,MAAM,EAAGA,CAAA,KAAMrC,YAAY,CAAE,KAAM;EAAG,GAEtC,IAAA0B,MAAA,CAAAC,aAAA;IAAKG,SAAS,EAAC;EAAiD,GAC7DhC,QAAQ,CAAEC,SAAU,CAClB,CACD,CACwB,CAAC;AAEjC","ignoreList":[]}
@@ -10,6 +10,7 @@ var _components = require("@wordpress/components");
10
10
  var _variation = _interopRequireDefault(require("./variation"));
11
11
  var _previewColors = _interopRequireDefault(require("../preview-colors"));
12
12
  var _hooks = require("../hooks");
13
+ var _subtitle = _interopRequireDefault(require("../subtitle"));
13
14
  /**
14
15
  * WordPress dependencies
15
16
  */
@@ -18,15 +19,21 @@ var _hooks = require("../hooks");
18
19
  * Internal dependencies
19
20
  */
20
21
 
21
- function ColorVariations() {
22
+ function ColorVariations({
23
+ title,
24
+ gap = 2
25
+ }) {
22
26
  const colorVariations = (0, _hooks.useColorVariations)();
23
27
  if (!colorVariations?.length) {
24
28
  return null;
25
29
  }
26
30
  return (0, _react.createElement)(_components.__experimentalVStack, {
27
31
  spacing: 3
28
- }, (0, _react.createElement)(_components.__experimentalGrid, {
29
- columns: 3
32
+ }, title && (0, _react.createElement)(_subtitle.default, {
33
+ level: 3
34
+ }, title), (0, _react.createElement)(_components.__experimentalGrid, {
35
+ columns: 3,
36
+ gap: gap
30
37
  }, colorVariations.map((variation, index) => (0, _react.createElement)(_variation.default, {
31
38
  key: index,
32
39
  variation: variation
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_variation","_interopRequireDefault","_previewColors","_hooks","ColorVariations","colorVariations","useColorVariations","length","_react","createElement","__experimentalVStack","spacing","__experimentalGrid","columns","map","variation","index","default","key"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Variation from './variation';\nimport StylesPreviewColors from '../preview-colors';\nimport { useColorVariations } from '../hooks';\n\nexport default function ColorVariations() {\n\tconst colorVariations = useColorVariations();\n\n\tif ( ! colorVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Grid columns={ 3 }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAbA;AACA;AACA;;AAMA;AACA;AACA;;AAKe,SAASK,eAAeA,CAAA,EAAG;EACzC,MAAMC,eAAe,GAAG,IAAAC,yBAAkB,EAAC,CAAC;EAE5C,IAAK,CAAED,eAAe,EAAEE,MAAM,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACX,WAAA,CAAAY,oBAAM;IAACC,OAAO,EAAG;EAAG,GACpB,IAAAH,MAAA,CAAAC,aAAA,EAACX,WAAA,CAAAc,kBAAI;IAACC,OAAO,EAAG;EAAG,GAChBR,eAAe,CAACS,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KACxC,IAAAR,MAAA,CAAAC,aAAA,EAACT,UAAA,CAAAiB,OAAS;IAACC,GAAG,EAAGF,KAAO;IAACD,SAAS,EAAGA;EAAW,GAC7C,MAAM,IAAAP,MAAA,CAAAC,aAAA,EAACP,cAAA,CAAAe,OAAmB,MAAE,CACpB,CACV,CACG,CACC,CAAC;AAEX"}
1
+ {"version":3,"names":["_components","require","_variation","_interopRequireDefault","_previewColors","_hooks","_subtitle","ColorVariations","title","gap","colorVariations","useColorVariations","length","_react","createElement","__experimentalVStack","spacing","default","level","__experimentalGrid","columns","map","variation","index","key"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Variation from './variation';\nimport StylesPreviewColors from '../preview-colors';\nimport { useColorVariations } from '../hooks';\nimport Subtitle from '../subtitle';\n\nexport default function ColorVariations( { title, gap = 2 } ) {\n\tconst colorVariations = useColorVariations();\n\n\tif ( ! colorVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid columns={ 3 } gap={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAH,sBAAA,CAAAF,OAAA;AAdA;AACA;AACA;;AAMA;AACA;AACA;;AAMe,SAASM,eAAeA,CAAE;EAAEC,KAAK;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAC7D,MAAMC,eAAe,GAAG,IAAAC,yBAAkB,EAAC,CAAC;EAE5C,IAAK,CAAED,eAAe,EAAEE,MAAM,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAe,oBAAM;IAACC,OAAO,EAAG;EAAG,GAClBR,KAAK,IAAI,IAAAK,MAAA,CAAAC,aAAA,EAACR,SAAA,CAAAW,OAAQ;IAACC,KAAK,EAAG;EAAG,GAAGV,KAAiB,CAAC,EACrD,IAAAK,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAmB,kBAAI;IAACC,OAAO,EAAG,CAAG;IAACX,GAAG,EAAGA;EAAK,GAC5BC,eAAe,CAACW,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KACxC,IAAAV,MAAA,CAAAC,aAAA,EAACZ,UAAA,CAAAe,OAAS;IAACO,GAAG,EAAGD,KAAO;IAACD,SAAS,EAAGA;EAAW,GAC7C,MAAM,IAAAT,MAAA,CAAAC,aAAA,EAACV,cAAA,CAAAa,OAAmB,MAAE,CACpB,CACV,CACG,CACC,CAAC;AAEX","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_data","_components","_navigationButton","getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","useSelect","select","getBlockStyles","blocksStore","coreBlockStyles","VariationsPanel","_react","createElement","__experimentalItemGroup","isBordered","isSeparated","map","index","isDefault","NavigationButtonAsItem","key","path","encodeURIComponent","label"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from '../navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,SAASI,kBAAkBA,CAAEC,WAAW,EAAG;EAC1C,OAAOA,WAAW,EAAEC,MAAM,CAAIC,KAAK,IAAMA,KAAK,CAACC,MAAM,KAAK,OAAQ,CAAC;AACpE;AAEO,SAASC,kBAAkBA,CAAEC,IAAI,EAAG;EAC1C,MAAML,WAAW,GAAG,IAAAM,eAAS,EAC1BC,MAAM,IAAM;IACb,MAAM;MAAEC;IAAe,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAChD,OAAOD,cAAc,CAAEH,IAAK,CAAC;EAC9B,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EACD,MAAMK,eAAe,GAAGX,kBAAkB,CAAEC,WAAY,CAAC;EACzD,OAAOU,eAAe;AACvB;AAEO,SAASC,eAAeA,CAAE;EAAEN;AAAK,CAAC,EAAG;EAC3C,MAAMK,eAAe,GAAGN,kBAAkB,CAAEC,IAAK,CAAC;EAElD,OACC,IAAAO,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAiB,uBAAS;IAACC,UAAU;IAACC,WAAW;EAAA,GAC9BN,eAAe,CAACO,GAAG,CAAE,CAAEf,KAAK,EAAEgB,KAAK,KAAM;IAC1C,IAAKhB,KAAK,EAAEiB,SAAS,EAAG;MACvB,OAAO,IAAI;IACZ;IACA,OACC,IAAAP,MAAA,CAAAC,aAAA,EAACf,iBAAA,CAAAsB,sBAAsB;MACtBC,GAAG,EAAGH,KAAO;MACbI,IAAI,EACH,UAAU,GACVC,kBAAkB,CAAElB,IAAK,CAAC,GAC1B,cAAc,GACdkB,kBAAkB,CAAErB,KAAK,CAACG,IAAK,CAC/B;MACD,cAAaH,KAAK,CAACsB;IAAO,GAExBtB,KAAK,CAACsB,KACe,CAAC;EAE3B,CAAE,CACQ,CAAC;AAEd"}
1
+ {"version":3,"names":["_blocks","require","_data","_components","_navigationButton","getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","useSelect","select","getBlockStyles","blocksStore","coreBlockStyles","VariationsPanel","_react","createElement","__experimentalItemGroup","isBordered","isSeparated","map","index","isDefault","NavigationButtonAsItem","key","path","encodeURIComponent","label"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from '../navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,SAASI,kBAAkBA,CAAEC,WAAW,EAAG;EAC1C,OAAOA,WAAW,EAAEC,MAAM,CAAIC,KAAK,IAAMA,KAAK,CAACC,MAAM,KAAK,OAAQ,CAAC;AACpE;AAEO,SAASC,kBAAkBA,CAAEC,IAAI,EAAG;EAC1C,MAAML,WAAW,GAAG,IAAAM,eAAS,EAC1BC,MAAM,IAAM;IACb,MAAM;MAAEC;IAAe,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAChD,OAAOD,cAAc,CAAEH,IAAK,CAAC;EAC9B,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EACD,MAAMK,eAAe,GAAGX,kBAAkB,CAAEC,WAAY,CAAC;EACzD,OAAOU,eAAe;AACvB;AAEO,SAASC,eAAeA,CAAE;EAAEN;AAAK,CAAC,EAAG;EAC3C,MAAMK,eAAe,GAAGN,kBAAkB,CAAEC,IAAK,CAAC;EAElD,OACC,IAAAO,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAiB,uBAAS;IAACC,UAAU;IAACC,WAAW;EAAA,GAC9BN,eAAe,CAACO,GAAG,CAAE,CAAEf,KAAK,EAAEgB,KAAK,KAAM;IAC1C,IAAKhB,KAAK,EAAEiB,SAAS,EAAG;MACvB,OAAO,IAAI;IACZ;IACA,OACC,IAAAP,MAAA,CAAAC,aAAA,EAACf,iBAAA,CAAAsB,sBAAsB;MACtBC,GAAG,EAAGH,KAAO;MACbI,IAAI,EACH,UAAU,GACVC,kBAAkB,CAAElB,IAAK,CAAC,GAC1B,cAAc,GACdkB,kBAAkB,CAAErB,KAAK,CAACG,IAAK,CAC/B;MACD,cAAaH,KAAK,CAACsB;IAAO,GAExBtB,KAAK,CAACsB,KACe,CAAC;EAE3B,CAAE,CACQ,CAAC;AAEd","ignoreList":[]}
@@ -11,6 +11,7 @@ var _hooks = require("../hooks");
11
11
  var _typographyExample = _interopRequireDefault(require("../typography-example"));
12
12
  var _previewIframe = _interopRequireDefault(require("../preview-iframe"));
13
13
  var _variation = _interopRequireDefault(require("./variation"));
14
+ var _subtitle = _interopRequireDefault(require("../subtitle"));
14
15
  /**
15
16
  * WordPress dependencies
16
17
  */
@@ -19,15 +20,21 @@ var _variation = _interopRequireDefault(require("./variation"));
19
20
  * Internal dependencies
20
21
  */
21
22
 
22
- function TypographyVariations() {
23
+ function TypographyVariations({
24
+ title,
25
+ gap = 2
26
+ }) {
23
27
  const typographyVariations = (0, _hooks.useTypographyVariations)();
24
28
  if (!typographyVariations?.length) {
25
29
  return null;
26
30
  }
27
31
  return (0, _react.createElement)(_components.__experimentalVStack, {
28
32
  spacing: 3
29
- }, (0, _react.createElement)(_components.__experimentalGrid, {
33
+ }, title && (0, _react.createElement)(_subtitle.default, {
34
+ level: 3
35
+ }, title), (0, _react.createElement)(_components.__experimentalGrid, {
30
36
  columns: 3,
37
+ gap: gap,
31
38
  className: "edit-site-global-styles-style-variations-container"
32
39
  }, typographyVariations && typographyVariations.length && typographyVariations.map((variation, index) => (0, _react.createElement)(_variation.default, {
33
40
  key: index,
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_hooks","_typographyExample","_interopRequireDefault","_previewIframe","_variation","TypographyVariations","typographyVariations","useTypographyVariations","length","_react","createElement","__experimentalVStack","spacing","__experimentalGrid","columns","className","map","variation","index","default","key","isFocused","label","title","ratio","justify","style","height","overflow","fontSize"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useTypographyVariations } from '../hooks';\nimport TypographyExample from '../typography-example';\nimport PreviewIframe from '../preview-iframe';\nimport Variation from './variation';\n\nexport default function TypographyVariations() {\n\tconst typographyVariations = useTypographyVariations();\n\n\tif ( ! typographyVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations &&\n\t\t\t\t\ttypographyVariations.length &&\n\t\t\t\t\ttypographyVariations.map( ( variation, index ) => (\n\t\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t\t\t<PreviewIframe\n\t\t\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t\t\t\t\t\tfontSize={ 85 * ratio }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</PreviewIframe>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Variation>\n\t\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,UAAA,GAAAF,sBAAA,CAAAH,OAAA;AAfA;AACA;AACA;;AAOA;AACA;AACA;;AAMe,SAASM,oBAAoBA,CAAA,EAAG;EAC9C,MAAMC,oBAAoB,GAAG,IAAAC,8BAAuB,EAAC,CAAC;EAEtD,IAAK,CAAED,oBAAoB,EAAEE,MAAM,EAAG;IACrC,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAa,oBAAM;IAACC,OAAO,EAAG;EAAG,GACpB,IAAAH,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAe,kBAAI;IACJC,OAAO,EAAG,CAAG;IACbC,SAAS,EAAC;EAAoD,GAE5DT,oBAAoB,IACrBA,oBAAoB,CAACE,MAAM,IAC3BF,oBAAoB,CAACU,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KAC3C,IAAAT,MAAA,CAAAC,aAAA,EAACN,UAAA,CAAAe,OAAS;IAACC,GAAG,EAAGF,KAAO;IAACD,SAAS,EAAGA;EAAW,GAC3CI,SAAS,IACZ,IAAAZ,MAAA,CAAAC,aAAA,EAACP,cAAA,CAAAgB,OAAa;IACbG,KAAK,EAAGL,SAAS,EAAEM,KAAO;IAC1BF,SAAS,EAAGA;EAAW,GAErB,CAAE;IAAEG,KAAK;IAAEJ;EAAI,CAAC,KACjB,IAAAX,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAa,oBAAM;IACNS,GAAG,EAAGA,GAAK;IACXR,OAAO,EAAG,EAAE,GAAGY,KAAO;IACtBC,OAAO,EAAC,QAAQ;IAChBC,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEH,IAAAnB,MAAA,CAAAC,aAAA,EAACT,kBAAA,CAAAkB,OAAiB;IACjBF,SAAS,EAAGA,SAAW;IACvBY,QAAQ,EAAG,EAAE,GAAGL;EAAO,CACvB,CACM,CAEK,CAEN,CACV,CACE,CACC,CAAC;AAEX"}
1
+ {"version":3,"names":["_components","require","_hooks","_typographyExample","_interopRequireDefault","_previewIframe","_variation","_subtitle","TypographyVariations","title","gap","typographyVariations","useTypographyVariations","length","_react","createElement","__experimentalVStack","spacing","default","level","__experimentalGrid","columns","className","map","variation","index","key","isFocused","label","ratio","justify","style","height","overflow","fontSize"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useTypographyVariations } from '../hooks';\nimport TypographyExample from '../typography-example';\nimport PreviewIframe from '../preview-iframe';\nimport Variation from './variation';\nimport Subtitle from '../subtitle';\n\nexport default function TypographyVariations( { title, gap = 2 } ) {\n\tconst typographyVariations = useTypographyVariations();\n\n\tif ( ! typographyVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tgap={ gap }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations &&\n\t\t\t\t\ttypographyVariations.length &&\n\t\t\t\t\ttypographyVariations.map( ( variation, index ) => (\n\t\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t\t\t<PreviewIframe\n\t\t\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t\t\t\t\t\tfontSize={ 85 * ratio }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</PreviewIframe>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Variation>\n\t\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;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ACjB,IAAAZ,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAgB,oBAAM;IACNU,GAAG,EAAGA,GAAK;IACXT,OAAO,EAAG,EAAE,GAAGY,KAAO;IACtBC,OAAO,EAAC,QAAQ;IAChBC,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEH,IAAAnB,MAAA,CAAAC,aAAA,EAACZ,kBAAA,CAAAe,OAAiB;IACjBM,SAAS,EAAGA,SAAW;IACvBU,QAAQ,EAAG,EAAE,GAAGL;EAAO,CACvB,CACM,CAEK,CAEN,CACV,CACE,CACC,CAAC;AAEX","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_blockEditor","_store","_lockUnlock","useGlobalStylesOutput","unlock","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","useSelect","editSiteStore","updateSettings","useDispatch","useEffect","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings, updateSettings, getSettings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIA,MAAM;EAAEK;AAAsB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAElE,SAASC,uBAAuBA,CAAA,EAAG;EAClC,MAAM,CAAEC,MAAM,EAAEC,QAAQ,CAAE,GAAGL,qBAAqB,CAAC,CAAC;EACpD,MAAM;IAAEM;EAAY,CAAC,GAAG,IAAAC,eAAS,EAAEC,YAAc,CAAC;EAClD,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,iBAAW,EAAEF,YAAc,CAAC;EAEvD,IAAAG,kBAAS,EAAE,MAAM;IAAA,IAAAC,qBAAA;IAChB,IAAK,CAAER,MAAM,IAAI,CAAEC,QAAQ,EAAG;MAC7B;IACD;IAEA,MAAMQ,oBAAoB,GAAGP,WAAW,CAAC,CAAC;IAC1C,MAAMQ,eAAe,GAAGC,MAAM,CAACC,MAAM,EAAAJ,qBAAA,GACpCC,oBAAoB,CAACT,MAAM,cAAAQ,qBAAA,cAAAA,qBAAA,GAAI,EAChC,CAAC,CAACK,MAAM,CAAIC,KAAK,IAAM,CAAEA,KAAK,CAACC,cAAe,CAAC;IAC/CV,cAAc,CAAE;MACf,GAAGI,oBAAoB;MACvBT,MAAM,EAAE,CAAE,GAAGU,eAAe,EAAE,GAAGV,MAAM,CAAE;MACzCgB,sBAAsB,EAAEf;IACzB,CAAE,CAAC;EACJ,CAAC,EAAE,CAAED,MAAM,EAAEC,QAAQ,EAAEI,cAAc,EAAEH,WAAW,CAAG,CAAC;AACvD;AAEO,SAASe,oBAAoBA,CAAA,EAAG;EACtClB,uBAAuB,CAAC,CAAC;EAEzB,OAAO,IAAI;AACZ"}
1
+ {"version":3,"names":["_element","require","_data","_blockEditor","_store","_lockUnlock","useGlobalStylesOutput","unlock","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","useSelect","editSiteStore","updateSettings","useDispatch","useEffect","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings, updateSettings, getSettings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer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;AACZ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_compose","require","_blockEditor","_data","_i18n","_icons","_components","_editor","_lockUnlock","DocumentTools","EditorDocumentTools","unlock","editorPrivateApis","blockEditorMode","hasFixedToolbar","isDistractionFree","isVisualMode","useSelect","select","getEditorMode","editorStore","__unstableSetEditorMode","useDispatch","blockEditorStore","setDeviceType","isLargeViewport","useViewportMatch","isZoomedOutViewExperimentEnabled","window","__experimentalEnableZoomedOutView","isZoomedOutView","_react","createElement","disableBlockTools","listViewLabel","__","ToolbarItem","as","Button","className","icon","chevronUpDown","isPressed","label","onClick","size"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronUpDown } from '@wordpress/icons';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { DocumentTools: EditorDocumentTools } = unlock( editorPrivateApis );\n\nexport default function DocumentTools( {\n\tblockEditorMode,\n\thasFixedToolbar,\n\tisDistractionFree,\n} ) {\n\tconst { isVisualMode } = useSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\treturn (\n\t\t<EditorDocumentTools\n\t\t\tdisableBlockTools={ ! isVisualMode }\n\t\t\tlistViewLabel={ __( 'List View' ) }\n\t\t>\n\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetDeviceType( 'Desktop' );\n\t\t\t\t\t\t\t__unstableSetEditorMode(\n\t\t\t\t\t\t\t\tisZoomedOutView ? 'edit' : 'zoom-out'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</EditorDocumentTools>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAQA,IAAAO,WAAA,GAAAP,OAAA;AAjBA;AACA;AACA;;AAYA;AACA;AACA;;AAGA,MAAM;EAAEQ,aAAa,EAAEC;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE3D,SAASH,aAAaA,CAAE;EACtCI,eAAe;EACfC,eAAe;EACfC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACjD,MAAM;MAAEC;IAAc,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAE/C,OAAO;MACNJ,YAAY,EAAEG,aAAa,CAAC,CAAC,KAAK;IACnC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEE;EAAwB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EACnE,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAF,iBAAW,EAAEF,aAAY,CAAC;EACpD,MAAMK,eAAe,GAAG,IAAAC,yBAAgB,EAAE,QAAS,CAAC;EACpD,MAAMC,gCAAgC,GACrCC,MAAM,EAAEC,iCAAiC,IAAIb,YAAY;EAC1D,MAAMc,eAAe,GAAGjB,eAAe,KAAK,UAAU;EAEtD,OACC,IAAAkB,MAAA,CAAAC,aAAA,EAACtB,mBAAmB;IACnBuB,iBAAiB,EAAG,CAAEjB,YAAc;IACpCkB,aAAa,EAAG,IAAAC,QAAE,EAAE,WAAY;EAAG,GAEjCR,gCAAgC,IACjCF,eAAe,IACf,CAAEV,iBAAiB,IACnB,CAAED,eAAe,IAChB,IAAAiB,MAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAA8B,WAAW;IACXC,EAAE,EAAGC,kBAAQ;IACbC,SAAS,EAAC,kDAAkD;IAC5DC,IAAI,EAAGC,oBAAe;IACtBC,SAAS,EAAGZ;IACZ;IACAa,KAAK,EAAG,IAAAR,QAAE,EAAE,eAAgB,CAAG;IAC/BS,OAAO,EAAGA,CAAA,KAAM;MACfpB,aAAa,CAAE,SAAU,CAAC;MAC1BH,uBAAuB,CACtBS,eAAe,GAAG,MAAM,GAAG,UAC5B,CAAC;IACF,CAAG;IACHe,IAAI,EAAC;EAAS,CACd,CAEiB,CAAC;AAExB"}
1
+ {"version":3,"names":["_compose","require","_blockEditor","_data","_i18n","_icons","_components","_editor","_lockUnlock","DocumentTools","EditorDocumentTools","unlock","editorPrivateApis","blockEditorMode","hasFixedToolbar","isDistractionFree","isVisualMode","useSelect","select","getEditorMode","editorStore","__unstableSetEditorMode","useDispatch","blockEditorStore","setDeviceType","isLargeViewport","useViewportMatch","isZoomedOutViewExperimentEnabled","window","__experimentalEnableZoomedOutView","isZoomedOutView","_react","createElement","disableBlockTools","listViewLabel","__","ToolbarItem","as","Button","className","icon","chevronUpDown","isPressed","label","onClick","size"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronUpDown } from '@wordpress/icons';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { DocumentTools: EditorDocumentTools } = unlock( editorPrivateApis );\n\nexport default function DocumentTools( {\n\tblockEditorMode,\n\thasFixedToolbar,\n\tisDistractionFree,\n} ) {\n\tconst { isVisualMode } = useSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\treturn (\n\t\t<EditorDocumentTools\n\t\t\tdisableBlockTools={ ! isVisualMode }\n\t\t\tlistViewLabel={ __( 'List View' ) }\n\t\t>\n\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetDeviceType( 'Desktop' );\n\t\t\t\t\t\t\t__unstableSetEditorMode(\n\t\t\t\t\t\t\t\tisZoomedOutView ? 'edit' : 'zoom-out'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</EditorDocumentTools>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAQA,IAAAO,WAAA,GAAAP,OAAA;AAjBA;AACA;AACA;;AAYA;AACA;AACA;;AAGA,MAAM;EAAEQ,aAAa,EAAEC;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE3D,SAASH,aAAaA,CAAE;EACtCI,eAAe;EACfC,eAAe;EACfC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACjD,MAAM;MAAEC;IAAc,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAE/C,OAAO;MACNJ,YAAY,EAAEG,aAAa,CAAC,CAAC,KAAK;IACnC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEE;EAAwB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EACnE,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAF,iBAAW,EAAEF,aAAY,CAAC;EACpD,MAAMK,eAAe,GAAG,IAAAC,yBAAgB,EAAE,QAAS,CAAC;EACpD,MAAMC,gCAAgC,GACrCC,MAAM,EAAEC,iCAAiC,IAAIb,YAAY;EAC1D,MAAMc,eAAe,GAAGjB,eAAe,KAAK,UAAU;EAEtD,OACC,IAAAkB,MAAA,CAAAC,aAAA,EAACtB,mBAAmB;IACnBuB,iBAAiB,EAAG,CAAEjB,YAAc;IACpCkB,aAAa,EAAG,IAAAC,QAAE,EAAE,WAAY;EAAG,GAEjCR,gCAAgC,IACjCF,eAAe,IACf,CAAEV,iBAAiB,IACnB,CAAED,eAAe,IAChB,IAAAiB,MAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAA8B,WAAW;IACXC,EAAE,EAAGC,kBAAQ;IACbC,SAAS,EAAC,kDAAkD;IAC5DC,IAAI,EAAGC,oBAAe;IACtBC,SAAS,EAAGZ;IACZ;IACAa,KAAK,EAAG,IAAAR,QAAE,EAAE,eAAgB,CAAG;IAC/BS,OAAO,EAAGA,CAAA,KAAM;MACfpB,aAAa,CAAE,SAAU,CAAC;MAC1BH,uBAAuB,CACtBS,eAAe,GAAG,MAAM,GAAG,UAC5B,CAAC;IACF,CAAG;IACHe,IAAI,EAAC;EAAS,CACd,CAEiB,CAAC;AAExB","ignoreList":[]}
@@ -11,7 +11,6 @@ var _compose = require("@wordpress/compose");
11
11
  var _blockEditor = require("@wordpress/block-editor");
12
12
  var _data = require("@wordpress/data");
13
13
  var _element = require("@wordpress/element");
14
- var _interface = require("@wordpress/interface");
15
14
  var _i18n = require("@wordpress/i18n");
16
15
  var _icons = require("@wordpress/icons");
17
16
  var _components = require("@wordpress/components");
@@ -41,7 +40,8 @@ const {
41
40
  } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
42
41
  const {
43
42
  PostViewLink,
44
- PreviewDropdown
43
+ PreviewDropdown,
44
+ PinnedItems
45
45
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
46
46
  function HeaderEditMode() {
47
47
  const {
@@ -157,8 +157,8 @@ function HeaderEditMode() {
157
157
  disabled: isFocusMode || !hasDefaultEditorCanvasView
158
158
  })), (0, _react.createElement)(PostViewLink, null), (0, _react.createElement)(_saveButton.default, {
159
159
  size: "compact"
160
- }), !isDistractionFree && (0, _react.createElement)(_interface.PinnedItems.Slot, {
161
- scope: "core/edit-site"
160
+ }), !isDistractionFree && (0, _react.createElement)(PinnedItems.Slot, {
161
+ scope: "core"
162
162
  }), (0, _react.createElement)(_moreMenu.default, {
163
163
  showIconLabels: showIconLabels
164
164
  }))));
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_blockEditor","_data","_element","_interface","_i18n","_icons","_components","_preferences","_editor","_moreMenu","_saveButton","_documentTools","_store","_editorCanvasContainer","_lockUnlock","_constants","useShowBlockTools","unlock","blockEditorPrivateApis","PostViewLink","PreviewDropdown","editorPrivateApis","HeaderEditMode","templateType","isDistractionFree","blockEditorMode","blockSelectionStart","showIconLabels","editorCanvasView","useSelect","select","getEditedPostType","editSiteStore","getBlockSelectionStart","__unstableGetEditorMode","blockEditorStore","get","getPreference","preferencesStore","getDeviceType","editorStore","deviceType","getEditorCanvasContainerView","isLargeViewport","useViewportMatch","showFixedToolbar","showTopToolbar","blockToolbarRef","useRef","disableMotion","useReducedMotion","hasDefaultEditorCanvasView","useHasEditorCanvasContainer","isFocusMode","FOCUSABLE_ENTITIES","includes","isZoomedOutView","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","useEffect","toolbarVariants","y","isDistractionFreeHovering","view","edit","toolbarTransition","type","duration","ease","_react","createElement","className","classnames","__unstableMotion","div","variants","transition","default","Fragment","BlockToolbar","hideDragHandle","Popover","Slot","ref","name","Button","icon","next","previous","onClick","collapsed","label","__","size","getEditorCanvasContainerTitle","DocumentBar","disabled","PinnedItems","scope"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport {\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { PinnedItems } from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tDocumentBar,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MoreMenu from './more-menu';\nimport SaveButton from '../save-button';\nimport DocumentTools from './document-tools';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport { unlock } from '../../lock-unlock';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { useShowBlockTools } = unlock( blockEditorPrivateApis );\nconst { PostViewLink, PreviewDropdown } = unlock( editorPrivateApis );\n\nexport default function HeaderEditMode() {\n\tconst {\n\t\ttemplateType,\n\t\tisDistractionFree,\n\t\tblockEditorMode,\n\t\tblockSelectionStart,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType } = select( editSiteStore );\n\t\tconst { getBlockSelectionStart, __unstableGetEditorMode } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getDeviceType } = select( editorStore );\n\n\t\treturn {\n\t\t\tdeviceType: getDeviceType(),\n\t\t\ttemplateType: getEditedPostType(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tblockSelectionStart: getBlockSelectionStart(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tisDistractionFree: getPreference( 'core', 'distractionFree' ),\n\t\t};\n\t}, [] );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { showFixedToolbar } = useShowBlockTools();\n\tconst showTopToolbar = isLargeViewport && showFixedToolbar;\n\tconst blockToolbarRef = useRef();\n\tconst disableMotion = useReducedMotion();\n\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\n\tconst isFocusMode = FOCUSABLE_ENTITIES.includes( templateType );\n\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\n\n\tconst toolbarVariants = {\n\t\tisDistractionFree: { y: '-50px' },\n\t\tisDistractionFreeHovering: { y: 0 },\n\t\tview: { y: 0 },\n\t\tedit: { y: 0 },\n\t};\n\n\tconst toolbarTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : 0.2,\n\t\tease: 'easeOut',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-header-edit-mode', {\n\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasDefaultEditorCanvasView && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__start\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t<DocumentTools\n\t\t\t\t\t\tblockEditorMode={ blockEditorMode }\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showTopToolbar && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-collapsed': isBlockToolsCollapsed,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__block-tools-toggle\"\n\t\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</motion.div>\n\t\t\t) }\n\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-header-edit-mode__center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t! isBlockToolsCollapsed && showTopToolbar,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! hasDefaultEditorCanvasView ? (\n\t\t\t\t\t\tgetEditorCanvasContainerTitle( editorCanvasView )\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DocumentBar />\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t<div className=\"edit-site-header-edit-mode__end\">\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__actions\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-header-edit-mode__preview-options',\n\t\t\t\t\t\t\t\t{ 'is-zoomed-out': isZoomedOutView }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreviewDropdown\n\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\tisFocusMode || ! hasDefaultEditorCanvasView\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<PostViewLink />\n\t\t\t\t\t<SaveButton size=\"compact\" />\n\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-site\" />\n\t\t\t\t\t) }\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t</motion.div>\n\t\t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,EACD,IAAAmB,MAAA,CAAAC,aAAA,EAACpD,YAAY,MAAE,CAAC,EAChB,IAAAmD,MAAA,CAAAC,aAAA,EAAC7D,WAAA,CAAAoE,OAAU;IAACgB,IAAI,EAAC;EAAS,CAAE,CAAC,EAC3B,CAAEtE,iBAAiB,IACpB,IAAA8C,MAAA,CAAAC,aAAA,EAACpE,UAAA,CAAA+F,WAAW,CAACf,IAAI;IAACgB,KAAK,EAAC;EAAgB,CAAE,CAC1C,EACD,IAAA7B,MAAA,CAAAC,aAAA,EAAC9D,SAAA,CAAAqE,OAAQ;IAACnD,cAAc,EAAGA;EAAgB,CAAE,CAClC,CACR,CACD,CAAC;AAER"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_blockEditor","_data","_element","_i18n","_icons","_components","_preferences","_editor","_moreMenu","_saveButton","_documentTools","_store","_editorCanvasContainer","_lockUnlock","_constants","useShowBlockTools","unlock","blockEditorPrivateApis","PostViewLink","PreviewDropdown","PinnedItems","editorPrivateApis","HeaderEditMode","templateType","isDistractionFree","blockEditorMode","blockSelectionStart","showIconLabels","editorCanvasView","useSelect","select","getEditedPostType","editSiteStore","getBlockSelectionStart","__unstableGetEditorMode","blockEditorStore","get","getPreference","preferencesStore","getDeviceType","editorStore","deviceType","getEditorCanvasContainerView","isLargeViewport","useViewportMatch","showFixedToolbar","showTopToolbar","blockToolbarRef","useRef","disableMotion","useReducedMotion","hasDefaultEditorCanvasView","useHasEditorCanvasContainer","isFocusMode","FOCUSABLE_ENTITIES","includes","isZoomedOutView","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","useEffect","toolbarVariants","y","isDistractionFreeHovering","view","edit","toolbarTransition","type","duration","ease","_react","createElement","className","classnames","__unstableMotion","div","variants","transition","default","Fragment","BlockToolbar","hideDragHandle","Popover","Slot","ref","name","Button","icon","next","previous","onClick","collapsed","label","__","size","getEditorCanvasContainerTitle","DocumentBar","disabled","scope"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport {\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tDocumentBar,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MoreMenu from './more-menu';\nimport SaveButton from '../save-button';\nimport DocumentTools from './document-tools';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport { unlock } from '../../lock-unlock';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { useShowBlockTools } = unlock( blockEditorPrivateApis );\nconst { PostViewLink, PreviewDropdown, PinnedItems } =\n\tunlock( editorPrivateApis );\n\nexport default function HeaderEditMode() {\n\tconst {\n\t\ttemplateType,\n\t\tisDistractionFree,\n\t\tblockEditorMode,\n\t\tblockSelectionStart,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType } = select( editSiteStore );\n\t\tconst { getBlockSelectionStart, __unstableGetEditorMode } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getDeviceType } = select( editorStore );\n\n\t\treturn {\n\t\t\tdeviceType: getDeviceType(),\n\t\t\ttemplateType: getEditedPostType(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tblockSelectionStart: getBlockSelectionStart(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tisDistractionFree: getPreference( 'core', 'distractionFree' ),\n\t\t};\n\t}, [] );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { showFixedToolbar } = useShowBlockTools();\n\tconst showTopToolbar = isLargeViewport && showFixedToolbar;\n\tconst blockToolbarRef = useRef();\n\tconst disableMotion = useReducedMotion();\n\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\n\tconst isFocusMode = FOCUSABLE_ENTITIES.includes( templateType );\n\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\n\n\tconst toolbarVariants = {\n\t\tisDistractionFree: { y: '-50px' },\n\t\tisDistractionFreeHovering: { y: 0 },\n\t\tview: { y: 0 },\n\t\tedit: { y: 0 },\n\t};\n\n\tconst toolbarTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : 0.2,\n\t\tease: 'easeOut',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-header-edit-mode', {\n\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasDefaultEditorCanvasView && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__start\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t<DocumentTools\n\t\t\t\t\t\tblockEditorMode={ blockEditorMode }\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showTopToolbar && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-collapsed': isBlockToolsCollapsed,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__block-tools-toggle\"\n\t\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</motion.div>\n\t\t\t) }\n\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-header-edit-mode__center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t! isBlockToolsCollapsed && showTopToolbar,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! hasDefaultEditorCanvasView ? (\n\t\t\t\t\t\tgetEditorCanvasContainerTitle( editorCanvasView )\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DocumentBar />\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t<div className=\"edit-site-header-edit-mode__end\">\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__actions\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-header-edit-mode__preview-options',\n\t\t\t\t\t\t\t\t{ 'is-zoomed-out': isZoomedOutView }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreviewDropdown\n\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\tisFocusMode || ! hasDefaultEditorCanvasView\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<PostViewLink />\n\t\t\t\t\t<SaveButton size=\"compact\" />\n\t\t\t\t\t{ ! isDistractionFree && <PinnedItems.Slot scope=\"core\" /> }\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t</motion.div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OA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C,aAAA,EAACnD,WAAW,CAAC+D,IAAI;IAACe,KAAK,EAAC;EAAM,CAAE,CAAC,EAC1D,IAAA5B,MAAA,CAAAC,aAAA,EAAC/D,SAAA,CAAAsE,OAAQ;IAACnD,cAAc,EAAGA;EAAgB,CAAE,CAClC,CACR,CACD,CAAC;AAER","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_data","_i18n","_compose","_notices","_coreData","_blocks","_store","CopyContentMenuItem","createNotice","useDispatch","noticesStore","getEditedPostId","getEditedPostType","useSelect","editSiteStore","getEditedEntityRecord","coreStore","getText","record","content","blocks","__unstableSerializeAndClean","onSuccess","__","isDismissible","type","ref","useCopyToClipboard","_react","createElement","MenuItem"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/more-menu/copy-content-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\n\nexport default function CopyContentMenuItem() {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { getEditedPostId, getEditedPostType } = useSelect( editSiteStore );\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\n\tfunction getText() {\n\t\tconst record = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tgetEditedPostType(),\n\t\t\tgetEditedPostId()\n\t\t);\n\t\tif ( ! record ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( typeof record.content === 'function' ) {\n\t\t\treturn record.content( record );\n\t\t} else if ( record.blocks ) {\n\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t} else if ( record.content ) {\n\t\t\treturn record.content;\n\t\t}\n\t}\n\n\tfunction onSuccess() {\n\t\tcreateNotice( 'info', __( 'All content copied.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}\n\n\tconst ref = useCopyToClipboard( getText, onSuccess );\n\n\treturn <MenuItem ref={ ref }>{ __( 'Copy all blocks' ) }</MenuItem>;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AAdA;AACA;AACA;;AASA;AACA;AACA;;AAGe,SAASQ,mBAAmBA,CAAA,EAAG;EAC7C,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEC,cAAa,CAAC;EACpD,MAAM;IAAEC,eAAe;IAAEC;EAAkB,CAAC,GAAG,IAAAC,eAAS,EAAEC,YAAc,CAAC;EACzE,MAAM;IAAEC;EAAsB,CAAC,GAAG,IAAAF,eAAS,EAAEG,eAAU,CAAC;EAExD,SAASC,OAAOA,CAAA,EAAG;IAClB,MAAMC,MAAM,GAAGH,qBAAqB,CACnC,UAAU,EACVH,iBAAiB,CAAC,CAAC,EACnBD,eAAe,CAAC,CACjB,CAAC;IACD,IAAK,CAAEO,MAAM,EAAG;MACf,OAAO,EAAE;IACV;IAEA,IAAK,OAAOA,MAAM,CAACC,OAAO,KAAK,UAAU,EAAG;MAC3C,OAAOD,MAAM,CAACC,OAAO,CAAED,MAAO,CAAC;IAChC,CAAC,MAAM,IAAKA,MAAM,CAACE,MAAM,EAAG;MAC3B,OAAO,IAAAC,mCAA2B,EAAEH,MAAM,CAACE,MAAO,CAAC;IACpD,CAAC,MAAM,IAAKF,MAAM,CAACC,OAAO,EAAG;MAC5B,OAAOD,MAAM,CAACC,OAAO;IACtB;EACD;EAEA,SAASG,SAASA,CAAA,EAAG;IACpBd,YAAY,CAAE,MAAM,EAAE,IAAAe,QAAE,EAAE,qBAAsB,CAAC,EAAE;MAClDC,aAAa,EAAE,IAAI;MACnBC,IAAI,EAAE;IACP,CAAE,CAAC;EACJ;EAEA,MAAMC,GAAG,GAAG,IAAAC,2BAAkB,EAAEV,OAAO,EAAEK,SAAU,CAAC;EAEpD,OAAO,IAAAM,MAAA,CAAAC,aAAA,EAAC/B,WAAA,CAAAgC,QAAQ;IAACJ,GAAG,EAAGA;EAAK,GAAG,IAAAH,QAAE,EAAE,iBAAkB,CAAa,CAAC;AACpE"}
1
+ {"version":3,"names":["_components","require","_data","_i18n","_compose","_notices","_coreData","_blocks","_store","CopyContentMenuItem","createNotice","useDispatch","noticesStore","getEditedPostId","getEditedPostType","useSelect","editSiteStore","getEditedEntityRecord","coreStore","getText","record","content","blocks","__unstableSerializeAndClean","onSuccess","__","isDismissible","type","ref","useCopyToClipboard","_react","createElement","MenuItem"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/more-menu/copy-content-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\n\nexport default function CopyContentMenuItem() {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { getEditedPostId, getEditedPostType } = useSelect( editSiteStore );\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\n\tfunction getText() {\n\t\tconst record = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tgetEditedPostType(),\n\t\t\tgetEditedPostId()\n\t\t);\n\t\tif ( ! record ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( typeof record.content === 'function' ) {\n\t\t\treturn record.content( record );\n\t\t} else if ( record.blocks ) {\n\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t} else if ( record.content ) {\n\t\t\treturn record.content;\n\t\t}\n\t}\n\n\tfunction onSuccess() {\n\t\tcreateNotice( 'info', __( 'All content copied.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}\n\n\tconst ref = useCopyToClipboard( getText, onSuccess );\n\n\treturn <MenuItem ref={ ref }>{ __( 'Copy all blocks' ) }</MenuItem>;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AAdA;AACA;AACA;;AASA;AACA;AACA;;AAGe,SAASQ,mBAAmBA,CAAA,EAAG;EAC7C,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEC,cAAa,CAAC;EACpD,MAAM;IAAEC,eAAe;IAAEC;EAAkB,CAAC,GAAG,IAAAC,eAAS,EAAEC,YAAc,CAAC;EACzE,MAAM;IAAEC;EAAsB,CAAC,GAAG,IAAAF,eAAS,EAAEG,eAAU,CAAC;EAExD,SAASC,OAAOA,CAAA,EAAG;IAClB,MAAMC,MAAM,GAAGH,qBAAqB,CACnC,UAAU,EACVH,iBAAiB,CAAC,CAAC,EACnBD,eAAe,CAAC,CACjB,CAAC;IACD,IAAK,CAAEO,MAAM,EAAG;MACf,OAAO,EAAE;IACV;IAEA,IAAK,OAAOA,MAAM,CAACC,OAAO,KAAK,UAAU,EAAG;MAC3C,OAAOD,MAAM,CAACC,OAAO,CAAED,MAAO,CAAC;IAChC,CAAC,MAAM,IAAKA,MAAM,CAACE,MAAM,EAAG;MAC3B,OAAO,IAAAC,mCAA2B,EAAEH,MAAM,CAACE,MAAO,CAAC;IACpD,CAAC,MAAM,IAAKF,MAAM,CAACC,OAAO,EAAG;MAC5B,OAAOD,MAAM,CAACC,OAAO;IACtB;EACD;EAEA,SAASG,SAASA,CAAA,EAAG;IACpBd,YAAY,CAAE,MAAM,EAAE,IAAAe,QAAE,EAAE,qBAAsB,CAAC,EAAE;MAClDC,aAAa,EAAE,IAAI;MACnBC,IAAI,EAAE;IACP,CAAE,CAAC;EACJ;EAEA,MAAMC,GAAG,GAAG,IAAAC,2BAAkB,EAAEV,OAAO,EAAEK,SAAU,CAAC;EAEpD,OAAO,IAAAM,MAAA,CAAAC,aAAA,EAAC/B,WAAA,CAAAgC,QAAQ;IAACJ,GAAG,EAAGA;EAAK,GAAG,IAAAH,QAAE,EAAE,iBAAkB,CAAa,CAAC;AACpE","ignoreList":[]}
@@ -11,19 +11,14 @@ var _data = require("@wordpress/data");
11
11
  var _keycodes = require("@wordpress/keycodes");
12
12
  var _icons = require("@wordpress/icons");
13
13
  var _components = require("@wordpress/components");
14
- var _interface = require("@wordpress/interface");
15
14
  var _preferences = require("@wordpress/preferences");
16
15
  var _coreData = require("@wordpress/core-data");
17
16
  var _editor = require("@wordpress/editor");
18
- var _keyboardShortcutHelpModal = _interopRequireWildcard(require("../../keyboard-shortcut-help-modal"));
19
- var _preferencesModal = _interopRequireWildcard(require("../../preferences-modal"));
20
17
  var _toolsMoreMenuGroup = _interopRequireDefault(require("../tools-more-menu-group"));
21
18
  var _siteExport = _interopRequireDefault(require("./site-export"));
22
19
  var _welcomeGuideMenuItem = _interopRequireDefault(require("./welcome-guide-menu-item"));
23
20
  var _copyContentMenuItem = _interopRequireDefault(require("./copy-content-menu-item"));
24
21
  var _lockUnlock = require("../../../lock-unlock");
25
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
26
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
27
22
  /**
28
23
  * WordPress dependencies
29
24
  */
@@ -33,14 +28,17 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
33
28
  */
34
29
 
35
30
  const {
36
- ModeSwitcher
31
+ ModeSwitcher,
32
+ ActionItem,
33
+ interfaceStore,
34
+ PreferencesModal
37
35
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
38
36
  function MoreMenu({
39
37
  showIconLabels
40
38
  }) {
41
39
  const {
42
40
  openModal
43
- } = (0, _data.useDispatch)(_interface.store);
41
+ } = (0, _data.useDispatch)(interfaceStore);
44
42
  const {
45
43
  set: setPreference
46
44
  } = (0, _data.useDispatch)(_preferences.store);
@@ -97,8 +95,8 @@ function MoreMenu({
97
95
  info: (0, _i18n.__)('Focus on one block at a time'),
98
96
  messageActivated: (0, _i18n.__)('Spotlight mode activated'),
99
97
  messageDeactivated: (0, _i18n.__)('Spotlight mode deactivated')
100
- })), (0, _react.createElement)(ModeSwitcher, null), (0, _react.createElement)(_interface.ActionItem.Slot, {
101
- name: "core/edit-site/plugin-more-menu",
98
+ })), (0, _react.createElement)(ModeSwitcher, null), (0, _react.createElement)(ActionItem.Slot, {
99
+ name: "core/plugin-more-menu",
102
100
  label: (0, _i18n.__)('Plugins'),
103
101
  as: _components.MenuGroup,
104
102
  fillProps: {
@@ -107,7 +105,7 @@ function MoreMenu({
107
105
  }), (0, _react.createElement)(_components.MenuGroup, {
108
106
  label: (0, _i18n.__)('Tools')
109
107
  }, isBlockBasedTheme && (0, _react.createElement)(_siteExport.default, null), (0, _react.createElement)(_components.MenuItem, {
110
- onClick: () => openModal(_keyboardShortcutHelpModal.KEYBOARD_SHORTCUT_HELP_MODAL_NAME),
108
+ onClick: () => openModal('editor/keyboard-shortcut-help'),
111
109
  shortcut: _keycodes.displayShortcut.access('h')
112
110
  }, (0, _i18n.__)('Keyboard shortcuts')), (0, _react.createElement)(_welcomeGuideMenuItem.default, null), (0, _react.createElement)(_copyContentMenuItem.default, null), (0, _react.createElement)(_components.MenuItem, {
113
111
  icon: _icons.external,
@@ -123,7 +121,7 @@ function MoreMenu({
123
121
  onClose
124
122
  }
125
123
  })), (0, _react.createElement)(_components.MenuGroup, null, (0, _react.createElement)(_components.MenuItem, {
126
- onClick: () => openModal(_preferencesModal.PREFERENCES_MODAL_NAME)
127
- }, (0, _i18n.__)('Preferences'))))), (0, _react.createElement)(_keyboardShortcutHelpModal.default, null), (0, _react.createElement)(_preferencesModal.default, null));
124
+ onClick: () => openModal('editor/preferences')
125
+ }, (0, _i18n.__)('Preferences'))))), (0, _react.createElement)(PreferencesModal, null));
128
126
  }
129
127
  //# sourceMappingURL=index.js.map