@wordpress/edit-site 5.32.0 → 5.34.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 (872) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-page/index.js +3 -0
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +8 -7
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +3 -1
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +282 -13
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/utils.js +22 -11
  13. package/build/components/add-new-template/utils.js.map +1 -1
  14. package/build/components/app/index.js.map +1 -1
  15. package/build/components/async/index.js +51 -0
  16. package/build/components/async/index.js.map +1 -0
  17. package/build/components/block-editor/block-inspector-button.js +10 -9
  18. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  19. package/build/components/block-editor/editor-canvas.js +15 -6
  20. package/build/components/block-editor/editor-canvas.js.map +1 -1
  21. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  22. package/build/components/block-editor/resizable-editor.js.map +1 -1
  23. package/build/components/block-editor/resize-handle.js +20 -5
  24. package/build/components/block-editor/resize-handle.js.map +1 -1
  25. package/build/components/block-editor/site-editor-canvas.js +5 -1
  26. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  27. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  28. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  29. package/build/components/canvas-loader/index.js.map +1 -1
  30. package/build/components/code-editor/index.js.map +1 -1
  31. package/build/components/create-template-part-modal/index.js +3 -0
  32. package/build/components/create-template-part-modal/index.js.map +1 -1
  33. package/build/components/editor/index.js +61 -11
  34. package/build/components/editor/index.js.map +1 -1
  35. package/build/components/editor-canvas-container/index.js.map +1 -1
  36. package/build/components/error-boundary/index.js.map +1 -1
  37. package/build/components/error-boundary/warning.js.map +1 -1
  38. package/build/components/global-styles/background-panel.js +13 -1
  39. package/build/components/global-styles/background-panel.js.map +1 -1
  40. package/build/components/global-styles/block-preview-panel.js +6 -1
  41. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  42. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  43. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  44. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  45. package/build/components/global-styles/font-families.js +1 -1
  46. package/build/components/global-styles/font-families.js.map +1 -1
  47. package/build/components/global-styles/font-family-item.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  49. package/build/components/global-styles/font-library-modal/context.js +69 -35
  50. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  51. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/font-collection.js +18 -6
  53. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  55. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/index.js +1 -1
  57. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/installed-fonts.js +31 -28
  59. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  61. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  63. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  65. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  67. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  68. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  69. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  70. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
  71. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  72. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  73. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  74. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  75. package/build/components/global-styles/header.js.map +1 -1
  76. package/build/components/global-styles/highlighted-colors.js +1 -1
  77. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  78. package/build/components/global-styles/hooks.js +11 -3
  79. package/build/components/global-styles/hooks.js.map +1 -1
  80. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  81. package/build/components/global-styles/index.js.map +1 -1
  82. package/build/components/global-styles/navigation-button.js.map +1 -1
  83. package/build/components/global-styles/palette.js.map +1 -1
  84. package/build/components/global-styles/preview-colors.js.map +1 -1
  85. package/build/components/global-styles/preview-iframe.js.map +1 -1
  86. package/build/components/global-styles/preview-styles.js.map +1 -1
  87. package/build/components/global-styles/root-menu.js +2 -2
  88. package/build/components/global-styles/root-menu.js.map +1 -1
  89. package/build/components/global-styles/screen-background.js +1 -1
  90. package/build/components/global-styles/screen-background.js.map +1 -1
  91. package/build/components/global-styles/screen-block-list.js.map +1 -1
  92. package/build/components/global-styles/screen-block.js.map +1 -1
  93. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  94. package/build/components/global-styles/screen-colors.js.map +1 -1
  95. package/build/components/global-styles/screen-css.js.map +1 -1
  96. package/build/components/global-styles/screen-layout.js.map +1 -1
  97. package/build/components/global-styles/screen-revisions/index.js +1 -1
  98. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  99. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  100. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  101. package/build/components/global-styles/screen-root.js.map +1 -1
  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.map +1 -1
  105. package/build/components/global-styles/style-variations-container.js +8 -2
  106. package/build/components/global-styles/style-variations-container.js.map +1 -1
  107. package/build/components/global-styles/subtitle.js.map +1 -1
  108. package/build/components/global-styles/typography-elements.js.map +1 -1
  109. package/build/components/global-styles/typography-example.js.map +1 -1
  110. package/build/components/global-styles/typography-panel.js.map +1 -1
  111. package/build/components/global-styles/typography-preview.js.map +1 -1
  112. package/build/components/global-styles/ui.js +1 -1
  113. package/build/components/global-styles/ui.js.map +1 -1
  114. package/build/components/global-styles/utils.js.map +1 -1
  115. package/build/components/global-styles/variations/variation.js.map +1 -1
  116. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  117. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  118. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  119. package/build/components/global-styles-renderer/index.js.map +1 -1
  120. package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
  121. package/build/components/header-edit-mode/index.js +36 -52
  122. package/build/components/header-edit-mode/index.js.map +1 -1
  123. package/build/components/header-edit-mode/more-menu/index.js +4 -100
  124. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  125. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  126. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  127. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  128. package/build/components/keyboard-shortcuts/register.js +0 -67
  129. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  130. package/build/components/layout/animation.js +3 -2
  131. package/build/components/layout/animation.js.map +1 -1
  132. package/build/components/layout/hooks.js.map +1 -1
  133. package/build/components/layout/index.js +20 -52
  134. package/build/components/layout/index.js.map +1 -1
  135. package/build/components/layout/router.js +70 -33
  136. package/build/components/layout/router.js.map +1 -1
  137. package/build/components/media/index.js.map +1 -1
  138. package/build/components/page/header.js.map +1 -1
  139. package/build/components/page/index.js +5 -2
  140. package/build/components/page/index.js.map +1 -1
  141. package/build/components/page-pages/index.js +18 -19
  142. package/build/components/page-pages/index.js.map +1 -1
  143. package/build/components/page-patterns/dataviews-pattern-actions.js +16 -11
  144. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  145. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  146. package/build/components/page-patterns/header.js +5 -3
  147. package/build/components/page-patterns/header.js.map +1 -1
  148. package/build/components/page-patterns/index.js +140 -62
  149. package/build/components/page-patterns/index.js.map +1 -1
  150. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  151. package/build/components/page-patterns/search-items.js +2 -1
  152. package/build/components/page-patterns/search-items.js.map +1 -1
  153. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  154. package/build/components/page-patterns/use-patterns.js +6 -10
  155. package/build/components/page-patterns/use-patterns.js.map +1 -1
  156. package/build/components/page-patterns/utils.js.map +1 -1
  157. package/build/components/page-templates/hooks.js.map +1 -0
  158. package/build/components/{page-templates-template-parts → page-templates}/index.js +78 -103
  159. package/build/components/page-templates/index.js.map +1 -0
  160. package/build/components/pagination/index.js.map +1 -1
  161. package/build/components/pattern-modal/duplicate.js +13 -8
  162. package/build/components/pattern-modal/duplicate.js.map +1 -1
  163. package/build/components/pattern-modal/index.js.map +1 -1
  164. package/build/components/pattern-modal/rename.js +6 -3
  165. package/build/components/pattern-modal/rename.js.map +1 -1
  166. package/build/components/plugin-template-setting-panel/index.js +9 -0
  167. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  168. package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
  169. package/build/components/rename-post-menu-item/index.js.map +1 -0
  170. package/build/components/resizable-frame/index.js +10 -11
  171. package/build/components/resizable-frame/index.js.map +1 -1
  172. package/build/components/revisions/index.js.map +1 -1
  173. package/build/components/routes/link.js.map +1 -1
  174. package/build/components/routes/use-title.js.map +1 -1
  175. package/build/components/save-button/index.js.map +1 -1
  176. package/build/components/save-hub/index.js.map +1 -1
  177. package/build/components/save-panel/index.js +3 -3
  178. package/build/components/save-panel/index.js.map +1 -1
  179. package/build/components/sidebar/index.js +41 -75
  180. package/build/components/sidebar/index.js.map +1 -1
  181. package/build/components/sidebar-button/index.js.map +1 -1
  182. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  183. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  184. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  185. package/build/components/sidebar-dataviews/default-views.js +1 -1
  186. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  187. package/build/components/sidebar-dataviews/index.js +1 -1
  188. package/build/components/sidebar-dataviews/index.js.map +1 -1
  189. package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
  190. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  191. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  192. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  193. package/build/components/sidebar-edit-mode/index.js +31 -55
  194. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  195. package/build/components/sidebar-edit-mode/page-panels/index.js +55 -3
  196. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  197. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  198. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +23 -16
  199. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
  201. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  202. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  203. package/build/components/sidebar-edit-mode/template-panel/index.js +3 -6
  204. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  205. package/build/components/sidebar-navigation-item/index.js +31 -0
  206. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  207. package/build/components/sidebar-navigation-screen/index.js +36 -9
  208. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  209. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  210. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  211. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  212. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  213. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  214. package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -2
  215. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  216. package/build/components/sidebar-navigation-screen-main/index.js +6 -15
  217. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  218. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  219. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  220. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
  221. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  223. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  224. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  225. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  226. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  227. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  228. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  229. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  231. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  232. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  233. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  234. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  235. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-page/index.js +53 -12
  237. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  239. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-pattern/index.js +17 -15
  241. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  243. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  245. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
  246. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  247. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  249. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  250. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  251. package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
  252. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  253. package/build/components/sidebar-navigation-screen-patterns/index.js +64 -52
  254. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  255. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  257. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  259. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-template/index.js +11 -8
  261. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  263. package/build/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  264. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  265. package/build/components/sidebar-navigation-screen-templates-browse/index.js +4 -36
  266. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  267. package/build/components/site-hub/index.js +22 -21
  268. package/build/components/site-hub/index.js.map +1 -1
  269. package/build/components/site-icon/index.js.map +1 -1
  270. package/build/components/start-template-options/index.js.map +1 -1
  271. package/build/components/style-book/index.js.map +1 -1
  272. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -13
  273. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  274. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  275. package/build/components/table/index.js.map +1 -1
  276. package/build/components/template-actions/index.js +7 -8
  277. package/build/components/template-actions/index.js.map +1 -1
  278. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  279. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  280. package/build/components/template-part-converter/index.js.map +1 -1
  281. package/build/components/use-edited-entity-record/index.js.map +1 -1
  282. package/build/components/welcome-guide/editor.js.map +1 -1
  283. package/build/components/welcome-guide/image.js.map +1 -1
  284. package/build/components/welcome-guide/index.js.map +1 -1
  285. package/build/components/welcome-guide/page.js.map +1 -1
  286. package/build/components/welcome-guide/styles.js +6 -3
  287. package/build/components/welcome-guide/styles.js.map +1 -1
  288. package/build/components/welcome-guide/template.js.map +1 -1
  289. package/build/deprecated.js +55 -0
  290. package/build/deprecated.js.map +1 -0
  291. package/build/hooks/commands/use-common-commands.js.map +1 -1
  292. package/build/hooks/commands/use-edit-mode-commands.js +10 -28
  293. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  294. package/build/hooks/components.js.map +1 -1
  295. package/build/hooks/index.js.map +1 -1
  296. package/build/hooks/push-changes-to-global-styles/index.js +3 -40
  297. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  298. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +36 -5
  299. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  300. package/build/index.js +18 -23
  301. package/build/index.js.map +1 -1
  302. package/build/lock-unlock.js.map +1 -1
  303. package/build/store/actions.js +21 -96
  304. package/build/store/actions.js.map +1 -1
  305. package/build/store/constants.js.map +1 -1
  306. package/build/store/index.js +1 -1
  307. package/build/store/index.js.map +1 -1
  308. package/build/store/private-actions.js +1 -85
  309. package/build/store/private-actions.js.map +1 -1
  310. package/build/store/private-selectors.js.map +1 -1
  311. package/build/store/reducer.js.map +1 -1
  312. package/build/store/selectors.js.map +1 -1
  313. package/build/utils/clone-deep.js.map +1 -1
  314. package/build/utils/constants.js +2 -2
  315. package/build/utils/constants.js.map +1 -1
  316. package/build/utils/get-is-list-page.js.map +1 -1
  317. package/build/utils/is-previewing-theme.js.map +1 -1
  318. package/build/utils/is-template-removable.js.map +1 -1
  319. package/build/utils/is-template-revertable.js.map +1 -1
  320. package/build/utils/math.js.map +1 -1
  321. package/build/utils/set-nested-value.js +44 -0
  322. package/build/utils/set-nested-value.js.map +1 -0
  323. package/build/utils/template-part-create.js.map +1 -1
  324. package/build/utils/use-activate-theme.js.map +1 -1
  325. package/build/utils/use-actual-current-theme.js.map +1 -1
  326. package/build-module/components/add-new-page/index.js +3 -0
  327. package/build-module/components/add-new-page/index.js.map +1 -1
  328. package/build-module/components/add-new-pattern/index.js +8 -7
  329. package/build-module/components/add-new-pattern/index.js.map +1 -1
  330. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
  331. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  332. package/build-module/components/add-new-template/add-custom-template-modal-content.js +3 -1
  333. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  334. package/build-module/components/add-new-template/index.js +283 -14
  335. package/build-module/components/add-new-template/index.js.map +1 -1
  336. package/build-module/components/add-new-template/utils.js +21 -11
  337. package/build-module/components/add-new-template/utils.js.map +1 -1
  338. package/build-module/components/app/index.js.map +1 -1
  339. package/build-module/components/async/index.js +44 -0
  340. package/build-module/components/async/index.js.map +1 -0
  341. package/build-module/components/block-editor/block-inspector-button.js +9 -8
  342. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  343. package/build-module/components/block-editor/editor-canvas.js +16 -7
  344. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  345. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  346. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  347. package/build-module/components/block-editor/resize-handle.js +21 -6
  348. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  349. package/build-module/components/block-editor/site-editor-canvas.js +5 -1
  350. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  351. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  352. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  353. package/build-module/components/canvas-loader/index.js.map +1 -1
  354. package/build-module/components/code-editor/index.js.map +1 -1
  355. package/build-module/components/create-template-part-modal/index.js +3 -0
  356. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  357. package/build-module/components/editor/index.js +61 -11
  358. package/build-module/components/editor/index.js.map +1 -1
  359. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  360. package/build-module/components/error-boundary/index.js.map +1 -1
  361. package/build-module/components/error-boundary/warning.js.map +1 -1
  362. package/build-module/components/global-styles/background-panel.js +14 -1
  363. package/build-module/components/global-styles/background-panel.js.map +1 -1
  364. package/build-module/components/global-styles/block-preview-panel.js +6 -1
  365. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  366. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  367. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  368. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  369. package/build-module/components/global-styles/font-families.js.map +1 -1
  370. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  371. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/context.js +68 -35
  373. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  375. package/build-module/components/global-styles/font-library-modal/font-collection.js +19 -7
  376. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  377. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  379. package/build-module/components/global-styles/font-library-modal/index.js +2 -2
  380. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  381. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +32 -29
  382. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  383. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  384. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  385. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  386. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  387. package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  388. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  389. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  390. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  391. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  392. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  393. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
  394. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  395. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  396. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  397. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  398. package/build-module/components/global-styles/header.js.map +1 -1
  399. package/build-module/components/global-styles/highlighted-colors.js +1 -1
  400. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  401. package/build-module/components/global-styles/hooks.js +11 -3
  402. package/build-module/components/global-styles/hooks.js.map +1 -1
  403. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  404. package/build-module/components/global-styles/index.js.map +1 -1
  405. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  406. package/build-module/components/global-styles/palette.js.map +1 -1
  407. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  408. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  409. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  410. package/build-module/components/global-styles/root-menu.js +2 -2
  411. package/build-module/components/global-styles/root-menu.js.map +1 -1
  412. package/build-module/components/global-styles/screen-background.js +1 -1
  413. package/build-module/components/global-styles/screen-background.js.map +1 -1
  414. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  415. package/build-module/components/global-styles/screen-block.js.map +1 -1
  416. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  417. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  418. package/build-module/components/global-styles/screen-css.js.map +1 -1
  419. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  420. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  421. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  422. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  423. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  424. package/build-module/components/global-styles/screen-root.js.map +1 -1
  425. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  426. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  427. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  428. package/build-module/components/global-styles/style-variations-container.js +8 -2
  429. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  430. package/build-module/components/global-styles/subtitle.js.map +1 -1
  431. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  432. package/build-module/components/global-styles/typography-example.js.map +1 -1
  433. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  434. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  435. package/build-module/components/global-styles/ui.js.map +1 -1
  436. package/build-module/components/global-styles/utils.js.map +1 -1
  437. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  438. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  439. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  440. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  441. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  442. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
  443. package/build-module/components/header-edit-mode/index.js +41 -57
  444. package/build-module/components/header-edit-mode/index.js.map +1 -1
  445. package/build-module/components/header-edit-mode/more-menu/index.js +6 -100
  446. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  447. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  448. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  449. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  450. package/build-module/components/keyboard-shortcuts/register.js +0 -67
  451. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  452. package/build-module/components/layout/animation.js +4 -3
  453. package/build-module/components/layout/animation.js.map +1 -1
  454. package/build-module/components/layout/hooks.js.map +1 -1
  455. package/build-module/components/layout/index.js +20 -52
  456. package/build-module/components/layout/index.js.map +1 -1
  457. package/build-module/components/layout/router.js +70 -33
  458. package/build-module/components/layout/router.js.map +1 -1
  459. package/build-module/components/media/index.js.map +1 -1
  460. package/build-module/components/page/header.js.map +1 -1
  461. package/build-module/components/page/index.js +5 -2
  462. package/build-module/components/page/index.js.map +1 -1
  463. package/build-module/components/page-pages/index.js +18 -19
  464. package/build-module/components/page-pages/index.js.map +1 -1
  465. package/build-module/components/page-patterns/dataviews-pattern-actions.js +16 -11
  466. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  467. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  468. package/build-module/components/page-patterns/header.js +5 -3
  469. package/build-module/components/page-patterns/header.js.map +1 -1
  470. package/build-module/components/page-patterns/index.js +143 -65
  471. package/build-module/components/page-patterns/index.js.map +1 -1
  472. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  473. package/build-module/components/page-patterns/search-items.js +3 -2
  474. package/build-module/components/page-patterns/search-items.js.map +1 -1
  475. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  476. package/build-module/components/page-patterns/use-patterns.js +3 -6
  477. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  478. package/build-module/components/page-patterns/utils.js.map +1 -1
  479. package/build-module/components/page-templates/hooks.js.map +1 -0
  480. package/build-module/components/{page-templates-template-parts → page-templates}/index.js +77 -102
  481. package/build-module/components/page-templates/index.js.map +1 -0
  482. package/build-module/components/pagination/index.js.map +1 -1
  483. package/build-module/components/pattern-modal/duplicate.js +11 -6
  484. package/build-module/components/pattern-modal/duplicate.js.map +1 -1
  485. package/build-module/components/pattern-modal/index.js.map +1 -1
  486. package/build-module/components/pattern-modal/rename.js +4 -1
  487. package/build-module/components/pattern-modal/rename.js.map +1 -1
  488. package/build-module/components/plugin-template-setting-panel/index.js +8 -0
  489. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  490. package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
  491. package/build-module/components/rename-post-menu-item/index.js.map +1 -0
  492. package/build-module/components/resizable-frame/index.js +10 -11
  493. package/build-module/components/resizable-frame/index.js.map +1 -1
  494. package/build-module/components/revisions/index.js.map +1 -1
  495. package/build-module/components/routes/link.js.map +1 -1
  496. package/build-module/components/routes/use-title.js.map +1 -1
  497. package/build-module/components/save-button/index.js.map +1 -1
  498. package/build-module/components/save-hub/index.js.map +1 -1
  499. package/build-module/components/save-panel/index.js +2 -2
  500. package/build-module/components/save-panel/index.js.map +1 -1
  501. package/build-module/components/sidebar/index.js +42 -75
  502. package/build-module/components/sidebar/index.js.map +1 -1
  503. package/build-module/components/sidebar-button/index.js.map +1 -1
  504. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  505. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  506. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  507. package/build-module/components/sidebar-dataviews/default-views.js +1 -1
  508. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  509. package/build-module/components/sidebar-dataviews/index.js +1 -1
  510. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  511. package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
  512. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  513. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  514. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  515. package/build-module/components/sidebar-edit-mode/index.js +30 -54
  516. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  517. package/build-module/components/sidebar-edit-mode/page-panels/index.js +58 -6
  518. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  519. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  520. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +25 -17
  521. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  522. package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
  523. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  524. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  525. package/build-module/components/sidebar-edit-mode/template-panel/index.js +4 -7
  526. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  527. package/build-module/components/sidebar-navigation-item/index.js +31 -0
  528. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  529. package/build-module/components/sidebar-navigation-screen/index.js +37 -10
  530. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  531. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  532. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  533. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  534. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  535. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -3
  537. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  538. package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
  539. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  540. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  541. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
  543. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  544. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  545. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  546. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  547. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  548. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  549. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  550. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  551. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  553. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  554. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  555. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  556. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  557. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-page/index.js +56 -15
  559. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  561. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-pattern/index.js +17 -15
  563. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  565. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  567. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
  568. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  569. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  570. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  571. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  572. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  573. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
  574. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  575. package/build-module/components/sidebar-navigation-screen-patterns/index.js +66 -54
  576. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  577. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  579. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  580. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  581. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  582. package/build-module/components/sidebar-navigation-screen-template/index.js +13 -9
  583. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  584. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  585. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  586. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  587. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +4 -36
  588. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  589. package/build-module/components/site-hub/index.js +22 -21
  590. package/build-module/components/site-hub/index.js.map +1 -1
  591. package/build-module/components/site-icon/index.js.map +1 -1
  592. package/build-module/components/start-template-options/index.js.map +1 -1
  593. package/build-module/components/style-book/index.js.map +1 -1
  594. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -13
  595. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  596. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  597. package/build-module/components/table/index.js.map +1 -1
  598. package/build-module/components/template-actions/index.js +7 -8
  599. package/build-module/components/template-actions/index.js.map +1 -1
  600. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  601. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  602. package/build-module/components/template-part-converter/index.js.map +1 -1
  603. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  604. package/build-module/components/welcome-guide/editor.js.map +1 -1
  605. package/build-module/components/welcome-guide/image.js.map +1 -1
  606. package/build-module/components/welcome-guide/index.js.map +1 -1
  607. package/build-module/components/welcome-guide/page.js.map +1 -1
  608. package/build-module/components/welcome-guide/styles.js +6 -3
  609. package/build-module/components/welcome-guide/styles.js.map +1 -1
  610. package/build-module/components/welcome-guide/template.js.map +1 -1
  611. package/build-module/deprecated.js +45 -0
  612. package/build-module/deprecated.js.map +1 -0
  613. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  614. package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
  615. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  616. package/build-module/hooks/components.js.map +1 -1
  617. package/build-module/hooks/index.js.map +1 -1
  618. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
  619. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  620. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +35 -5
  621. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  622. package/build-module/index.js +1 -5
  623. package/build-module/index.js.map +1 -1
  624. package/build-module/lock-unlock.js.map +1 -1
  625. package/build-module/store/actions.js +16 -92
  626. package/build-module/store/actions.js.map +1 -1
  627. package/build-module/store/constants.js.map +1 -1
  628. package/build-module/store/index.js.map +1 -1
  629. package/build-module/store/private-actions.js +0 -83
  630. package/build-module/store/private-actions.js.map +1 -1
  631. package/build-module/store/private-selectors.js.map +1 -1
  632. package/build-module/store/reducer.js.map +1 -1
  633. package/build-module/store/selectors.js.map +1 -1
  634. package/build-module/utils/clone-deep.js.map +1 -1
  635. package/build-module/utils/constants.js +1 -1
  636. package/build-module/utils/constants.js.map +1 -1
  637. package/build-module/utils/get-is-list-page.js.map +1 -1
  638. package/build-module/utils/is-previewing-theme.js.map +1 -1
  639. package/build-module/utils/is-template-removable.js.map +1 -1
  640. package/build-module/utils/is-template-revertable.js.map +1 -1
  641. package/build-module/utils/math.js.map +1 -1
  642. package/build-module/utils/set-nested-value.js +38 -0
  643. package/build-module/utils/set-nested-value.js.map +1 -0
  644. package/build-module/utils/template-part-create.js.map +1 -1
  645. package/build-module/utils/use-activate-theme.js.map +1 -1
  646. package/build-module/utils/use-actual-current-theme.js.map +1 -1
  647. package/build-style/style-rtl.css +261 -720
  648. package/build-style/style.css +261 -720
  649. package/package.json +43 -44
  650. package/src/components/add-new-page/index.js +7 -1
  651. package/src/components/add-new-pattern/index.js +15 -12
  652. package/src/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
  653. package/src/components/add-new-template/add-custom-template-modal-content.js +3 -1
  654. package/src/components/add-new-template/index.js +412 -12
  655. package/src/components/add-new-template/style.scss +0 -22
  656. package/src/components/add-new-template/utils.js +44 -24
  657. package/src/components/async/index.js +43 -0
  658. package/src/components/block-editor/block-inspector-button.js +9 -11
  659. package/src/components/block-editor/editor-canvas.js +45 -21
  660. package/src/components/block-editor/resize-handle.js +30 -11
  661. package/src/components/block-editor/site-editor-canvas.js +6 -1
  662. package/src/components/block-editor/style.scss +10 -15
  663. package/src/components/create-template-part-modal/index.js +3 -0
  664. package/src/components/editor/index.js +91 -15
  665. package/src/components/editor/style.scss +6 -1
  666. package/src/components/global-styles/background-panel.js +16 -0
  667. package/src/components/global-styles/block-preview-panel.js +6 -1
  668. package/src/components/global-styles/font-library-modal/context.js +85 -54
  669. package/src/components/global-styles/font-library-modal/font-collection.js +265 -222
  670. package/src/components/global-styles/font-library-modal/index.js +2 -2
  671. package/src/components/global-styles/font-library-modal/installed-fonts.js +184 -147
  672. package/src/components/global-styles/font-library-modal/style.scss +48 -13
  673. package/src/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
  674. package/src/components/global-styles/highlighted-colors.js +1 -1
  675. package/src/components/global-styles/hooks.js +20 -3
  676. package/src/components/global-styles/root-menu.js +2 -2
  677. package/src/components/global-styles/screen-background.js +1 -1
  678. package/src/components/global-styles/screen-revisions/index.js +1 -1
  679. package/src/components/global-styles/style-variations-container.js +11 -2
  680. package/src/components/header-edit-mode/index.js +56 -78
  681. package/src/components/header-edit-mode/more-menu/index.js +9 -157
  682. package/src/components/header-edit-mode/style.scss +14 -86
  683. package/src/components/keyboard-shortcuts/register.js +0 -78
  684. package/src/components/layout/animation.js +6 -3
  685. package/src/components/layout/index.js +23 -52
  686. package/src/components/layout/router.js +73 -50
  687. package/src/components/layout/style.scss +15 -37
  688. package/src/components/page/index.js +7 -2
  689. package/src/components/page-pages/index.js +46 -26
  690. package/src/components/page-pages/style.scss +40 -22
  691. package/src/components/page-patterns/dataviews-pattern-actions.js +13 -15
  692. package/src/components/page-patterns/header.js +7 -3
  693. package/src/components/page-patterns/index.js +162 -109
  694. package/src/components/page-patterns/search-items.js +3 -0
  695. package/src/components/page-patterns/style.scss +21 -7
  696. package/src/components/page-patterns/use-patterns.js +3 -6
  697. package/src/components/{page-templates-template-parts → page-templates}/index.js +46 -84
  698. package/src/components/{page-templates-template-parts → page-templates}/style.scss +2 -2
  699. package/src/components/pattern-modal/duplicate.js +6 -4
  700. package/src/components/pattern-modal/rename.js +2 -1
  701. package/src/components/plugin-template-setting-panel/index.js +8 -0
  702. package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
  703. package/src/components/resizable-frame/index.js +6 -9
  704. package/src/components/save-panel/index.js +2 -2
  705. package/src/components/sidebar/index.js +52 -100
  706. package/src/components/sidebar/style.scss +41 -6
  707. package/src/components/sidebar-dataviews/default-views.js +1 -1
  708. package/src/components/sidebar-dataviews/index.js +1 -1
  709. package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
  710. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
  711. package/src/components/sidebar-edit-mode/index.js +50 -75
  712. package/src/components/sidebar-edit-mode/page-panels/index.js +65 -14
  713. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +40 -20
  714. package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
  715. package/src/components/sidebar-edit-mode/style.scss +1 -1
  716. package/src/components/sidebar-edit-mode/template-panel/index.js +3 -13
  717. package/src/components/sidebar-navigation-item/index.js +29 -0
  718. package/src/components/sidebar-navigation-screen/index.js +29 -12
  719. package/src/components/sidebar-navigation-screen/style.scss +1 -21
  720. package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -11
  721. package/src/components/sidebar-navigation-screen-main/index.js +11 -23
  722. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  723. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
  724. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  725. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
  726. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  727. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
  728. package/src/components/sidebar-navigation-screen-page/index.js +63 -14
  729. package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
  730. package/src/components/sidebar-navigation-screen-pattern/index.js +13 -15
  731. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
  732. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  733. package/src/components/sidebar-navigation-screen-patterns/category-item.js +2 -1
  734. package/src/components/sidebar-navigation-screen-patterns/index.js +97 -95
  735. package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
  736. package/src/components/sidebar-navigation-screen-template/index.js +9 -13
  737. package/src/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  738. package/src/components/sidebar-navigation-screen-templates-browse/index.js +6 -43
  739. package/src/components/site-hub/index.js +80 -90
  740. package/src/components/site-hub/style.scss +14 -34
  741. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +50 -39
  742. package/src/components/template-actions/index.js +8 -11
  743. package/src/components/welcome-guide/style.scss +1 -1
  744. package/src/components/welcome-guide/styles.js +6 -5
  745. package/src/deprecated.js +42 -0
  746. package/src/hooks/commands/use-edit-mode-commands.js +12 -33
  747. package/src/hooks/push-changes-to-global-styles/index.js +1 -40
  748. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
  749. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +74 -17
  750. package/src/index.js +1 -9
  751. package/src/store/actions.js +25 -141
  752. package/src/store/private-actions.js +0 -133
  753. package/src/store/test/actions.js +7 -2
  754. package/src/style.scss +1 -7
  755. package/src/utils/constants.js +2 -1
  756. package/src/utils/set-nested-value.js +39 -0
  757. package/build/components/add-new-template/new-template.js +0 -298
  758. package/build/components/add-new-template/new-template.js.map +0 -1
  759. package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
  760. package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  761. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -59
  762. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
  763. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
  764. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  765. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
  766. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  767. package/build/components/header-edit-mode/tools-more-menu-group/index.js +0 -23
  768. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
  769. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  770. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  771. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
  772. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  773. package/build/components/keyboard-shortcut-help-modal/index.js +0 -119
  774. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  775. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
  776. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  777. package/build/components/keyboard-shortcuts/edit-mode.js +0 -79
  778. package/build/components/keyboard-shortcuts/edit-mode.js.map +0 -1
  779. package/build/components/page-actions/index.js +0 -35
  780. package/build/components/page-actions/index.js.map +0 -1
  781. package/build/components/page-actions/trash-page-menu-item.js +0 -54
  782. package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
  783. package/build/components/page-templates-template-parts/actions.js +0 -207
  784. package/build/components/page-templates-template-parts/actions.js.map +0 -1
  785. package/build/components/page-templates-template-parts/add-new-template-part.js +0 -64
  786. package/build/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
  787. package/build/components/page-templates-template-parts/hooks.js.map +0 -1
  788. package/build/components/page-templates-template-parts/index.js.map +0 -1
  789. package/build/components/preferences-modal/index.js +0 -38
  790. package/build/components/preferences-modal/index.js.map +0 -1
  791. package/build/components/sidebar-edit-mode/constants.js +0 -9
  792. package/build/components/sidebar-edit-mode/constants.js.map +0 -1
  793. package/build/components/sidebar-edit-mode/page-panels/page-status.js +0 -188
  794. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
  795. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
  796. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  797. package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
  798. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  799. package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
  800. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  801. package/build/components/template-actions/rename-menu-item.js.map +0 -1
  802. package/build-module/components/add-new-template/new-template.js +0 -290
  803. package/build-module/components/add-new-template/new-template.js.map +0 -1
  804. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
  805. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  806. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -52
  807. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
  808. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  809. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  810. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
  811. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  812. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
  813. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
  814. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  815. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  816. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
  817. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  818. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -110
  819. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  820. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
  821. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  822. package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -72
  823. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +0 -1
  824. package/build-module/components/page-actions/index.js +0 -27
  825. package/build-module/components/page-actions/index.js.map +0 -1
  826. package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
  827. package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
  828. package/build-module/components/page-templates-template-parts/actions.js +0 -199
  829. package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
  830. package/build-module/components/page-templates-template-parts/add-new-template-part.js +0 -56
  831. package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
  832. package/build-module/components/page-templates-template-parts/hooks.js.map +0 -1
  833. package/build-module/components/page-templates-template-parts/index.js.map +0 -1
  834. package/build-module/components/preferences-modal/index.js +0 -30
  835. package/build-module/components/preferences-modal/index.js.map +0 -1
  836. package/build-module/components/sidebar-edit-mode/constants.js +0 -3
  837. package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
  838. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +0 -180
  839. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
  840. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
  841. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  842. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
  843. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  844. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
  845. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  846. package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
  847. package/src/components/add-new-template/new-template.js +0 -429
  848. package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
  849. package/src/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -51
  850. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  851. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
  852. package/src/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
  853. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  854. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  855. package/src/components/keyboard-shortcut-help-modal/index.js +0 -151
  856. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
  857. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  858. package/src/components/keyboard-shortcuts/edit-mode.js +0 -88
  859. package/src/components/page-actions/index.js +0 -30
  860. package/src/components/page-actions/trash-page-menu-item.js +0 -63
  861. package/src/components/page-templates-template-parts/actions.js +0 -277
  862. package/src/components/page-templates-template-parts/add-new-template-part.js +0 -60
  863. package/src/components/preferences-modal/index.js +0 -29
  864. package/src/components/sidebar-edit-mode/constants.js +0 -2
  865. package/src/components/sidebar-edit-mode/page-panels/page-status.js +0 -249
  866. package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -40
  867. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
  868. package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
  869. package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
  870. /package/build/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
  871. /package/build-module/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
  872. /package/src/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","createElement","Fragment","title","label","className","inheritedValue","value","onChange","includeLayoutControls","initialOpen"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport {\n\tuseBlockVariations,\n\tVariationsPanel,\n} from './variations/variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tif (\n\t\tsettings?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tsettings.spacing.blockGap = false;\n\t}\n\n\t// Only allow `aspectRatio` support if the block is not the grouping block.\n\t// The grouping block allows the user to use Group, Row and Stack variations,\n\t// and it is highly likely that the user will not want to set an aspect ratio\n\t// for all three at once. Until there is the ability to set a different aspect\n\t// ratio for each variation, we disable the aspect ratio controls for the\n\t// grouping block in global styles.\n\tif ( settings?.dimensions?.aspectRatio && name === 'core/group' ) {\n\t\tsettings.dimensions.aspectRatio = false;\n\t}\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\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 currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":";AAAA;AACA;AACA;AACA,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rBI,QAAQ,EAAGA,QAAU;IACrBkD,qBAAqB;EAAA,CACrB,CACD,EACClC,qBAAqB,IACtB0B,aAAA,CAAC1D,kBAAkB;IAClBiE,QAAQ,EAAGd,gBAAkB;IAC7Ba,KAAK,EAAGnD,YAAc;IACtBkD,cAAc,EAAG/C;EAAU,CAC3B,CACD,EAECmB,UAAU,IACXuB,aAAA,CAACtG,SAAS;IAACwG,KAAK,EAAGnG,EAAE,CAAE,UAAW,CAAG;IAAC0G,WAAW,EAAG;EAAO,GAC1DT,aAAA,YACGhG,OAAO;EACR;EACAD,EAAE,CACD,2IACD,CAAC,EACDwD,SAAS,EAAE2C,KACZ,CACE,CAAC,EACJF,aAAA,CAACxD,mBAAmB;IACnB8D,KAAK,EAAG1F,KAAO;IACf2F,QAAQ,EAAGrD,QAAU;IACrBmD,cAAc,EAAGpD;EAAgB,CACjC,CACS,CAEX,CAAC;AAEL;AAEA,eAAeR,WAAW"}
1
+ {"version":3,"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","createElement","Fragment","title","label","className","inheritedValue","value","onChange","includeLayoutControls","initialOpen"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport {\n\tuseBlockVariations,\n\tVariationsPanel,\n} from './variations/variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tif (\n\t\tsettings?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tsettings.spacing.blockGap = false;\n\t}\n\n\t// Only allow `aspectRatio` support if the block is not the grouping block.\n\t// The grouping block allows the user to use Group, Row and Stack variations,\n\t// and it is highly likely that the user will not want to set an aspect ratio\n\t// for all three at once. Until there is the ability to set a different aspect\n\t// ratio for each variation, we disable the aspect ratio controls for the\n\t// grouping block in global styles.\n\tif ( settings?.dimensions?.aspectRatio && name === 'core/group' ) {\n\t\tsettings.dimensions.aspectRatio = false;\n\t}\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\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 currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SACC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D,EAECmB,UAAU,IACXuB,aAAA,CAACtG,SAAS;IAACwG,KAAK,EAAGnG,EAAE,CAAE,UAAW,CAAG;IAAC0G,WAAW,EAAG;EAAO,GAC1DT,aAAA,YACGhG,OAAO;EACR;EACAD,EAAE,CACD,2IACD,CAAC,EACDwD,SAAS,EAAE2C,KACZ,CACE,CAAC,EACJF,aAAA,CAACxD,mBAAmB;IACnB8D,KAAK,EAAG1F,KAAO;IACf2F,QAAQ,EAAGrD,QAAU;IACrBmD,cAAc,EAAGpD;EAAgB,CACjC,CACS,CAEX,CAAC;AAEL;AAEA,eAAeR,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","privateApis","componentsPrivateApis","ColorPalettePanel","GradientPalettePanel","ScreenHeader","unlock","Tabs","ScreenColorPalette","name","createElement","Fragment","title","description","TabList","Tab","tabId","TabPanel","focusable"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-color-palette.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ColorPalettePanel from './color-palette-panel';\nimport GradientPalettePanel from './gradients-palette-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction ScreenColorPalette( { name } ) {\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Palette' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<Tabs>\n\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t<Tabs.Tab tabId=\"solid\">{ __( 'Solid' ) }</Tabs.Tab>\n\t\t\t\t\t<Tabs.Tab tabId=\"gradient\">{ __( 'Gradient' ) }</Tabs.Tab>\n\t\t\t\t</Tabs.TabList>\n\t\t\t\t<Tabs.TabPanel tabId=\"solid\" focusable={ false }>\n\t\t\t\t\t<ColorPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId=\"gradient\" focusable={ false }>\n\t\t\t\t\t<GradientPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs>\n\t\t</>\n\t);\n}\n\nexport default ScreenColorPalette;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;;AAE5E;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,oBAAoB,MAAM,2BAA2B;AAC5D,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAAK,CAAC,GAAGD,MAAM,CAAEJ,qBAAsB,CAAC;AAEhD,SAASM,kBAAkBA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACvC,OACCC,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACL,YAAY;IACZO,KAAK,EAAGZ,EAAE,CAAE,SAAU,CAAG;IACzBa,WAAW,EAAGb,EAAE,CACf,yIACD;EAAG,CACH,CAAC,EACFU,aAAA,CAACH,IAAI,QACJG,aAAA,CAACH,IAAI,CAACO,OAAO,QACZJ,aAAA,CAACH,IAAI,CAACQ,GAAG;IAACC,KAAK,EAAC;EAAO,GAAGhB,EAAE,CAAE,OAAQ,CAAa,CAAC,EACpDU,aAAA,CAACH,IAAI,CAACQ,GAAG;IAACC,KAAK,EAAC;EAAU,GAAGhB,EAAE,CAAE,UAAW,CAAa,CAC5C,CAAC,EACfU,aAAA,CAACH,IAAI,CAACU,QAAQ;IAACD,KAAK,EAAC,OAAO;IAACE,SAAS,EAAG;EAAO,GAC/CR,aAAA,CAACP,iBAAiB;IAACM,IAAI,EAAGA;EAAM,CAAE,CACpB,CAAC,EAChBC,aAAA,CAACH,IAAI,CAACU,QAAQ;IAACD,KAAK,EAAC,UAAU;IAACE,SAAS,EAAG;EAAO,GAClDR,aAAA,CAACN,oBAAoB;IAACK,IAAI,EAAGA;EAAM,CAAE,CACvB,CACV,CACL,CAAC;AAEL;AAEA,eAAeD,kBAAkB"}
1
+ {"version":3,"names":["__","privateApis","componentsPrivateApis","ColorPalettePanel","GradientPalettePanel","ScreenHeader","unlock","Tabs","ScreenColorPalette","name","createElement","Fragment","title","description","TabList","Tab","tabId","TabPanel","focusable"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-color-palette.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ColorPalettePanel from './color-palette-panel';\nimport GradientPalettePanel from './gradients-palette-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction ScreenColorPalette( { name } ) {\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Palette' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<Tabs>\n\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t<Tabs.Tab tabId=\"solid\">{ __( 'Solid' ) }</Tabs.Tab>\n\t\t\t\t\t<Tabs.Tab tabId=\"gradient\">{ __( 'Gradient' ) }</Tabs.Tab>\n\t\t\t\t</Tabs.TabList>\n\t\t\t\t<Tabs.TabPanel tabId=\"solid\" focusable={ false }>\n\t\t\t\t\t<ColorPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId=\"gradient\" focusable={ false }>\n\t\t\t\t\t<GradientPalettePanel name={ name } />\n\t\t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kBAAkB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","__experimentalVStack","VStack","privateApis","blockEditorPrivateApis","ScreenHeader","Palette","unlock","ColorVariations","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","ColorPanel","StylesColorPanel","ScreenColors","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","settings","createElement","Fragment","title","description","className","spacing","inheritedValue","value","onChange"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport { unlock } from '../../lock-unlock';\nimport ColorVariations from './variations/variations-color';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tColorPanel: StylesColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenColors() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palette colors and the application of those colors on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t<ColorVariations title={ __( 'Presets' ) } />\n\t\t\t\t\t<Palette />\n\t\t\t\t\t<StylesColorPanel\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\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MAAM;IAACyB,OAAO,EAAG;EAAG,GACpBL,aAAA,CAACd,eAAe;IAACgB,KAAK,EAAGxB,EAAE,CAAE,SAAU;EAAG,CAAE,CAAC,EAC7CsB,aAAA,CAAChB,OAAO,MAAE,CAAC,EACXgB,aAAA,CAACT,gBAAgB;IAChBe,cAAc,EAAGV,cAAgB;IACjCW,KAAK,EAAGd,KAAO;IACfe,QAAQ,EAAGX,QAAU;IACrBE,QAAQ,EAAGA;EAAU,CACrB,CACM,CACJ,CACJ,CAAC;AAEL;AAEA,eAAeP,YAAY"}
1
+ {"version":3,"names":["__","__experimentalVStack","VStack","privateApis","blockEditorPrivateApis","ScreenHeader","Palette","unlock","ColorVariations","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","ColorPanel","StylesColorPanel","ScreenColors","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","settings","createElement","Fragment","title","description","className","spacing","inheritedValue","value","onChange"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport { unlock } from '../../lock-unlock';\nimport ColorVariations from './variations/variations-color';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tColorPanel: StylesColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenColors() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palette colors and the application of those colors on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t<ColorVariations title={ __( 'Presets' ) } />\n\t\t\t\t\t<Palette />\n\t\t\t\t\t<StylesColorPanel\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,OAAO,MAAM,WAAW;AAC/B,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,eAAe,MAAM,+BAA+B;AAE3D,MAAM;EACLC,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,UAAU,EAAEC;AACb,CAAC,GAAGN,MAAM,CAAEH,sBAAuB,CAAC;AAEpC,SAASU,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,KAAK,CAAE,GAAGN,cAAc,CAAE,EAAE,EAAEO,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGV,cAAc,CAAE,EAAE,EAAEO,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEG,WAAW,CAAE,GAAGV,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMW,QAAQ,GAAGV,0BAA0B,CAAES,WAAY,CAAC;EAE1D,OACCE,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACjB,YAAY;IACZmB,KAAK,EAAGxB,EAAE,CAAE,QAAS,CAAG;IACxByB,WAAW,EAAGzB,EAAE,CACf,sEACD;EAAG,CACH,CAAC,EACFsB,aAAA;IAAKI,SAAS,EAAC;EAAgC,GAC9CJ,aAAA,CAACpB,MAAM;IAACyB,OAAO,EAAG;EAAG,GACpBL,aAAA,CAACd,eAAe;IAACgB,KAAK,EAAGxB,EAAE,CAAE,SAAU;EAAG,CAAE,CAAC,EAC7CsB,aAAA,CAAChB,OAAO,MAAE,CAAC,EACXgB,aAAA,CAACT,gBAAgB;IAChBe,cAAc,EAAGV,cAAgB;IACjCW,KAAK,EAAGd,KAAO;IACfe,QAAQ,EAAGX,QAAU;IACrBE,QAAQ,EAAGA;EAAU,CACrB,CACM,CACJ,CACJ,CAAC;AAEL;AAEA,eAAeP,YAAY","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","ExternalLink","privateApis","blockEditorPrivateApis","unlock","ScreenHeader","useGlobalStyle","AdvancedPanel","StylesAdvancedPanel","ScreenCSS","description","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","createElement","Fragment","title","href","className","value","onChange","inheritedValue"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-css.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ScreenHeader from './header';\n\nconst { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenCSS() {\n\tconst description = __(\n\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t);\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref=\"https://wordpress.org/documentation/article/css/\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-css-help-link\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about CSS' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-css\">\n\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenCSS;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,MAAM,UAAU;AAEnC,MAAM;EAAEC,cAAc;EAAEC,aAAa,EAAEC;AAAoB,CAAC,GAAGJ,MAAM,CACpED,sBACD,CAAC;AAED,SAASM,SAASA,CAAA,EAAG;EACpB,MAAMC,WAAW,GAAGV,EAAE,CACrB,uEACD,CAAC;EACD,MAAM,CAAEW,KAAK,CAAE,GAAGL,cAAc,CAAE,EAAE,EAAEM,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGT,cAAc,CAAE,EAAE,EAAEM,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EAEH,OACCG,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACX,YAAY;IACZa,KAAK,EAAGlB,EAAE,CAAE,KAAM,CAAG;IACrBU,WAAW,EACVM,aAAA,CAAAC,QAAA,QACGP,WAAW,EACbM,aAAA,CAACf,YAAY;MACZkB,IAAI,EAAC,kDAAkD;MACvDC,SAAS,EAAC;IAA8C,GAEtDpB,EAAE,CAAE,sBAAuB,CAChB,CACb;EACF,CACD,CAAC,EACFgB,aAAA;IAAKI,SAAS,EAAC;EAAoC,GAClDJ,aAAA,CAACR,mBAAmB;IACnBa,KAAK,EAAGV,KAAO;IACfW,QAAQ,EAAGP,QAAU;IACrBQ,cAAc,EAAGT;EAAgB,CACjC,CACG,CACJ,CAAC;AAEL;AAEA,eAAeL,SAAS"}
1
+ {"version":3,"names":["__","ExternalLink","privateApis","blockEditorPrivateApis","unlock","ScreenHeader","useGlobalStyle","AdvancedPanel","StylesAdvancedPanel","ScreenCSS","description","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","createElement","Fragment","title","href","className","value","onChange","inheritedValue"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-css.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ScreenHeader from './header';\n\nconst { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenCSS() {\n\tconst description = __(\n\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t);\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref=\"https://wordpress.org/documentation/article/css/\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-css-help-link\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about CSS' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-css\">\n\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenCSS;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,MAAM,UAAU;AAEnC,MAAM;EAAEC,cAAc;EAAEC,aAAa,EAAEC;AAAoB,CAAC,GAAGJ,MAAM,CACpED,sBACD,CAAC;AAED,SAASM,SAASA,CAAA,EAAG;EACpB,MAAMC,WAAW,GAAGV,EAAE,CACrB,uEACD,CAAC;EACD,MAAM,CAAEW,KAAK,CAAE,GAAGL,cAAc,CAAE,EAAE,EAAEM,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGT,cAAc,CAAE,EAAE,EAAEM,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EAEH,OACCG,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACX,YAAY;IACZa,KAAK,EAAGlB,EAAE,CAAE,KAAM,CAAG;IACrBU,WAAW,EACVM,aAAA,CAAAC,QAAA,QACGP,WAAW,EACbM,aAAA,CAACf,YAAY;MACZkB,IAAI,EAAC,kDAAkD;MACvDC,SAAS,EAAC;IAA8C,GAEtDpB,EAAE,CAAE,sBAAuB,CAChB,CACb;EACF,CACD,CAAC,EACFgB,aAAA;IAAKI,SAAS,EAAC;EAAoC,GAClDJ,aAAA,CAACR,mBAAmB;IACnBa,KAAK,EAAGV,KAAO;IACfW,QAAQ,EAAGP,QAAU;IACrBQ,cAAc,EAAGT;EAAgB,CACjC,CACG,CACJ,CAAC;AAEL;AAEA,eAAeL,SAAS","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","privateApis","blockEditorPrivateApis","DimensionsPanel","ScreenHeader","unlock","useHasDimensionsPanel","useGlobalSetting","useSettingsForBlockElement","ScreenLayout","rawSettings","settings","hasDimensionsPanel","createElement","Fragment","title"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DimensionsPanel from './dimensions-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasDimensionsPanel, useGlobalSetting, useSettingsForBlockElement } =\n\tunlock( blockEditorPrivateApis );\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC,qBAAqB;EAAEC,gBAAgB;EAAEC;AAA2B,CAAC,GAC5EH,MAAM,CAAEH,sBAAuB,CAAC;AAEjC,SAASO,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,WAAW,CAAE,GAAGH,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMI,QAAQ,GAAGH,0BAA0B,CAAEE,WAAY,CAAC;EAC1D,MAAME,kBAAkB,GAAGN,qBAAqB,CAAEK,QAAS,CAAC;EAC5D,OACCE,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACT,YAAY;IAACW,KAAK,EAAGf,EAAE,CAAE,QAAS;EAAG,CAAE,CAAC,EACvCY,kBAAkB,IAAIC,aAAA,CAACV,eAAe,MAAE,CACzC,CAAC;AAEL;AAEA,eAAeM,YAAY"}
1
+ {"version":3,"names":["__","privateApis","blockEditorPrivateApis","DimensionsPanel","ScreenHeader","unlock","useHasDimensionsPanel","useGlobalSetting","useSettingsForBlockElement","ScreenLayout","rawSettings","settings","hasDimensionsPanel","createElement","Fragment","title"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DimensionsPanel from './dimensions-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasDimensionsPanel, useGlobalSetting, useSettingsForBlockElement } =\n\tunlock( blockEditorPrivateApis );\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC,qBAAqB;EAAEC,gBAAgB;EAAEC;AAA2B,CAAC,GAC5EH,MAAM,CAAEH,sBAAuB,CAAC;AAEjC,SAASO,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,WAAW,CAAE,GAAGH,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMI,QAAQ,GAAGH,0BAA0B,CAAEE,WAAY,CAAC;EAC1D,MAAME,kBAAkB,GAAGN,qBAAqB,CAAEK,QAAS,CAAC;EAC5D,OACCE,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACT,YAAY;IAACW,KAAK,EAAGf,EAAE,CAAE,QAAS;EAAG,CAAE,CAAC,EACvCY,kBAAkB,IAAIC,aAAA,CAACV,eAAe,MAAE,CACzC,CAAC;AAEL;AAEA,eAAeM,YAAY","ignoreList":[]}
@@ -152,7 +152,7 @@ function ScreenRevisions() {
152
152
  confirmButtonText: __('Apply'),
153
153
  onConfirm: () => restoreRevision(currentlySelectedRevision),
154
154
  onCancel: () => setIsLoadingRevisionWithUnsavedChanges(false)
155
- }, __('Any unsaved changes will be lost when you apply this revision.')));
155
+ }, __('Are you sure you want to apply this revision? Any unsaved changes will be lost.')));
156
156
  }
157
157
  export default ScreenRevisions;
158
158
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","sprintf","__experimentalUseNavigator","useNavigator","__experimentalConfirmDialog","ConfirmDialog","Spinner","useSelect","useDispatch","useContext","useState","useEffect","privateApis","blockEditorPrivateApis","store","blockEditorStore","ScreenHeader","unlock","Revisions","editSiteStore","useGlobalStylesRevisions","RevisionsButtons","StyleBook","Pagination","GlobalStylesContext","areGlobalStyleConfigsEqual","PAGE_SIZE","ScreenRevisions","goTo","user","currentEditorGlobalStyles","setUserConfig","blocks","editorCanvasContainerView","select","getEditorCanvasContainerView","getBlocks","currentPage","setCurrentPage","currentRevisions","setCurrentRevisions","revisions","isLoading","hasUnsavedChanges","revisionsCount","query","per_page","page","numPages","Math","ceil","currentlySelectedRevision","setCurrentlySelectedRevision","isLoadingRevisionWithUnsavedChanges","setIsLoadingRevisionWithUnsavedChanges","setEditorCanvasContainerView","selectedRevisionMatchesEditorStyles","onCloseRevisions","canvasContainerView","undefined","restoreRevision","revision","styles","settings","selectRevision","id","startsWith","length","firstRevision","currentlySelectedRevisionId","shouldSelectFirstItem","isLoadButtonEnabled","hasRevisions","createElement","Fragment","title","description","onBack","className","userConfig","isSelected","onClose","closeButtonLabel","onChange","selectedRevisionId","userRevisions","canApplyRevision","onApplyRevision","changePage","totalItems","disabled","label","isOpen","confirmButtonText","onConfirm","onCancel"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tSpinner,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext, useState, useEffect } from '@wordpress/element';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from '../header';\nimport { unlock } from '../../../lock-unlock';\nimport Revisions from '../../revisions';\nimport { store as editSiteStore } from '../../../store';\nimport useGlobalStylesRevisions from './use-global-styles-revisions';\nimport RevisionsButtons from './revisions-buttons';\nimport StyleBook from '../../style-book';\nimport Pagination from '../../pagination';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst PAGE_SIZE = 10;\n\nfunction ScreenRevisions() {\n\tconst { goTo } = useNavigator();\n\tconst { user: currentEditorGlobalStyles, setUserConfig } =\n\t\tuseContext( GlobalStylesContext );\n\tconst { blocks, editorCanvasContainerView } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorCanvasContainerView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tblocks: select( blockEditorStore ).getBlocks(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst [ currentPage, setCurrentPage ] = useState( 1 );\n\tconst [ currentRevisions, setCurrentRevisions ] = useState( [] );\n\tconst { revisions, isLoading, hasUnsavedChanges, revisionsCount } =\n\t\tuseGlobalStylesRevisions( {\n\t\t\tquery: {\n\t\t\t\tper_page: PAGE_SIZE,\n\t\t\t\tpage: currentPage,\n\t\t\t},\n\t\t} );\n\n\tconst numPages = Math.ceil( revisionsCount / PAGE_SIZE );\n\n\tconst [ currentlySelectedRevision, setCurrentlySelectedRevision ] =\n\t\tuseState( currentEditorGlobalStyles );\n\tconst [\n\t\tisLoadingRevisionWithUnsavedChanges,\n\t\tsetIsLoadingRevisionWithUnsavedChanges,\n\t] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst selectedRevisionMatchesEditorStyles = areGlobalStyleConfigsEqual(\n\t\tcurrentlySelectedRevision,\n\t\tcurrentEditorGlobalStyles\n\t);\n\n\tconst onCloseRevisions = () => {\n\t\tgoTo( '/' ); // Return to global styles main panel.\n\t\tconst canvasContainerView =\n\t\t\teditorCanvasContainerView === 'global-styles-revisions:style-book'\n\t\t\t\t? 'style-book'\n\t\t\t\t: undefined;\n\t\tsetEditorCanvasContainerView( canvasContainerView );\n\t};\n\n\tconst restoreRevision = ( revision ) => {\n\t\tsetUserConfig( () => ( {\n\t\t\tstyles: revision?.styles,\n\t\t\tsettings: revision?.settings,\n\t\t} ) );\n\t\tsetIsLoadingRevisionWithUnsavedChanges( false );\n\t\tonCloseRevisions();\n\t};\n\n\tconst selectRevision = ( revision ) => {\n\t\tsetCurrentlySelectedRevision( {\n\t\t\tstyles: revision?.styles || {},\n\t\t\tsettings: revision?.settings || {},\n\t\t\tid: revision?.id,\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! editorCanvasContainerView ||\n\t\t\t! editorCanvasContainerView.startsWith( 'global-styles-revisions' )\n\t\t) {\n\t\t\tgoTo( '/' ); // Return to global styles main panel.\n\t\t}\n\t}, [ editorCanvasContainerView ] );\n\n\tuseEffect( () => {\n\t\tif ( ! isLoading && revisions.length ) {\n\t\t\tsetCurrentRevisions( revisions );\n\t\t}\n\t}, [ revisions, isLoading ] );\n\n\tconst firstRevision = revisions[ 0 ];\n\tconst currentlySelectedRevisionId = currentlySelectedRevision?.id;\n\tconst shouldSelectFirstItem =\n\t\t!! firstRevision?.id &&\n\t\t! selectedRevisionMatchesEditorStyles &&\n\t\t! currentlySelectedRevisionId;\n\n\tuseEffect( () => {\n\t\t/*\n\t\t * Ensure that the first item is selected and loaded into the preview pane\n\t\t * when no revision is selected and the selected styles don't match the current editor styles.\n\t\t * This is required in case editor styles are changed outside the revisions panel,\n\t\t * e.g., via the reset styles function of useGlobalStylesReset().\n\t\t * See: https://github.com/WordPress/gutenberg/issues/55866\n\t\t */\n\t\tif ( shouldSelectFirstItem ) {\n\t\t\tsetCurrentlySelectedRevision( {\n\t\t\t\tstyles: firstRevision?.styles || {},\n\t\t\t\tsettings: firstRevision?.settings || {},\n\t\t\t\tid: firstRevision?.id,\n\t\t\t} );\n\t\t}\n\t}, [ shouldSelectFirstItem, firstRevision ] );\n\n\t// Only display load button if there is a revision to load,\n\t// and it is different from the current editor styles.\n\tconst isLoadButtonEnabled =\n\t\t!! currentlySelectedRevisionId &&\n\t\tcurrentlySelectedRevisionId !== 'unsaved' &&\n\t\t! selectedRevisionMatchesEditorStyles;\n\tconst hasRevisions = !! currentRevisions.length;\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={\n\t\t\t\t\trevisionsCount &&\n\t\t\t\t\t// translators: %s: number of revisions.\n\t\t\t\t\tsprintf( __( 'Revisions (%s)' ), revisionsCount )\n\t\t\t\t}\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Click on previously saved styles to preview them. To restore a selected version to the editor, hit \"Apply.\" When you\\'re ready, use the Save button to save your changes.'\n\t\t\t\t) }\n\t\t\t\tonBack={ onCloseRevisions }\n\t\t\t/>\n\t\t\t{ ! hasRevisions && (\n\t\t\t\t<Spinner className=\"edit-site-global-styles-screen-revisions__loading\" />\n\t\t\t) }\n\t\t\t{ hasRevisions &&\n\t\t\t\t( editorCanvasContainerView ===\n\t\t\t\t'global-styles-revisions:style-book' ? (\n\t\t\t\t\t<StyleBook\n\t\t\t\t\t\tuserConfig={ currentlySelectedRevision }\n\t\t\t\t\t\tisSelected={ () => {} }\n\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t'global-styles-revisions'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<Revisions\n\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\tuserConfig={ currentlySelectedRevision }\n\t\t\t\t\t\tcloseButtonLabel={ __( 'Close revisions' ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t<RevisionsButtons\n\t\t\t\tonChange={ selectRevision }\n\t\t\t\tselectedRevisionId={ currentlySelectedRevisionId }\n\t\t\t\tuserRevisions={ currentRevisions }\n\t\t\t\tcanApplyRevision={ isLoadButtonEnabled }\n\t\t\t\tonApplyRevision={ () =>\n\t\t\t\t\thasUnsavedChanges\n\t\t\t\t\t\t? setIsLoadingRevisionWithUnsavedChanges( true )\n\t\t\t\t\t\t: restoreRevision( currentlySelectedRevision )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-revisions__footer\">\n\t\t\t\t\t<Pagination\n\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__pagination\"\n\t\t\t\t\t\tcurrentPage={ currentPage }\n\t\t\t\t\t\tnumPages={ numPages }\n\t\t\t\t\t\tchangePage={ setCurrentPage }\n\t\t\t\t\t\ttotalItems={ revisionsCount }\n\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\tlabel={ __( 'Global Styles pagination navigation' ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ isLoadingRevisionWithUnsavedChanges && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ isLoadingRevisionWithUnsavedChanges }\n\t\t\t\t\tconfirmButtonText={ __( 'Apply' ) }\n\t\t\t\t\tonConfirm={ () =>\n\t\t\t\t\t\trestoreRevision( currentlySelectedRevision )\n\t\t\t\t\t}\n\t\t\t\t\tonCancel={ () =>\n\t\t\t\t\t\tsetIsLoadingRevisionWithUnsavedChanges( false )\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Any unsaved changes will be lost when you apply this revision.'\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenRevisions;\n"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uD,SAAS,EAAC,sDAAsD;IAChEzC,WAAW,EAAGA,WAAa;IAC3BW,QAAQ,EAAGA,QAAU;IACrBwC,UAAU,EAAGlD,cAAgB;IAC7BmD,UAAU,EAAG7C,cAAgB;IAC7B8C,QAAQ,EAAGhD,SAAW;IACtBiD,KAAK,EAAG3F,EAAE,CAAE,qCAAsC;EAAG,CACrD,CACG,CACL,EACCqD,mCAAmC,IACpCoB,aAAA,CAACpE,aAAa;IACbuF,MAAM,EAAGvC,mCAAqC;IAC9CwC,iBAAiB,EAAG7F,EAAE,CAAE,OAAQ,CAAG;IACnC8F,SAAS,EAAGA,CAAA,KACXlC,eAAe,CAAET,yBAA0B,CAC3C;IACD4C,QAAQ,EAAGA,CAAA,KACVzC,sCAAsC,CAAE,KAAM;EAC9C,GAECtD,EAAE,CACH,gEACD,CACc,CAEf,CAAC;AAEL;AAEA,eAAe2B,eAAe"}
1
+ {"version":3,"names":["__","sprintf","__experimentalUseNavigator","useNavigator","__experimentalConfirmDialog","ConfirmDialog","Spinner","useSelect","useDispatch","useContext","useState","useEffect","privateApis","blockEditorPrivateApis","store","blockEditorStore","ScreenHeader","unlock","Revisions","editSiteStore","useGlobalStylesRevisions","RevisionsButtons","StyleBook","Pagination","GlobalStylesContext","areGlobalStyleConfigsEqual","PAGE_SIZE","ScreenRevisions","goTo","user","currentEditorGlobalStyles","setUserConfig","blocks","editorCanvasContainerView","select","getEditorCanvasContainerView","getBlocks","currentPage","setCurrentPage","currentRevisions","setCurrentRevisions","revisions","isLoading","hasUnsavedChanges","revisionsCount","query","per_page","page","numPages","Math","ceil","currentlySelectedRevision","setCurrentlySelectedRevision","isLoadingRevisionWithUnsavedChanges","setIsLoadingRevisionWithUnsavedChanges","setEditorCanvasContainerView","selectedRevisionMatchesEditorStyles","onCloseRevisions","canvasContainerView","undefined","restoreRevision","revision","styles","settings","selectRevision","id","startsWith","length","firstRevision","currentlySelectedRevisionId","shouldSelectFirstItem","isLoadButtonEnabled","hasRevisions","createElement","Fragment","title","description","onBack","className","userConfig","isSelected","onClose","closeButtonLabel","onChange","selectedRevisionId","userRevisions","canApplyRevision","onApplyRevision","changePage","totalItems","disabled","label","isOpen","confirmButtonText","onConfirm","onCancel"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tSpinner,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext, useState, useEffect } from '@wordpress/element';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from '../header';\nimport { unlock } from '../../../lock-unlock';\nimport Revisions from '../../revisions';\nimport { store as editSiteStore } from '../../../store';\nimport useGlobalStylesRevisions from './use-global-styles-revisions';\nimport RevisionsButtons from './revisions-buttons';\nimport StyleBook from '../../style-book';\nimport Pagination from '../../pagination';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst PAGE_SIZE = 10;\n\nfunction ScreenRevisions() {\n\tconst { goTo } = useNavigator();\n\tconst { user: currentEditorGlobalStyles, setUserConfig } =\n\t\tuseContext( GlobalStylesContext );\n\tconst { blocks, editorCanvasContainerView } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorCanvasContainerView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tblocks: select( blockEditorStore ).getBlocks(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst [ currentPage, setCurrentPage ] = useState( 1 );\n\tconst [ currentRevisions, setCurrentRevisions ] = useState( [] );\n\tconst { revisions, isLoading, hasUnsavedChanges, revisionsCount } =\n\t\tuseGlobalStylesRevisions( {\n\t\t\tquery: {\n\t\t\t\tper_page: PAGE_SIZE,\n\t\t\t\tpage: currentPage,\n\t\t\t},\n\t\t} );\n\n\tconst numPages = Math.ceil( revisionsCount / PAGE_SIZE );\n\n\tconst [ currentlySelectedRevision, setCurrentlySelectedRevision ] =\n\t\tuseState( currentEditorGlobalStyles );\n\tconst [\n\t\tisLoadingRevisionWithUnsavedChanges,\n\t\tsetIsLoadingRevisionWithUnsavedChanges,\n\t] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst selectedRevisionMatchesEditorStyles = areGlobalStyleConfigsEqual(\n\t\tcurrentlySelectedRevision,\n\t\tcurrentEditorGlobalStyles\n\t);\n\n\tconst onCloseRevisions = () => {\n\t\tgoTo( '/' ); // Return to global styles main panel.\n\t\tconst canvasContainerView =\n\t\t\teditorCanvasContainerView === 'global-styles-revisions:style-book'\n\t\t\t\t? 'style-book'\n\t\t\t\t: undefined;\n\t\tsetEditorCanvasContainerView( canvasContainerView );\n\t};\n\n\tconst restoreRevision = ( revision ) => {\n\t\tsetUserConfig( () => ( {\n\t\t\tstyles: revision?.styles,\n\t\t\tsettings: revision?.settings,\n\t\t} ) );\n\t\tsetIsLoadingRevisionWithUnsavedChanges( false );\n\t\tonCloseRevisions();\n\t};\n\n\tconst selectRevision = ( revision ) => {\n\t\tsetCurrentlySelectedRevision( {\n\t\t\tstyles: revision?.styles || {},\n\t\t\tsettings: revision?.settings || {},\n\t\t\tid: revision?.id,\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! editorCanvasContainerView ||\n\t\t\t! editorCanvasContainerView.startsWith( 'global-styles-revisions' )\n\t\t) {\n\t\t\tgoTo( '/' ); // Return to global styles main panel.\n\t\t}\n\t}, [ editorCanvasContainerView ] );\n\n\tuseEffect( () => {\n\t\tif ( ! isLoading && revisions.length ) {\n\t\t\tsetCurrentRevisions( revisions );\n\t\t}\n\t}, [ revisions, isLoading ] );\n\n\tconst firstRevision = revisions[ 0 ];\n\tconst currentlySelectedRevisionId = currentlySelectedRevision?.id;\n\tconst shouldSelectFirstItem =\n\t\t!! firstRevision?.id &&\n\t\t! selectedRevisionMatchesEditorStyles &&\n\t\t! currentlySelectedRevisionId;\n\n\tuseEffect( () => {\n\t\t/*\n\t\t * Ensure that the first item is selected and loaded into the preview pane\n\t\t * when no revision is selected and the selected styles don't match the current editor styles.\n\t\t * This is required in case editor styles are changed outside the revisions panel,\n\t\t * e.g., via the reset styles function of useGlobalStylesReset().\n\t\t * See: https://github.com/WordPress/gutenberg/issues/55866\n\t\t */\n\t\tif ( shouldSelectFirstItem ) {\n\t\t\tsetCurrentlySelectedRevision( {\n\t\t\t\tstyles: firstRevision?.styles || {},\n\t\t\t\tsettings: firstRevision?.settings || {},\n\t\t\t\tid: firstRevision?.id,\n\t\t\t} );\n\t\t}\n\t}, [ shouldSelectFirstItem, firstRevision ] );\n\n\t// Only display load button if there is a revision to load,\n\t// and it is different from the current editor styles.\n\tconst isLoadButtonEnabled =\n\t\t!! currentlySelectedRevisionId &&\n\t\tcurrentlySelectedRevisionId !== 'unsaved' &&\n\t\t! selectedRevisionMatchesEditorStyles;\n\tconst hasRevisions = !! currentRevisions.length;\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={\n\t\t\t\t\trevisionsCount &&\n\t\t\t\t\t// translators: %s: number of revisions.\n\t\t\t\t\tsprintf( __( 'Revisions (%s)' ), revisionsCount )\n\t\t\t\t}\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Click on previously saved styles to preview them. To restore a selected version to the editor, hit \"Apply.\" When you\\'re ready, use the Save button to save your changes.'\n\t\t\t\t) }\n\t\t\t\tonBack={ onCloseRevisions }\n\t\t\t/>\n\t\t\t{ ! hasRevisions && (\n\t\t\t\t<Spinner className=\"edit-site-global-styles-screen-revisions__loading\" />\n\t\t\t) }\n\t\t\t{ hasRevisions &&\n\t\t\t\t( editorCanvasContainerView ===\n\t\t\t\t'global-styles-revisions:style-book' ? (\n\t\t\t\t\t<StyleBook\n\t\t\t\t\t\tuserConfig={ currentlySelectedRevision }\n\t\t\t\t\t\tisSelected={ () => {} }\n\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t'global-styles-revisions'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<Revisions\n\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\tuserConfig={ currentlySelectedRevision }\n\t\t\t\t\t\tcloseButtonLabel={ __( 'Close revisions' ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t<RevisionsButtons\n\t\t\t\tonChange={ selectRevision }\n\t\t\t\tselectedRevisionId={ currentlySelectedRevisionId }\n\t\t\t\tuserRevisions={ currentRevisions }\n\t\t\t\tcanApplyRevision={ isLoadButtonEnabled }\n\t\t\t\tonApplyRevision={ () =>\n\t\t\t\t\thasUnsavedChanges\n\t\t\t\t\t\t? setIsLoadingRevisionWithUnsavedChanges( true )\n\t\t\t\t\t\t: restoreRevision( currentlySelectedRevision )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-revisions__footer\">\n\t\t\t\t\t<Pagination\n\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__pagination\"\n\t\t\t\t\t\tcurrentPage={ currentPage }\n\t\t\t\t\t\tnumPages={ numPages }\n\t\t\t\t\t\tchangePage={ setCurrentPage }\n\t\t\t\t\t\ttotalItems={ revisionsCount }\n\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\tlabel={ __( 'Global Styles pagination navigation' ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ isLoadingRevisionWithUnsavedChanges && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ isLoadingRevisionWithUnsavedChanges }\n\t\t\t\t\tconfirmButtonText={ __( 'Apply' ) }\n\t\t\t\t\tonConfirm={ () =>\n\t\t\t\t\t\trestoreRevision( currentlySelectedRevision )\n\t\t\t\t\t}\n\t\t\t\t\tonCancel={ () =>\n\t\t\t\t\t\tsetIsLoadingRevisionWithUnsavedChanges( false )\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Are you sure you want to apply this revision? Any unsaved changes will be lost.'\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenRevisions;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,0BAA0B,IAAIC,YAAY,EAC1CC,2BAA2B,IAAIC,aAAa,EAC5CC,OAAO,QACD,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,UAAU,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACpE,SACCC,WAAW,IAAIC,sBAAsB,EACrCC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;;AAEhC;AACA;AACA;AACA,OAAOC,YAAY,MAAM,WAAW;AACpC,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,OAAOC,SAAS,MAAM,iBAAiB;AACvC,SAASJ,KAAK,IAAIK,aAAa,QAAQ,gBAAgB;AACvD,OAAOC,wBAAwB,MAAM,+BAA+B;AACpE,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,SAAS,MAAM,kBAAkB;AACxC,OAAOC,UAAU,MAAM,kBAAkB;AAEzC,MAAM;EAAEC,mBAAmB;EAAEC;AAA2B,CAAC,GAAGR,MAAM,CACjEJ,sBACD,CAAC;AAED,MAAMa,SAAS,GAAG,EAAE;AAEpB,SAASC,eAAeA,CAAA,EAAG;EAC1B,MAAM;IAAEC;EAAK,CAAC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;EAAG,CAC5C,CACD,CAAE,EACJyE,aAAA,CAACpD,gBAAgB;IAChB8D,QAAQ,EAAGnB,cAAgB;IAC3BoB,kBAAkB,EAAGf,2BAA6B;IAClDgB,aAAa,EAAG9C,gBAAkB;IAClC+C,gBAAgB,EAAGf,mBAAqB;IACxCgB,eAAe,EAAGA,CAAA,KACjB5C,iBAAiB,GACdW,sCAAsC,CAAE,IAAK,CAAC,GAC9CM,eAAe,CAAET,yBAA0B;EAC9C,CACD,CAAC,EACAH,QAAQ,GAAG,CAAC,IACbyB,aAAA;IAAKK,SAAS,EAAC;EAAkD,GAChEL,aAAA,CAAClD,UAAU;IACVuD,SAAS,EAAC,sDAAsD;IAChEzC,WAAW,EAAGA,WAAa;IAC3BW,QAAQ,EAAGA,QAAU;IACrBwC,UAAU,EAAGlD,cAAgB;IAC7BmD,UAAU,EAAG7C,cAAgB;IAC7B8C,QAAQ,EAAGhD,SAAW;IACtBiD,KAAK,EAAG3F,EAAE,CAAE,qCAAsC;EAAG,CACrD,CACG,CACL,EACCqD,mCAAmC,IACpCoB,aAAA,CAACpE,aAAa;IACbuF,MAAM,EAAGvC,mCAAqC;IAC9CwC,iBAAiB,EAAG7F,EAAE,CAAE,OAAQ,CAAG;IACnC8F,SAAS,EAAGA,CAAA,KACXlC,eAAe,CAAET,yBAA0B,CAC3C;IACD4C,QAAQ,EAAGA,CAAA,KACVzC,sCAAsC,CAAE,KAAM;EAC9C,GAECtD,EAAE,CACH,iFACD,CACc,CAEf,CAAC;AAEL;AAEA,eAAe2B,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","__","sprintf","Button","dateI18n","getDate","humanTimeDiff","getSettings","store","coreStore","useSelect","privateApis","blockEditorPrivateApis","unlock","DAY_IN_MILLISECONDS","getGlobalStylesChanges","ChangesSummary","revision","previousRevision","changes","maxResults","length","createElement","className","map","change","key","getRevisionLabel","id","authorDisplayName","formattedModifiedDate","areStylesEqual","RevisionsButtons","userRevisions","selectedRevisionId","onChange","canApplyRevision","onApplyRevision","currentThemeName","currentUser","select","getCurrentTheme","getCurrentUser","currentTheme","name","rendered","stylesheet","dateNowInMs","getTime","datetimeAbbreviated","formats","role","index","author","modified","isUnsaved","revisionAuthor","authorAvatar","avatar_urls","isFirstItem","isSelected","isReset","modifiedDate","displayDate","revisionLabel","disabled","onClick","dateTime","alt","src","size","variant"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/revisions-buttons.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { dateI18n, getDate, humanTimeDiff, getSettings } from '@wordpress/date';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst DAY_IN_MILLISECONDS = 60 * 60 * 1000 * 24;\nconst { getGlobalStylesChanges } = unlock( blockEditorPrivateApis );\n\nfunction ChangesSummary( { revision, previousRevision } ) {\n\tconst changes = getGlobalStylesChanges( revision, previousRevision, {\n\t\tmaxResults: 7,\n\t} );\n\n\tif ( ! changes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ul\n\t\t\tdata-testid=\"global-styles-revision-changes\"\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__changes\"\n\t\t>\n\t\t\t{ changes.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n\n/**\n * Returns a button label for the revision.\n *\n * @param {string|number} id A revision object.\n * @param {string} authorDisplayName Author name.\n * @param {string} formattedModifiedDate Revision modified date formatted.\n * @param {boolean} areStylesEqual Whether the revision matches the current editor styles.\n * @return {string} Translated label.\n */\nfunction getRevisionLabel(\n\tid,\n\tauthorDisplayName,\n\tformattedModifiedDate,\n\tareStylesEqual\n) {\n\tif ( 'parent' === id ) {\n\t\treturn __( 'Reset the styles to the theme defaults' );\n\t}\n\n\tif ( 'unsaved' === id ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: author display name */\n\t\t\t__( 'Unsaved changes by %s' ),\n\t\t\tauthorDisplayName\n\t\t);\n\t}\n\n\treturn areStylesEqual\n\t\t? sprintf(\n\t\t\t\t// translators: %1$s: author display name, %2$s: revision creation date.\n\t\t\t\t__(\n\t\t\t\t\t'Changes saved by %1$s on %2$s. This revision matches current editor styles.'\n\t\t\t\t),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: %1$s: author display name, %2$s: revision creation date.\n\t\t\t\t__( 'Changes saved by %1$s on %2$s' ),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t );\n}\n\n/**\n * Returns a rendered list of revisions buttons.\n *\n * @typedef {Object} props\n * @property {Array<Object>} userRevisions A collection of user revisions.\n * @property {number} selectedRevisionId The id of the currently-selected revision.\n * @property {Function} onChange Callback fired when a revision is selected.\n *\n * @param {props} Component props.\n * @return {JSX.Element} The modal component.\n */\nfunction RevisionsButtons( {\n\tuserRevisions,\n\tselectedRevisionId,\n\tonChange,\n\tcanApplyRevision,\n\tonApplyRevision,\n} ) {\n\tconst { currentThemeName, currentUser } = useSelect( ( select ) => {\n\t\tconst { getCurrentTheme, getCurrentUser } = select( coreStore );\n\t\tconst currentTheme = getCurrentTheme();\n\t\treturn {\n\t\t\tcurrentThemeName:\n\t\t\t\tcurrentTheme?.name?.rendered || currentTheme?.stylesheet,\n\t\t\tcurrentUser: getCurrentUser(),\n\t\t};\n\t}, [] );\n\tconst dateNowInMs = getDate().getTime();\n\tconst { datetimeAbbreviated } = getSettings().formats;\n\n\treturn (\n\t\t<ol\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revisions-list\"\n\t\t\taria-label={ __( 'Global styles revisions list' ) }\n\t\t\trole=\"group\"\n\t\t>\n\t\t\t{ userRevisions.map( ( revision, index ) => {\n\t\t\t\tconst { id, author, modified } = revision;\n\t\t\t\tconst isUnsaved = 'unsaved' === id;\n\t\t\t\t// Unsaved changes are created by the current user.\n\t\t\t\tconst revisionAuthor = isUnsaved ? currentUser : author;\n\t\t\t\tconst authorDisplayName = revisionAuthor?.name || __( 'User' );\n\t\t\t\tconst authorAvatar = revisionAuthor?.avatar_urls?.[ '48' ];\n\t\t\t\tconst isFirstItem = index === 0;\n\t\t\t\tconst isSelected = selectedRevisionId\n\t\t\t\t\t? selectedRevisionId === id\n\t\t\t\t\t: isFirstItem;\n\t\t\t\tconst areStylesEqual = ! canApplyRevision && isSelected;\n\t\t\t\tconst isReset = 'parent' === id;\n\t\t\t\tconst modifiedDate = getDate( modified );\n\t\t\t\tconst displayDate =\n\t\t\t\t\tmodified &&\n\t\t\t\t\tdateNowInMs - modifiedDate.getTime() > DAY_IN_MILLISECONDS\n\t\t\t\t\t\t? dateI18n( datetimeAbbreviated, modifiedDate )\n\t\t\t\t\t\t: humanTimeDiff( modified );\n\t\t\t\tconst revisionLabel = getRevisionLabel(\n\t\t\t\t\tid,\n\t\t\t\t\tauthorDisplayName,\n\t\t\t\t\tdateI18n( datetimeAbbreviated, modifiedDate ),\n\t\t\t\t\tareStylesEqual\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'edit-site-global-styles-screen-revisions__revision-item',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t\t\t'is-active': areStylesEqual,\n\t\t\t\t\t\t\t\t'is-reset': isReset,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\taria-current={ isSelected }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revision-button\"\n\t\t\t\t\t\t\tdisabled={ isSelected }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonChange( revision );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\taria-label={ revisionLabel }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ isReset ? (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ __( 'Default styles' ) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t{ currentThemeName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ isUnsaved ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__date\">\n\t\t\t\t\t\t\t\t\t\t\t{ __( '(Unsaved)' ) }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<time\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__date\"\n\t\t\t\t\t\t\t\t\t\t\tdateTime={ modified }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ displayDate }\n\t\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\talt={ authorDisplayName }\n\t\t\t\t\t\t\t\t\t\t\tsrc={ authorAvatar }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ authorDisplayName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t\t\t\t<ChangesSummary\n\t\t\t\t\t\t\t\t\t\t\trevision={ revision }\n\t\t\t\t\t\t\t\t\t\t\tpreviousRevision={\n\t\t\t\t\t\t\t\t\t\t\t\tindex < userRevisions.length\n\t\t\t\t\t\t\t\t\t\t\t\t\t? userRevisions[ index + 1 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {}\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) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{ isSelected &&\n\t\t\t\t\t\t\t( areStylesEqual ? (\n\t\t\t\t\t\t\t\t<p className=\"edit-site-global-styles-screen-revisions__applied-text\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'These styles are already applied to your site.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tdisabled={ areStylesEqual }\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__apply-button\"\n\t\t\t\t\t\t\t\t\tonClick={ onApplyRevision }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ isReset\n\t\t\t\t\t\t\t\t\t\t? __( 'Reset to defaults' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Apply' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ol>\n\t);\n}\n\nexport default RevisionsButt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e,GAE1BH,OAAO,GACRvC,aAAA;MAAMC,SAAS,EAAC;IAAuD,GACpEtB,EAAE,CAAE,gBAAiB,CAAC,EACxBqB,aAAA;MAAMC,SAAS,EAAC;IAAgD,GAC7De,gBACG,CACD,CAAC,GAEPhB,aAAA;MAAMC,SAAS,EAAC;IAAuD,GACpEgC,SAAS,GACVjC,aAAA;MAAMC,SAAS,EAAC;IAAgD,GAC7DtB,EAAE,CAAE,WAAY,CACb,CAAC,GAEPqB,aAAA;MACCC,SAAS,EAAC,gDAAgD;MAC1D4C,QAAQ,EAAGb;IAAU,GAEnBS,WACG,CACN,EACDzC,aAAA;MAAMC,SAAS,EAAC;IAAgD,GAC/DD,aAAA;MACC8C,GAAG,EAAGvC,iBAAmB;MACzBwC,GAAG,EAAGZ;IAAc,CACpB,CAAC,EACA5B,iBACG,CAAC,EACL+B,UAAU,IACXtC,aAAA,CAACN,cAAc;MACdC,QAAQ,EAAGA,QAAU;MACrBC,gBAAgB,EACfkC,KAAK,GAAGnB,aAAa,CAACZ,MAAM,GACzBY,aAAa,CAAEmB,KAAK,GAAG,CAAC,CAAE,GAC1B,CAAC;IACJ,CACD,CAEG,CAEA,CAAC,EACPQ,UAAU,KACT7B,cAAc,GACfT,aAAA;MAAGC,SAAS,EAAC;IAAwD,GAClEtB,EAAE,CACH,gDACD,CACE,CAAC,GAEJqB,aAAA,CAACnB,MAAM;MACN8D,QAAQ,EAAGlC,cAAgB;MAC3BuC,IAAI,EAAC,SAAS;MACdC,OAAO,EAAC,SAAS;MACjBhD,SAAS,EAAC,wDAAwD;MAClE2C,OAAO,EAAG7B;IAAiB,GAEzBwB,OAAO,GACN5D,EAAE,CAAE,mBAAoB,CAAC,GACzBA,EAAE,CAAE,OAAQ,CACR,CACR,CACC,CAAC;EAEP,CAAE,CACC,CAAC;AAEP;AAEA,eAAe+B,gBAAgB"}
1
+ {"version":3,"names":["classnames","__","sprintf","Button","dateI18n","getDate","humanTimeDiff","getSettings","store","coreStore","useSelect","privateApis","blockEditorPrivateApis","unlock","DAY_IN_MILLISECONDS","getGlobalStylesChanges","ChangesSummary","revision","previousRevision","changes","maxResults","length","createElement","className","map","change","key","getRevisionLabel","id","authorDisplayName","formattedModifiedDate","areStylesEqual","RevisionsButtons","userRevisions","selectedRevisionId","onChange","canApplyRevision","onApplyRevision","currentThemeName","currentUser","select","getCurrentTheme","getCurrentUser","currentTheme","name","rendered","stylesheet","dateNowInMs","getTime","datetimeAbbreviated","formats","role","index","author","modified","isUnsaved","revisionAuthor","authorAvatar","avatar_urls","isFirstItem","isSelected","isReset","modifiedDate","displayDate","revisionLabel","disabled","onClick","dateTime","alt","src","size","variant"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/revisions-buttons.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { dateI18n, getDate, humanTimeDiff, getSettings } from '@wordpress/date';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst DAY_IN_MILLISECONDS = 60 * 60 * 1000 * 24;\nconst { getGlobalStylesChanges } = unlock( blockEditorPrivateApis );\n\nfunction ChangesSummary( { revision, previousRevision } ) {\n\tconst changes = getGlobalStylesChanges( revision, previousRevision, {\n\t\tmaxResults: 7,\n\t} );\n\n\tif ( ! changes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ul\n\t\t\tdata-testid=\"global-styles-revision-changes\"\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__changes\"\n\t\t>\n\t\t\t{ changes.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n\n/**\n * Returns a button label for the revision.\n *\n * @param {string|number} id A revision object.\n * @param {string} authorDisplayName Author name.\n * @param {string} formattedModifiedDate Revision modified date formatted.\n * @param {boolean} areStylesEqual Whether the revision matches the current editor styles.\n * @return {string} Translated label.\n */\nfunction getRevisionLabel(\n\tid,\n\tauthorDisplayName,\n\tformattedModifiedDate,\n\tareStylesEqual\n) {\n\tif ( 'parent' === id ) {\n\t\treturn __( 'Reset the styles to the theme defaults' );\n\t}\n\n\tif ( 'unsaved' === id ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: author display name */\n\t\t\t__( 'Unsaved changes by %s' ),\n\t\t\tauthorDisplayName\n\t\t);\n\t}\n\n\treturn areStylesEqual\n\t\t? sprintf(\n\t\t\t\t// translators: %1$s: author display name, %2$s: revision creation date.\n\t\t\t\t__(\n\t\t\t\t\t'Changes saved by %1$s on %2$s. This revision matches current editor styles.'\n\t\t\t\t),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: %1$s: author display name, %2$s: revision creation date.\n\t\t\t\t__( 'Changes saved by %1$s on %2$s' ),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t );\n}\n\n/**\n * Returns a rendered list of revisions buttons.\n *\n * @typedef {Object} props\n * @property {Array<Object>} userRevisions A collection of user revisions.\n * @property {number} selectedRevisionId The id of the currently-selected revision.\n * @property {Function} onChange Callback fired when a revision is selected.\n *\n * @param {props} Component props.\n * @return {JSX.Element} The modal component.\n */\nfunction RevisionsButtons( {\n\tuserRevisions,\n\tselectedRevisionId,\n\tonChange,\n\tcanApplyRevision,\n\tonApplyRevision,\n} ) {\n\tconst { currentThemeName, currentUser } = useSelect( ( select ) => {\n\t\tconst { getCurrentTheme, getCurrentUser } = select( coreStore );\n\t\tconst currentTheme = getCurrentTheme();\n\t\treturn {\n\t\t\tcurrentThemeName:\n\t\t\t\tcurrentTheme?.name?.rendered || currentTheme?.stylesheet,\n\t\t\tcurrentUser: getCurrentUser(),\n\t\t};\n\t}, [] );\n\tconst dateNowInMs = getDate().getTime();\n\tconst { datetimeAbbreviated } = getSettings().formats;\n\n\treturn (\n\t\t<ol\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revisions-list\"\n\t\t\taria-label={ __( 'Global styles revisions list' ) }\n\t\t\trole=\"group\"\n\t\t>\n\t\t\t{ userRevisions.map( ( revision, index ) => {\n\t\t\t\tconst { id, author, modified } = revision;\n\t\t\t\tconst isUnsaved = 'unsaved' === id;\n\t\t\t\t// Unsaved changes are created by the current user.\n\t\t\t\tconst revisionAuthor = isUnsaved ? currentUser : author;\n\t\t\t\tconst authorDisplayName = revisionAuthor?.name || __( 'User' );\n\t\t\t\tconst authorAvatar = revisionAuthor?.avatar_urls?.[ '48' ];\n\t\t\t\tconst isFirstItem = index === 0;\n\t\t\t\tconst isSelected = selectedRevisionId\n\t\t\t\t\t? selectedRevisionId === id\n\t\t\t\t\t: isFirstItem;\n\t\t\t\tconst areStylesEqual = ! canApplyRevision && isSelected;\n\t\t\t\tconst isReset = 'parent' === id;\n\t\t\t\tconst modifiedDate = getDate( modified );\n\t\t\t\tconst displayDate =\n\t\t\t\t\tmodified &&\n\t\t\t\t\tdateNowInMs - modifiedDate.getTime() > DAY_IN_MILLISECONDS\n\t\t\t\t\t\t? dateI18n( datetimeAbbreviated, modifiedDate )\n\t\t\t\t\t\t: humanTimeDiff( modified );\n\t\t\t\tconst revisionLabel = getRevisionLabel(\n\t\t\t\t\tid,\n\t\t\t\t\tauthorDisplayName,\n\t\t\t\t\tdateI18n( datetimeAbbreviated, modifiedDate ),\n\t\t\t\t\tareStylesEqual\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'edit-site-global-styles-screen-revisions__revision-item',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t\t\t'is-active': areStylesEqual,\n\t\t\t\t\t\t\t\t'is-reset': isReset,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\taria-current={ isSelected }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revision-button\"\n\t\t\t\t\t\t\tdisabled={ isSelected }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonChange( revision );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\taria-label={ revisionLabel }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ isReset ? (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ __( 'Default styles' ) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t{ currentThemeName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ isUnsaved ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__date\">\n\t\t\t\t\t\t\t\t\t\t\t{ __( '(Unsaved)' ) }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<time\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__date\"\n\t\t\t\t\t\t\t\t\t\t\tdateTime={ modified }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ displayDate }\n\t\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\talt={ authorDisplayName }\n\t\t\t\t\t\t\t\t\t\t\tsrc={ authorAvatar }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ authorDisplayName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t\t\t\t<ChangesSummary\n\t\t\t\t\t\t\t\t\t\t\trevision={ revision }\n\t\t\t\t\t\t\t\t\t\t\tpreviousRevision={\n\t\t\t\t\t\t\t\t\t\t\t\tindex < userRevisions.length\n\t\t\t\t\t\t\t\t\t\t\t\t\t? userRevisions[ index + 1 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {}\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) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{ isSelected &&\n\t\t\t\t\t\t\t( areStylesEqual ? (\n\t\t\t\t\t\t\t\t<p className=\"edit-site-global-styles-screen-revisions__applied-text\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'These styles are already applied to your site.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tdisabled={ areStylesEqual }\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__apply-button\"\n\t\t\t\t\t\t\t\t\tonClick={ onApplyRevision }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ isReset\n\t\t\t\t\t\t\t\t\t\t? __( 'Reset to defaults' )\n\t\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E,CAAE,OAAQ,CACR,CACR,CACC,CAAC;EAEP,CAAE,CACC,CAAC;AAEP;AAEA,eAAe+B,gBAAgB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","store","coreStore","useContext","useMemo","privateApis","blockEditorPrivateApis","unlock","SITE_EDITOR_AUTHORS_QUERY","per_page","_fields","context","capabilities","DEFAULT_QUERY","page","EMPTY_ARRAY","GlobalStylesContext","useGlobalStylesRevisions","query","user","userConfig","_query","authors","currentUser","isDirty","revisions","isLoadingGlobalStylesRevisions","revisionsCount","select","_globalStyles$_links$","__experimentalGetDirtyEntityRecords","getCurrentUser","getUsers","getRevisions","__experimentalGetCurrentGlobalStylesId","getEntityRecord","isResolving","dirtyEntityRecords","_currentUser","_isDirty","length","globalStylesId","globalStyles","undefined","_revisionsCount","_links","count","globalStylesRevisions","_authors","_isResolving","hasUnsavedChanges","isLoading","_modifiedRevisions","map","revision","author","find","id","fetchedRevisionsCount","isLatest","Object","keys","unsavedRevision","styles","settings","name","avatar_urls","modified","Date","unshift","Math","ceil","push"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/use-global-styles-revisions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst SITE_EDITOR_AUTHORS_QUERY = {\n\tper_page: -1,\n\t_fields: 'id,name,avatar_urls',\n\tcontext: 'view',\n\tcapabilities: [ 'edit_theme_options' ],\n};\nconst DEFAULT_QUERY = { per_page: 100, page: 1 };\nconst EMPTY_ARRAY = [];\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\nexport default function useGlobalStylesRevisions( { query } = {} ) {\n\tconst { user: userConfig } = useContext( GlobalStylesContext );\n\tconst _query = { ...DEFAULT_QUERY, ...query };\n\tconst {\n\t\tauthors,\n\t\tcurrentUser,\n\t\tisDirty,\n\t\trevisions,\n\t\tisLoadingGlobalStylesRevisions,\n\t\trevisionsCount,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetCurrentUser,\n\t\t\t\tgetUsers,\n\t\t\t\tgetRevisions,\n\t\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tisResolving,\n\t\t\t} = select( coreStore );\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tconst _currentUser = getCurrentUser();\n\t\t\tconst _isDirty = dirtyEntityRecords.length > 0;\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\tconst _revisionsCount =\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t\t\tconst globalStylesRevisions =\n\t\t\t\tgetRevisions(\n\t\t\t\t\t'root',\n\t\t\t\t\t'globalStyles',\n\t\t\t\t\tglobalStylesId,\n\t\t\t\t\t_query\n\t\t\t\t) || EMPTY_ARRAY;\n\t\t\tconst _authors =\n\t\t\t\tgetUsers( SITE_EDITOR_AUTHORS_QUERY ) || EMPTY_ARRAY;\n\t\t\tconst _isResolving = isResolving( 'getRevisions', [\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId,\n\t\t\t\t_query,\n\t\t\t] );\n\t\t\treturn {\n\t\t\t\tauthors: _authors,\n\t\t\t\tcurrentUser: _currentUser,\n\t\t\t\tisDirty: _isDirty,\n\t\t\t\trevisions: globalStylesRevisions,\n\t\t\t\tisLoadingGlobalStylesRevisions: _isResolving,\n\t\t\t\trevisionsCount: _revisionsCount,\n\t\t\t};\n\t\t},\n\t\t[ query ]\n\t);\n\treturn useMemo( () => {\n\t\tif ( ! authors.length || isLoadingGlobalStylesRevisions ) {\n\t\t\treturn {\n\t\t\t\trevisions: EMPTY_ARRAY,\n\t\t\t\thasUnsavedChanges: isDirty,\n\t\t\t\tisLoading: true,\n\t\t\t\trevisionsCount,\n\t\t\t};\n\t\t}\n\n\t\t// Adds author details to each revision.\n\t\tconst _modifiedRevisions = revisions.map( ( revision ) => {\n\t\t\treturn {\n\t\t\t\t...revision,\n\t\t\t\tauthor: authors.find(\n\t\t\t\t\t( author ) => author.id === revision.author\n\t\t\t\t),\n\t\t\t};\n\t\t} );\n\n\t\tconst fetchedRevisionsCount = revisions.length;\n\n\t\tif ( fetchedRevisionsCount ) {\n\t\t\t// Flags the most current saved revision.\n\t\t\tif (\n\t\t\t\t_modifiedRevisions[ 0 ].id !== 'unsaved' &&\n\t\t\t\t_query.page === 1\n\t\t\t) {\n\t\t\t\t_modifiedRevisions[ 0 ].isLatest = true;\n\t\t\t}\n\n\t\t\t// Adds an item for unsaved changes.\n\t\t\tif (\n\t\t\t\tisDirty &&\n\t\t\t\tuserConfig &&\n\t\t\t\tObject.keys( userConfig ).length > 0 &&\n\t\t\t\tcurrentUser &&\n\t\t\t\t_query.page === 1\n\t\t\t) {\n\t\t\t\tconst unsavedRevision = {\n\t\t\t\t\tid: 'unsaved',\n\t\t\t\t\tstyles: userConfig?.styles,\n\t\t\t\t\tsettings: userConfig?.settings,\n\t\t\t\t\tauthor: {\n\t\t\t\t\t\tname: currentUser?.name,\n\t\t\t\t\t\tavatar_urls: currentUser?.avatar_urls,\n\t\t\t\t\t},\n\t\t\t\t\tmodified: new Date(),\n\t\t\t\t};\n\n\t\t\t\t_modifiedRevisions.unshift( unsavedRevision );\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t_query.page === Math.ceil( revisionsCount / _query.per_page )\n\t\t\t) {\n\t\t\t\t// Adds an item for the default theme styles.\n\t\t\t\t_modifiedRevisions.push( {\n\t\t\t\t\tid: 'parent',\n\t\t\t\t\tstyles: {},\n\t\t\t\t\tsettings: {},\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\trevisions: _modifiedRevisions,\n\t\t\thasUnsavedChanges: isDirty,\n\t\t\tisLoading: false,\n\t\t\trevisionsCount,\n\t\t};\n\t}, [\n\t\tisDirty,\n\t\trevisions,\n\t\tcurrentUser,\n\t\tauthors,\n\t\tuserConfig,\n\t\tisLoadingGlobalStylesRevisions,\n\t] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAMC,yBAAyB,GAAG;EACjCC,QAAQ,EAAE,CAAC,CAAC;EACZC,OAAO,EAAE,qBAAqB;EAC9BC,OAAO,EAAE,MAAM;EACfC,YAAY,EAAE,CAAE,oBAAoB;AACrC,CAAC;AACD,MAAMC,aAAa,GAAG;EAAEJ,QAAQ,EAAE,GAAG;EAAEK,IAAI,EAAE;AAAE,CAAC;AAChD,MAAMC,WAAW,GAAG,EAAE;AACtB,MAAM;EAAEC;AAAoB,CAAC,GAAGT,MAAM,CAAED,sBAAuB,CAAC;AAChE,eAAe,SAASW,wBAAwBA,CAAE;EAAEC;AAAM,CAAC,GAAG,CAAC,CAAC,EAAG;EAClE,MAAM;IAAEC,IAAI,EAAEC;EAAW,CAAC,GAAGjB,UAAU,CAAEa,mBAAoB,CAAC;EAC9D,MAAMK,MAAM,GAAG;IAAE,GAAGR,aAAa;IAAE,GAAGK;EAAM,CAAC;EAC7C,MAAM;IACLI,OAAO;IACPC,WAAW;IACXC,OAAO;IACPC,SAAS;IACTC,8BAA8B;IAC9BC;EACD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ACC,IAAI,CAAE5C,cAAc,GAAGN,MAAM,CAACZ,QAAS,CAAC,EAC5D;QACD;QACA2C,kBAAkB,CAACoB,IAAI,CAAE;UACxBf,EAAE,EAAE,QAAQ;UACZM,MAAM,EAAE,CAAC,CAAC;UACVC,QAAQ,EAAE,CAAC;QACZ,CAAE,CAAC;MACJ;IACD;IAEA,OAAO;MACNvC,SAAS,EAAE2B,kBAAkB;MAC7BF,iBAAiB,EAAE1B,OAAO;MAC1B2B,SAAS,EAAE,KAAK;MAChBxB;IACD,CAAC;EACF,CAAC,EAAE,CACFH,OAAO,EACPC,SAAS,EACTF,WAAW,EACXD,OAAO,EACPF,UAAU,EACVM,8BAA8B,CAC7B,CAAC;AACJ"}
1
+ {"version":3,"names":["useSelect","store","coreStore","useContext","useMemo","privateApis","blockEditorPrivateApis","unlock","SITE_EDITOR_AUTHORS_QUERY","per_page","_fields","context","capabilities","DEFAULT_QUERY","page","EMPTY_ARRAY","GlobalStylesContext","useGlobalStylesRevisions","query","user","userConfig","_query","authors","currentUser","isDirty","revisions","isLoadingGlobalStylesRevisions","revisionsCount","select","_globalStyles$_links$","__experimentalGetDirtyEntityRecords","getCurrentUser","getUsers","getRevisions","__experimentalGetCurrentGlobalStylesId","getEntityRecord","isResolving","dirtyEntityRecords","_currentUser","_isDirty","length","globalStylesId","globalStyles","undefined","_revisionsCount","_links","count","globalStylesRevisions","_authors","_isResolving","hasUnsavedChanges","isLoading","_modifiedRevisions","map","revision","author","find","id","fetchedRevisionsCount","isLatest","Object","keys","unsavedRevision","styles","settings","name","avatar_urls","modified","Date","unshift","Math","ceil","push"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/use-global-styles-revisions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst SITE_EDITOR_AUTHORS_QUERY = {\n\tper_page: -1,\n\t_fields: 'id,name,avatar_urls',\n\tcontext: 'view',\n\tcapabilities: [ 'edit_theme_options' ],\n};\nconst DEFAULT_QUERY = { per_page: 100, page: 1 };\nconst EMPTY_ARRAY = [];\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\nexport default function useGlobalStylesRevisions( { query } = {} ) {\n\tconst { user: userConfig } = useContext( GlobalStylesContext );\n\tconst _query = { ...DEFAULT_QUERY, ...query };\n\tconst {\n\t\tauthors,\n\t\tcurrentUser,\n\t\tisDirty,\n\t\trevisions,\n\t\tisLoadingGlobalStylesRevisions,\n\t\trevisionsCount,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetCurrentUser,\n\t\t\t\tgetUsers,\n\t\t\t\tgetRevisions,\n\t\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tisResolving,\n\t\t\t} = select( coreStore );\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tconst _currentUser = getCurrentUser();\n\t\t\tconst _isDirty = dirtyEntityRecords.length > 0;\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\tconst _revisionsCount =\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t\t\tconst globalStylesRevisions =\n\t\t\t\tgetRevisions(\n\t\t\t\t\t'root',\n\t\t\t\t\t'globalStyles',\n\t\t\t\t\tglobalStylesId,\n\t\t\t\t\t_query\n\t\t\t\t) || EMPTY_ARRAY;\n\t\t\tconst _authors =\n\t\t\t\tgetUsers( SITE_EDITOR_AUTHORS_QUERY ) || EMPTY_ARRAY;\n\t\t\tconst _isResolving = isResolving( 'getRevisions', [\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId,\n\t\t\t\t_query,\n\t\t\t] );\n\t\t\treturn {\n\t\t\t\tauthors: _authors,\n\t\t\t\tcurrentUser: _currentUser,\n\t\t\t\tisDirty: _isDirty,\n\t\t\t\trevisions: globalStylesRevisions,\n\t\t\t\tisLoadingGlobalStylesRevisions: _isResolving,\n\t\t\t\trevisionsCount: _revisionsCount,\n\t\t\t};\n\t\t},\n\t\t[ query ]\n\t);\n\treturn useMemo( () => {\n\t\tif ( ! authors.length || isLoadingGlobalStylesRevisions ) {\n\t\t\treturn {\n\t\t\t\trevisions: EMPTY_ARRAY,\n\t\t\t\thasUnsavedChanges: isDirty,\n\t\t\t\tisLoading: true,\n\t\t\t\trevisionsCount,\n\t\t\t};\n\t\t}\n\n\t\t// Adds author details to each revision.\n\t\tconst _modifiedRevisions = revisions.map( ( revision ) => {\n\t\t\treturn {\n\t\t\t\t...revision,\n\t\t\t\tauthor: authors.find(\n\t\t\t\t\t( author ) => author.id === revision.author\n\t\t\t\t),\n\t\t\t};\n\t\t} );\n\n\t\tconst fetchedRevisionsCount = revisions.length;\n\n\t\tif ( fetchedRevisionsCount ) {\n\t\t\t// Flags the most current saved revision.\n\t\t\tif (\n\t\t\t\t_modifiedRevisions[ 0 ].id !== 'unsaved' &&\n\t\t\t\t_query.page === 1\n\t\t\t) {\n\t\t\t\t_modifiedRevisions[ 0 ].isLatest = true;\n\t\t\t}\n\n\t\t\t// Adds an item for unsaved changes.\n\t\t\tif (\n\t\t\t\tisDirty &&\n\t\t\t\tuserConfig &&\n\t\t\t\tObject.keys( userConfig ).length > 0 &&\n\t\t\t\tcurrentUser &&\n\t\t\t\t_query.page === 1\n\t\t\t) {\n\t\t\t\tconst unsavedRevision = {\n\t\t\t\t\tid: 'unsaved',\n\t\t\t\t\tstyles: userConfig?.styles,\n\t\t\t\t\tsettings: userConfig?.settings,\n\t\t\t\t\tauthor: {\n\t\t\t\t\t\tname: currentUser?.name,\n\t\t\t\t\t\tavatar_urls: currentUser?.avatar_urls,\n\t\t\t\t\t},\n\t\t\t\t\tmodified: new Date(),\n\t\t\t\t};\n\n\t\t\t\t_modifiedRevisions.unshift( unsavedRevision );\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t_query.page === Math.ceil( revisionsCount / _query.per_page )\n\t\t\t) {\n\t\t\t\t// Adds an item for the default theme styles.\n\t\t\t\t_modifiedRevisions.push( {\n\t\t\t\t\tid: 'parent',\n\t\t\t\t\tstyles: {},\n\t\t\t\t\tsettings: {},\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\trevisions: _modifiedRevisions,\n\t\t\thasUnsavedChanges: isDirty,\n\t\t\tisLoading: false,\n\t\t\trevisionsCount,\n\t\t};\n\t}, [\n\t\tisDirty,\n\t\trevisions,\n\t\tcurrentUser,\n\t\tauthors,\n\t\tuserConfig,\n\t\tisLoadingGlobalStylesRevisions,\n\t] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAMC,yBAAyB,GAAG;EACjCC,QAAQ,EAAE,CAAC,CAAC;EACZC,OAAO,EAAE,qBAAqB;EAC9BC,OAAO,EAAE,MAAM;EACfC,YAAY,EAAE,CAAE,oBAAoB;AACrC,CAAC;AACD,MAAMC,aAAa,GAAG;EAAEJ,QAAQ,EAAE,GAAG;EAAEK,IAAI,EAAE;AAAE,CAAC;AAChD,MAAMC,WAAW,GAAG,EAAE;AACtB,MAAM;EAAEC;AAAoB,CAAC,GAAGT,MAAM,CA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,UAAU,EAAE2C,MAAM;UAC1BC,QAAQ,EAAE5C,UAAU,EAAE4C,QAAQ;UAC9BT,MAAM,EAAE;YACPU,IAAI,EAAE1C,WAAW,EAAE0C,IAAI;YACvBC,WAAW,EAAE3C,WAAW,EAAE2C;UAC3B,CAAC;UACDC,QAAQ,EAAE,IAAIC,IAAI,CAAC;QACpB,CAAC;QAEDhB,kBAAkB,CAACiB,OAAO,CAAEP,eAAgB,CAAC;MAC9C;MAEA,IACCzC,MAAM,CAACP,IAAI,KAAKwD,IAAI,CAACC,IAAI,CAAE5C,cAAc,GAAGN,MAAM,CAACZ,QAAS,CAAC,EAC5D;QACD;QACA2C,kBAAkB,CAACoB,IAAI,CAAE;UACxBf,EAAE,EAAE,QAAQ;UACZM,MAAM,EAAE,CAAC,CAAC;UACVC,QAAQ,EAAE,CAAC;QACZ,CAAE,CAAC;MACJ;IACD;IAEA,OAAO;MACNvC,SAAS,EAAE2B,kBAAkB;MAC7BF,iBAAiB,EAAE1B,OAAO;MAC1B2B,SAAS,EAAE,KAAK;MAChBxB;IACD,CAAC;EACF,CAAC,EAAE,CACFH,OAAO,EACPC,SAAS,EACTF,WAAW,EACXD,OAAO,EACPF,UAAU,EACVM,8BAA8B,CAC7B,CAAC;AACJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalSpacer","Spacer","__experimentalVStack","VStack","FlexItem","CardBody","Card","CardDivider","CardMedia","isRTL","__","chevronLeft","chevronRight","useSelect","store","coreStore","privateApis","blockEditorPrivateApis","IconWithCurrentColor","NavigationButtonAsItem","RootMenu","PreviewStyles","unlock","useGlobalStyle","ScreenRoot","customCSS","hasVariations","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","__experimentalGetCurrentThemeGlobalStylesVariations","globalStylesId","globalStyles","undefined","length","_links","createElement","size","className","spacing","path","justify","icon","as","paddingTop","paddingX","marginBottom","Fragment"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-root.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport PreviewStyles from './preview-styles';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ScreenRoot() {\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card size=\"small\" className=\"edit-site-global-styles-screen-root\">\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardMedia>\n\t\t\t\t\t\t\t<PreviewStyles />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/variations\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tpath=\"/blocks\"\n\t\t\t\t\t\taria-label={ __( 'Blocks styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/css\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t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A,CAACxC,SAAS,QACTwC,aAAA,CAAClB,sBAAsB;IACtBsB,IAAI,EAAC,SAAS;IACd,cAAa/B,EAAE,CAAE,eAAgB;EAAG,GAEpC2B,aAAA,CAACtC,MAAM;IAAC2C,OAAO,EAAC;EAAe,GAC9BL,aAAA,CAACjC,QAAQ,QAAGM,EAAE,CAAE,QAAS,CAAa,CAAC,EACvC2B,aAAA,CAACnB,oBAAoB;IACpByB,IAAI,EAAGlC,KAAK,CAAC,CAAC,GAAGE,WAAW,GAAGC;EAAc,CAC7C,CACM,CACe,CACd,CACF,CAAC,EAETe,UAAU,IAAI,CAAC,CAAEF,SAAS,IAC3BY,aAAA,CAAAW,QAAA,QACCX,aAAA,CAAC9B,WAAW,MAAE,CAAC,EACf8B,aAAA,CAAChC,QAAQ,QACRgC,aAAA,CAACpC,MAAM;IACN2C,EAAE,EAAC,GAAG;IACNC,UAAU,EAAG,CAAG;IAChBC,QAAQ,EAAC,MAAM;IACfC,YAAY,EAAG;EAAG,GAEhBrC,EAAE,CACH,uEACD,CACO,CAAC,EACT2B,aAAA,CAACxC,SAAS,QACTwC,aAAA,CAAClB,sBAAsB;IACtBsB,IAAI,EAAC,MAAM;IACX,cAAa/B,EAAE,CAAE,gBAAiB;EAAG,GAErC2B,aAAA,CAACtC,MAAM;IAAC2C,OAAO,EAAC;EAAe,GAC9BL,aAAA,CAACjC,QAAQ,QACNM,EAAE,CAAE,gBAAiB,CACd,CAAC,EACX2B,aAAA,CAACnB,oBAAoB;IACpByB,IAAI,EACHlC,KAAK,CAAC,CAAC,GAAGE,WAAW,GAAGC;EACxB,CACD,CACM,CACe,CACd,CACF,CACT,CAEE,CAAC;AAET;AAEA,eAAeY,UAAU"}
1
+ {"version":3,"names":["__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalSpacer","Spacer","__experimentalVStack","VStack","FlexItem","CardBody","Card","CardDivider","CardMedia","isRTL","__","chevronLeft","chevronRight","useSelect","store","coreStore","privateApis","blockEditorPrivateApis","IconWithCurrentColor","NavigationButtonAsItem","RootMenu","PreviewStyles","unlock","useGlobalStyle","ScreenRoot","customCSS","hasVariations","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","__experimentalGetCurrentThemeGlobalStylesVariations","globalStylesId","globalStyles","undefined","length","_links","createElement","size","className","spacing","path","justify","icon","as","paddingTop","paddingX","marginBottom","Fragment"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-root.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport PreviewStyles from './preview-styles';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ScreenRoot() {\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card size=\"small\" className=\"edit-site-global-styles-screen-root\">\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardMedia>\n\t\t\t\t\t\t\t<PreviewStyles />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/variations\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tpath=\"/blocks\"\n\t\t\t\t\t\taria-label={ __( 'Blocks styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/css\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</CardBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Card>\n\t);\n}\n\nexport default ScreenRoot;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,uBAAuB,IAAIC,SAAS,EACpCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,QAAQ,EACRC,QAAQ,EACRC,IAAI,EACJC,WAAW,EACXC,SAAS,QACH,uBAAuB;AAC9B,SAASC,KAAK,EAAEC,EAAE,QAAQ,iBAAiB;AAC3C,SAASC,WAAW,EAAEC,YAAY,QAAQ,kBAAkB;AAC5D,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,qBAAqB;AAC5D,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAAe,CAAC,GAAGD,MAAM,CAAEL,sBAAuB,CAAC;AAE3D,SAASO,UAAUA,CAAA,EAAG;EACrB,MAAM,CAAEC,SAAS,CAAE,GAAGF,cA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AGC;EACxB,CACD,CACM,CACe,CACd,CACF,CACT,CAEE,CAAC;AAET;AAEA,eAAeY,UAAU","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Card","CardBody","__","useZoomOut","ScreenHeader","StyleVariationsContainer","ScreenStyleVariations","createElement","Fragment","title","description","size","isBorderless","className"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-style-variations.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Card, CardBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useZoomOut } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport StyleVariationsContainer from './style-variations-container';\n\nfunction ScreenStyleVariations() {\n\t// Move to zoom out mode when this component is mounted\n\t// and back to the previous mode when unmounted.\n\tuseZoomOut();\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Browse styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a variation to change the look of the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<Card\n\t\t\t\tsize=\"small\"\n\t\t\t\tisBorderless\n\t\t\t\tclassName=\"edit-site-global-styles-screen-style-variations\"\n\t\t\t>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<StyleVariationsContainer />\n\t\t\t\t</CardBody>\n\t\t\t</Card>\n\t\t</>\n\t);\n}\n\nexport default ScreenStyleVariations;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,QAAQ,QAAQ,uBAAuB;AACtD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,yBAAyB;;AAEpD;AACA;AACA;AACA,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,wBAAwB,MAAM,8BAA8B;AAEnE,SAASC,qBAAqBA,CAAA,EAAG;EAChC;EACA;EACAH,UAAU,CAAC,CAAC;EAEZ,OACCI,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACH,YAAY;IACZK,KAAK,EAAGP,EAAE,CAAE,eAAgB,CAAG;IAC/BQ,WAAW,EAAGR,EAAE,CACf,oDACD;EAAG,CACH,CAAC,EAEFK,aAAA,CAACP,IAAI;IACJW,IAAI,EAAC,OAAO;IACZC,YAAY;IACZC,SAAS,EAAC;EAAiD,GAE3DN,aAAA,CAACN,QAAQ,QACRM,aAAA,CAACF,wBAAwB,MAAE,CAClB,CACL,CACL,CAAC;AAEL;AAEA,eAAeC,qBAAqB"}
1
+ {"version":3,"names":["Card","CardBody","__","useZoomOut","ScreenHeader","StyleVariationsContainer","ScreenStyleVariations","createElement","Fragment","title","description","size","isBorderless","className"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-style-variations.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Card, CardBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useZoomOut } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport StyleVariationsContainer from './style-variations-container';\n\nfunction ScreenStyleVariations() {\n\t// Move to zoom out mode when this component is mounted\n\t// and back to the previous mode when unmounted.\n\tuseZoomOut();\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Browse styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a variation to change the look of the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<Card\n\t\t\t\tsize=\"small\"\n\t\t\t\tisBorderless\n\t\t\t\tclassName=\"edit-site-global-styles-screen-style-variations\"\n\t\t\t>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<StyleVariationsContainer />\n\t\t\t\t</CardBody>\n\t\t\t</Card>\n\t\t</>\n\t);\n}\n\nexport default ScreenStyleVariations;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,QAAQ,QAAQ,uBAAuB;AACtD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,yBAAyB;;AAEpD;AACA;AACA;AACA,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,wBAAwB,MAAM,8BAA8B;AAEnE,SAASC,qBAAqBA,CAAA,EAAG;EAChC;EACA;EACAH,UAAU,CAAC,CAAC;EAEZ,OACCI,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACH,YAAY;IACZK,KAAK,EAAGP,EAAE,CAAE,eAAgB,CAAG;IAC/BQ,WAAW,EAAGR,EAAE,CACf,oDACD;EAAG,CACH,CAAC,EAEFK,aAAA,CAACP,IAAI;IACJW,IAAI,EAAC,OAAO;IACZC,YAAY;IACZC,SAAS,EAAC;EAAiD,GAE3DN,aAAA,CAACN,QAAQ,QACRM,aAAA,CAACF,wBAAwB,MAAE,CAClB,CACL,CACL,CAAC;AAEL;AAEA,eAAeC,qBAAqB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","_x","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","__experimentalSpacer","Spacer","useState","TypographyPanel","ScreenHeader","TypographyPreview","elements","text","description","title","link","heading","caption","button","ScreenTypographyElement","element","headingLevel","setHeadingLevel","createElement","Fragment","marginX","marginBottom","label","hideLabelFromVision","value","onChange","isBlock","size","__nextHasNoMarginBottom"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography-element.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport TypographyPanel from './typography-panel';\nimport ScreenHeader from './header';\nimport TypographyPreview from './typography-preview';\n\nconst elements = {\n\ttext: {\n\t\tdescription: __( 'Manage the fonts used on the site.' ),\n\t\ttitle: __( 'Text' ),\n\t},\n\tlink: {\n\t\tdescription: __( 'Manage the fonts and typography used on the links.' ),\n\t\ttitle: __( 'Links' ),\n\t},\n\theading: {\n\t\tdescription: __( 'Manage the fonts and typography used on headings.' ),\n\t\ttitle: __( 'Headings' ),\n\t},\n\tcaption: {\n\t\tdescription: __( 'Manage the fonts and typography used on captions.' ),\n\t\ttitle: __( 'Captions' ),\n\t},\n\tbutton: {\n\t\tdescription: __( 'Manage the fonts and typography used on buttons.' ),\n\t\ttitle: __( 'Buttons' ),\n\t},\n};\n\nfunction ScreenTypographyElement( { element } ) {\n\tconst [ headingLevel, setHeadingLevel ] = useState( 'heading' );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ elements[ element ].title }\n\t\t\t\tdescription={ elements[ element ].description }\n\t\t\t/>\n\t\t\t<Spacer marginX={ 4 }>\n\t\t\t\t<TypographyPreview\n\t\t\t\t\telement={ element }\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t\t{ element === 'heading' && (\n\t\t\t\t<Spacer marginX={ 4 } marginBottom=\"1em\">\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\tlabel={ __( 'Select heading level' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ headingLevel }\n\t\t\t\t\t\tonChange={ setHeadingLevel }\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"heading\"\n\t\t\t\t\t\t\tlabel={ _x( 'All', 'heading levels' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h1\"\n\t\t\t\t\t\t\tlabel={ __( 'H1' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h2\"\n\t\t\t\t\t\t\tlabel={ __( 'H2' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h3\"\n\t\t\t\t\t\t\tlabel={ __( 'H3' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h4\"\n\t\t\t\t\t\t\tlabel={ __( 'H4' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h5\"\n\t\t\t\t\t\t\tlabel={ __( 'H5' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h6\"\n\t\t\t\t\t\t\tlabel={ __( 'H6' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t</Spacer>\n\t\t\t) }\n\t\t\t<TypographyPanel\n\t\t\t\telement={ element }\n\t\t\t\theadingLevel={ headingLevel }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypographyElement;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,gCAAgC,IAAIC,kBAAkB,EACtDC,sCAAsC,IAAIC,wBAAwB,EAClEC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,iBAAiB,MAAM,sBAAsB;AAEpD,MAAMC,QAAQ,GAAG;EAChBC,IAAI,EAAE;IACLC,WAAW,EAAEd,EAAE,CAAE,oCAAqC,CAAC;IACvDe,KAAK,EAAEf,EAAE,CAAE,MAAO;EACnB,CAAC;EACDgB,IAAI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AA,GAEvBV,aAAA,CAACnB,wBAAwB;IACxByB,KAAK,EAAC,SAAS;IACfF,KAAK,EAAG3B,EAAE,CAAE,KAAK,EAAE,gBAAiB;EAAG,CACvC,CAAC,EACFuB,aAAA,CAACnB,wBAAwB;IACxByB,KAAK,EAAC,IAAI;IACVF,KAAK,EAAG5B,EAAE,CAAE,IAAK;EAAG,CACpB,CAAC,EACFwB,aAAA,CAACnB,wBAAwB;IACxByB,KAAK,EAAC,IAAI;IACVF,KAAK,EAAG5B,EAAE,CAAE,IAAK;EAAG,CACpB,CAAC,EACFwB,aAAA,CAACnB,wBAAwB;IACxByB,KAAK,EAAC,IAAI;IACVF,KAAK,EAAG5B,EAAE,CAAE,IAAK;EAAG,CACpB,CAAC,EACFwB,aAAA,CAACnB,wBAAwB;IACxByB,KAAK,EAAC,IAAI;IACVF,KAAK,EAAG5B,EAAE,CAAE,IAAK;EAAG,CACpB,CAAC,EACFwB,aAAA,CAACnB,wBAAwB;IACxByB,KAAK,EAAC,IAAI;IACVF,KAAK,EAAG5B,EAAE,CAAE,IAAK;EAAG,CACpB,CAAC,EACFwB,aAAA,CAACnB,wBAAwB;IACxByB,KAAK,EAAC,IAAI;IACVF,KAAK,EAAG5B,EAAE,CAAE,IAAK;EAAG,CACpB,CACkB,CACb,CACR,EACDwB,aAAA,CAACf,eAAe;IACfY,OAAO,EAAGA,OAAS;IACnBC,YAAY,EAAGA;EAAc,CAC7B,CACA,CAAC;AAEL;AAEA,eAAeF,uBAAuB"}
1
+ {"version":3,"names":["__","_x","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","__experimentalSpacer","Spacer","useState","TypographyPanel","ScreenHeader","TypographyPreview","elements","text","description","title","link","heading","caption","button","ScreenTypographyElement","element","headingLevel","setHeadingLevel","createElement","Fragment","marginX","marginBottom","label","hideLabelFromVision","value","onChange","isBlock","size","__nextHasNoMarginBottom"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography-element.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport TypographyPanel from './typography-panel';\nimport ScreenHeader from './header';\nimport TypographyPreview from './typography-preview';\n\nconst elements = {\n\ttext: {\n\t\tdescription: __( 'Manage the fonts used on the site.' ),\n\t\ttitle: __( 'Text' ),\n\t},\n\tlink: {\n\t\tdescription: __( 'Manage the fonts and typography used on the links.' ),\n\t\ttitle: __( 'Links' ),\n\t},\n\theading: {\n\t\tdescription: __( 'Manage the fonts and typography used on headings.' ),\n\t\ttitle: __( 'Headings' ),\n\t},\n\tcaption: {\n\t\tdescription: __( 'Manage the fonts and typography used on captions.' ),\n\t\ttitle: __( 'Captions' ),\n\t},\n\tbutton: {\n\t\tdescription: __( 'Manage the fonts and typography used on buttons.' ),\n\t\ttitle: __( 'Buttons' ),\n\t},\n};\n\nfunction ScreenTypographyElement( { element } ) {\n\tconst [ headingLevel, setHeadingLevel ] = useState( 'heading' );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ elements[ element ].title }\n\t\t\t\tdescription={ elements[ element ].description }\n\t\t\t/>\n\t\t\t<Spacer marginX={ 4 }>\n\t\t\t\t<TypographyPreview\n\t\t\t\t\telement={ element }\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t\t{ element === 'heading' && (\n\t\t\t\t<Spacer marginX={ 4 } marginBottom=\"1em\">\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\tlabel={ __( 'Select heading level' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ headingLevel }\n\t\t\t\t\t\tonChange={ setHeadingLevel }\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"heading\"\n\t\t\t\t\t\t\tlabel={ _x( 'All', 'heading levels' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h1\"\n\t\t\t\t\t\t\tlabel={ __( 'H1' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h2\"\n\t\t\t\t\t\t\tlabel={ __( 'H2' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h3\"\n\t\t\t\t\t\t\tlabel={ __( 'H3' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h4\"\n\t\t\t\t\t\t\tlabel={ __( 'H4' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h5\"\n\t\t\t\t\t\t\tlabel={ __( 'H5' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h6\"\n\t\t\t\t\t\t\tlabel={ __( 'H6' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t</Spacer>\n\t\t\t) }\n\t\t\t<TypographyPanel\n\t\t\t\telement={ element }\n\t\t\t\theadingLevel={ headingLevel }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypographyElement;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,gCAAgC,IAAIC,kBAAkB,EACtDC,sCAA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,YAAY,EAAGA;EAAc,CAC7B,CACA,CAAC;AAEL;AAEA,eAAeF,uBAAuB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","__experimentalVStack","VStack","store","editorStore","useSelect","TypographyElements","TypographyVariations","FontFamilies","ScreenHeader","ScreenTypography","fontLibraryEnabled","select","getEditorSettings","createElement","Fragment","title","description","className","spacing","window","__experimentalDisableFontLibrary"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport TypographyElements from './typography-elements';\nimport TypographyVariations from './variations/variations-typography';\nimport FontFamilies from './font-families';\nimport ScreenHeader from './header';\n\nfunction ScreenTypography() {\n\tconst fontLibraryEnabled = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().fontLibraryEnabled,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Typography styles and the application of those styles on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t<TypographyVariations title={ __( 'Presets' ) } />\n\t\t\t\t\t{ ! window.__experimentalDisableFontLibrary &&\n\t\t\t\t\t\tfontLibraryEnabled && <FontFamilies /> }\n\t\t\t\t\t<TypographyElements />\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,uBAAuB;AACtD,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,YAAY,MAAM,UAAU;AAEnC,SAASC,gBAAgBA,CAAA,EAAG;EAC3B,MAAMC,kBAAkB,GAAGN,SAAS,CACjCO,MAAM,IACPA,MAAM,CAAER,WAAY,CAAC,CAACS,iBAAiB,CAAC,CAAC,CAACF,kBAAkB,EAC7D,EACD,CAAC;EAED,OACCG,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACL,YAAY;IACZO,KAAK,EAAGhB,EAAE,CAAE,YAAa,CAAG;IAC5BiB,WAAW,EAAGjB,EAAE,CACf,yEACD;EAAG,CACH,CAAC,EACFc,aAAA;IAAKI,SAAS,EAAC;EAAgC,GAC9CJ,aAAA,CAACZ,MAAM;IAACiB,OAAO,EAAG;EAAG,GACpBL,aAAA,CAACP,oBAAoB;IAACS,KAAK,EAAGhB,EAAE,CAAE,SAAU;EAAG,CAAE,CAAC,EAChD,CAAEoB,MAAM,CAACC,gCAAgC,IAC1CV,kBAAkB,IAAIG,aAAA,CAACN,YAAY,MAAE,CAAC,EACvCM,aAAA,CAACR,kBAAkB,MAAE,CACd,CACJ,CACJ,CAAC;AAEL;AAEA,eAAeI,gBAAgB"}
1
+ {"version":3,"names":["__","__experimentalVStack","VStack","store","editorStore","useSelect","TypographyElements","TypographyVariations","FontFamilies","ScreenHeader","ScreenTypography","fontLibraryEnabled","select","getEditorSettings","createElement","Fragment","title","description","className","spacing","window","__experimentalDisableFontLibrary"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport TypographyElements from './typography-elements';\nimport TypographyVariations from './variations/variations-typography';\nimport FontFamilies from './font-families';\nimport ScreenHeader from './header';\n\nfunction ScreenTypography() {\n\tconst fontLibraryEnabled = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().fontLibraryEnabled,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Typography styles and the application of those styles on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t<TypographyVariations title={ __( 'Presets' ) } />\n\t\t\t\t\t{ ! window.__experimentalDisableFontLibrary &&\n\t\t\t\t\t\tfontLibraryEnabled && <FontFamilies /> }\n\t\t\t\t\t<TypographyElements />\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,uBAAuB;AACtD,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,YAAY,MAAM,UAAU;AAEnC,SAASC,gBAAgBA,CAAA,EAAG;EAC3B,MAAMC,kBAAkB,GAAGN,SAAS,CACjCO,MAAM,IACPA,MAAM,CAAER,WAAY,CAAC,CAACS,iBAAiB,CAAC,CAAC,CAACF,kBAAkB,EAC7D,EACD,CAAC;EAED,OACCG,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACL,YAAY;IACZO,KAAK,EAAGhB,EAAE,CAAE,YAAa,CAAG;IAC5BiB,WAAW,EAAGjB,EAAE,CACf,yEACD;EAAG,CACH,CAAC,EACFc,aAAA;IAAKI,SAAS,EAAC;EAAgC,GAC9CJ,aAAA,CAACZ,MAAM;IAACiB,OAAO,EAAG;EAAG,GACpBL,aAAA,CAACP,oBAAoB;IAACS,KAAK,EAAGhB,EAAE,CAAE,SAAU;EAAG,CAAE,CAAC,EAChD,CAAEoB,MAAM,CAACC,gCAAgC,IAC1CV,kBAAkB,IAAIG,aAAA,CAACN,YAAY,MAAE,CAAC,EACvCM,aAAA,CAACR,kBAAkB,MAAE,CACd,CACJ,CACJ,CAAC;AAEL;AAEA,eAAeI,gBAAgB","ignoreList":[]}
@@ -13,18 +13,24 @@ import { __ } from '@wordpress/i18n';
13
13
  */
14
14
  import PreviewStyles from './preview-styles';
15
15
  import Variation from './variations/variation';
16
+ import { isVariationWithSingleProperty } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
16
17
  export default function StyleVariationsContainer({
17
18
  gap = 2
18
19
  }) {
19
20
  const variations = useSelect(select => {
20
21
  return select(coreStore).__experimentalGetCurrentThemeGlobalStylesVariations();
21
22
  }, []);
23
+
24
+ // Filter out variations that are of single property type, i.e. color or typography variations.
25
+ const multiplePropertyVariations = variations?.filter(variation => {
26
+ return !isVariationWithSingleProperty(variation, 'color') && !isVariationWithSingleProperty(variation, 'typography');
27
+ });
22
28
  const withEmptyVariation = useMemo(() => {
23
29
  return [{
24
30
  title: __('Default'),
25
31
  settings: {},
26
32
  styles: {}
27
- }, ...(variations !== null && variations !== void 0 ? variations : []).map(variation => {
33
+ }, ...(multiplePropertyVariations !== null && multiplePropertyVariations !== void 0 ? multiplePropertyVariations : []).map(variation => {
28
34
  var _variation$settings, _variation$styles;
29
35
  return {
30
36
  ...variation,
@@ -32,7 +38,7 @@ export default function StyleVariationsContainer({
32
38
  styles: (_variation$styles = variation.styles) !== null && _variation$styles !== void 0 ? _variation$styles : {}
33
39
  };
34
40
  })];
35
- }, [variations]);
41
+ }, [multiplePropertyVariations]);
36
42
  return createElement(Grid, {
37
43
  columns: 2,
38
44
  className: "edit-site-global-styles-style-variations-container",
@@ -1 +1 @@
1
- {"version":3,"names":["store","coreStore","useSelect","useMemo","__experimentalGrid","Grid","__","PreviewStyles","Variation","StyleVariationsContainer","gap","variations","select","__experimentalGetCurrentThemeGlobalStylesVariations","withEmptyVariation","title","settings","styles","map","variation","_variation$settings","_variation$styles","createElement","columns","className","index","key","isFocused","label","withHoverView"],"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PreviewStyles from './preview-styles';\nimport Variation from './variations/variation';\n\nexport default function StyleVariationsContainer( { gap = 2 } ) {\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\tconst withEmptyVariation = useMemo( () => {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( variations ?? [] ).map( ( variation ) => ( {\n\t\t\t\t...variation,\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t} ) ),\n\t\t];\n\t}, [ variations ] );\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\tgap={ gap }\n\t\t>\n\t\t\t{ withEmptyVariation.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t<PreviewStyles\n\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\twithHoverView\n\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Variation>\n\t\t\t) ) }\n\t\t</Grid>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;AAClE,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,SAAS,MAAM,wBAAwB;AAE9C,eAAe,SAASC,wBAAwBA,CAAE;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAC/D,MAAMC,UAAU,GAAGT,SAAS,CAAIU,MAAM,IAAM;IAC3C,OAAOA,MAAM,CACZX,SACD,CAAC,CAACY,mDAAmD,CAAC,CAAC;EACxD,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,kBAAkB,GAAGX,OAAO,CAAE,MAAM;IACzC,OAAO,CACN;MACCY,KAAK,EAAET,EAAE,CAAE,SAAU,CAAC;MACtBU,QAAQ,EAAE,CAAC,CAAC;MACZC,MAAM,EAAE,CAAC;IACV,CAAC,EACD,GAAG,CAAEN,UAAU,aAAVA,UAAU,cAAVA,UAAU,GAAI,EAAE,EAAGO,GAAG,CAAIC,SAAS;MAAA,IAAAC,mBAAA,EAAAC,iBAAA;MAAA,OAAQ;QAC/C,GAAGF,SAAS;QACZH,QAAQ,GAAAI,mBAAA,GAAED,SAAS,CAACH,QAAQ,cAAAI,mBAAA,cAAAA,mBAAA,GAAI,CAAC,CAAC;QAClCH,MAAM,GAAAI,iBAAA,GAAEF,SAAS,CAACF,MAAM,cAAAI,iBAAA,cAAAA,iBAAA,GAAI,CAAC;MAC9B,CAAC;IAAA,CAAG,CAAC,CACL;EACF,CAAC,EAAE,CAAEV,UAAU,CAAG,CAAC;EAEnB,OACCW,aAAA,CAACjB,IAAI;IACJkB,OAAO,EAAG,CAAG;IACbC,SAAS,EAAC,oDAAoD;IAC9Dd,GAAG,EAAGA;EAAK,GAETI,kBAAkB,CAACI,GAAG,CAAE,CAAEC,SAAS,EAAEM,KAAK,KAC3CH,aAAA,CAACd,SAAS;IAACkB,GAAG,EAAGD,KAAO;IAACN,SAAS,EAAGA;EAAW,GAC3CQ,SAAS,IACZL,aAAA,CAACf,aAAa;IACbqB,KAAK,EAAGT,SAAS,EAAEJ,KAAO;IAC1Bc,aAAa;IACbF,SAAS,EAAGA,SAAW;IACvBR,SAAS,EAAGA;EAAW,CACvB,CAEQ,CACV,CACG,CAAC;AAET"}
1
+ {"version":3,"names":["store","coreStore","useSelect","useMemo","__experimentalGrid","Grid","__","PreviewStyles","Variation","isVariationWithSingleProperty","StyleVariationsContainer","gap","variations","select","__experimentalGetCurrentThemeGlobalStylesVariations","multiplePropertyVariations","filter","variation","withEmptyVariation","title","settings","styles","map","_variation$settings","_variation$styles","createElement","columns","className","index","key","isFocused","label","withHoverView"],"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PreviewStyles from './preview-styles';\nimport Variation from './variations/variation';\nimport { isVariationWithSingleProperty } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\n\nexport default function StyleVariationsContainer( { gap = 2 } ) {\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\t// Filter out variations that are of single property type, i.e. color or typography variations.\n\tconst multiplePropertyVariations = variations?.filter( ( variation ) => {\n\t\treturn (\n\t\t\t! isVariationWithSingleProperty( variation, 'color' ) &&\n\t\t\t! isVariationWithSingleProperty( variation, 'typography' )\n\t\t);\n\t} );\n\n\tconst withEmptyVariation = useMemo( () => {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( multiplePropertyVariations ?? [] ).map( ( variation ) => ( {\n\t\t\t\t...variation,\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t} ) ),\n\t\t];\n\t}, [ multiplePropertyVariations ] );\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\tgap={ gap }\n\t\t>\n\t\t\t{ withEmptyVariation.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t<PreviewStyles\n\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\twithHoverView\n\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Variation>\n\t\t\t) ) }\n\t\t</Grid>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;AAClE,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,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hB,GAAG,EAAGA;EAAK,GAETO,kBAAkB,CAACI,GAAG,CAAE,CAAEL,SAAS,EAAEW,KAAK,KAC3CH,aAAA,CAACjB,SAAS;IAACqB,GAAG,EAAGD,KAAO;IAACX,SAAS,EAAGA;EAAW,GAC3Ca,SAAS,IACZL,aAAA,CAAClB,aAAa;IACbwB,KAAK,EAAGd,SAAS,EAAEE,KAAO;IAC1Ba,aAAa;IACbF,SAAS,EAAGA,SAAW;IACvBb,SAAS,EAAGA;EAAW,CACvB,CAEQ,CACV,CACG,CAAC;AAET","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalHeading","Heading","Subtitle","children","level","createElement","className"],"sources":["@wordpress/edit-site/src/components/global-styles/subtitle.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n\nfunction Subtitle( { children, level } ) {\n\treturn (\n\t\t<Heading\n\t\t\tclassName=\"edit-site-global-styles-subtitle\"\n\t\t\tlevel={ level ?? 2 }\n\t\t>\n\t\t\t{ children }\n\t\t</Heading>\n\t);\n}\n\nexport default Subtitle;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,qBAAqB,IAAIC,OAAO,QAAQ,uBAAuB;AAExE,SAASC,QAAQA,CAAE;EAAEC,QAAQ;EAAEC;AAAM,CAAC,EAAG;EACxC,OACCC,aAAA,CAACJ,OAAO;IACPK,SAAS,EAAC,kCAAkC;IAC5CF,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI;EAAG,GAElBD,QACM,CAAC;AAEZ;AAEA,eAAeD,QAAQ"}
1
+ {"version":3,"names":["__experimentalHeading","Heading","Subtitle","children","level","createElement","className"],"sources":["@wordpress/edit-site/src/components/global-styles/subtitle.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n\nfunction Subtitle( { children, level } ) {\n\treturn (\n\t\t<Heading\n\t\t\tclassName=\"edit-site-global-styles-subtitle\"\n\t\t\tlevel={ level ?? 2 }\n\t\t>\n\t\t\t{ children }\n\t\t</Heading>\n\t);\n}\n\nexport default Subtitle;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,qBAAqB,IAAIC,OAAO,QAAQ,uBAAuB;AAExE,SAASC,QAAQA,CAAE;EAAEC,QAAQ;EAAEC;AAAM,CAAC,EAAG;EACxC,OACCC,aAAA,CAACJ,OAAO;IACPK,SAAS,EAAC,kCAAkC;IAC5CF,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI;EAAG,GAElBD,QACM,CAAC;AAEZ;AAEA,eAAeD,QAAQ","ignoreList":[]}