@wordpress/edit-site 5.27.1 → 5.28.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 (362) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/actions/index.js +3 -6
  3. package/build/components/actions/index.js.map +1 -1
  4. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +1 -2
  5. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-template-modal-content.js +1 -2
  7. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  8. package/build/components/block-editor/editor-canvas.js +1 -2
  9. package/build/components/block-editor/editor-canvas.js.map +1 -1
  10. package/build/components/block-editor/inserter-media-categories.js +1 -2
  11. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  12. package/build/components/block-editor/resizable-editor.js +1 -2
  13. package/build/components/block-editor/resizable-editor.js.map +1 -1
  14. package/build/components/block-editor/site-editor-canvas.js +12 -5
  15. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  16. package/build/components/block-editor/use-navigate-to-entity-record.js +32 -0
  17. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -0
  18. package/build/components/block-editor/use-site-editor-settings.js +30 -4
  19. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  20. package/build/components/editor/index.js +13 -10
  21. package/build/components/editor/index.js.map +1 -1
  22. package/build/components/editor-canvas-container/index.js +1 -2
  23. package/build/components/editor-canvas-container/index.js.map +1 -1
  24. package/build/components/global-styles/block-preview-panel.js +1 -2
  25. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  26. package/build/components/global-styles/color-indicator-wrapper.js +1 -2
  27. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  28. package/build/components/global-styles/font-families.js +9 -5
  29. package/build/components/global-styles/font-families.js.map +1 -1
  30. package/build/components/global-styles/font-family-item.js +1 -2
  31. package/build/components/global-styles/font-family-item.js.map +1 -1
  32. package/build/components/global-styles/font-library-modal/collection-font-details.js +1 -2
  33. package/build/components/global-styles/font-library-modal/collection-font-details.js.map +1 -1
  34. package/build/components/global-styles/font-library-modal/collection-font-variant.js +13 -13
  35. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  36. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js +1 -2
  37. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +1 -1
  38. package/build/components/global-styles/font-library-modal/context.js +16 -4
  39. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  40. package/build/components/global-styles/font-library-modal/font-card.js +3 -3
  41. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  42. package/build/components/global-styles/font-library-modal/font-collection.js +26 -40
  43. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  44. package/build/components/global-styles/font-library-modal/font-demo.js +6 -12
  45. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  46. package/build/components/global-styles/font-library-modal/fonts-grid.js +1 -2
  47. package/build/components/global-styles/font-library-modal/fonts-grid.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +3 -4
  49. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/index.js +11 -5
  51. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/installed-fonts.js +14 -26
  53. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/library-font-card.js +2 -3
  55. package/build/components/global-styles/font-library-modal/library-font-card.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/library-font-details.js +1 -2
  57. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/library-font-variant.js +15 -15
  59. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/resolvers.js +1 -1
  61. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/tab-panel-layout.js +13 -4
  63. package/build/components/global-styles/font-library-modal/tab-panel-layout.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/upload-fonts.js +157 -6
  65. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/utils/constants.js +3 -6
  67. package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  68. package/build/components/global-styles/font-library-modal/utils/index.js +37 -32
  69. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  70. package/build/components/global-styles/header.js +1 -2
  71. package/build/components/global-styles/header.js.map +1 -1
  72. package/build/components/global-styles/palette.js +1 -2
  73. package/build/components/global-styles/palette.js.map +1 -1
  74. package/build/components/global-styles/preview.js +1 -2
  75. package/build/components/global-styles/preview.js.map +1 -1
  76. package/build/components/global-styles/root-menu.js +1 -2
  77. package/build/components/global-styles/root-menu.js.map +1 -1
  78. package/build/components/global-styles/screen-block-list.js +1 -2
  79. package/build/components/global-styles/screen-block-list.js.map +1 -1
  80. package/build/components/global-styles/screen-block.js +1 -11
  81. package/build/components/global-styles/screen-block.js.map +1 -1
  82. package/build/components/global-styles/screen-color-palette.js +1 -2
  83. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  84. package/build/components/global-styles/screen-colors.js +1 -2
  85. package/build/components/global-styles/screen-colors.js.map +1 -1
  86. package/build/components/global-styles/screen-css.js +1 -2
  87. package/build/components/global-styles/screen-css.js.map +1 -1
  88. package/build/components/global-styles/screen-layout.js +1 -2
  89. package/build/components/global-styles/screen-layout.js.map +1 -1
  90. package/build/components/global-styles/screen-revisions/index.js +1 -2
  91. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  92. package/build/components/global-styles/screen-revisions/revisions-buttons.js +2 -3
  93. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  94. package/build/components/global-styles/screen-root.js +1 -2
  95. package/build/components/global-styles/screen-root.js.map +1 -1
  96. package/build/components/global-styles/screen-style-variations.js +1 -2
  97. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  98. package/build/components/global-styles/screen-typography-element.js +3 -6
  99. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  100. package/build/components/global-styles/screen-typography.js +1 -2
  101. package/build/components/global-styles/screen-typography.js.map +1 -1
  102. package/build/components/global-styles/subtitle.js +1 -2
  103. package/build/components/global-styles/subtitle.js.map +1 -1
  104. package/build/components/global-styles/typogrphy-elements.js +1 -2
  105. package/build/components/global-styles/typogrphy-elements.js.map +1 -1
  106. package/build/components/global-styles/ui.js +3 -4
  107. package/build/components/global-styles/ui.js.map +1 -1
  108. package/build/components/header-edit-mode/mode-switcher/index.js +1 -2
  109. package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
  110. package/build/components/header-edit-mode/more-menu/index.js +12 -21
  111. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  112. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +1 -2
  113. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  114. package/build/components/header-edit-mode/tools-more-menu-group/index.js +1 -2
  115. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  116. package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
  117. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  118. package/build/components/keyboard-shortcut-help-modal/index.js +1 -3
  119. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  120. package/build/components/keyboard-shortcuts/edit-mode.js +1 -2
  121. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  122. package/build/components/keyboard-shortcuts/global.js +1 -2
  123. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  124. package/build/components/keyboard-shortcuts/register.js +1 -2
  125. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  126. package/build/components/layout/index.js +0 -2
  127. package/build/components/layout/index.js.map +1 -1
  128. package/build/components/media/index.js +1 -2
  129. package/build/components/media/index.js.map +1 -1
  130. package/build/components/page-pages/index.js +27 -15
  131. package/build/components/page-pages/index.js.map +1 -1
  132. package/build/components/page-patterns/dataviews-pattern-actions.js +87 -32
  133. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  134. package/build/components/page-patterns/grid-item.js +2 -6
  135. package/build/components/page-patterns/grid-item.js.map +1 -1
  136. package/build/components/page-patterns/index.js +2 -1
  137. package/build/components/page-patterns/index.js.map +1 -1
  138. package/build/components/page-patterns/search-items.js +0 -1
  139. package/build/components/page-patterns/search-items.js.map +1 -1
  140. package/build/components/page-patterns/use-patterns.js +1 -2
  141. package/build/components/page-patterns/use-patterns.js.map +1 -1
  142. package/build/components/page-templates-template-parts/actions.js +2 -4
  143. package/build/components/page-templates-template-parts/actions.js.map +1 -1
  144. package/build/components/page-templates-template-parts/index.js +8 -5
  145. package/build/components/page-templates-template-parts/index.js.map +1 -1
  146. package/build/components/pattern-modal/index.js +1 -2
  147. package/build/components/pattern-modal/index.js.map +1 -1
  148. package/build/components/plugin-template-setting-panel/index.js +1 -2
  149. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  150. package/build/components/preferences-modal/index.js +1 -2
  151. package/build/components/preferences-modal/index.js.map +1 -1
  152. package/build/components/resizable-frame/index.js +1 -2
  153. package/build/components/resizable-frame/index.js.map +1 -1
  154. package/build/components/revisions/index.js +1 -2
  155. package/build/components/revisions/index.js.map +1 -1
  156. package/build/components/routes/link.js +3 -7
  157. package/build/components/routes/link.js.map +1 -1
  158. package/build/components/sidebar/index.js +3 -4
  159. package/build/components/sidebar/index.js.map +1 -1
  160. package/build/components/sidebar-dataviews/default-views.js +4 -6
  161. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  162. package/build/components/sidebar-edit-mode/constants.js +2 -4
  163. package/build/components/sidebar-edit-mode/constants.js.map +1 -1
  164. package/build/components/sidebar-edit-mode/index.js +97 -19
  165. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  166. package/build/components/sidebar-edit-mode/settings-header/index.js +22 -73
  167. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  168. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +1 -2
  169. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  170. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +1 -2
  171. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  172. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  173. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  174. package/build/components/site-hub/index.js +1 -2
  175. package/build/components/site-hub/index.js.map +1 -1
  176. package/build/components/site-icon/index.js +3 -4
  177. package/build/components/site-icon/index.js.map +1 -1
  178. package/build/components/style-book/index.js +1 -2
  179. package/build/components/style-book/index.js.map +1 -1
  180. package/build/components/template-part-converter/convert-to-template-part.js +0 -1
  181. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  182. package/build/components/welcome-guide/template.js +2 -2
  183. package/build/components/welcome-guide/template.js.map +1 -1
  184. package/build/hooks/commands/use-edit-mode-commands.js +16 -6
  185. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  186. package/build/hooks/navigation-menu-edit.js +1 -2
  187. package/build/hooks/navigation-menu-edit.js.map +1 -1
  188. package/build/hooks/template-part-edit.js +1 -2
  189. package/build/hooks/template-part-edit.js.map +1 -1
  190. package/build/store/actions.js +7 -2
  191. package/build/store/actions.js.map +1 -1
  192. package/build/store/constants.js +1 -2
  193. package/build/store/constants.js.map +1 -1
  194. package/build/store/index.js +4 -6
  195. package/build/store/index.js.map +1 -1
  196. package/build/store/reducer.js +1 -2
  197. package/build/store/reducer.js.map +1 -1
  198. package/build/store/selectors.js +9 -18
  199. package/build/store/selectors.js.map +1 -1
  200. package/build/store/utils.js +1 -2
  201. package/build/store/utils.js.map +1 -1
  202. package/build/utils/constants.js +13 -26
  203. package/build/utils/constants.js.map +1 -1
  204. package/build-module/components/block-editor/site-editor-canvas.js +13 -6
  205. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  206. package/build-module/components/block-editor/use-navigate-to-entity-record.js +25 -0
  207. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -0
  208. package/build-module/components/block-editor/use-site-editor-settings.js +29 -4
  209. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  210. package/build-module/components/editor/index.js +13 -10
  211. package/build-module/components/editor/index.js.map +1 -1
  212. package/build-module/components/global-styles/font-families.js +8 -4
  213. package/build-module/components/global-styles/font-families.js.map +1 -1
  214. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +12 -11
  215. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  216. package/build-module/components/global-styles/font-library-modal/context.js +14 -0
  217. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  218. package/build-module/components/global-styles/font-library-modal/font-card.js +3 -2
  219. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  220. package/build-module/components/global-styles/font-library-modal/font-collection.js +28 -41
  221. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  222. package/build-module/components/global-styles/font-library-modal/font-demo.js +5 -10
  223. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  224. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +2 -2
  225. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  226. package/build-module/components/global-styles/font-library-modal/index.js +10 -3
  227. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  228. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +14 -25
  229. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  230. package/build-module/components/global-styles/font-library-modal/library-font-card.js +1 -1
  231. package/build-module/components/global-styles/font-library-modal/library-font-card.js.map +1 -1
  232. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +14 -13
  233. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  234. package/build-module/components/global-styles/font-library-modal/resolvers.js +1 -1
  235. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  236. package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js +13 -3
  237. package/build-module/components/global-styles/font-library-modal/tab-panel-layout.js.map +1 -1
  238. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +158 -6
  239. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  240. package/build-module/components/global-styles/font-library-modal/utils/index.js +36 -31
  241. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  242. package/build-module/components/global-styles/screen-block.js +0 -9
  243. package/build-module/components/global-styles/screen-block.js.map +1 -1
  244. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  245. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  246. package/build-module/components/global-styles/screen-typography-element.js +3 -5
  247. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  248. package/build-module/components/header-edit-mode/more-menu/index.js +12 -21
  249. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  250. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -1
  251. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  252. package/build-module/components/layout/index.js +0 -2
  253. package/build-module/components/layout/index.js.map +1 -1
  254. package/build-module/components/page-pages/index.js +25 -13
  255. package/build-module/components/page-pages/index.js.map +1 -1
  256. package/build-module/components/page-patterns/dataviews-pattern-actions.js +81 -20
  257. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  258. package/build-module/components/page-patterns/grid-item.js +1 -4
  259. package/build-module/components/page-patterns/grid-item.js.map +1 -1
  260. package/build-module/components/page-patterns/index.js +2 -1
  261. package/build-module/components/page-patterns/index.js.map +1 -1
  262. package/build-module/components/page-patterns/search-items.js +0 -1
  263. package/build-module/components/page-patterns/search-items.js.map +1 -1
  264. package/build-module/components/page-templates-template-parts/index.js +6 -3
  265. package/build-module/components/page-templates-template-parts/index.js.map +1 -1
  266. package/build-module/components/routes/link.js +3 -6
  267. package/build-module/components/routes/link.js.map +1 -1
  268. package/build-module/components/sidebar-dataviews/default-views.js +3 -3
  269. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  270. package/build-module/components/sidebar-edit-mode/index.js +98 -19
  271. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  272. package/build-module/components/sidebar-edit-mode/settings-header/index.js +24 -73
  273. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  274. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +2 -2
  275. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  276. package/build-module/components/site-icon/index.js +2 -2
  277. package/build-module/components/site-icon/index.js.map +1 -1
  278. package/build-module/components/template-part-converter/convert-to-template-part.js +0 -1
  279. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  280. package/build-module/components/welcome-guide/template.js +2 -2
  281. package/build-module/components/welcome-guide/template.js.map +1 -1
  282. package/build-module/hooks/commands/use-edit-mode-commands.js +16 -6
  283. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  284. package/build-module/store/actions.js +7 -2
  285. package/build-module/store/actions.js.map +1 -1
  286. package/build-style/style-rtl.css +398 -224
  287. package/build-style/style.css +398 -224
  288. package/package.json +42 -42
  289. package/src/components/add-new-template/style.scss +0 -12
  290. package/src/components/block-editor/site-editor-canvas.js +23 -15
  291. package/src/components/block-editor/style.scss +2 -20
  292. package/src/components/block-editor/use-navigate-to-entity-record.js +25 -0
  293. package/src/components/block-editor/use-site-editor-settings.js +35 -4
  294. package/src/components/editor/index.js +11 -10
  295. package/src/components/global-styles/font-families.js +13 -4
  296. package/src/components/global-styles/font-library-modal/collection-font-variant.js +10 -8
  297. package/src/components/global-styles/font-library-modal/context.js +14 -0
  298. package/src/components/global-styles/font-library-modal/font-card.js +10 -4
  299. package/src/components/global-styles/font-library-modal/font-collection.js +25 -47
  300. package/src/components/global-styles/font-library-modal/font-demo.js +9 -10
  301. package/src/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +2 -2
  302. package/src/components/global-styles/font-library-modal/index.js +8 -3
  303. package/src/components/global-styles/font-library-modal/installed-fonts.js +20 -34
  304. package/src/components/global-styles/font-library-modal/library-font-card.js +1 -1
  305. package/src/components/global-styles/font-library-modal/library-font-variant.js +12 -10
  306. package/src/components/global-styles/font-library-modal/resolvers.js +1 -1
  307. package/src/components/global-styles/font-library-modal/style.scss +13 -27
  308. package/src/components/global-styles/font-library-modal/tab-panel-layout.js +17 -0
  309. package/src/components/global-styles/font-library-modal/upload-fonts.js +192 -6
  310. package/src/components/global-styles/font-library-modal/utils/index.js +46 -39
  311. package/src/components/global-styles/screen-block.js +0 -12
  312. package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  313. package/src/components/global-styles/screen-revisions/style.scss +21 -15
  314. package/src/components/global-styles/screen-typography-element.js +2 -4
  315. package/src/components/global-styles/style.scss +4 -0
  316. package/src/components/header-edit-mode/more-menu/index.js +10 -18
  317. package/src/components/header-edit-mode/style.scss +54 -6
  318. package/src/components/layout/style.scss +2 -7
  319. package/src/components/page/style.scss +0 -1
  320. package/src/components/page-pages/index.js +32 -23
  321. package/src/components/page-pages/style.scss +28 -27
  322. package/src/components/page-patterns/dataviews-pattern-actions.js +106 -30
  323. package/src/components/page-patterns/grid-item.js +0 -2
  324. package/src/components/page-patterns/index.js +1 -0
  325. package/src/components/page-patterns/style.scss +4 -9
  326. package/src/components/page-templates-template-parts/index.js +23 -16
  327. package/src/components/page-templates-template-parts/style.scss +16 -0
  328. package/src/components/routes/link.js +3 -12
  329. package/src/components/sidebar-dataviews/default-views.js +3 -3
  330. package/src/components/sidebar-edit-mode/index.js +122 -29
  331. package/src/components/sidebar-edit-mode/settings-header/index.js +28 -88
  332. package/src/components/sidebar-edit-mode/settings-header/style.scss +0 -87
  333. package/src/components/sidebar-edit-mode/sidebar-card/style.scss +3 -0
  334. package/src/components/sidebar-edit-mode/style.scss +4 -0
  335. package/src/components/sidebar-navigation-screen/style.scss +2 -1
  336. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +9 -3
  337. package/src/components/site-hub/style.scss +0 -1
  338. package/src/components/site-icon/index.js +1 -1
  339. package/src/components/site-icon/style.scss +9 -1
  340. package/src/components/welcome-guide/template.js +2 -2
  341. package/src/hooks/commands/use-edit-mode-commands.js +26 -14
  342. package/src/store/actions.js +20 -3
  343. package/build/components/block-editor/back-button.js +0 -47
  344. package/build/components/block-editor/back-button.js.map +0 -1
  345. package/build/components/block-editor/use-post-link-props.js +0 -27
  346. package/build/components/block-editor/use-post-link-props.js.map +0 -1
  347. package/build/components/global-styles/font-library-modal/font-variant.js +0 -51
  348. package/build/components/global-styles/font-library-modal/font-variant.js.map +0 -1
  349. package/build/components/global-styles/font-library-modal/local-fonts.js +0 -196
  350. package/build/components/global-styles/font-library-modal/local-fonts.js.map +0 -1
  351. package/build-module/components/block-editor/back-button.js +0 -39
  352. package/build-module/components/block-editor/back-button.js.map +0 -1
  353. package/build-module/components/block-editor/use-post-link-props.js +0 -20
  354. package/build-module/components/block-editor/use-post-link-props.js.map +0 -1
  355. package/build-module/components/global-styles/font-library-modal/font-variant.js +0 -42
  356. package/build-module/components/global-styles/font-library-modal/font-variant.js.map +0 -1
  357. package/build-module/components/global-styles/font-library-modal/local-fonts.js +0 -187
  358. package/build-module/components/global-styles/font-library-modal/local-fonts.js.map +0 -1
  359. package/src/components/block-editor/back-button.js +0 -48
  360. package/src/components/block-editor/use-post-link-props.js +0 -20
  361. package/src/components/global-styles/font-library-modal/font-variant.js +0 -53
  362. package/src/components/global-styles/font-library-modal/local-fonts.js +0 -239
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_components","_compose","_element","_lockUnlock","_hooks","useGlobalStyle","useGlobalStylesOutput","unlock","blockEditorPrivateApis","firstFrame","start","scale","opacity","hover","midFrame","secondFrame","normalizedWidth","normalizedHeight","normalizedColorSwatchSize","THROTTLE_OPTIONS","leading","trailing","StylesPreview","label","isFocused","withHoverView","fontWeight","fontFamily","headingFontFamily","headingFontWeight","textColor","headingColor","backgroundColor","gradientValue","styles","disableMotion","useReducedMotion","isHovered","setIsHovered","useState","containerResizeListener","width","useResizeObserver","throttledWidth","setThrottledWidthState","ratioState","setRatioState","setThrottledWidth","useThrottle","useLayoutEffect","newRatio","ratioDiff","isRatioDiffBigEnough","Math","abs","fallbackRatio","ratio","paletteColors","highlightedColors","useStylesPreviewColors","editorStyles","useMemo","css","isGlobalStyles","isReady","_react","createElement","Fragment","style","position","__unstableIframe","className","height","onMouseEnter","onMouseLeave","tabIndex","__unstableEditorStyles","__unstableMotion","div","background","cursor","undefined","initial","animate","variants","overflow","__experimentalHStack","spacing","justify","fontSize","color","transition","delay","type","__experimentalVStack","map","slug","index","key","borderRadius","top","filter","slice","flexGrow","padding","boxSizing","lineHeight","textAlign","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/preview.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__unstableIframe as Iframe,\n\t__unstableEditorStyles as EditorStyles,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\t__unstableMotion as motion,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport {\n\tuseThrottle,\n\tuseReducedMotion,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { useLayoutEffect, useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useStylesPreviewColors } from './hooks';\n\nconst { useGlobalStyle, useGlobalStylesOutput } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst firstFrame = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst midFrame = {\n\thover: {\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\topacity: 0.5,\n\t},\n};\n\nconst secondFrame = {\n\thover: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\n\nconst normalizedColorSwatchSize = 32;\n\n// Throttle options for useThrottle. Must be defined outside of the component,\n// so that the object reference is the same on each render.\nconst THROTTLE_OPTIONS = {\n\tleading: true,\n\ttrailing: true,\n};\n\nconst StylesPreview = ( { label, isFocused, withHoverView } ) => {\n\tconst [ fontWeight ] = useGlobalStyle( 'typography.fontWeight' );\n\tconst [ fontFamily = 'serif' ] = useGlobalStyle( 'typography.fontFamily' );\n\tconst [ headingFontFamily = fontFamily ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontFamily'\n\t);\n\tconst [ headingFontWeight = fontWeight ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontWeight'\n\t);\n\tconst [ textColor = 'black' ] = useGlobalStyle( 'color.text' );\n\tconst [ headingColor = textColor ] = useGlobalStyle(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( 'color.gradient' );\n\tconst [ styles ] = useGlobalStylesOutput();\n\tconst disableMotion = useReducedMotion();\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ containerResizeListener, { width } ] = useResizeObserver();\n\tconst [ throttledWidth, setThrottledWidthState ] = useState( width );\n\tconst [ ratioState, setRatioState ] = useState();\n\n\tconst setThrottledWidth = useThrottle(\n\t\tsetThrottledWidthState,\n\t\t250,\n\t\tTHROTTLE_OPTIONS\n\t);\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tif ( width ) {\n\t\t\tsetThrottledWidth( width );\n\t\t}\n\t}, [ width, setThrottledWidth ] );\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tconst newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;\n\t\tconst ratioDiff = newRatio - ( ratioState || 0 );\n\n\t\t// Only update the ratio state if the difference is big enough\n\t\t// or if the ratio state is not yet set. This is to avoid an\n\t\t// endless loop of updates at particular viewport heights when the\n\t\t// presence of a scrollbar causes the width to change slightly.\n\t\tconst isRatioDiffBigEnough = Math.abs( ratioDiff ) > 0.1;\n\n\t\tif ( isRatioDiffBigEnough || ! ratioState ) {\n\t\t\tsetRatioState( newRatio );\n\t\t}\n\t}, [ throttledWidth, ratioState ] );\n\n\t// Set a fallbackRatio to use before the throttled ratio has been set.\n\tconst fallbackRatio = width ? width / normalizedWidth : 1;\n\t// Use the throttled ratio if it has been calculated, otherwise\n\t// use the fallback ratio. The throttled ratio is used to avoid\n\t// an endless loop of updates at particular viewport heights.\n\t// See: https://github.com/WordPress/gutenberg/issues/55112\n\tconst ratio = ratioState ? ratioState : fallbackRatio;\n\n\tconst { paletteColors, highlightedColors } = useStylesPreviewColors();\n\n\t// Reset leaked styles from WP common.css and remove main content layout padding and border.\n\tconst editorStyles = useMemo( () => {\n\t\tif ( styles ) {\n\t\t\treturn [\n\t\t\t\t...styles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}',\n\t\t\t\t\tisGlobalStyles: true,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles ] );\n\tconst isReady = !! width;\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative' } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t{ isReady && (\n\t\t\t\t<Iframe\n\t\t\t\t\tclassName=\"edit-site-global-styles-preview__iframe\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t} }\n\t\t\t\t\tonMouseEnter={ () => setIsHovered( true ) }\n\t\t\t\t\tonMouseLeave={ () => setIsHovered( false ) }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\t\tcursor: withHoverView ? 'pointer' : undefined,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tinitial=\"start\"\n\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t( isHovered || isFocused ) &&\n\t\t\t\t\t\t\t! disableMotion &&\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t? 'hover'\n\t\t\t\t\t\t\t\t: 'start'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ firstFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\t\tfontSize: 65 * ratio,\n\t\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tanimate={ { scale: 1, opacity: 1 } }\n\t\t\t\t\t\t\t\t\tinitial={ { scale: 0.1, opacity: 0 } }\n\t\t\t\t\t\t\t\t\ttransition={ { delay: 0.3, type: 'tween' } }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tAa\n\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 * ratio }>\n\t\t\t\t\t\t\t\t\t{ highlightedColors.map(\n\t\t\t\t\t\t\t\t\t\t( { slug, color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio,\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio,\n\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( normalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio ) /\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 0.1,\n\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelay:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex === 1 ? 0.2 : 0.1,\n\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</VStack>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ withHoverView && midFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tfilter: 'blur(60px)',\n\t\t\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ paletteColors\n\t\t\t\t\t\t\t\t\t.slice( 0, 4 )\n\t\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\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</HStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ secondFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tspacing={ 3 * ratio }\n\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\tpadding: 10 * ratio,\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ label && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\tfontSize: 40 * ratio,\n\t\t\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\t\t\tlineHeight: '1em',\n\t\t\t\t\t\t\t\t\t\t\ttextAlign: 'center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AAM;IACNP,OAAO,EAAG,CAAC,GAAG/B,KAAO;IACrBgC,OAAO,EAAC,QAAQ;IAChBpB,KAAK,EAAG;MACPI,MAAM,EAAE,MAAM;MACda,QAAQ,EAAE,QAAQ;MAClBmB,OAAO,EAAE,EAAE,GAAGhD,KAAK;MACnBiD,SAAS,EAAE;IACZ;EAAG,GAEDlF,KAAK,IACN,IAAA0C,MAAA,CAAAC,aAAA;IACCE,KAAK,EAAG;MACPqB,QAAQ,EAAE,EAAE,GAAGjC,KAAK;MACpB7B,UAAU,EAAEC,iBAAiB;MAC7B8D,KAAK,EAAE3D,YAAY;MACnBL,UAAU,EAAEG,iBAAiB;MAC7B6E,UAAU,EAAE,KAAK;MACjBC,SAAS,EAAE;IACZ;EAAG,GAEDpF,KACE,CAEC,CACG,CACD,CACL,CAER,CAAC;AAEL,CAAC;AAAC,IAAAqF,QAAA,GAEatF,aAAa;AAAAuF,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_blockEditor","require","_components","_compose","_element","_lockUnlock","_hooks","useGlobalStyle","useGlobalStylesOutput","unlock","blockEditorPrivateApis","firstFrame","start","scale","opacity","hover","midFrame","secondFrame","normalizedWidth","normalizedHeight","normalizedColorSwatchSize","THROTTLE_OPTIONS","leading","trailing","StylesPreview","label","isFocused","withHoverView","fontWeight","fontFamily","headingFontFamily","headingFontWeight","textColor","headingColor","backgroundColor","gradientValue","styles","disableMotion","useReducedMotion","isHovered","setIsHovered","useState","containerResizeListener","width","useResizeObserver","throttledWidth","setThrottledWidthState","ratioState","setRatioState","setThrottledWidth","useThrottle","useLayoutEffect","newRatio","ratioDiff","isRatioDiffBigEnough","Math","abs","fallbackRatio","ratio","paletteColors","highlightedColors","useStylesPreviewColors","editorStyles","useMemo","css","isGlobalStyles","isReady","_react","createElement","Fragment","style","position","__unstableIframe","className","height","onMouseEnter","onMouseLeave","tabIndex","__unstableEditorStyles","__unstableMotion","div","background","cursor","undefined","initial","animate","variants","overflow","__experimentalHStack","spacing","justify","fontSize","color","transition","delay","type","__experimentalVStack","map","slug","index","key","borderRadius","top","filter","slice","flexGrow","padding","boxSizing","lineHeight","textAlign","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/preview.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__unstableIframe as Iframe,\n\t__unstableEditorStyles as EditorStyles,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\t__unstableMotion as motion,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport {\n\tuseThrottle,\n\tuseReducedMotion,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { useLayoutEffect, useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useStylesPreviewColors } from './hooks';\n\nconst { useGlobalStyle, useGlobalStylesOutput } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst firstFrame = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst midFrame = {\n\thover: {\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\topacity: 0.5,\n\t},\n};\n\nconst secondFrame = {\n\thover: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\n\nconst normalizedColorSwatchSize = 32;\n\n// Throttle options for useThrottle. Must be defined outside of the component,\n// so that the object reference is the same on each render.\nconst THROTTLE_OPTIONS = {\n\tleading: true,\n\ttrailing: true,\n};\n\nconst StylesPreview = ( { label, isFocused, withHoverView } ) => {\n\tconst [ fontWeight ] = useGlobalStyle( 'typography.fontWeight' );\n\tconst [ fontFamily = 'serif' ] = useGlobalStyle( 'typography.fontFamily' );\n\tconst [ headingFontFamily = fontFamily ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontFamily'\n\t);\n\tconst [ headingFontWeight = fontWeight ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontWeight'\n\t);\n\tconst [ textColor = 'black' ] = useGlobalStyle( 'color.text' );\n\tconst [ headingColor = textColor ] = useGlobalStyle(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( 'color.gradient' );\n\tconst [ styles ] = useGlobalStylesOutput();\n\tconst disableMotion = useReducedMotion();\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ containerResizeListener, { width } ] = useResizeObserver();\n\tconst [ throttledWidth, setThrottledWidthState ] = useState( width );\n\tconst [ ratioState, setRatioState ] = useState();\n\n\tconst setThrottledWidth = useThrottle(\n\t\tsetThrottledWidthState,\n\t\t250,\n\t\tTHROTTLE_OPTIONS\n\t);\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tif ( width ) {\n\t\t\tsetThrottledWidth( width );\n\t\t}\n\t}, [ width, setThrottledWidth ] );\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tconst newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;\n\t\tconst ratioDiff = newRatio - ( ratioState || 0 );\n\n\t\t// Only update the ratio state if the difference is big enough\n\t\t// or if the ratio state is not yet set. This is to avoid an\n\t\t// endless loop of updates at particular viewport heights when the\n\t\t// presence of a scrollbar causes the width to change slightly.\n\t\tconst isRatioDiffBigEnough = Math.abs( ratioDiff ) > 0.1;\n\n\t\tif ( isRatioDiffBigEnough || ! ratioState ) {\n\t\t\tsetRatioState( newRatio );\n\t\t}\n\t}, [ throttledWidth, ratioState ] );\n\n\t// Set a fallbackRatio to use before the throttled ratio has been set.\n\tconst fallbackRatio = width ? width / normalizedWidth : 1;\n\t// Use the throttled ratio if it has been calculated, otherwise\n\t// use the fallback ratio. The throttled ratio is used to avoid\n\t// an endless loop of updates at particular viewport heights.\n\t// See: https://github.com/WordPress/gutenberg/issues/55112\n\tconst ratio = ratioState ? ratioState : fallbackRatio;\n\n\tconst { paletteColors, highlightedColors } = useStylesPreviewColors();\n\n\t// Reset leaked styles from WP common.css and remove main content layout padding and border.\n\tconst editorStyles = useMemo( () => {\n\t\tif ( styles ) {\n\t\t\treturn [\n\t\t\t\t...styles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}',\n\t\t\t\t\tisGlobalStyles: true,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles ] );\n\tconst isReady = !! width;\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative' } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t{ isReady && (\n\t\t\t\t<Iframe\n\t\t\t\t\tclassName=\"edit-site-global-styles-preview__iframe\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t} }\n\t\t\t\t\tonMouseEnter={ () => setIsHovered( true ) }\n\t\t\t\t\tonMouseLeave={ () => setIsHovered( false ) }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\t\tcursor: withHoverView ? 'pointer' : undefined,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tinitial=\"start\"\n\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t( isHovered || isFocused ) &&\n\t\t\t\t\t\t\t! disableMotion &&\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t? 'hover'\n\t\t\t\t\t\t\t\t: 'start'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ firstFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\t\tfontSize: 65 * ratio,\n\t\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tanimate={ { scale: 1, opacity: 1 } }\n\t\t\t\t\t\t\t\t\tinitial={ { scale: 0.1, opacity: 0 } }\n\t\t\t\t\t\t\t\t\ttransition={ { delay: 0.3, type: 'tween' } }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tAa\n\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 * ratio }>\n\t\t\t\t\t\t\t\t\t{ highlightedColors.map(\n\t\t\t\t\t\t\t\t\t\t( { slug, color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio,\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio,\n\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( normalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio ) /\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 0.1,\n\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelay:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex === 1 ? 0.2 : 0.1,\n\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</VStack>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ withHoverView && midFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tfilter: 'blur(60px)',\n\t\t\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ paletteColors\n\t\t\t\t\t\t\t\t\t.slice( 0, 4 )\n\t\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\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</HStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ secondFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tspacing={ 3 * ratio }\n\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\tpadding: 10 * ratio,\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ label && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\tfontSize: 40 * ratio,\n\t\t\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\t\t\tlineHeight: '1em',\n\t\t\t\t\t\t\t\t\t\t\ttextAlign: 'center',\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\t\t{ label }\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t</motion.div>\n\t\t\t\t</Iframe>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default StylesPreview;\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAxBA;AACA;AACA;;AAkBA;AACA;AACA;;AAI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IAAAqF,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaxF,aAAa"}
@@ -47,6 +47,5 @@ function RootMenu() {
47
47
  "aria-label": (0, _i18n.__)('Layout styles')
48
48
  }, (0, _i18n.__)('Layout'))));
49
49
  }
50
- var _default = RootMenu;
51
- exports.default = _default;
50
+ var _default = exports.default = RootMenu;
52
51
  //# sourceMappingURL=root-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_icons","_i18n","_blockEditor","_navigationButton","_lockUnlock","useHasDimensionsPanel","useHasTypographyPanel","useHasColorPanel","useGlobalSetting","useSettingsForBlockElement","unlock","blockEditorPrivateApis","RootMenu","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasDimensionsPanel","hasLayoutPanel","_react","createElement","Fragment","__experimentalItemGroup","NavigationButtonAsItem","icon","typography","path","__","color","layout","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/root-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { typography, color, layout } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasColorPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n} = unlock( blockEditorPrivateApis );\n\nfunction RootMenu() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasDimensionsPanel;\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup>\n\t\t\t\t{ hasTypographyPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ typography }\n\t\t\t\t\t\tpath=\"/typography\"\n\t\t\t\t\t\taria-label={ __( 'Typography styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Typography' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasColorPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ color }\n\t\t\t\t\t\tpath=\"/colors\"\n\t\t\t\t\t\taria-label={ __( 'Colors styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Colors' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasLayoutPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\tpath=\"/layout\"\n\t\t\t\t\t\taria-label={ __( 'Layout styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Layout' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nexport default RootMenu;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EACLM,qBAAqB;EACrBC,qBAAqB;EACrBC,gBAAgB;EAChBC,gBAAgB;EAChBC;AACD,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEpC,SAASC,QAAQA,CAAA,EAAG;EACnB,MAAM,CAAEC,WAAW,CAAE,GAAGL,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMM,QAAQ,GAAGL,0BAA0B,CAAEI,WAAY,CAAC;EAC1D,MAAME,kBAAkB,GAAGT,qBAAqB,CAAEQ,QAAS,CAAC;EAC5D,MAAME,aAAa,GAAGT,gBAAgB,CAAEO,QAAS,CAAC;EAClD,MAAMG,kBAAkB,GAAGZ,qBAAqB,CAAES,QAAS,CAAC;EAC5D,MAAMI,cAAc,GAAGD,kBAAkB;EAEzC,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACtB,WAAA,CAAAwB,uBAAS,QACPP,kBAAkB,IACnB,IAAAI,MAAA,CAAAC,aAAA,EAACjB,iBAAA,CAAAoB,sBAAsB;IACtBC,IAAI,EAAGC,iBAAY;IACnBC,IAAI,EAAC,aAAa;IAClB,cAAa,IAAAC,QAAE,EAAE,mBAAoB;EAAG,GAEtC,IAAAA,QAAE,EAAE,YAAa,CACI,CACxB,EACCX,aAAa,IACd,IAAAG,MAAA,CAAAC,aAAA,EAACjB,iBAAA,CAAAoB,sBAAsB;IACtBC,IAAI,EAAGI,YAAO;IACdF,IAAI,EAAC,SAAS;IACd,cAAa,IAAAC,QAAE,EAAE,eAAgB;EAAG,GAElC,IAAAA,QAAE,EAAE,QAAS,CACQ,CACxB,EACCT,cAAc,IACf,IAAAC,MAAA,CAAAC,aAAA,EAACjB,iBAAA,CAAAoB,sBAAsB;IACtBC,IAAI,EAAGK,aAAQ;IACfH,IAAI,EAAC,SAAS;IACd,cAAa,IAAAC,QAAE,EAAE,eAAgB;EAAG,GAElC,IAAAA,QAAE,EAAE,QAAS,CACQ,CAEf,CACV,CAAC;AAEL;AAAC,IAAAG,QAAA,GAEclB,QAAQ;AAAAmB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_components","require","_icons","_i18n","_blockEditor","_navigationButton","_lockUnlock","useHasDimensionsPanel","useHasTypographyPanel","useHasColorPanel","useGlobalSetting","useSettingsForBlockElement","unlock","blockEditorPrivateApis","RootMenu","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasDimensionsPanel","hasLayoutPanel","_react","createElement","Fragment","__experimentalItemGroup","NavigationButtonAsItem","icon","typography","path","__","color","layout","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/root-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { typography, color, layout } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasColorPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n} = unlock( blockEditorPrivateApis );\n\nfunction RootMenu() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasDimensionsPanel;\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup>\n\t\t\t\t{ hasTypographyPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ typography }\n\t\t\t\t\t\tpath=\"/typography\"\n\t\t\t\t\t\taria-label={ __( 'Typography styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Typography' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasColorPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ color }\n\t\t\t\t\t\tpath=\"/colors\"\n\t\t\t\t\t\taria-label={ __( 'Colors styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Colors' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasLayoutPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\tpath=\"/layout\"\n\t\t\t\t\t\taria-label={ __( 'Layout styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Layout' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nexport default RootMenu;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EACLM,qBAAqB;EACrBC,qBAAqB;EACrBC,gBAAgB;EAChBC,gBAAgB;EAChBC;AACD,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEpC,SAASC,QAAQA,CAAA,EAAG;EACnB,MAAM,CAAEC,WAAW,CAAE,GAAGL,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMM,QAAQ,GAAGL,0BAA0B,CAAEI,WAAY,CAAC;EAC1D,MAAME,kBAAkB,GAAGT,qBAAqB,CAAEQ,QAAS,CAAC;EAC5D,MAAME,aAAa,GAAGT,gBAAgB,CAAEO,QAAS,CAAC;EAClD,MAAMG,kBAAkB,GAAGZ,qBAAqB,CAAES,QAAS,CAAC;EAC5D,MAAMI,cAAc,GAAGD,kBAAkB;EAEzC,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACtB,WAAA,CAAAwB,uBAAS,QACPP,kBAAkB,IACnB,IAAAI,MAAA,CAAAC,aAAA,EAACjB,iBAAA,CAAAoB,sBAAsB;IACtBC,IAAI,EAAGC,iBAAY;IACnBC,IAAI,EAAC,aAAa;IAClB,cAAa,IAAAC,QAAE,EAAE,mBAAoB;EAAG,GAEtC,IAAAA,QAAE,EAAE,YAAa,CACI,CACxB,EACCX,aAAa,IACd,IAAAG,MAAA,CAAAC,aAAA,EAACjB,iBAAA,CAAAoB,sBAAsB;IACtBC,IAAI,EAAGI,YAAO;IACdF,IAAI,EAAC,SAAS;IACd,cAAa,IAAAC,QAAE,EAAE,eAAgB;EAAG,GAElC,IAAAA,QAAE,EAAE,QAAS,CACQ,CACxB,EACCT,cAAc,IACf,IAAAC,MAAA,CAAAC,aAAA,EAACjB,iBAAA,CAAAoB,sBAAsB;IACtBC,IAAI,EAAGK,aAAQ;IACfH,IAAI,EAAC,SAAS;IACd,cAAa,IAAAC,QAAE,EAAE,eAAgB;EAAG,GAElC,IAAAA,QAAE,EAAE,QAAS,CACQ,CAEf,CACV,CAAC;AAEL;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcpB,QAAQ"}
@@ -146,6 +146,5 @@ function ScreenBlockList() {
146
146
  filterValue: deferredFilterValue
147
147
  }));
148
148
  }
149
- var _default = ScreenBlockList;
150
- exports.default = _default;
149
+ var _default = exports.default = ScreenBlockList;
151
150
  //# sourceMappingURL=screen-block-list.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_i18n","_components","_data","_element","_blockEditor","_compose","_a11y","_variationsPanel","_header","_interopRequireDefault","_navigationButton","_lockUnlock","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","unlock","blockEditorPrivateApis","useSortedBlockTypes","blockItems","useSelect","select","blocksStore","getBlockTypes","groupByType","blocks","block","core","noncore","type","name","startsWith","push","coreItems","nonCoreItems","reduce","useBlockHasGlobalStyles","blockName","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasLayoutPanel","hasVariationsPanel","useBlockVariations","length","hasGlobalStyles","BlockMenuItem","hasBlockMenuItem","navigationButtonLabel","sprintf","__","title","_react","createElement","NavigationButtonAsItem","path","encodeURIComponent","__experimentalHStack","justify","BlockIcon","icon","FlexItem","BlockList","filterValue","sortedBlockTypes","debouncedSpeak","useDebounce","speak","isMatchingSearchTerm","filteredBlockTypes","filter","blockType","blockTypesListRef","useRef","useEffect","count","current","childElementCount","resultsFoundMessage","_n","ref","className","map","key","MemoizedBlockList","memo","ScreenBlockList","setFilterValue","useState","deferredFilterValue","useDeferredValue","Fragment","default","description","SearchControl","__nextHasNoMarginBottom","onChange","value","label","placeholder","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block-list.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tFlexItem,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseDeferredValue,\n\tmemo,\n} from '@wordpress/element';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { useBlockVariations } from './variations-panel';\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction useSortedBlockTypes() {\n\tconst blockItems = useSelect(\n\t\t( select ) => select( blocksStore ).getBlockTypes(),\n\t\t[]\n\t);\n\t// Ensure core blocks are prioritized in the returned results,\n\t// because third party blocks can be registered earlier than\n\t// the core blocks (usually by using the `init` action),\n\t// thus affecting the display order.\n\t// We don't sort reusable blocks as they are handled differently.\n\tconst groupByType = ( blocks, block ) => {\n\t\tconst { core, noncore } = blocks;\n\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\t\ttype.push( block );\n\t\treturn blocks;\n\t};\n\tconst { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(\n\t\tgroupByType,\n\t\t{ core: [], noncore: [] }\n\t);\n\treturn [ ...coreItems, ...nonCoreItems ];\n}\n\nexport function useBlockHasGlobalStyles( blockName ) {\n\tconst [ rawSettings ] = useGlobalSetting( '', blockName );\n\tconst settings = useSettingsForBlockElement( rawSettings, blockName );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;\n\tconst hasVariationsPanel = !! useBlockVariations( blockName )?.length;\n\tconst hasGlobalStyles =\n\t\thasTypographyPanel ||\n\t\thasColorPanel ||\n\t\thasLayoutPanel ||\n\t\thasVariationsPanel;\n\treturn hasGlobalStyles;\n}\n\nfunction BlockMenuItem( { block } ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t__( '%s block styles' ),\n\t\tblock.title\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<BlockIcon icon={ block.icon } />\n\t\t\t\t<FlexItem>{ block.title }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction BlockList( { filterValue } ) {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst { isMatchingSearchTerm } = useSelect( blocksStore );\n\n\tconst filteredBlockTypes = ! filterValue\n\t\t? sortedBlockTypes\n\t\t: sortedBlockTypes.filter( ( blockType ) =>\n\t\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t );\n\n\tconst blockTypesListRef = useRef();\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\t// We extract the results from the wrapper div's `ref` because\n\t\t// filtered items can contain items that will eventually not\n\t\t// render and there is no reliable way to detect when a child\n\t\t// will return `null`.\n\t\t// TODO: We should find a better way of handling this as it's\n\t\t// fragile and depends on the number of rendered elements of `BlockMenuItem`,\n\t\t// which is now one.\n\t\t// @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116\n\t\tconst count = blockTypesListRef.current.childElementCount;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage, count );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ blockTypesListRef }\n\t\t\tclassName=\"edit-site-block-types-item-list\"\n\t\t>\n\t\t\t{ filteredBlockTypes.map( ( block ) => (\n\t\t\t\t<BlockMenuItem\n\t\t\t\t\tblock={ block }\n\t\t\t\t\tkey={ 'menu-itemblock-' + block.name }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n\nconst MemoizedBlockList = memo( BlockList );\n\nfunction ScreenBlockList() {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst deferredFilterValue = useDeferredValue( filterValue );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Blocks' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of specific blocks and for the whole site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tclassName=\"edit-site-block-types-search\"\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search for blocks' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t\t<MemoizedBlockList filterValue={ deferredFilterValue } />\n\t\t</>\n\t);\n}\n\nexport default ScreenBlockList;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAOA,IAAAK,YAAA,GAAAL,OAAA;AAIA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AAKA,IAAAQ,gBAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,iBAAA,GAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AA/BA;AACA;AACA;;AAuBA;AACA;AACA;;AAMA,MAAM;EACLa,qBAAqB;EACrBC,qBAAqB;EACrBC,iBAAiB;EACjBC,gBAAgB;EAChBC,0BAA0B;EAC1BC;AACD,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEpC,SAASC,mBAAmBA,CAAA,EAAG;EAC9B,MAAMC,UAAU,GAAG,IAAAC,eAAS,EACzBC,MAAM,IAAMA,MAAM,CAAEC,aAAY,CAAC,CAACC,aAAa,CAAC,CAAC,EACnD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,WAAA,CAAAkG,aAAa;IACbC,uBAAuB;IACvBd,SAAS,EAAC,8BAA8B;IACxCe,QAAQ,EAAGT,cAAgB;IAC3BU,KAAK,EAAGlC,WAAa;IACrBmC,KAAK,EAAG,IAAAhD,QAAE,EAAE,mBAAoB,CAAG;IACnCiD,WAAW,EAAG,IAAAjD,QAAE,EAAE,QAAS;EAAG,CAC9B,CAAC,EACF,IAAAE,MAAA,CAAAC,aAAA,EAAC+B,iBAAiB;IAACrB,WAAW,EAAG0B;EAAqB,CAAE,CACvD,CAAC;AAEL;AAAC,IAAAW,QAAA,GAEcd,eAAe;AAAAe,OAAA,CAAAT,OAAA,GAAAQ,QAAA"}
1
+ {"version":3,"names":["_blocks","require","_i18n","_components","_data","_element","_blockEditor","_compose","_a11y","_variationsPanel","_header","_interopRequireDefault","_navigationButton","_lockUnlock","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","unlock","blockEditorPrivateApis","useSortedBlockTypes","blockItems","useSelect","select","blocksStore","getBlockTypes","groupByType","blocks","block","core","noncore","type","name","startsWith","push","coreItems","nonCoreItems","reduce","useBlockHasGlobalStyles","blockName","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasLayoutPanel","hasVariationsPanel","useBlockVariations","length","hasGlobalStyles","BlockMenuItem","hasBlockMenuItem","navigationButtonLabel","sprintf","__","title","_react","createElement","NavigationButtonAsItem","path","encodeURIComponent","__experimentalHStack","justify","BlockIcon","icon","FlexItem","BlockList","filterValue","sortedBlockTypes","debouncedSpeak","useDebounce","speak","isMatchingSearchTerm","filteredBlockTypes","filter","blockType","blockTypesListRef","useRef","useEffect","count","current","childElementCount","resultsFoundMessage","_n","ref","className","map","key","MemoizedBlockList","memo","ScreenBlockList","setFilterValue","useState","deferredFilterValue","useDeferredValue","Fragment","default","description","SearchControl","__nextHasNoMarginBottom","onChange","value","label","placeholder","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block-list.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tFlexItem,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseDeferredValue,\n\tmemo,\n} from '@wordpress/element';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { useBlockVariations } from './variations-panel';\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction useSortedBlockTypes() {\n\tconst blockItems = useSelect(\n\t\t( select ) => select( blocksStore ).getBlockTypes(),\n\t\t[]\n\t);\n\t// Ensure core blocks are prioritized in the returned results,\n\t// because third party blocks can be registered earlier than\n\t// the core blocks (usually by using the `init` action),\n\t// thus affecting the display order.\n\t// We don't sort reusable blocks as they are handled differently.\n\tconst groupByType = ( blocks, block ) => {\n\t\tconst { core, noncore } = blocks;\n\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\t\ttype.push( block );\n\t\treturn blocks;\n\t};\n\tconst { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(\n\t\tgroupByType,\n\t\t{ core: [], noncore: [] }\n\t);\n\treturn [ ...coreItems, ...nonCoreItems ];\n}\n\nexport function useBlockHasGlobalStyles( blockName ) {\n\tconst [ rawSettings ] = useGlobalSetting( '', blockName );\n\tconst settings = useSettingsForBlockElement( rawSettings, blockName );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;\n\tconst hasVariationsPanel = !! useBlockVariations( blockName )?.length;\n\tconst hasGlobalStyles =\n\t\thasTypographyPanel ||\n\t\thasColorPanel ||\n\t\thasLayoutPanel ||\n\t\thasVariationsPanel;\n\treturn hasGlobalStyles;\n}\n\nfunction BlockMenuItem( { block } ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t__( '%s block styles' ),\n\t\tblock.title\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<BlockIcon icon={ block.icon } />\n\t\t\t\t<FlexItem>{ block.title }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction BlockList( { filterValue } ) {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst { isMatchingSearchTerm } = useSelect( blocksStore );\n\n\tconst filteredBlockTypes = ! filterValue\n\t\t? sortedBlockTypes\n\t\t: sortedBlockTypes.filter( ( blockType ) =>\n\t\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t );\n\n\tconst blockTypesListRef = useRef();\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\t// We extract the results from the wrapper div's `ref` because\n\t\t// filtered items can contain items that will eventually not\n\t\t// render and there is no reliable way to detect when a child\n\t\t// will return `null`.\n\t\t// TODO: We should find a better way of handling this as it's\n\t\t// fragile and depends on the number of rendered elements of `BlockMenuItem`,\n\t\t// which is now one.\n\t\t// @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116\n\t\tconst count = blockTypesListRef.current.childElementCount;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage, count );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ blockTypesListRef }\n\t\t\tclassName=\"edit-site-block-types-item-list\"\n\t\t>\n\t\t\t{ filteredBlockTypes.map( ( block ) => (\n\t\t\t\t<BlockMenuItem\n\t\t\t\t\tblock={ block }\n\t\t\t\t\tkey={ 'menu-itemblock-' + block.name }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n\nconst MemoizedBlockList = memo( BlockList );\n\nfunction ScreenBlockList() {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst deferredFilterValue = useDeferredValue( filterValue );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Blocks' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of specific blocks and for the whole site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tclassName=\"edit-site-block-types-search\"\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search for blocks' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t\t<MemoizedBlockList filterValue={ deferredFilterValue } />\n\t\t</>\n\t);\n}\n\nexport default ScreenBlockList;\n"],"mappings":";;;;;;;;;AAGA,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el,
67
66
  useHasFiltersPanel,
68
67
  useHasImageSettingsPanel,
69
68
  useGlobalStyle,
@@ -71,7 +70,6 @@ const {
71
70
  ColorPanel: StylesColorPanel,
72
71
  TypographyPanel: StylesTypographyPanel,
73
72
  DimensionsPanel: StylesDimensionsPanel,
74
- EffectsPanel: StylesEffectsPanel,
75
73
  FiltersPanel: StylesFiltersPanel,
76
74
  ImageSettingsPanel,
77
75
  AdvancedPanel: StylesAdvancedPanel
@@ -115,7 +113,6 @@ function ScreenBlock({
115
113
  const hasColorPanel = useHasColorPanel(settings);
116
114
  const hasBorderPanel = useHasBorderPanel(settings);
117
115
  const hasDimensionsPanel = useHasDimensionsPanel(settings);
118
- const hasEffectsPanel = useHasEffectsPanel(settings);
119
116
  const hasFiltersPanel = useHasFiltersPanel(settings);
120
117
  const hasImageSettingsPanel = useHasImageSettingsPanel(name, userSettings, settings);
121
118
  const hasVariationsPanel = !!blockVariations?.length && !variation;
@@ -255,12 +252,6 @@ function ScreenBlock({
255
252
  value: style,
256
253
  onChange: onChangeBorders,
257
254
  settings: settings
258
- }), hasEffectsPanel && (0, _react.createElement)(StylesEffectsPanel, {
259
- inheritedValue: inheritedStyleWithLayout,
260
- value: styleWithLayout,
261
- onChange: setStyle,
262
- settings: settings,
263
- includeLayoutControls: true
264
255
  }), hasFiltersPanel && (0, _react.createElement)(StylesFiltersPanel, {
265
256
  inheritedValue: inheritedStyleWithLayout,
266
257
  value: styleWithLayout,
@@ -282,6 +273,5 @@ function ScreenBlock({
282
273
  inheritedValue: inheritedStyle
283
274
  })));
284
275
  }
285
- var _default = ScreenBlock;
286
- exports.default = _default;
276
+ var _default = exports.default = ScreenBlock;
287
277
  //# sourceMappingURL=screen-block.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_blockEditor","_element","_data","_coreData","_components","_i18n","_header","_interopRequireDefault","_blockPreviewPanel","_lockUnlock","_subtitle","_variationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","hasSplitBorders","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasEffectsPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","unlock","blockEditorPrivateApis","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","getBlockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","useBlockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasEffectsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","useMemo","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","_react","createElement","Fragment","default","title","label","className","__experimentalVStack","__","VariationsPanel","inheritedValue","value","onChange","includeLayoutControls","PanelBody","initialOpen","sprintf","_default","exports"],"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 { useBlockVariations, VariationsPanel } from './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\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\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 hasEffectsPanel = useHasEffectsPanel( 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{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\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{ 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":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAKA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAH,sBAAA,CAAAR,OAAA;AACA,IAAAY,gBAAA,GAAAZ,OAAA;AAtBA;AACA;AACA;;AAaA;AACA;AACA;;AAOA,SAASa,kBAAkBA,CAAEC,MAAM,EAAG;EACrC,IAAK,CAAEA,MAAM,EAAG;IACf,OAAOA,MAAM;EACd;EAEA,MAAMC,e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AGtB,eAAiB;IACzBuB,QAAQ,EAAGhE,QAAU;IACrBI,QAAQ,EAAGA,QAAU;IACrB6D,qBAAqB;EAAA,CACrB,CACD,EACC1C,qBAAqB,IACtB,IAAA6B,MAAA,CAAAC,aAAA,EAACnE,kBAAkB;IAClB8E,QAAQ,EAAGnB,gBAAkB;IAC7BkB,KAAK,EAAG9D,YAAc;IACtB6D,cAAc,EAAG1D;EAAU,CAC3B,CACD,EAECsB,UAAU,IACX,IAAA0B,MAAA,CAAAC,aAAA,EAAC9G,WAAA,CAAA2H,SAAS;IAACV,KAAK,EAAG,IAAAI,QAAE,EAAE,UAAW,CAAG;IAACO,WAAW,EAAG;EAAO,GAC1D,IAAAf,MAAA,CAAAC,aAAA,aACG,IAAAe,aAAO;EACR;EACA,IAAAR,QAAE,EACD,2IACD,CAAC,EACDvD,SAAS,EAAEmD,KACZ,CACE,CAAC,EACJ,IAAAJ,MAAA,CAAAC,aAAA,EAACjE,mBAAmB;IACnB2E,KAAK,EAAG3G,KAAO;IACf4G,QAAQ,EAAGhE,QAAU;IACrB8D,cAAc,EAAG/D;EAAgB,CACjC,CACS,CAEX,CAAC;AAEL;AAAC,IAAAsE,QAAA,GAEc9E,WAAW;AAAA+E,OAAA,CAAAf,OAAA,GAAAc,QAAA"}
1
+ {"version":3,"names":["_blocks","require","_blockEditor","_element","_data","_coreData","_components","_i18n","_header","_interopRequireDefault","_blockPreviewPanel","_lockUnlock","_subtitle","_variationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","hasSplitBorders","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","unlock","blockEditorPrivateApis","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","getBlockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","useBlockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","useMemo","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","_react","createElement","Fragment","default","title","label","className","__experimentalVStack","__","VariationsPanel","inheritedValue","value","onChange","includeLayoutControls","PanelBody","initialOpen","sprintf","_default","exports"],"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 { useBlockVariations, VariationsPanel } from './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 ScreenB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AAAC,aAAA,EAAC3E,iBAAiB;IACjBoF,cAAc,EAAG9D,cAAgB;IACjC+D,KAAK,EAAGvG,KAAO;IACfwG,QAAQ,EAAGhB,eAAiB;IAC5B3C,QAAQ,EAAGA;EAAU,CACrB,CACD,EACCiB,eAAe,IAChB,IAAA8B,MAAA,CAAAC,aAAA,EAACnE,kBAAkB;IAClB4E,cAAc,EAAGxB,wBAA0B;IAC3CyB,KAAK,EAAGtB,eAAiB;IACzBuB,QAAQ,EAAG/D,QAAU;IACrBI,QAAQ,EAAGA,QAAU;IACrB4D,qBAAqB;EAAA,CACrB,CACD,EACC1C,qBAAqB,IACtB,IAAA6B,MAAA,CAAAC,aAAA,EAAClE,kBAAkB;IAClB6E,QAAQ,EAAGnB,gBAAkB;IAC7BkB,KAAK,EAAG7D,YAAc;IACtB4D,cAAc,EAAGzD;EAAU,CAC3B,CACD,EAECqB,UAAU,IACX,IAAA0B,MAAA,CAAAC,aAAA,EAAC1G,WAAA,CAAAuH,SAAS;IAACV,KAAK,EAAG,IAAAI,QAAE,EAAE,UAAW,CAAG;IAACO,WAAW,EAAG;EAAO,GAC1D,IAAAf,MAAA,CAAAC,aAAA,aACG,IAAAe,aAAO;EACR;EACA,IAAAR,QAAE,EACD,2IACD,CAAC,EACDtD,SAAS,EAAEkD,KACZ,CACE,CAAC,EACJ,IAAAJ,MAAA,CAAAC,aAAA,EAAChE,mBAAmB;IACnB0E,KAAK,EAAGvG,KAAO;IACfwG,QAAQ,EAAG/D,QAAU;IACrB6D,cAAc,EAAG9D;EAAgB,CACjC,CACS,CAEX,CAAC;AAEL;AAAC,IAAAqE,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEc/D,WAAW"}
@@ -45,6 +45,5 @@ function ScreenColorPalette({
45
45
  name: name
46
46
  }))));
47
47
  }
48
- var _default = ScreenColorPalette;
49
- exports.default = _default;
48
+ var _default = exports.default = ScreenColorPalette;
50
49
  //# sourceMappingURL=screen-color-palette.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_colorPalettePanel","_interopRequireDefault","_gradientsPalettePanel","_header","_lockUnlock","Tabs","unlock","componentsPrivateApis","ScreenColorPalette","name","_react","createElement","Fragment","default","title","__","description","TabList","Tab","tabId","TabPanel","focusable","_default","exports"],"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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,kBAAA,GAAAC,sBAAA,CAA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CAAE,CACvB,CACV,CACL,CAAC;AAEL;AAAC,IAAAa,QAAA,GAEcd,kBAAkB;AAAAe,OAAA,CAAAV,OAAA,GAAAS,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_colorPalettePanel","_interopRequireDefault","_gradientsPalettePanel","_header","_lockUnlock","Tabs","unlock","componentsPrivateApis","ScreenColorPalette","name","_react","createElement","Fragment","default","title","__","description","TabList","Tab","tabId","TabPanel","focusable","_default","exports"],"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"],"m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AAU;IAACE,SAAS,EAAG;EAAO,GAClD,IAAAX,MAAA,CAAAC,aAAA,EAACT,sBAAA,CAAAW,OAAoB;IAACJ,IAAI,EAAGA;EAAM,CAAE,CACvB,CACV,CACL,CAAC;AAEL;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEcL,kBAAkB"}
@@ -49,6 +49,5 @@ function ScreenColors() {
49
49
  settings: settings
50
50
  }))));
51
51
  }
52
- var _default = ScreenColors;
53
- exports.default = _default;
52
+ var _default = exports.default = ScreenColors;
54
53
  //# sourceMappingURL=screen-colors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_blockEditor","_header","_interopRequireDefault","_palette","_lockUnlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","ColorPanel","StylesColorPanel","unlock","blockEditorPrivateApis","ScreenColors","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","settings","_react","createElement","Fragment","default","title","__","description","className","__experimentalVStack","spacing","inheritedValue","value","onChange","_default","exports"],"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';\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'Manage palettes and the default color of different global elements on the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-colors\">\n\t\t\t\t<VStack spacing={ 10 }>\n\t\t\t\t\t<Palette />\n\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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAZA;AACA;AACA;;AAKA;AACA;AACA;;AAKA,MAAM;EACLO,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,UAAU,EAAEC;AACb,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEpC,SAASC,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,KAAK,CAAE,GAAGR,cAAc,CAAE,EAAE,EAAES,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGZ,cAAc,CAAE,EAAE,EAAES,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEG,WAAW,CAAE,GAAGZ,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMa,QAAQ,GAAGZ,0BAA0B,CAAEW,WAAY,CAAC;EAE1D,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACpB,OAAA,CAAAsB,OAAY;IACZC,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;IACxBC,WAAW,EAAG,IAAAD,QAAE,EACf,iFACD;EAAG,CACH,CAAC,EACF,IAAAL,MAAA,CAAAC,aAAA;IAAKM,SAAS,EAAC;EAAuC,GACrD,IAAAP,MAAA,CAAAC,aAAA,EAACtB,WAAA,CAAA6B,oBAAM;IAACC,OAAO,EAAG;EAAI,GACrB,IAAAT,MAAA,CAAAC,aAAA,EAAClB,QAAA,CAAAoB,OAAO,MAAE,CAAC,EAEX,IAAAH,MAAA,CAAAC,aAAA,EAACZ,gBAAgB;IAChBqB,cAAc,EAAGd,cAAgB;IACjCe,KAAK,EAAGlB,KAAO;IACfmB,QAAQ,EAAGf,QAAU;IACrBE,QAAQ,EAAGA;EAAU,CACrB,CACM,CACJ,CACJ,CAAC;AAEL;AAAC,IAAAc,QAAA,GAEcrB,YAAY;AAAAsB,OAAA,CAAAX,OAAA,GAAAU,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_blockEditor","_header","_interopRequireDefault","_palette","_lockUnlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","ColorPanel","StylesColorPanel","unlock","blockEditorPrivateApis","ScreenColors","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","settings","_react","createElement","Fragment","default","title","__","description","className","__experimentalVStack","spacing","inheritedValue","value","onChange","_default","exports"],"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';\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'Manage palettes and the default color of different global elements on the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-colors\">\n\t\t\t\t<VStack spacing={ 10 }>\n\t\t\t\t\t<Palette />\n\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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAZA;AACA;AACA;;AAKA;AACA;AACA;;AAKA,MAAM;EACLO,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,U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inheritedValue: inheritedStyle
46
46
  })));
47
47
  }
48
- var _default = ScreenCSS;
49
- exports.default = _default;
48
+ var _default = exports.default = ScreenCSS;
50
49
  //# sourceMappingURL=screen-css.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_blockEditor","_lockUnlock","_header","_interopRequireDefault","useGlobalStyle","AdvancedPanel","StylesAdvancedPanel","unlock","blockEditorPrivateApis","ScreenCSS","description","__","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","_react","createElement","Fragment","default","title","ExternalLink","href","className","value","onChange","inheritedValue","_default","exports"],"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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIA,MAAM;EAAEM,cAAc;EAAEC,aAAa,EAAEC;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EACpEC,wBACD,CAAC;AAED,SAASC,SAASA,CAAA,EAAG;EACpB,MAAMC,WAAW,GAAG,IAAAC,QAAE,EACrB,uEACD,CAAC;EACD,MAAM,CAAEC,KAAK,CAAE,GAAGR,cAAc,CAAE,EAAE,EAAES,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGZ,cAAc,CAAE,EAAE,EAAES,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EAEH,OACC,IAAAG,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAAChB,OAAA,CAAAkB,OAAY;IACZC,KAAK,EAAG,IAAAV,QAAE,EAAE,KAAM,CAAG;IACrBD,WAAW,EACV,IAAAO,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACGT,WAAW,EACb,IAAAO,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAuB,YAAY;MACZC,IAAI,EAAC,kDAAkD;MACvDC,SAAS,EAAC;IAA8C,GAEtD,IAAAb,QAAE,EAAE,sBAAuB,CAChB,CACb;EACF,CACD,CAAC,EACF,IAAAM,MAAA,CAAAC,aAAA;IAAKM,SAAS,EAAC;EAAoC,GAClD,IAAAP,MAAA,CAAAC,aAAA,EAACZ,mBAAmB;IACnBmB,KAAK,EAAGb,KAAO;IACfc,QAAQ,EAAGV,QAAU;IACrBW,cAAc,EAAGZ;EAAgB,CACjC,CACG,CACJ,CAAC;AAEL;AAAC,IAAAa,QAAA,GAEcnB,SAAS;AAAAoB,OAAA,CAAAT,OAAA,GAAAQ,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_blockEditor","_lockUnlock","_header","_interopRequireDefault","useGlobalStyle","AdvancedPanel","StylesAdvancedPanel","unlock","blockEditorPrivateApis","ScreenCSS","description","__","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","_react","createElement","Fragment","default","title","ExternalLink","href","className","value","onChange","inheritedValue","_default","exports"],"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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIA,MAAM;EAAEM,cAAc;EAAEC,aAAa,EAAEC;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EACpEC,wBACD,CAAC;AAED,SAASC,SAASA,CAAA,EAAG;EACpB,MAAMC,WAAW,GAAG,IAAAC,QAAE,EACrB,uEACD,CAAC;EACD,MAAM,CAAEC,KAAK,CAAE,GAAGR,cAAc,CAAE,EAAE,EAAES,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGZ,cAAc,CAAE,EAAE,EAAES,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EAEH,OACC,IAAAG,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAAChB,OAAA,CAAAkB,OAAY;IACZC,KAAK,EAAG,IAAAV,QAAE,EAAE,KAAM,CAAG;IACrBD,WAAW,EACV,IAAAO,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACGT,WAAW,EACb,IAAAO,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAuB,YAAY;MACZC,IAAI,EAAC,kDAAkD;MACvDC,SAAS,EAAC;IAA8C,GAEtD,IAAAb,QAAE,EAAE,sBAAuB,CAChB,CACb;EACF,CACD,CAAC,EACF,IAAAM,MAAA,CAAAC,aAAA;IAAKM,SAAS,EAAC;EAAoC,GAClD,IAAAP,MAAA,CAAAC,aAAA,EAACZ,mBAAmB;IACnBmB,KAAK,EAAGb,KAAO;IACfc,QAAQ,EAAGV,QAAU;IACrBW,cAAc,EAAGZ;EAAgB,CACjC,CACG,CACJ,CAAC;AAEL;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEcX,SAAS"}
@@ -32,6 +32,5 @@ function ScreenLayout() {
32
32
  title: (0, _i18n.__)('Layout')
33
33
  }), hasDimensionsPanel && (0, _react.createElement)(_dimensionsPanel.default, null));
34
34
  }
35
- var _default = ScreenLayout;
36
- exports.default = _default;
35
+ var _default = exports.default = ScreenLayout;
37
36
  //# sourceMappingURL=screen-layout.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_blockEditor","_dimensionsPanel","_interopRequireDefault","_header","_lockUnlock","useHasDimensionsPanel","useGlobalSetting","useSettingsForBlockElement","unlock","blockEditorPrivateApis","ScreenLayout","rawSettings","settings","hasDimensionsPanel","_react","createElement","Fragment","default","title","__","_default","exports"],"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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,gBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAXA;AACA;AACA;;AAIA;AACA;AACA;;AAKA,MAAM;EAAEM,qBAAqB;EAAEC,gBAAgB;EAAEC;AAA2B,CAAC,GAC5E,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEjC,SAASC,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,WAAW,CAAE,GAAGL,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMM,QAAQ,GAAGL,0BAA0B,CAAEI,WAAY,CAAC;EAC1D,MAAME,kBAAkB,GAAGR,qBAAqB,CAAEO,QAAS,CAAC;EAC5D,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACZ,OAAA,CAAAc,OAAY;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS;EAAG,CAAE,CAAC,EACvCN,kBAAkB,IAAI,IAAAC,MAAA,CAAAC,aAAA,EAACd,gBAAA,CAAAgB,OAAe,MAAE,CACzC,CAAC;AAEL;AAAC,IAAAG,QAAA,GAEcV,YAAY;AAAAW,OAAA,CAAAJ,OAAA,GAAAG,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_blockEditor","_dimensionsPanel","_interopRequireDefault","_header","_lockUnlock","useHasDimensionsPanel","useGlobalSetting","useSettingsForBlockElement","unlock","blockEditorPrivateApis","ScreenLayout","rawSettings","settings","hasDimensionsPanel","_react","createElement","Fragment","default","title","__","_default","exports"],"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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,gBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAXA;AACA;AACA;;AAIA;AACA;AACA;;AAKA,MAAM;EAAEM,qBAAqB;EAAEC,gBAAgB;EAAEC;AAA2B,CAAC,GAC5E,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEjC,SAASC,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,WAAW,CAAE,GAAGL,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMM,QAAQ,GAAGL,0BAA0B,CAAEI,WAAY,CAAC;EAC1D,MAAME,kBAAkB,GAAGR,qBAAqB,CAAEO,QAAS,CAAC;EAC5D,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACZ,OAAA,CAAAc,OAAY;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS;EAAG,CAAE,CAAC,EACvCN,kBAAkB,IAAI,IAAAC,MAAA,CAAAC,aAAA,EAACd,gBAAA,CAAAgB,OAAe,MAAE,CACzC,CAAC;AAEL;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAJ,OAAA,GAEcP,YAAY"}
@@ -162,6 +162,5 @@ function ScreenRevisions() {
162
162
  onCancel: () => setIsLoadingRevisionWithUnsavedChanges(false)
163
163
  }, (0, _i18n.__)('Any unsaved changes will be lost when you apply this revision.')));
164
164
  }
165
- var _default = ScreenRevisions;
166
- exports.default = _default;
165
+ var _default = exports.default = ScreenRevisions;
167
166
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_element","_blockEditor","_header","_interopRequireDefault","_lockUnlock","_revisions","_store","_useGlobalStylesRevisions","_revisionsButtons","_styleBook","_pagination","GlobalStylesContext","areGlobalStyleConfigsEqual","unlock","blockEditorPrivateApis","PAGE_SIZE","ScreenRevisions","goTo","useNavigator","user","currentEditorGlobalStyles","setUserConfig","useContext","blocks","editorCanvasContainerView","useSelect","select","editSiteStore","getEditorCanvasContainerView","blockEditorStore","getBlocks","currentPage","setCurrentPage","useState","currentRevisions","setCurrentRevisions","revisions","isLoading","hasUnsavedChanges","revisionsCount","useGlobalStylesRevisions","query","per_page","page","numPages","Math","ceil","currentlySelectedRevision","setCurrentlySelectedRevision","isLoadingRevisionWithUnsavedChanges","setIsLoadingRevisionWithUnsavedChanges","setEditorCanvasContainerView","useDispatch","selectedRevisionMatchesEditorStyles","onCloseRevisions","undefined","restoreRevision","revision","styles","settings","selectRevision","id","useEffect","startsWith","length","firstRevision","currentlySelectedRevisionId","shouldSelectFirstItem","isLoadButtonEnabled","hasRevisions","_react","createElement","Fragment","default","title","sprintf","__","description","onBack","Spinner","className","userConfig","isSelected","onClose","closeButtonLabel","onChange","selectedRevisionId","userRevisions","canApplyRevision","onApplyRevision","changePage","totalItems","disabled","label","__experimentalConfirmDialog","isOpen","confirmButtonText","onConfirm","onCancel","_default","exports"],"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\tsetEditorCanvasContainerView( undefined );\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\tsetEditorCanvasContainerView( editorCanvasContainerView );\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"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAQA,IAAAK,OAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAF,sBAAA,CAAAN,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,yBAAA,GAAAJ,sBAAA,CAAAN,OAAA;AACA,IAAAW,iBAAA,GAAAL,sBAAA,CAAAN,OAAA;AACA,IAAAY,UAAA,GAAAN,sBAAA,CAAAN,OAAA;AACA,IAAAa,WAAA,GAAAP,sBAAA,CAAAN,OAAA;AA1BA;AACA;AACA;;AAcA;AACA;AACA;;AAUA,MAAM;EAAEc,mBAAmB;EAAEC;AAA2B,CAAC,GAAG,IAAAC,kBAAM,EACjEC,wBACD,CAAC;AAED,MAAMC,SAA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KACXzC,eAAe,CAAET,yBAA0B,CAC3C;IACDmD,QAAQ,EAAGA,CAAA,KACVhD,sCAAsC,CAAE,KAAM;EAC9C,GAEC,IAAA0B,QAAE,EACH,gEACD,CACc,CAEf,CAAC;AAEL;AAAC,IAAAuB,QAAA,GAEcnF,eAAe;AAAAoF,OAAA,CAAA3B,OAAA,GAAA0B,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_element","_blockEditor","_header","_interopRequireDefault","_lockUnlock","_revisions","_store","_useGlobalStylesRevisions","_revisionsButtons","_styleBook","_pagination","GlobalStylesContext","areGlobalStyleConfigsEqual","unlock","blockEditorPrivateApis","PAGE_SIZE","ScreenRevisions","goTo","useNavigator","user","currentEditorGlobalStyles","setUserConfig","useContext","blocks","editorCanvasContainerView","useSelect","select","editSiteStore","getEditorCanvasContainerView","blockEditorStore","getBlocks","currentPage","setCurrentPage","useState","currentRevisions","setCurrentRevisions","revisions","isLoading","hasUnsavedChanges","revisionsCount","useGlobalStylesRevisions","query","per_page","page","numPages","Math","ceil","currentlySelectedRevision","setCurrentlySelectedRevision","isLoadingRevisionWithUnsavedChanges","setIsLoadingRevisionWithUnsavedChanges","setEditorCanvasContainerView","useDispatch","selectedRevisionMatchesEditorStyles","onCloseRevisions","undefined","restoreRevision","revision","styles","settings","selectRevision","id","useEffect","startsWith","length","firstRevision","currentlySelectedRevisionId","shouldSelectFirstItem","isLoadButtonEnabled","hasRevisions","_react","createElement","Fragment","default","title","sprintf","__","description","onBack","Spinner","className","userConfig","isSelected","onClose","closeButtonLabel","onChange","selectedRevisionId","userRevisions","canApplyRevision","onApplyRevision","changePage","totalItems","disabled","label","__experimentalConfirmDialog","isOpen","confirmButtonText","onConfirm","onCancel","_default","exports"],"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\tsetEditorCanvasContainerView( undefined );\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\tsetEditorCanvasContainerView( editorCanvasContainerView );\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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,EAAGA,CAAA,KACjBnD,iBAAiB,GACdY,sCAAsC,CAAE,IAAK,CAAC,GAC9CM,eAAe,CAAET,yBAA0B;EAC9C,CACD,CAAC,EACAH,QAAQ,GAAG,CAAC,IACb,IAAA0B,MAAA,CAAAC,aAAA;IAAKS,SAAS,EAAC;EAAkD,GAChE,IAAAV,MAAA,CAAAC,aAAA,EAAC7D,WAAA,CAAA+D,OAAU;IACVO,SAAS,EAAC,sDAAsD;IAChEjD,WAAW,EAAGA,WAAa;IAC3Ba,QAAQ,EAAGA,QAAU;IACrB8C,UAAU,EAAG1D,cAAgB;IAC7B2D,UAAU,EAAGpD,cAAgB;IAC7BqD,QAAQ,EAAGvD,SAAW;IACtBwD,KAAK,EAAG,IAAAjB,QAAE,EAAE,qCAAsC;EAAG,CACrD,CACG,CACL,EACC3B,mCAAmC,IACpC,IAAAqB,MAAA,CAAAC,aAAA,EAACzE,WAAA,CAAAgG,2BAAa;IACbC,MAAM,EAAG9C,mCAAqC;IAC9C+C,iBAAiB,EAAG,IAAApB,QAAE,EAAE,OAAQ,CAAG;IACnCqB,SAAS,EAAGA,CAAA,KACXzC,eAAe,CAAET,yBAA0B,CAC3C;IACDmD,QAAQ,EAAGA,CAAA,KACVhD,sCAAsC,CAAE,KAAM;EAC9C,GAEC,IAAA0B,QAAE,EACH,gEACD,CACc,CAEf,CAAC;AAEL;AAAC,IAAAuB,QAAA,GAAAC,OAAA,CAAA3B,OAAA,GAEczD,eAAe"}
@@ -44,7 +44,7 @@ function ChangesSummary({
44
44
  return (0, _react.createElement)("span", {
45
45
  "data-testid": "global-styles-revision-changes",
46
46
  className: "edit-site-global-styles-screen-revisions__changes"
47
- }, changes.join(', '));
47
+ }, changes.join(', '), ".");
48
48
  }
49
49
 
50
50
  /**
@@ -173,6 +173,5 @@ function RevisionsButtons({
173
173
  }, isReset ? (0, _i18n.__)('Reset to defaults') : (0, _i18n.__)('Apply'))));
174
174
  }));
175
175
  }
176
- var _default = RevisionsButtons;
177
- exports.default = _default;
176
+ var _default = exports.default = RevisionsButtons;
178
177
  //# sourceMappingURL=revisions-buttons.js.map