@wordpress/edit-site 6.9.0 → 6.11.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 (675) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-post/index.js +1 -1
  3. package/build/components/add-new-post/index.js.map +1 -1
  4. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  5. package/build/components/add-new-template/index.js +1 -1
  6. package/build/components/add-new-template/index.js.map +1 -1
  7. package/build/components/add-new-template/utils.js +8 -8
  8. package/build/components/add-new-template/utils.js.map +1 -1
  9. package/build/components/app/index.js +3 -1
  10. package/build/components/app/index.js.map +1 -1
  11. package/build/components/block-editor/use-editor-iframe-props.js +29 -20
  12. package/build/components/block-editor/use-editor-iframe-props.js.map +1 -1
  13. package/build/components/block-editor/use-site-editor-settings.js +10 -8
  14. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  15. package/build/components/editor/index.js +23 -11
  16. package/build/components/editor/index.js.map +1 -1
  17. package/build/components/editor/use-adapt-editor-to-canvas.js +49 -0
  18. package/build/components/editor/use-adapt-editor-to-canvas.js.map +1 -0
  19. package/build/components/editor/use-editor-title.js +2 -2
  20. package/build/components/editor/use-editor-title.js.map +1 -1
  21. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  22. package/build/components/global-styles/font-families.js +41 -25
  23. package/build/components/global-styles/font-families.js.map +1 -1
  24. package/build/components/global-styles/font-family-item.js +1 -1
  25. package/build/components/global-styles/font-family-item.js.map +1 -1
  26. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  27. package/build/components/global-styles/font-library-modal/context.js +1 -0
  28. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  29. package/build/components/global-styles/font-library-modal/font-card.js +1 -1
  30. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  31. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  32. package/build/components/global-styles/font-library-modal/installed-fonts.js +4 -3
  33. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  34. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  35. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  36. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  37. package/build/components/global-styles/font-library-modal/upload-fonts.js +1 -0
  38. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  39. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  40. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  41. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  42. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +1 -1
  43. package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -1
  44. package/build/components/global-styles/font-sizes/font-size.js +14 -15
  45. package/build/components/global-styles/font-sizes/font-size.js.map +1 -1
  46. package/build/components/global-styles/font-sizes/font-sizes-count.js +1 -2
  47. package/build/components/global-styles/font-sizes/font-sizes-count.js.map +1 -1
  48. package/build/components/global-styles/font-sizes/font-sizes.js +4 -4
  49. package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  50. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  51. package/build/components/global-styles/palette.js +16 -13
  52. package/build/components/global-styles/palette.js.map +1 -1
  53. package/build/components/global-styles/preset-colors.js.map +1 -1
  54. package/build/components/global-styles/root-menu.js +0 -4
  55. package/build/components/global-styles/root-menu.js.map +1 -1
  56. package/build/components/global-styles/screen-block-list.js +2 -6
  57. package/build/components/global-styles/screen-block-list.js.map +1 -1
  58. package/build/components/global-styles/screen-css.js +1 -1
  59. package/build/components/global-styles/screen-css.js.map +1 -1
  60. package/build/components/global-styles/screen-revisions/index.js +3 -8
  61. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  62. package/build/components/global-styles/screen-revisions/revisions-buttons.js +3 -3
  63. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  64. package/build/components/global-styles/screen-root.js +0 -3
  65. package/build/components/global-styles/screen-root.js.map +1 -1
  66. package/build/components/global-styles/screen-style-variations.js +14 -3
  67. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  68. package/build/components/global-styles/shadow-utils.js.map +1 -1
  69. package/build/components/global-styles/shadows-edit-panel.js +26 -15
  70. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  71. package/build/components/global-styles/shadows-panel.js +1 -4
  72. package/build/components/global-styles/shadows-panel.js.map +1 -1
  73. package/build/components/global-styles/style-variations-container.js +1 -5
  74. package/build/components/global-styles/style-variations-container.js.map +1 -1
  75. package/build/components/global-styles/typography-elements.js +1 -4
  76. package/build/components/global-styles/typography-elements.js.map +1 -1
  77. package/build/components/global-styles/typography-preview.js.map +1 -1
  78. package/build/components/global-styles/ui.js +27 -14
  79. package/build/components/global-styles/ui.js.map +1 -1
  80. package/build/components/global-styles/utils.js.map +1 -1
  81. package/build/components/global-styles/variations/variation.js +2 -2
  82. package/build/components/global-styles/variations/variation.js.map +1 -1
  83. package/build/components/global-styles/variations/variations-panel.js +0 -1
  84. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  85. package/build/components/global-styles-sidebar/default-sidebar.js +0 -1
  86. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  87. package/build/components/global-styles-sidebar/index.js +43 -36
  88. package/build/components/global-styles-sidebar/index.js.map +1 -1
  89. package/build/components/layout/animation.js +1 -3
  90. package/build/components/layout/animation.js.map +1 -1
  91. package/build/components/layout/index.js +23 -47
  92. package/build/components/layout/index.js.map +1 -1
  93. package/build/components/layout/router.js +17 -140
  94. package/build/components/layout/router.js.map +1 -1
  95. package/build/components/page-patterns/delete-category-menu-item.js +3 -3
  96. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  97. package/build/components/page-patterns/fields.js.map +1 -1
  98. package/build/components/page-patterns/header.js +1 -1
  99. package/build/components/page-patterns/header.js.map +1 -1
  100. package/build/components/page-patterns/index.js +4 -2
  101. package/build/components/page-patterns/index.js.map +1 -1
  102. package/build/components/page-patterns/use-pattern-settings.js +1 -1
  103. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  104. package/build/components/page-templates/index.js +2 -2
  105. package/build/components/page-templates/index.js.map +1 -1
  106. package/build/components/pagination/index.js +1 -1
  107. package/build/components/pagination/index.js.map +1 -1
  108. package/build/components/post-edit/index.js +8 -4
  109. package/build/components/post-edit/index.js.map +1 -1
  110. package/build/components/post-fields/index.js +8 -54
  111. package/build/components/post-fields/index.js.map +1 -1
  112. package/build/components/post-list/index.js +1 -1
  113. package/build/components/post-list/index.js.map +1 -1
  114. package/build/components/posts-app/index.js.map +1 -1
  115. package/build/components/posts-app/router.js +4 -4
  116. package/build/components/posts-app/router.js.map +1 -1
  117. package/build/components/resizable-frame/index.js +21 -9
  118. package/build/components/resizable-frame/index.js.map +1 -1
  119. package/build/components/revisions/index.js +1 -1
  120. package/build/components/revisions/index.js.map +1 -1
  121. package/build/components/routes/use-title.js +1 -1
  122. package/build/components/routes/use-title.js.map +1 -1
  123. package/build/components/save-button/index.js +3 -3
  124. package/build/components/save-button/index.js.map +1 -1
  125. package/build/components/save-keyboard-shortcut/index.js +78 -0
  126. package/build/components/save-keyboard-shortcut/index.js.map +1 -0
  127. package/build/components/save-panel/index.js +17 -6
  128. package/build/components/save-panel/index.js.map +1 -1
  129. package/build/components/sidebar-button/index.js +1 -1
  130. package/build/components/sidebar-button/index.js.map +1 -1
  131. package/build/components/sidebar-dataviews/default-views.js +2 -5
  132. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  133. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  134. package/build/components/sidebar-navigation-screen/index.js +2 -1
  135. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  136. package/build/components/sidebar-navigation-screen-details-footer/index.js +1 -1
  137. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  138. package/build/components/sidebar-navigation-screen-global-styles/index.js +30 -10
  139. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  140. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  141. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +5 -5
  142. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  143. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +3 -3
  144. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  145. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +7 -12
  146. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  147. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +2 -2
  148. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  149. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  150. package/build/components/site-editor-routes/home-edit.js +26 -0
  151. package/build/components/site-editor-routes/home-edit.js.map +1 -0
  152. package/build/components/site-editor-routes/home-view.js +25 -0
  153. package/build/components/site-editor-routes/home-view.js.map +1 -0
  154. package/build/components/site-editor-routes/index.js +49 -0
  155. package/build/components/site-editor-routes/index.js.map +1 -0
  156. package/build/components/site-editor-routes/navigation-edit.js +29 -0
  157. package/build/components/site-editor-routes/navigation-edit.js.map +1 -0
  158. package/build/components/site-editor-routes/navigation-item-edit.js +31 -0
  159. package/build/components/site-editor-routes/navigation-item-edit.js.map +1 -0
  160. package/build/components/site-editor-routes/navigation-item-view.js +30 -0
  161. package/build/components/site-editor-routes/navigation-item-view.js.map +1 -0
  162. package/build/components/site-editor-routes/navigation-view.js +28 -0
  163. package/build/components/site-editor-routes/navigation-view.js.map +1 -0
  164. package/build/components/site-editor-routes/pages-edit.js +43 -0
  165. package/build/components/site-editor-routes/pages-edit.js.map +1 -0
  166. package/build/components/site-editor-routes/pages-list-view-quick-edit.js +64 -0
  167. package/build/components/site-editor-routes/pages-list-view-quick-edit.js.map +1 -0
  168. package/build/components/site-editor-routes/pages-list-view.js +47 -0
  169. package/build/components/site-editor-routes/pages-list-view.js.map +1 -0
  170. package/build/components/site-editor-routes/pages-view-quick-edit.js +61 -0
  171. package/build/components/site-editor-routes/pages-view-quick-edit.js.map +1 -0
  172. package/build/components/site-editor-routes/pages-view.js +42 -0
  173. package/build/components/site-editor-routes/pages-view.js.map +1 -0
  174. package/build/components/site-editor-routes/patterns-edit.js +31 -0
  175. package/build/components/site-editor-routes/patterns-edit.js.map +1 -0
  176. package/build/components/site-editor-routes/patterns-view.js +29 -0
  177. package/build/components/site-editor-routes/patterns-view.js.map +1 -0
  178. package/build/components/site-editor-routes/styles-edit.js +28 -0
  179. package/build/components/site-editor-routes/styles-edit.js.map +1 -0
  180. package/build/components/site-editor-routes/styles-view.js +27 -0
  181. package/build/components/site-editor-routes/styles-view.js.map +1 -0
  182. package/build/components/site-editor-routes/templates-edit.js +31 -0
  183. package/build/components/site-editor-routes/templates-edit.js.map +1 -0
  184. package/build/components/site-editor-routes/templates-list-view.js +34 -0
  185. package/build/components/site-editor-routes/templates-list-view.js.map +1 -0
  186. package/build/components/site-editor-routes/templates-view.js +29 -0
  187. package/build/components/site-editor-routes/templates-view.js.map +1 -0
  188. package/build/components/site-hub/index.js +3 -2
  189. package/build/components/site-hub/index.js.map +1 -1
  190. package/build/components/style-book/color-examples.js +46 -0
  191. package/build/components/style-book/color-examples.js.map +1 -0
  192. package/build/components/style-book/constants.js +75 -10
  193. package/build/components/style-book/constants.js.map +1 -1
  194. package/build/components/style-book/duotone-examples.js +55 -0
  195. package/build/components/style-book/duotone-examples.js.map +1 -0
  196. package/build/components/style-book/examples.js +46 -3
  197. package/build/components/style-book/examples.js.map +1 -1
  198. package/build/components/style-book/index.js +92 -36
  199. package/build/components/style-book/index.js.map +1 -1
  200. package/build/components/style-book/types.js.map +1 -1
  201. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +6 -1
  202. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  203. package/build/deprecated.js.map +1 -1
  204. package/build/hooks/commands/use-common-commands.js +46 -30
  205. package/build/hooks/commands/use-common-commands.js.map +1 -1
  206. package/build/hooks/commands/use-edit-mode-commands.js +15 -11
  207. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  208. package/build/hooks/commands/use-set-command-context.js +12 -15
  209. package/build/hooks/commands/use-set-command-context.js.map +1 -1
  210. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  211. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  212. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  213. package/build/index.js +2 -4
  214. package/build/index.js.map +1 -1
  215. package/build/posts.js +1 -1
  216. package/build/posts.js.map +1 -1
  217. package/build/store/actions.js.map +1 -1
  218. package/build/store/private-actions.js +8 -61
  219. package/build/store/private-actions.js.map +1 -1
  220. package/build/store/private-selectors.js +4 -12
  221. package/build/store/private-selectors.js.map +1 -1
  222. package/build/store/reducer.js +9 -18
  223. package/build/store/reducer.js.map +1 -1
  224. package/build/store/selectors.js.map +1 -1
  225. package/build/utils/get-filtered-template-parts.js.map +1 -1
  226. package/build-module/components/add-new-pattern/index.js +1 -3
  227. package/build-module/components/add-new-pattern/index.js.map +1 -1
  228. package/build-module/components/add-new-post/index.js +2 -3
  229. package/build-module/components/add-new-post/index.js.map +1 -1
  230. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -2
  231. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  232. package/build-module/components/add-new-template/add-custom-template-modal-content.js +1 -3
  233. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  234. package/build-module/components/add-new-template/index.js +2 -4
  235. package/build-module/components/add-new-template/index.js.map +1 -1
  236. package/build-module/components/add-new-template/utils.js +9 -9
  237. package/build-module/components/add-new-template/utils.js.map +1 -1
  238. package/build-module/components/app/index.js +6 -5
  239. package/build-module/components/app/index.js.map +1 -1
  240. package/build-module/components/block-editor/use-editor-iframe-props.js +30 -21
  241. package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -1
  242. package/build-module/components/block-editor/use-site-editor-settings.js +10 -8
  243. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  244. package/build-module/components/editor/index.js +24 -14
  245. package/build-module/components/editor/index.js.map +1 -1
  246. package/build-module/components/editor/use-adapt-editor-to-canvas.js +42 -0
  247. package/build-module/components/editor/use-adapt-editor-to-canvas.js.map +1 -0
  248. package/build-module/components/editor/use-editor-title.js +3 -3
  249. package/build-module/components/editor/use-editor-title.js.map +1 -1
  250. package/build-module/components/editor-canvas-container/index.js +1 -2
  251. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  252. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  253. package/build-module/components/global-styles/color-palette-panel.js +1 -2
  254. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  255. package/build-module/components/global-styles/font-families.js +45 -31
  256. package/build-module/components/global-styles/font-families.js.map +1 -1
  257. package/build-module/components/global-styles/font-family-item.js +2 -3
  258. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  259. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +1 -2
  260. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  261. package/build-module/components/global-styles/font-library-modal/context.js +1 -0
  262. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  263. package/build-module/components/global-styles/font-library-modal/font-card.js +2 -3
  264. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  265. package/build-module/components/global-styles/font-library-modal/font-collection.js +1 -3
  266. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  267. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +1 -2
  268. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  269. package/build-module/components/global-styles/font-library-modal/index.js +1 -2
  270. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  271. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +5 -6
  272. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  273. package/build-module/components/global-styles/font-library-modal/library-font-details.js +1 -3
  274. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  275. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +1 -2
  276. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  277. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  278. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +2 -2
  279. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  280. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  281. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  282. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  283. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +1 -1
  284. package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -1
  285. package/build-module/components/global-styles/font-sizes/font-size.js +15 -18
  286. package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -1
  287. package/build-module/components/global-styles/font-sizes/font-sizes-count.js +2 -4
  288. package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +1 -1
  289. package/build-module/components/global-styles/font-sizes/font-sizes.js +5 -7
  290. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  291. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +1 -2
  292. package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -1
  293. package/build-module/components/global-styles/gradients-palette-panel.js +1 -2
  294. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  295. package/build-module/components/global-styles/header.js +1 -2
  296. package/build-module/components/global-styles/header.js.map +1 -1
  297. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  298. package/build-module/components/global-styles/navigation-button.js +1 -2
  299. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  300. package/build-module/components/global-styles/palette.js +17 -15
  301. package/build-module/components/global-styles/palette.js.map +1 -1
  302. package/build-module/components/global-styles/preset-colors.js.map +1 -1
  303. package/build-module/components/global-styles/preview-iframe.js +1 -3
  304. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  305. package/build-module/components/global-styles/preview-styles.js +1 -2
  306. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  307. package/build-module/components/global-styles/root-menu.js +1 -7
  308. package/build-module/components/global-styles/root-menu.js.map +1 -1
  309. package/build-module/components/global-styles/screen-background.js +1 -3
  310. package/build-module/components/global-styles/screen-background.js.map +1 -1
  311. package/build-module/components/global-styles/screen-block-list.js +3 -9
  312. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  313. package/build-module/components/global-styles/screen-block.js +1 -3
  314. package/build-module/components/global-styles/screen-block.js.map +1 -1
  315. package/build-module/components/global-styles/screen-color-palette.js +1 -3
  316. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  317. package/build-module/components/global-styles/screen-colors.js +1 -3
  318. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  319. package/build-module/components/global-styles/screen-css.js +2 -4
  320. package/build-module/components/global-styles/screen-css.js.map +1 -1
  321. package/build-module/components/global-styles/screen-layout.js +1 -3
  322. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  323. package/build-module/components/global-styles/screen-revisions/index.js +5 -12
  324. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  325. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +4 -5
  326. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  327. package/build-module/components/global-styles/screen-root.js +1 -6
  328. package/build-module/components/global-styles/screen-root.js.map +1 -1
  329. package/build-module/components/global-styles/screen-style-variations.js +15 -6
  330. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  331. package/build-module/components/global-styles/screen-typography-element.js +1 -3
  332. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  333. package/build-module/components/global-styles/screen-typography.js +1 -3
  334. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  335. package/build-module/components/global-styles/shadow-utils.js.map +1 -1
  336. package/build-module/components/global-styles/shadows-edit-panel.js +28 -19
  337. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  338. package/build-module/components/global-styles/shadows-panel.js +2 -7
  339. package/build-module/components/global-styles/shadows-panel.js.map +1 -1
  340. package/build-module/components/global-styles/size-control/index.js +1 -2
  341. package/build-module/components/global-styles/size-control/index.js.map +1 -1
  342. package/build-module/components/global-styles/style-variations-container.js +2 -6
  343. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  344. package/build-module/components/global-styles/typeset.js +3 -5
  345. package/build-module/components/global-styles/typeset.js.map +1 -1
  346. package/build-module/components/global-styles/typography-elements.js +3 -7
  347. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  348. package/build-module/components/global-styles/typography-example.js +1 -2
  349. package/build-module/components/global-styles/typography-example.js.map +1 -1
  350. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  351. package/build-module/components/global-styles/ui.js +28 -17
  352. package/build-module/components/global-styles/ui.js.map +1 -1
  353. package/build-module/components/global-styles/utils.js.map +1 -1
  354. package/build-module/components/global-styles/variations/variation.js +3 -3
  355. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  356. package/build-module/components/global-styles/variations/variations-color.js +1 -2
  357. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  358. package/build-module/components/global-styles/variations/variations-panel.js +0 -1
  359. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  360. package/build-module/components/global-styles/variations/variations-typography.js +1 -2
  361. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  362. package/build-module/components/global-styles-sidebar/default-sidebar.js +1 -4
  363. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  364. package/build-module/components/global-styles-sidebar/index.js +45 -39
  365. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  366. package/build-module/components/layout/animation.js +1 -3
  367. package/build-module/components/layout/animation.js.map +1 -1
  368. package/build-module/components/layout/index.js +24 -50
  369. package/build-module/components/layout/index.js.map +1 -1
  370. package/build-module/components/layout/router.js +17 -139
  371. package/build-module/components/layout/router.js.map +1 -1
  372. package/build-module/components/more-menu/index.js +1 -3
  373. package/build-module/components/more-menu/index.js.map +1 -1
  374. package/build-module/components/page/header.js +1 -2
  375. package/build-module/components/page/header.js.map +1 -1
  376. package/build-module/components/page/index.js +1 -2
  377. package/build-module/components/page/index.js.map +1 -1
  378. package/build-module/components/page-patterns/delete-category-menu-item.js +5 -7
  379. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  380. package/build-module/components/page-patterns/fields.js +1 -2
  381. package/build-module/components/page-patterns/fields.js.map +1 -1
  382. package/build-module/components/page-patterns/header.js +2 -3
  383. package/build-module/components/page-patterns/header.js.map +1 -1
  384. package/build-module/components/page-patterns/index.js +5 -4
  385. package/build-module/components/page-patterns/index.js.map +1 -1
  386. package/build-module/components/page-patterns/rename-category-menu-item.js +1 -3
  387. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  388. package/build-module/components/page-patterns/use-pattern-settings.js +1 -1
  389. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  390. package/build-module/components/page-templates/fields.js +1 -2
  391. package/build-module/components/page-templates/fields.js.map +1 -1
  392. package/build-module/components/page-templates/index.js +2 -2
  393. package/build-module/components/page-templates/index.js.map +1 -1
  394. package/build-module/components/pagination/index.js +2 -3
  395. package/build-module/components/pagination/index.js.map +1 -1
  396. package/build-module/components/post-edit/index.js +9 -6
  397. package/build-module/components/post-edit/index.js.map +1 -1
  398. package/build-module/components/post-fields/index.js +10 -55
  399. package/build-module/components/post-fields/index.js.map +1 -1
  400. package/build-module/components/post-list/index.js +2 -4
  401. package/build-module/components/post-list/index.js.map +1 -1
  402. package/build-module/components/posts-app/index.js +3 -4
  403. package/build-module/components/posts-app/index.js.map +1 -1
  404. package/build-module/components/posts-app/router.js +3 -3
  405. package/build-module/components/posts-app/router.js.map +1 -1
  406. package/build-module/components/resizable-frame/index.js +21 -12
  407. package/build-module/components/resizable-frame/index.js.map +1 -1
  408. package/build-module/components/revisions/index.js +2 -3
  409. package/build-module/components/revisions/index.js.map +1 -1
  410. package/build-module/components/routes/use-title.js +1 -1
  411. package/build-module/components/routes/use-title.js.map +1 -1
  412. package/build-module/components/save-button/index.js +3 -3
  413. package/build-module/components/save-button/index.js.map +1 -1
  414. package/build-module/components/save-keyboard-shortcut/index.js +71 -0
  415. package/build-module/components/save-keyboard-shortcut/index.js.map +1 -0
  416. package/build-module/components/save-panel/index.js +18 -8
  417. package/build-module/components/save-panel/index.js.map +1 -1
  418. package/build-module/components/sidebar-button/index.js +1 -1
  419. package/build-module/components/sidebar-button/index.js.map +1 -1
  420. package/build-module/components/sidebar-dataviews/add-new-view.js +1 -3
  421. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  422. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +1 -3
  423. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  424. package/build-module/components/sidebar-dataviews/dataview-item.js +1 -2
  425. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  426. package/build-module/components/sidebar-dataviews/default-views.js +2 -5
  427. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  428. package/build-module/components/sidebar-dataviews/index.js +1 -3
  429. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  430. package/build-module/components/sidebar-navigation-item/index.js +1 -2
  431. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  432. package/build-module/components/sidebar-navigation-screen/index.js +3 -4
  433. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  434. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -3
  435. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  436. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -2
  437. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  438. package/build-module/components/sidebar-navigation-screen-global-styles/content.js +1 -2
  439. package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
  440. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +31 -13
  441. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  442. package/build-module/components/sidebar-navigation-screen-main/index.js +1 -3
  443. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  444. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  445. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +1 -3
  446. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  447. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -2
  448. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  449. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -2
  450. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  451. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +6 -6
  452. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  453. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
  454. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  455. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +8 -13
  456. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  457. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +3 -5
  458. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  459. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +1 -3
  460. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  461. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -3
  462. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  463. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +1 -2
  464. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  465. package/build-module/components/site-editor-routes/home-edit.js +18 -0
  466. package/build-module/components/site-editor-routes/home-edit.js.map +1 -0
  467. package/build-module/components/site-editor-routes/home-view.js +17 -0
  468. package/build-module/components/site-editor-routes/home-view.js.map +1 -0
  469. package/build-module/components/site-editor-routes/index.js +42 -0
  470. package/build-module/components/site-editor-routes/index.js.map +1 -0
  471. package/build-module/components/site-editor-routes/navigation-edit.js +21 -0
  472. package/build-module/components/site-editor-routes/navigation-edit.js.map +1 -0
  473. package/build-module/components/site-editor-routes/navigation-item-edit.js +23 -0
  474. package/build-module/components/site-editor-routes/navigation-item-edit.js.map +1 -0
  475. package/build-module/components/site-editor-routes/navigation-item-view.js +22 -0
  476. package/build-module/components/site-editor-routes/navigation-item-view.js.map +1 -0
  477. package/build-module/components/site-editor-routes/navigation-view.js +20 -0
  478. package/build-module/components/site-editor-routes/navigation-view.js.map +1 -0
  479. package/build-module/components/site-editor-routes/pages-edit.js +35 -0
  480. package/build-module/components/site-editor-routes/pages-edit.js.map +1 -0
  481. package/build-module/components/site-editor-routes/pages-list-view-quick-edit.js +56 -0
  482. package/build-module/components/site-editor-routes/pages-list-view-quick-edit.js.map +1 -0
  483. package/build-module/components/site-editor-routes/pages-list-view.js +39 -0
  484. package/build-module/components/site-editor-routes/pages-list-view.js.map +1 -0
  485. package/build-module/components/site-editor-routes/pages-view-quick-edit.js +53 -0
  486. package/build-module/components/site-editor-routes/pages-view-quick-edit.js.map +1 -0
  487. package/build-module/components/site-editor-routes/pages-view.js +34 -0
  488. package/build-module/components/site-editor-routes/pages-view.js.map +1 -0
  489. package/build-module/components/site-editor-routes/patterns-edit.js +23 -0
  490. package/build-module/components/site-editor-routes/patterns-edit.js.map +1 -0
  491. package/build-module/components/site-editor-routes/patterns-view.js +21 -0
  492. package/build-module/components/site-editor-routes/patterns-view.js.map +1 -0
  493. package/build-module/components/site-editor-routes/styles-edit.js +20 -0
  494. package/build-module/components/site-editor-routes/styles-edit.js.map +1 -0
  495. package/build-module/components/site-editor-routes/styles-view.js +19 -0
  496. package/build-module/components/site-editor-routes/styles-view.js.map +1 -0
  497. package/build-module/components/site-editor-routes/templates-edit.js +23 -0
  498. package/build-module/components/site-editor-routes/templates-edit.js.map +1 -0
  499. package/build-module/components/site-editor-routes/templates-list-view.js +26 -0
  500. package/build-module/components/site-editor-routes/templates-list-view.js.map +1 -0
  501. package/build-module/components/site-editor-routes/templates-view.js +21 -0
  502. package/build-module/components/site-editor-routes/templates-view.js.map +1 -0
  503. package/build-module/components/site-hub/index.js +4 -4
  504. package/build-module/components/site-hub/index.js.map +1 -1
  505. package/build-module/components/style-book/color-examples.js +38 -0
  506. package/build-module/components/style-book/color-examples.js.map +1 -0
  507. package/build-module/components/style-book/constants.js +74 -9
  508. package/build-module/components/style-book/constants.js.map +1 -1
  509. package/build-module/components/style-book/duotone-examples.js +48 -0
  510. package/build-module/components/style-book/duotone-examples.js.map +1 -0
  511. package/build-module/components/style-book/examples.js +47 -3
  512. package/build-module/components/style-book/examples.js.map +1 -1
  513. package/build-module/components/style-book/index.js +95 -40
  514. package/build-module/components/style-book/index.js.map +1 -1
  515. package/build-module/components/style-book/types.js.map +1 -1
  516. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +6 -1
  517. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  518. package/build-module/components/welcome-guide/editor.js +1 -3
  519. package/build-module/components/welcome-guide/editor.js.map +1 -1
  520. package/build-module/components/welcome-guide/image.js +1 -2
  521. package/build-module/components/welcome-guide/image.js.map +1 -1
  522. package/build-module/components/welcome-guide/index.js +1 -3
  523. package/build-module/components/welcome-guide/index.js.map +1 -1
  524. package/build-module/components/welcome-guide/page.js +1 -3
  525. package/build-module/components/welcome-guide/page.js.map +1 -1
  526. package/build-module/components/welcome-guide/styles.js +1 -3
  527. package/build-module/components/welcome-guide/styles.js.map +1 -1
  528. package/build-module/components/welcome-guide/template.js +1 -3
  529. package/build-module/components/welcome-guide/template.js.map +1 -1
  530. package/build-module/deprecated.js.map +1 -1
  531. package/build-module/hooks/commands/use-common-commands.js +46 -30
  532. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  533. package/build-module/hooks/commands/use-edit-mode-commands.js +15 -11
  534. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  535. package/build-module/hooks/commands/use-set-command-context.js +12 -15
  536. package/build-module/hooks/commands/use-set-command-context.js.map +1 -1
  537. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -3
  538. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  539. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  540. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  541. package/build-module/index.js +2 -4
  542. package/build-module/index.js.map +1 -1
  543. package/build-module/posts.js +1 -1
  544. package/build-module/posts.js.map +1 -1
  545. package/build-module/store/actions.js.map +1 -1
  546. package/build-module/store/private-actions.js +6 -59
  547. package/build-module/store/private-actions.js.map +1 -1
  548. package/build-module/store/private-selectors.js +3 -11
  549. package/build-module/store/private-selectors.js.map +1 -1
  550. package/build-module/store/reducer.js +9 -18
  551. package/build-module/store/reducer.js.map +1 -1
  552. package/build-module/store/selectors.js.map +1 -1
  553. package/build-module/utils/get-filtered-template-parts.js.map +1 -1
  554. package/build-style/posts-rtl.css +39 -45
  555. package/build-style/posts.css +39 -45
  556. package/build-style/style-rtl.css +160 -60
  557. package/build-style/style.css +160 -60
  558. package/package.json +44 -42
  559. package/src/components/add-new-post/index.js +1 -1
  560. package/src/components/add-new-template/index.js +1 -1
  561. package/src/components/add-new-template/utils.js +12 -9
  562. package/src/components/app/index.js +4 -2
  563. package/src/components/block-editor/use-editor-iframe-props.js +22 -18
  564. package/src/components/block-editor/use-site-editor-settings.js +12 -10
  565. package/src/components/editor/index.js +34 -14
  566. package/src/components/editor/use-adapt-editor-to-canvas.js +53 -0
  567. package/src/components/editor/use-editor-title.js +3 -3
  568. package/src/components/global-styles/font-families.js +51 -35
  569. package/src/components/global-styles/font-sizes/font-size.js +20 -21
  570. package/src/components/global-styles/font-sizes/font-sizes-count.js +1 -4
  571. package/src/components/global-styles/font-sizes/font-sizes.js +7 -9
  572. package/src/components/global-styles/palette.js +21 -18
  573. package/src/components/global-styles/root-menu.js +3 -16
  574. package/src/components/global-styles/screen-block-list.js +1 -8
  575. package/src/components/global-styles/screen-css.js +1 -0
  576. package/src/components/global-styles/screen-revisions/index.js +2 -11
  577. package/src/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
  578. package/src/components/global-styles/screen-root.js +3 -12
  579. package/src/components/global-styles/screen-style-variations.js +11 -3
  580. package/src/components/global-styles/shadows-edit-panel.js +33 -18
  581. package/src/components/global-styles/shadows-panel.js +0 -4
  582. package/src/components/global-styles/style-variations-container.js +2 -7
  583. package/src/components/global-styles/typography-elements.js +3 -11
  584. package/src/components/global-styles/ui.js +29 -12
  585. package/src/components/global-styles/variations/variation.js +3 -3
  586. package/src/components/global-styles/variations/variations-panel.js +0 -1
  587. package/src/components/global-styles-sidebar/default-sidebar.js +0 -1
  588. package/src/components/global-styles-sidebar/index.js +86 -75
  589. package/src/components/global-styles-sidebar/style.scss +6 -0
  590. package/src/components/layout/animation.js +0 -1
  591. package/src/components/layout/index.js +17 -51
  592. package/src/components/layout/router.js +18 -133
  593. package/src/components/layout/style.scss +2 -2
  594. package/src/components/page-patterns/delete-category-menu-item.js +4 -4
  595. package/src/components/page-patterns/index.js +3 -2
  596. package/src/components/page-patterns/use-pattern-settings.js +1 -1
  597. package/src/components/page-templates/index.js +0 -1
  598. package/src/components/pagination/index.js +1 -1
  599. package/src/components/post-edit/index.js +35 -4
  600. package/src/components/post-fields/index.js +7 -54
  601. package/src/components/post-fields/style.scss +3 -0
  602. package/src/components/post-list/index.js +1 -1
  603. package/src/components/post-list/style.scss +1 -1
  604. package/src/components/posts-app/index.js +2 -2
  605. package/src/components/posts-app/router.js +3 -3
  606. package/src/components/resizable-frame/index.js +19 -10
  607. package/src/components/revisions/index.js +4 -1
  608. package/src/components/save-keyboard-shortcut/index.js +69 -0
  609. package/src/components/save-panel/index.js +30 -32
  610. package/src/components/sidebar-button/index.js +1 -1
  611. package/src/components/sidebar-button/style.scss +2 -2
  612. package/src/components/sidebar-dataviews/default-views.js +2 -5
  613. package/src/components/sidebar-navigation-screen/index.js +2 -1
  614. package/src/components/sidebar-navigation-screen/style.scss +5 -1
  615. package/src/components/sidebar-navigation-screen-global-styles/index.js +47 -29
  616. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -2
  617. package/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
  618. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +11 -13
  619. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +1 -1
  620. package/src/components/site-editor-routes/README.md +20 -0
  621. package/src/components/site-editor-routes/home-edit.js +17 -0
  622. package/src/components/site-editor-routes/home-view.js +16 -0
  623. package/src/components/site-editor-routes/index.js +60 -0
  624. package/src/components/site-editor-routes/navigation-edit.js +22 -0
  625. package/src/components/site-editor-routes/navigation-item-edit.js +26 -0
  626. package/src/components/site-editor-routes/navigation-item-view.js +25 -0
  627. package/src/components/site-editor-routes/navigation-view.js +21 -0
  628. package/src/components/site-editor-routes/pages-edit.js +35 -0
  629. package/src/components/site-editor-routes/pages-list-view-quick-edit.js +56 -0
  630. package/src/components/site-editor-routes/pages-list-view.js +44 -0
  631. package/src/components/site-editor-routes/pages-view-quick-edit.js +53 -0
  632. package/src/components/site-editor-routes/pages-view.js +39 -0
  633. package/src/components/site-editor-routes/patterns-edit.js +24 -0
  634. package/src/components/site-editor-routes/patterns-view.js +22 -0
  635. package/src/components/site-editor-routes/styles-edit.js +17 -0
  636. package/src/components/site-editor-routes/styles-view.js +16 -0
  637. package/src/components/site-editor-routes/templates-edit.js +22 -0
  638. package/src/components/site-editor-routes/templates-list-view.js +28 -0
  639. package/src/components/site-editor-routes/templates-view.js +22 -0
  640. package/src/components/site-hub/index.js +2 -2
  641. package/src/components/site-hub/style.scss +4 -0
  642. package/src/components/style-book/color-examples.tsx +44 -0
  643. package/src/components/style-book/constants.ts +83 -10
  644. package/src/components/style-book/duotone-examples.tsx +53 -0
  645. package/src/components/style-book/examples.tsx +113 -0
  646. package/src/components/style-book/index.js +149 -52
  647. package/src/components/style-book/style.scss +12 -14
  648. package/src/components/style-book/test/categories.js +0 -5
  649. package/src/components/style-book/types.ts +34 -1
  650. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +11 -1
  651. package/src/hooks/commands/use-common-commands.js +60 -40
  652. package/src/hooks/commands/use-edit-mode-commands.js +14 -18
  653. package/src/hooks/commands/use-set-command-context.js +7 -9
  654. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  655. package/src/index.js +1 -5
  656. package/src/store/private-actions.js +7 -82
  657. package/src/store/private-selectors.js +4 -11
  658. package/src/store/reducer.js +10 -18
  659. package/src/style.scss +3 -0
  660. package/build/components/keyboard-shortcuts/global.js +0 -53
  661. package/build/components/keyboard-shortcuts/global.js.map +0 -1
  662. package/build/components/keyboard-shortcuts/register.js +0 -34
  663. package/build/components/keyboard-shortcuts/register.js.map +0 -1
  664. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +0 -69
  665. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +0 -1
  666. package/build-module/components/keyboard-shortcuts/global.js +0 -46
  667. package/build-module/components/keyboard-shortcuts/global.js.map +0 -1
  668. package/build-module/components/keyboard-shortcuts/register.js +0 -27
  669. package/build-module/components/keyboard-shortcuts/register.js.map +0 -1
  670. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +0 -62
  671. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +0 -1
  672. package/src/components/keyboard-shortcuts/global.js +0 -47
  673. package/src/components/keyboard-shortcuts/register.js +0 -27
  674. package/src/components/style-book/examples.ts +0 -63
  675. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +0 -73
@@ -10,9 +10,7 @@ import { useLayoutEffect, useState, useMemo } from '@wordpress/element';
10
10
  * Internal dependencies
11
11
  */
12
12
  import { unlock } from '../../lock-unlock';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { jsxs as _jsxs } from "react/jsx-runtime";
15
- import { Fragment as _Fragment } from "react/jsx-runtime";
13
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
16
14
  const {
17
15
  useGlobalStyle,
18
16
  useGlobalStylesOutput
@@ -1 +1 @@
1
- {"version":3,"names":["__unstableIframe","Iframe","__unstableEditorStyles","EditorStyles","privateApis","blockEditorPrivateApis","__unstableMotion","motion","useThrottle","useReducedMotion","useResizeObserver","useLayoutEffect","useState","useMemo","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useGlobalStyle","useGlobalStylesOutput","normalizedWidth","normalizedHeight","THROTTLE_OPTIONS","leading","trailing","PreviewIframe","children","label","isFocused","withHoverView","backgroundColor","gradientValue","styles","disableMotion","isHovered","setIsHovered","containerResizeListener","width","throttledWidth","setThrottledWidthState","ratioState","setRatioState","setThrottledWidth","newRatio","ratioDiff","isRatioDiffBigEnough","Math","abs","fallbackRatio","ratio","editorStyles","css","isGlobalStyles","isReady","style","position","className","height","onMouseEnter","onMouseLeave","tabIndex","div","background","cursor","undefined","initial","animate","concat","map","child","key"],"sources":["@wordpress/edit-site/src/components/global-styles/preview-iframe.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 { __unstableMotion as motion } 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';\n\nconst { useGlobalStyle, useGlobalStylesOutput } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\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\nexport default function PreviewIframe( {\n\tchildren,\n\tlabel,\n\tisFocused,\n\twithHoverView,\n} ) {\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/*\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\t */\n\tconst ratio = ratioState ? ratioState : fallbackRatio;\n\n\t/*\n\t * Reset leaked styles from WP common.css and remove main content layout padding and border.\n\t * Add pointer cursor to the body to indicate the iframe is interactive,\n\t * similar to Typography variation previews.\n\t */\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;cursor: pointer;}',\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\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{ []\n\t\t\t\t\t\t\t.concat( children ) // This makes sure children is always an array.\n\t\t\t\t\t\t\t.map( ( child, key ) => child( { ratio, key } ) ) }\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"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,gBAAgB,IAAIC,MAAM,EAC1BC,sBAAsB,IAAIC,YAAY,EACtCC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAClE,SACCC,WAAW,EACXC,gBAAgB,EAChBC,iBAAiB,QACX,oBAAoB;AAC3B,SAASC,eAAe,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,oBAAoB;;AAEvE;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAM;EAAEC,cAAc;EAAEC;AAAsB,CAAC,GAAGR,MAAM,CACvDT,sBACD,CAAC;AAED,MAAMkB,eAAe,GAAG,G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,CAAE,CAAC,eACxCrC,IAAA,CAACT,MAAM,CAACyD,GAAG;QACVP,KAAK,EAAG;UACPG,MAAM,EAAEpC,gBAAgB,GAAG4B,KAAK;UAChCZ,KAAK,EAAE,MAAM;UACbyB,UAAU,EAAE/B,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,eAAe;UAC5CiC,MAAM,EAAElC,aAAa,GAAG,SAAS,GAAGmC;QACrC,CAAG;QACHC,OAAO,EAAC,OAAO;QACfC,OAAO,EACN,CAAEhC,SAAS,IAAIN,SAAS,KACxB,CAAEK,aAAa,IACfN,KAAK,GACF,OAAO,GACP,OACH;QAAAD,QAAA,EAEC,EAAE,CACFyC,MAAM,CAAEzC,QAAS,CAAC,CAAC;QAAA,CACnB0C,GAAG,CAAE,CAAEC,KAAK,EAAEC,GAAG,KAAMD,KAAK,CAAE;UAAEpB,KAAK;UAAEqB;QAAI,CAAE,CAAE;MAAC,CACvC,CAAC;IAAA,CACN,CACR;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["__unstableIframe","Iframe","__unstableEditorStyles","EditorStyles","privateApis","blockEditorPrivateApis","__unstableMotion","motion","useThrottle","useReducedMotion","useResizeObserver","useLayoutEffect","useState","useMemo","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useGlobalStyle","useGlobalStylesOutput","normalizedWidth","normalizedHeight","THROTTLE_OPTIONS","leading","trailing","PreviewIframe","children","label","isFocused","withHoverView","backgroundColor","gradientValue","styles","disableMotion","isHovered","setIsHovered","containerResizeListener","width","throttledWidth","setThrottledWidthState","ratioState","setRatioState","setThrottledWidth","newRatio","ratioDiff","isRatioDiffBigEnough","Math","abs","fallbackRatio","ratio","editorStyles","css","isGlobalStyles","isReady","style","position","className","height","onMouseEnter","onMouseLeave","tabIndex","div","background","cursor","undefined","initial","animate","concat","map","child","key"],"sources":["@wordpress/edit-site/src/components/global-styles/preview-iframe.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 { __unstableMotion as motion } 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';\n\nconst { useGlobalStyle, useGlobalStylesOutput } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\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\nexport default function PreviewIframe( {\n\tchildren,\n\tlabel,\n\tisFocused,\n\twithHoverView,\n} ) {\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/*\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\t */\n\tconst ratio = ratioState ? ratioState : fallbackRatio;\n\n\t/*\n\t * Reset leaked styles from WP common.css and remove main content layout padding and border.\n\t * Add pointer cursor to the body to indicate the iframe is interactive,\n\t * similar to Typography variation previews.\n\t */\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;cursor: pointer;}',\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\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{ []\n\t\t\t\t\t\t\t.concat( children ) // This makes sure children is always an array.\n\t\t\t\t\t\t\t.map( ( child, key ) => child( { ratio, key } ) ) }\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"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,gBAAgB,IAAIC,MAAM,EAC1BC,sBAAsB,IAAIC,YAAY,EACtCC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAClE,SACCC,WAAW,EACXC,gBAAgB,EAChBC,iBAAiB,QACX,oBAAoB;AAC3B,SAASC,eAAe,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,oBAAoB;;AAEvE;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAM;EAAEC,cAAc;EAAEC;AAAsB,CAAC,GAAGR,MAAM,CACvDT,sBACD,CAAC;AAED,MAAMkB,eAAe,GAAG,GAAG;AAC3B,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,eACxCrC,IAAA,CAACT,MAAM,CAACyD,GAAG;QACVP,KAAK,EAAG;UACPG,MAAM,EAAEpC,gBAAgB,GAAG4B,KAAK;UAChCZ,KAAK,EAAE,MAAM;UACbyB,UAAU,EAAE/B,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,eAAe;UAC5CiC,MAAM,EAAElC,aAAa,GAAG,SAAS,GAAGmC;QACrC,CAAG;QACHC,OAAO,EAAC,OAAO;QACfC,OAAO,EACN,CAAEhC,SAAS,IAAIN,SAAS,KACxB,CAAEK,aAAa,IACfN,KAAK,GACF,OAAO,GACP,OACH;QAAAD,QAAA,EAEC,EAAE,CACFyC,MAAM,CAAEzC,QAAS,CAAC,CAAC;QAAA,CACnB0C,GAAG,CAAE,CAAEC,KAAK,EAAEC,GAAG,KAAMD,KAAK,CAAE;UAAEpB,KAAK;UAAEqB;QAAI,CAAE,CAAE;MAAC,CACvC,CAAC;IAAA,CACN,CACR;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
@@ -12,8 +12,7 @@ import { useStylesPreviewColors } from './hooks';
12
12
  import TypographyExample from './typography-example';
13
13
  import HighlightedColors from './highlighted-colors';
14
14
  import PreviewIframe from './preview-iframe';
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
16
  const {
18
17
  useGlobalStyle
19
18
  } = unlock(blockEditorPrivateApis);
@@ -1 +1 @@
1
- {"version":3,"names":["privateApis","blockEditorPrivateApis","__experimentalHStack","HStack","__experimentalVStack","VStack","__unstableMotion","motion","unlock","useStylesPreviewColors","TypographyExample","HighlightedColors","PreviewIframe","jsx","_jsx","jsxs","_jsxs","useGlobalStyle","firstFrameVariants","start","scale","opacity","hover","midFrameVariants","secondFrameVariants","PreviewStyles","label","isFocused","withHoverView","variation","fontWeight","fontFamily","headingFontFamily","headingFontWeight","textColor","headingColor","paletteColors","children","ratio","key","div","variants","style","height","overflow","spacing","justify","fontSize","normalizedColorSwatchSize","width","position","top","filter","slice","map","color","index","background","flexGrow","padding","boxSizing","lineHeight","textAlign"],"sources":["@wordpress/edit-site/src/components/global-styles/preview-styles.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useStylesPreviewColors } from './hooks';\nimport TypographyExample from './typography-example';\nimport HighlightedColors from './highlighted-colors';\nimport PreviewIframe from './preview-iframe';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nconst firstFrameVariants = {\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 midFrameVariants = {\n\thover: {\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\topacity: 0.5,\n\t},\n};\n\nconst secondFrameVariants = {\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 PreviewStyles = ( { label, isFocused, withHoverView, variation } ) => {\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\n\tconst { paletteColors } = useStylesPreviewColors();\n\n\treturn (\n\t\t<PreviewIframe\n\t\t\tlabel={ label }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ firstFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\tfontSize={ 65 * ratio }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<VStack spacing={ 4 * ratio }>\n\t\t\t\t\t\t\t<HighlightedColors\n\t\t\t\t\t\t\t\tnormalizedColorSwatchSize={ 32 }\n\t\t\t\t\t\t\t\tratio={ ratio }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ withHoverView && midFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tfilter: 'blur(60px)',\n\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ paletteColors\n\t\t\t\t\t\t\t.slice( 0, 4 )\n\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ secondFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing={ 3 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpadding: 10 * ratio,\n\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tfontSize: 40 * ratio,\n\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\tlineHeight: '1em',\n\t\t\t\t\t\t\t\t\ttextAlign: 'center',\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</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</VStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</PreviewIframe>\n\t);\n};\n\nexport default PreviewStyles;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SACCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,gBAAgB,IAAIC,MAAM,QACpB,uBAAuB;;AAE9B;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,sBAAsB,QAAQ,SAAS;AAChD,OAAOC,iBAAiB,MAAM,sBAAsB;AACpD,OAAOC,iBAAiB,MAAM,sBAAsB;AACpD,OAAOC,aAAa,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE7C,MAAM;EAAEC;AAAe,CAAC,GAAGT,MAAM,CAAEP,sBAAuB,CAAC;AAE3D,MAAMiB,kBAAkB,GAAG;EAC1BC,KAAK,EAAE;IACNC,KAAK,EAAE,CAAC;IACRC,OAAO,EAAE;EACV,CAAC;EACDC,KAAK,EAAE;IACNF,KAAK,EAAE,CAAC;IACRC,OAAO,EAAE;EACV;AACD,CAAC;AAED,MAAME,gBAAgB,GAAG;EACxBD,KAAK,EAAE;IACND,OAAO,EAAE;EACV,CAAC;EACDF,KAAK,EAAE;IACNE,OAAO,EAAE;EACV;AACD,CAAC;AAED,MAAMG,mBAAmB,GAAG;EAC3BF,KAAK,EAAE;IACNF,KAAK,EAA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MAChCkB,KAAK,EAAG;QACPC,MAAM,EAAE,MAAM;QACdM,KAAK,EAAE,MAAM;QACbL,QAAQ,EAAE,QAAQ;QAClBM,QAAQ,EAAE,UAAU;QACpBC,GAAG,EAAE;MACN,CAAG;MAAAd,QAAA,eAEHvB,IAAA,CAACT,MAAM;QACNwC,OAAO,EAAG,CAAC,GAAGP,KAAO;QACrBQ,OAAO,EAAC,QAAQ;QAChBJ,KAAK,EAAG;UACPC,MAAM,EAAE,MAAM;UACdC,QAAQ,EAAE,QAAQ;UAClBe,OAAO,EAAE,EAAE,GAAGrB,KAAK;UACnBsB,SAAS,EAAE;QACZ,CAAG;QAAAvB,QAAA,EAEDX,KAAK,iBACNZ,IAAA;UACC4B,KAAK,EAAG;YACPK,QAAQ,EAAE,EAAE,GAAGT,KAAK;YACpBP,UAAU,EAAEC,iBAAiB;YAC7BuB,KAAK,EAAEpB,YAAY;YACnBL,UAAU,EAAEG,iBAAiB;YAC7B4B,UAAU,EAAE,KAAK;YACjBC,SAAS,EAAE;UACZ,CAAG;UAAAzB,QAAA,EAEDX;QAAK,CACH;MACL,CACM;IAAC,GAlCHa,GAmCK,CACZ;EAAA,CACa,CAAC;AAElB,CAAC;AAED,eAAed,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["privateApis","blockEditorPrivateApis","__experimentalHStack","HStack","__experimentalVStack","VStack","__unstableMotion","motion","unlock","useStylesPreviewColors","TypographyExample","HighlightedColors","PreviewIframe","jsx","_jsx","jsxs","_jsxs","useGlobalStyle","firstFrameVariants","start","scale","opacity","hover","midFrameVariants","secondFrameVariants","PreviewStyles","label","isFocused","withHoverView","variation","fontWeight","fontFamily","headingFontFamily","headingFontWeight","textColor","headingColor","paletteColors","children","ratio","key","div","variants","style","height","overflow","spacing","justify","fontSize","normalizedColorSwatchSize","width","position","top","filter","slice","map","color","index","background","flexGrow","padding","boxSizing","lineHeight","textAlign"],"sources":["@wordpress/edit-site/src/components/global-styles/preview-styles.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useStylesPreviewColors } from './hooks';\nimport TypographyExample from './typography-example';\nimport HighlightedColors from './highlighted-colors';\nimport PreviewIframe from './preview-iframe';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nconst firstFrameVariants = {\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 midFrameVariants = {\n\thover: {\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\topacity: 0.5,\n\t},\n};\n\nconst secondFrameVariants = {\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 PreviewStyles = ( { label, isFocused, withHoverView, variation } ) => {\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\n\tconst { paletteColors } = useStylesPreviewColors();\n\n\treturn (\n\t\t<PreviewIframe\n\t\t\tlabel={ label }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ firstFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\tfontSize={ 65 * ratio }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<VStack spacing={ 4 * ratio }>\n\t\t\t\t\t\t\t<HighlightedColors\n\t\t\t\t\t\t\t\tnormalizedColorSwatchSize={ 32 }\n\t\t\t\t\t\t\t\tratio={ ratio }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ withHoverView && midFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tfilter: 'blur(60px)',\n\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ paletteColors\n\t\t\t\t\t\t\t.slice( 0, 4 )\n\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ secondFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing={ 3 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpadding: 10 * ratio,\n\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tfontSize: 40 * ratio,\n\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\tlineHeight: '1em',\n\t\t\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\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AA,eAEHvB,IAAA,CAACT,MAAM;QACNwC,OAAO,EAAG,CAAC,GAAGP,KAAO;QACrBQ,OAAO,EAAC,QAAQ;QAChBJ,KAAK,EAAG;UACPC,MAAM,EAAE,MAAM;UACdC,QAAQ,EAAE,QAAQ;UAClBe,OAAO,EAAE,EAAE,GAAGrB,KAAK;UACnBsB,SAAS,EAAE;QACZ,CAAG;QAAAvB,QAAA,EAEDX,KAAK,iBACNZ,IAAA;UACC4B,KAAK,EAAG;YACPK,QAAQ,EAAE,EAAE,GAAGT,KAAK;YACpBP,UAAU,EAAEC,iBAAiB;YAC7BuB,KAAK,EAAEpB,YAAY;YACnBL,UAAU,EAAEG,iBAAiB;YAC7B4B,UAAU,EAAE,KAAK;YACjBC,SAAS,EAAE;UACZ,CAAG;UAAAzB,QAAA,EAEDX;QAAK,CACH;MACL,CACM;IAAC,GAlCHa,GAmCK,CACZ;EAAA,CACa,CAAC;AAElB,CAAC;AAED,eAAed,aAAa","ignoreList":[]}
@@ -11,9 +11,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
11
11
  */
12
12
  import { NavigationButtonAsItem } from './navigation-button';
13
13
  import { unlock } from '../../lock-unlock';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
- import { Fragment as _Fragment } from "react/jsx-runtime";
14
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
17
15
  const {
18
16
  useHasDimensionsPanel,
19
17
  useHasTypographyPanel,
@@ -40,12 +38,10 @@ function RootMenu() {
40
38
  children: [hasTypographyPanel && /*#__PURE__*/_jsx(NavigationButtonAsItem, {
41
39
  icon: typography,
42
40
  path: "/typography",
43
- "aria-label": __('Typography styles'),
44
41
  children: __('Typography')
45
42
  }), hasColorPanel && /*#__PURE__*/_jsx(NavigationButtonAsItem, {
46
43
  icon: color,
47
44
  path: "/colors",
48
- "aria-label": __('Colors styles'),
49
45
  children: __('Colors')
50
46
  }), hasBackgroundPanel && /*#__PURE__*/_jsx(NavigationButtonAsItem, {
51
47
  icon: background,
@@ -55,12 +51,10 @@ function RootMenu() {
55
51
  }), hasShadowPanel && /*#__PURE__*/_jsx(NavigationButtonAsItem, {
56
52
  icon: shadowIcon,
57
53
  path: "/shadows",
58
- "aria-label": __('Shadow styles'),
59
54
  children: __('Shadows')
60
55
  }), hasLayoutPanel && /*#__PURE__*/_jsx(NavigationButtonAsItem, {
61
56
  icon: layout,
62
57
  path: "/layout",
63
- "aria-label": __('Layout styles'),
64
58
  children: __('Layout')
65
59
  })]
66
60
  })
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalItemGroup","ItemGroup","background","typography","color","layout","shadow","shadowIcon","__","privateApis","blockEditorPrivateApis","NavigationButtonAsItem","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useHasDimensionsPanel","useHasTypographyPanel","useHasColorPanel","useGlobalSetting","useSettingsForBlockElement","useHasBackgroundPanel","RootMenu","rawSettings","settings","hasBackgroundPanel","hasTypographyPanel","hasColorPanel","hasShadowPanel","hasDimensionsPanel","hasLayoutPanel","children","icon","path"],"sources":["@wordpress/edit-site/src/components/global-styles/root-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport {\n\tbackground,\n\ttypography,\n\tcolor,\n\tlayout,\n\tshadow as shadowIcon,\n} 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\tuseHasBackgroundPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction RootMenu() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\t/*\n\t * Use the raw settings to determine if the background panel should be displayed,\n\t * as the background panel is not dependent on the block element settings.\n\t */\n\tconst hasBackgroundPanel = useHasBackgroundPanel( rawSettings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasShadowPanel = true; // useHasShadowPanel( 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{ hasBackgroundPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ background }\n\t\t\t\t\t\tpath=\"/background\"\n\t\t\t\t\t\taria-label={ __( 'Background styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Background' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasShadowPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ shadowIcon }\n\t\t\t\t\t\tpath=\"/shadows\"\n\t\t\t\t\t\taria-label={ __( 'Shadow styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Shadows' ) }\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":"AAAA;AACA;AACA;AACA,SAASA,uBAAuB,IAAIC,SAAS,QAAQ,uBAAuB;AAC5E,SACCC,UAAU,EACVC,UAAU,EACVC,KAAK,EACLC,MAAM,EACNC,MAAM,IAAIC,UAAU,QACd,kBAAkB;AACzB,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,qBAAqB;AAC5D,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAM;EACLC,qBAAqB;EACrBC,qBAAqB;EACrBC,gBAAgB;EAChBC,gBAAgB;EAChBC,0BAA0B;EAC1BC;AACD,CAAC,GAAGZ,MAAM,CAAEF,sBAAuB,CAAC;AAEpC,SAASe,QAAQA,CAAA,EAAG;EACnB,MAAM,CAAEC,WAAW,CAAE,GAAGJ,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMK,QAAQ,GAAGJ,0BAA0B,CAAEG,WAAY,CAAC;EAC1D;AACD;AACA;AACA;EACC,MAAME,kBAAkB,GAAGJ,qBAAqB,CAAEE,WAAY,CAAC;EAC/D,MAAMG,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AAgB,CAAG;QAAA0B,QAAA,EAElC1B,EAAE,CAAE,QAAS;MAAC,CACO,CACxB;IAAA,CACS;EAAC,CACX,CAAC;AAEL;AAEA,eAAeiB,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["__experimentalItemGroup","ItemGroup","background","typography","color","layout","shadow","shadowIcon","__","privateApis","blockEditorPrivateApis","NavigationButtonAsItem","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useHasDimensionsPanel","useHasTypographyPanel","useHasColorPanel","useGlobalSetting","useSettingsForBlockElement","useHasBackgroundPanel","RootMenu","rawSettings","settings","hasBackgroundPanel","hasTypographyPanel","hasColorPanel","hasShadowPanel","hasDimensionsPanel","hasLayoutPanel","children","icon","path"],"sources":["@wordpress/edit-site/src/components/global-styles/root-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport {\n\tbackground,\n\ttypography,\n\tcolor,\n\tlayout,\n\tshadow as shadowIcon,\n} 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\tuseHasBackgroundPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction RootMenu() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\t/*\n\t * Use the raw settings to determine if the background panel should be displayed,\n\t * as the background panel is not dependent on the block element settings.\n\t */\n\tconst hasBackgroundPanel = useHasBackgroundPanel( rawSettings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasShadowPanel = true; // useHasShadowPanel( 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>\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 icon={ color } path=\"/colors\">\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{ hasBackgroundPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ background }\n\t\t\t\t\t\tpath=\"/background\"\n\t\t\t\t\t\taria-label={ __( 'Background styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Background' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasShadowPanel && (\n\t\t\t\t\t<NavigationButtonAsItem icon={ shadowIcon } path=\"/shadows\">\n\t\t\t\t\t\t{ __( 'Shadows' ) }\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 icon={ layout } path=\"/layout\">\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":"AAAA;AACA;AACA;AACA,SAASA,uBAAuB,IAAIC,SAAS,QAAQ,uBAAuB;AAC5E,SACCC,UAAU,EACVC,UAAU,EACVC,KAAK,EACLC,MAAM,EACNC,MAAM,IAAIC,UAAU,QACd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S;QAAAF,QAAA,EAClD1B,EAAE,CAAE,QAAS;MAAC,CACO,CACxB,EACCoB,kBAAkB,iBACnBd,IAAA,CAACH,sBAAsB;QACtBwB,IAAI,EAAGjC,UAAY;QACnBkC,IAAI,EAAC,aAAa;QAClB,cAAa5B,EAAE,CAAE,mBAAoB,CAAG;QAAA0B,QAAA,EAEtC1B,EAAE,CAAE,YAAa;MAAC,CACG,CACxB,EACCuB,cAAc,iBACfjB,IAAA,CAACH,sBAAsB;QAACwB,IAAI,EAAG5B,UAAY;QAAC6B,IAAI,EAAC,UAAU;QAAAF,QAAA,EACxD1B,EAAE,CAAE,SAAU;MAAC,CACM,CACxB,EACCyB,cAAc,iBACfnB,IAAA,CAACH,sBAAsB;QAACwB,IAAI,EAAG9B,MAAQ;QAAC+B,IAAI,EAAC,SAAS;QAAAF,QAAA,EACnD1B,EAAE,CAAE,QAAS;MAAC,CACO,CACxB;IAAA,CACS;EAAC,CACX,CAAC;AAEL;AAEA,eAAeiB,QAAQ","ignoreList":[]}
@@ -11,9 +11,7 @@ import { __experimentalText as Text } from '@wordpress/components';
11
11
  import BackgroundPanel from './background-panel';
12
12
  import ScreenHeader from './header';
13
13
  import { unlock } from '../../lock-unlock';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { Fragment as _Fragment } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
15
  const {
18
16
  useHasBackgroundPanel,
19
17
  useGlobalSetting
@@ -1 +1 @@
1
- {"version":3,"names":["__","privateApis","blockEditorPrivateApis","__experimentalText","Text","BackgroundPanel","ScreenHeader","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","useHasBackgroundPanel","useGlobalSetting","ScreenBackground","settings","hasBackgroundPanel","children","title","description"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-background.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { __experimentalText as Text } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BackgroundPanel from './background-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasBackgroundPanel, useGlobalSetting } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenBackground() {\n\tconst [ settings ] = useGlobalSetting( '' );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Background' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<Text>\n\t\t\t\t\t\t{ __( 'Set styles for the site’s background.' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ hasBackgroundPanel && <BackgroundPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenBackground;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;;AAElE;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC,qBAAqB;EAAEC;AAAiB,CAAC,GAAGR,MAAM,CACzDL,sBACD,CAAC;AAED,SAASc,gBAAgBA,CAAA,EAAG;EAC3B,MAAM,CAAEC,QAAQ,CAAE,GAAGF,gBAAgB,CAAE,EAAG,CAAC;EAC3C,MAAMG,kBAAkB,GAAGJ,qBAAqB,CAAEG,QAAS,CAAC;EAC5D,oBACCJ,KAAA,CAAAF,SAAA;IAAAQ,QAAA,gBACCV,IAAA,CAACH,YAAY;MACZc,KAAK,EAAGpB,EAAE,CAAE,YAAa,CAAG;MAC5BqB,WAAW,eACVZ,IAAA,CAACL,IAAI;QAAAe,QAAA,EACFnB,EAAE,CAAE,uCAAwC;MAAC,CAC1C;IACN,CACD,CAAC,EACAkB,kBAAkB,iBAAIT,IAAA,CAACJ,eAAe,IAAE,CAAC;EAAA,CAC1C,CAAC;AAEL;AAEA,eAAeW,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["__","privateApis","blockEditorPrivateApis","__experimentalText","Text","BackgroundPanel","ScreenHeader","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","useHasBackgroundPanel","useGlobalSetting","ScreenBackground","settings","hasBackgroundPanel","children","title","description"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-background.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { __experimentalText as Text } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BackgroundPanel from './background-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasBackgroundPanel, useGlobalSetting } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenBackground() {\n\tconst [ settings ] = useGlobalSetting( '' );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Background' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<Text>\n\t\t\t\t\t\t{ __( 'Set styles for the site’s background.' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ hasBackgroundPanel && <BackgroundPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenBackground;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;;AAElE;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC,qBAAqB;EAAEC;AAAiB,CAAC,GAAGR,MAAM,CACzDL,sBACD,CAAC;AAED,SAASc,gBAAgBA,CAAA,EAAG;EAC3B,MAAM,CAAEC,QAAQ,CAAE,GAAGF,gBAAgB,CAAE,EAAG,CAAC;EAC3C,MAAMG,kBAAkB,GAAGJ,qBAAqB,CAAEG,QAAS,CAAC;EAC5D,oBACCJ,KAAA,CAAAF,SAAA;IAAAQ,QAAA,gBACCV,IAAA,CAACH,YAAY;MACZc,KAAK,EAAGpB,EAAE,CAAE,YAAa,CAAG;MAC5BqB,WAAW,eACVZ,IAAA,CAACL,IAAI;QAAAe,QAAA,EACFnB,EAAE,CAAE,uCAAwC;MAAC,CAC1C;IACN,CACD,CAAC,EACAkB,kBAAkB,iBAAIT,IAAA,CAACJ,eAAe,IAAE,CAAC;EAAA,CAC1C,CAAC;AAEL;AAEA,eAAeW,gBAAgB","ignoreList":[]}
@@ -17,9 +17,7 @@ import { useBlockVariations } from './variations/variations-panel';
17
17
  import ScreenHeader from './header';
18
18
  import { NavigationButtonAsItem } from './navigation-button';
19
19
  import { unlock } from '../../lock-unlock';
20
- import { jsx as _jsx } from "react/jsx-runtime";
21
- import { jsxs as _jsxs } from "react/jsx-runtime";
22
- import { Fragment as _Fragment } from "react/jsx-runtime";
20
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
23
21
  const {
24
22
  useHasDimensionsPanel,
25
23
  useHasTypographyPanel,
@@ -72,12 +70,8 @@ function BlockMenuItem({
72
70
  if (!hasBlockMenuItem) {
73
71
  return null;
74
72
  }
75
- const navigationButtonLabel = sprintf(
76
- // translators: %s: is the name of a block e.g., 'Image' or 'Table'.
77
- __('%s block styles'), block.title);
78
73
  return /*#__PURE__*/_jsx(NavigationButtonAsItem, {
79
74
  path: '/blocks/' + encodeURIComponent(block.name),
80
- "aria-label": navigationButtonLabel,
81
75
  children: /*#__PURE__*/_jsxs(HStack, {
82
76
  justify: "flex-start",
83
77
  children: [/*#__PURE__*/_jsx(BlockIcon, {
@@ -113,7 +107,7 @@ function BlockList({
113
107
  // which is now one.
114
108
  // @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116
115
109
  const count = blockTypesListRef.current.childElementCount;
116
- const resultsFoundMessage = sprintf( /* translators: %d: number of results. */
110
+ const resultsFoundMessage = sprintf(/* translators: %d: number of results. */
117
111
  _n('%d result found.', '%d results found.', count), count);
118
112
  debouncedSpeak(resultsFoundMessage, count);
119
113
  }, [filterValue, debouncedSpeak]);
@@ -138,7 +132,7 @@ function ScreenBlockList() {
138
132
  className: "edit-site-block-types-search",
139
133
  onChange: setFilterValue,
140
134
  value: filterValue,
141
- label: __('Search for blocks'),
135
+ label: __('Search'),
142
136
  placeholder: __('Search')
143
137
  }), /*#__PURE__*/_jsx(MemoizedBlockList, {
144
138
  filterValue: deferredFilterValue
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","__","sprintf","_n","FlexItem","SearchControl","__experimentalHStack","HStack","useSelect","useState","useEffect","useRef","useDeferredValue","memo","BlockIcon","privateApis","blockEditorPrivateApis","useDebounce","speak","useBlockVariations","ScreenHeader","NavigationButtonAsItem","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useSortedBlockTypes","blockItems","select","getBlockTypes","groupByType","blocks","block","core","noncore","type","name","startsWith","push","coreItems","nonCoreItems","reduce","useBlockHasGlobalStyles","blockName","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasLayoutPanel","hasVariationsPanel","length","hasGlobalStyles","BlockMenuItem","hasBlockMenuItem","navigationButtonLabel","title","path","encodeURIComponent","children","justify","icon","BlockList","filterValue","sortedBlockTypes","debouncedSpeak","isMatchingSearchTerm","filteredBlockTypes","filter","blockType","blockTypesListRef","count","current","childElementCount","resultsFoundMessage","ref","className","map","MemoizedBlockList","ScreenBlockList","setFilterValue","deferredFilterValue","description","__nextHasNoMarginBottom","onChange","value","label","placeholder"],"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/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":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,EAAE,EAAEC,OAAO,EAAEC,EAAE,QAAQ,iBAAiB;AACjD,SACCC,QAAQ,EACRC,aAAa,EACbC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,QAAQ,EACRC,SAAS,EACTC,MAAM,EACNC,gBAAgB,EAChBC,IAAI,QACE,oBAAoB;AAC3B,SACCC,SAAS,EACTC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,sBAAsB,QAAQ,qBAAqB;AAC5D,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAM;EACLC,qBAAqB;EACrBC,qBAAqB;EACrBC,iBAAiB;EACjBC,gBAAgB;EAChBC,0BAA0B;EAC1BC;AACD,CAAC,GAAGZ,MAAM,CAAEN,sBAAuB,CAAC;AAEpC,SAASmB,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tB,WAAa;MACrBuB,KAAK,EAAG/F,EAAE,CAAE,mBAAoB,CAAG;MACnCgG,WAAW,EAAGhG,EAAE,CAAE,QAAS;IAAG,CAC9B,CAAC,eACFuB,IAAA,CAACgE,iBAAiB;MAACf,WAAW,EAAGkB;IAAqB,CAAE,CAAC;EAAA,CACxD,CAAC;AAEL;AAEA,eAAeF,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["store","blocksStore","__","sprintf","_n","FlexItem","SearchControl","__experimentalHStack","HStack","useSelect","useState","useEffect","useRef","useDeferredValue","memo","BlockIcon","privateApis","blockEditorPrivateApis","useDebounce","speak","useBlockVariations","ScreenHeader","NavigationButtonAsItem","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useSortedBlockTypes","blockItems","select","getBlockTypes","groupByType","blocks","block","core","noncore","type","name","startsWith","push","coreItems","nonCoreItems","reduce","useBlockHasGlobalStyles","blockName","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasLayoutPanel","hasVariationsPanel","length","hasGlobalStyles","BlockMenuItem","hasBlockMenuItem","path","encodeURIComponent","children","justify","icon","title","BlockList","filterValue","sortedBlockTypes","debouncedSpeak","isMatchingSearchTerm","filteredBlockTypes","filter","blockType","blockTypesListRef","count","current","childElementCount","resultsFoundMessage","ref","className","map","MemoizedBlockList","ScreenBlockList","setFilterValue","deferredFilterValue","description","__nextHasNoMarginBottom","onChange","value","label","placeholder"],"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/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\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\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' ) }\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":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,EAAE,EAAEC,OAAO,EAAEC,EAAE,QAAQ,iBAAiB;AACjD,SACCC,QAAQ,EACRC,aAAa,EACbC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,QAAQ,EACRC,SAAS,EACTC,MAAM,EACNC,gBAAgB,EAChBC,IAAI,QACE,oBAAoB;AAC3B,SACCC,SAAS,EACTC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,WAA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B,CAAE4D,WAAY,CAAC;EAE3D,oBACC9C,KAAA,CAAAE,SAAA;IAAAuC,QAAA,gBACC3C,IAAA,CAACJ,YAAY;MACZkD,KAAK,EAAGrE,EAAE,CAAE,QAAS,CAAG;MACxB0F,WAAW,EAAG1F,EAAE,CACf,qEACD;IAAG,CACH,CAAC,eACFuB,IAAA,CAACnB,aAAa;MACbuF,uBAAuB;MACvBP,SAAS,EAAC,8BAA8B;MACxCQ,QAAQ,EAAGJ,cAAgB;MAC3BK,KAAK,EAAGtB,WAAa;MACrBuB,KAAK,EAAG9F,EAAE,CAAE,QAAS,CAAG;MACxB+F,WAAW,EAAG/F,EAAE,CAAE,QAAS;IAAG,CAC9B,CAAC,eACFuB,IAAA,CAAC+D,iBAAiB;MAACf,WAAW,EAAGkB;IAAqB,CAAE,CAAC;EAAA,CACxD,CAAC;AAEL;AAEA,eAAeF,eAAe","ignoreList":[]}
@@ -19,9 +19,7 @@ import Subtitle from './subtitle';
19
19
  import { useBlockVariations, VariationsPanel } from './variations/variations-panel';
20
20
 
21
21
  // Initial control values.
22
- import { jsx as _jsx } from "react/jsx-runtime";
23
- import { jsxs as _jsxs } from "react/jsx-runtime";
24
- import { Fragment as _Fragment } from "react/jsx-runtime";
22
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
25
23
  const BACKGROUND_BLOCK_DEFAULT_VALUES = {
26
24
  backgroundSize: 'cover',
27
25
  backgroundPosition: '50% 50%' // used only when backgroundSize is 'contain'.
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","BACKGROUND_BLOCK_DEFAULT_VALUES","backgroundSize","backgroundPosition","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","useHasBackgroundPanel","BackgroundPanel","StylesBackgroundPanel","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","hasBackgroundPanel","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","children","title","label","className","inheritedValue","value","onChange","defaultValues","includeLayoutControls","initialOpen"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport {\n\tuseBlockVariations,\n\tVariationsPanel,\n} from './variations/variations-panel';\n\n// Initial control values.\nconst BACKGROUND_BLOCK_DEFAULT_VALUES = {\n\tbackgroundSize: 'cover',\n\tbackgroundPosition: '50% 50%', // used only when backgroundSize is 'contain'.\n};\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\tuseHasBackgroundPanel,\n\tBackgroundPanel: StylesBackgroundPanel,\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 hasBackgroundPanel = useHasBackgroundPanel( settings );\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{ hasBackgroundPanel && (\n\t\t\t\t<StylesBackgroundPanel\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\tdefaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SACCC,SAAS,EACTC,oBAAoB,IAAIC,MAAM,EAC9BC,6BAA6B,IAAIC,eAAe,QAC1C,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,QAAQ,MAAM,YA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AAA,CAACyC,kBAAkB;MAClBgE,cAAc,EAAGjB,wBAA0B;MAC3CkB,KAAK,EAAGhB,eAAiB;MACzBiB,QAAQ,EAAGrD,QAAU;MACrBI,QAAQ,EAAGA,QAAU;MACrBmD,qBAAqB;IAAA,CACrB,CACD,EACClC,qBAAqB,iBACtB3E,IAAA,CAAC0C,kBAAkB;MAClBiE,QAAQ,EAAGb,gBAAkB;MAC7BY,KAAK,EAAGnD,YAAc;MACtBkD,cAAc,EAAG/C;IAAU,CAC3B,CACD,EAECoB,UAAU,iBACX5E,KAAA,CAAChB,SAAS;MAACoH,KAAK,EAAG/G,EAAE,CAAE,UAAW,CAAG;MAACuH,WAAW,EAAG,KAAO;MAAAT,QAAA,gBAC1DrG,IAAA;QAAAqG,QAAA,EACG7G,OAAO;QACR;QACAD,EAAE,CACD,2IACD,CAAC,EACDoE,SAAS,EAAE2C,KACZ;MAAC,CACC,CAAC,eACJtG,IAAA,CAAC4C,mBAAmB;QACnB8D,KAAK,EAAG7F,KAAO;QACf8F,QAAQ,EAAGrD,QAAU;QACrBmD,cAAc,EAAGpD;MAAgB,CACjC,CAAC;IAAA,CACQ,CACX;EAAA,CACA,CAAC;AAEL;AAEA,eAAeR,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","BACKGROUND_BLOCK_DEFAULT_VALUES","backgroundSize","backgroundPosition","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","useHasBackgroundPanel","BackgroundPanel","StylesBackgroundPanel","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","hasBackgroundPanel","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","children","title","label","className","inheritedValue","value","onChange","defaultValues","includeLayoutControls","initialOpen"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport {\n\tuseBlockVariations,\n\tVariationsPanel,\n} from './variations/variations-panel';\n\n// Initial control values.\nconst BACKGROUND_BLOCK_DEFAULT_VALUES = {\n\tbackgroundSize: 'cover',\n\tbackgroundPosition: '50% 50%', // used only when backgroundSize is 'contain'.\n};\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\tuseHasBackgroundPanel,\n\tBackgroundPanel: StylesBackgroundPanel,\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 hasBackgroundPanel = useHasBackgroundPanel( settings );\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{ hasBackgroundPanel && (\n\t\t\t\t<StylesBackgroundPanel\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\tdefaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SACCC,SAAS,EACTC,oBAAoB,IAAIC,MAAM,EAC9BC,6BAA6B,IAAIC,eAAe,QAC1C,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,QAAQ,MAAM,YAAY;AACjC,SACCC,kBAAkB,EAClBC,eAAe,QACT,+BAA+B;;AAEtC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AACA,MAAMC,+BAA+B,GAAG;EACvCC,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BACtB3E,IAAA,CAAC0C,kBAAkB;MAClBiE,QAAQ,EAAGb,gBAAkB;MAC7BY,KAAK,EAAGnD,YAAc;MACtBkD,cAAc,EAAG/C;IAAU,CAC3B,CACD,EAECoB,UAAU,iBACX5E,KAAA,CAAChB,SAAS;MAACoH,KAAK,EAAG/G,EAAE,CAAE,UAAW,CAAG;MAACuH,WAAW,EAAG,KAAO;MAAAT,QAAA,gBAC1DrG,IAAA;QAAAqG,QAAA,EACG7G,OAAO;QACR;QACAD,EAAE,CACD,2IACD,CAAC,EACDoE,SAAS,EAAE2C,KACZ;MAAC,CACC,CAAC,eACJtG,IAAA,CAAC4C,mBAAmB;QACnB8D,KAAK,EAAG7F,KAAO;QACf8F,QAAQ,EAAGrD,QAAU;QACrBmD,cAAc,EAAGpD;MAAgB,CACjC,CAAC;IAAA,CACQ,CACX;EAAA,CACA,CAAC;AAEL;AAEA,eAAeR,WAAW","ignoreList":[]}
@@ -11,9 +11,7 @@ import ColorPalettePanel from './color-palette-panel';
11
11
  import GradientPalettePanel from './gradients-palette-panel';
12
12
  import ScreenHeader from './header';
13
13
  import { unlock } from '../../lock-unlock';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
- import { Fragment as _Fragment } from "react/jsx-runtime";
14
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
17
15
  const {
18
16
  Tabs
19
17
  } = unlock(componentsPrivateApis);
@@ -1 +1 @@
1
- {"version":3,"names":["__","privateApis","componentsPrivateApis","ColorPalettePanel","GradientPalettePanel","ScreenHeader","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Tabs","ScreenColorPalette","name","children","title","description","TabList","Tab","tabId","TabPanel","focusable"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-color-palette.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ColorPalettePanel from './color-palette-panel';\nimport GradientPalettePanel from './gradients-palette-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction ScreenColorPalette( { name } ) {\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Edit palette' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'The combination of colors used across the site and in color pickers.'\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=\"color\">{ __( 'Color' ) }</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=\"color\" focusable={ false }>\n\t\t\t\t\t<ColorPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId=\"gradient\" focusable={ false }>\n\t\t\t\t\t<GradientPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs>\n\t\t</>\n\t);\n}\n\nexport default ScreenColorPalette;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;;AAE5E;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,oBAAoB,MAAM,2BAA2B;AAC5D,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAM;EAAEC;AAAK,CAAC,GAAGP,MAAM,CAAEJ,qBAAsB,CAAC;AAEhD,SAASY,kBAAkBA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACvC,oBACCL,KAAA,CAAAE,SAAA;IAAAI,QAAA,gBACCR,IAAA,CAACH,YAAY;MACZY,KAAK,EAAGjB,EAAE,CAAE,cAAe,CAAG;MAC9BkB,WAAW,EAAGlB,EAAE,CACf,sEACD;IAAG,CACH,CAAC,eACFU,KAAA,CAACG,IAAI;MAAAG,QAAA,gBACJN,KAAA,CAACG,IAAI,CAACM,OAAO;QAAAH,QAAA,gBACZR,IAAA,CAACK,IAAI,CAACO,GAAG;UAACC,KAAK,EAAC,OAAO;UAAAL,QAAA,EAAGhB,EAAE,CAAE,OAAQ;QAAC,CAAY,CAAC,eACpDQ,IAAA,CAACK,IAAI,CAACO,GAAG;UAACC,KAAK,EAAC,UAAU;UAAAL,QAAA,EAAGhB,EAAE,CAAE,UAAW;QAAC,CAAY,CAAC;MAAA,CAC7C,CAAC,eACfQ,IAAA,CAACK,IAAI,CAACS,QAAQ;QAACD,KAAK,EAAC,OAAO;QAACE,SAAS,EAAG,KAAO;QAAAP,QAAA,eAC/CR,IAAA,CAACL,iBAAiB;UAACY,IAAI,EAAGA;QAAM,CAAE;MAAC,CACrB,CAAC,eAChBP,IAAA,CAACK,IAAI,CAACS,QAAQ;QAACD,KAAK,EAAC,UAAU;QAACE,SAAS,EAAG,KAAO;QAAAP,QAAA,eAClDR,IAAA,CAACJ,oBAAoB;UAACW,IAAI,EAAGA;QAAM,CAAE;MAAC,CACxB,CAAC;IAAA,CACX,CAAC;EAAA,CACN,CAAC;AAEL;AAEA,eAAeD,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["__","privateApis","componentsPrivateApis","ColorPalettePanel","GradientPalettePanel","ScreenHeader","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Tabs","ScreenColorPalette","name","children","title","description","TabList","Tab","tabId","TabPanel","focusable"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-color-palette.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ColorPalettePanel from './color-palette-panel';\nimport GradientPalettePanel from './gradients-palette-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction ScreenColorPalette( { name } ) {\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Edit palette' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'The combination of colors used across the site and in color pickers.'\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=\"color\">{ __( 'Color' ) }</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=\"color\" focusable={ false }>\n\t\t\t\t\t<ColorPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId=\"gradient\" focusable={ false }>\n\t\t\t\t\t<GradientPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs>\n\t\t</>\n\t);\n}\n\nexport default ScreenColorPalette;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;;AAE5E;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,oBAAoB,MAAM,2BAA2B;AAC5D,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAM;EAAEC;AAAK,CAAC,GAAGP,MAAM,CAAEJ,qBAAsB,CAAC;AAEhD,SAASY,kBAAkBA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACvC,oBACCL,KAAA,CAAAE,SAAA;IAAAI,QAAA,gBACCR,IAAA,CAACH,YAAY;MACZY,KAAK,EAAGjB,EAAE,CAAE,cAAe,CAAG;MAC9BkB,WAAW,EAAGlB,EAAE,CACf,sEACD;IAAG,CACH,CAAC,eACFU,KAAA,CAACG,IAAI;MAAAG,QAAA,gBACJN,KAAA,CAACG,IAAI,CAACM,OAAO;QAAAH,QAAA,gBACZR,IAAA,CAACK,IAAI,CAACO,GAAG;UAACC,KAAK,EAAC,OAAO;UAAAL,QAAA,EAAGhB,EAAE,CAAE,OAAQ;QAAC,CAAY,CAAC,eACpDQ,IAAA,CAACK,IAAI,CAACO,GAAG;UAACC,KAAK,EAAC,UAAU;UAAAL,QAAA,EAAGhB,EAAE,CAAE,UAAW;QAAC,CAAY,CAAC;MAAA,CAC7C,CAAC,eACfQ,IAAA,CAACK,IAAI,CAACS,QAAQ;QAACD,KAAK,EAAC,OAAO;QAACE,SAAS,EAAG,KAAO;QAAAP,QAAA,eAC/CR,IAAA,CAACL,iBAAiB;UAACY,IAAI,EAAGA;QAAM,CAAE;MAAC,CACrB,CAAC,eAChBP,IAAA,CAACK,IAAI,CAACS,QAAQ;QAACD,KAAK,EAAC,UAAU;QAACE,SAAS,EAAG,KAAO;QAAAP,QAAA,eAClDR,IAAA,CAACJ,oBAAoB;UAACW,IAAI,EAAGA;QAAM,CAAE;MAAC,CACxB,CAAC;IAAA,CACX,CAAC;EAAA,CACN,CAAC;AAEL;AAEA,eAAeD,kBAAkB","ignoreList":[]}
@@ -11,9 +11,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
11
11
  import ScreenHeader from './header';
12
12
  import Palette from './palette';
13
13
  import { unlock } from '../../lock-unlock';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
- import { Fragment as _Fragment } from "react/jsx-runtime";
14
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
17
15
  const {
18
16
  useGlobalStyle,
19
17
  useGlobalSetting,
@@ -1 +1 @@
1
- {"version":3,"names":["__","__experimentalVStack","VStack","privateApis","blockEditorPrivateApis","ScreenHeader","Palette","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","ColorPanel","StylesColorPanel","ScreenColors","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","settings","children","title","description","className","spacing","inheritedValue","value","onChange"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tColorPanel: StylesColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenColors() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palette colors and the application of those colors on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t<Palette />\n\t\t\t\t\t<StylesColorPanel\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,OAAO,MAAM,WAAW;AAC/B,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAM;EACLC,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,UAAU,EAAEC;AACb,CAAC,GAAGX,MAAM,CAAEH,sBAAuB,CAAC;AAEpC,SAASe,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,KAAK,CAAE,GAAGN,cAAc,CAAE,EAAE,EAAEO,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGV,cAAc,CAAE,EAAE,EAAEO,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEG,WAAW,CAAE,GAAGV,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMW,QAAQ,GAAGV,0BAA0B,CAAES,WAAY,CAAC;EAE1D,oBACCd,KAAA,CAAAE,SAAA;IAAAc,QAAA,gBACClB,IAAA,CAACJ,YAAY;MACZuB,KAAK,EAAG5B,EAAE,CAAE,QAAS,CAAG;MACxB6B,WAAW,EAAG7B,EAAE,CACf,sEACD;IAAG,CACH,CAAC,eACFS,IAAA;MAAKqB,SAAS,EAAC,gCAAgC;MAAAH,QAAA,eAC9ChB,KAAA,CAACT,MAAM;QAAC6B,OAAO,EAAG,CAAG;QAAAJ,QAAA,gBACpBlB,IAAA,CAACH,OAAO,IAAE,CAAC,eACXG,IAAA,CAACS,gBAAgB;UAChBc,cAAc,EAAGT,cAAgB;UACjCU,KAAK,EAAGb,KAAO;UACfc,QAAQ,EAAGV,QAAU;UACrBE,QAAQ,EAAGA;QAAU,CACrB,CAAC;MAAA,CACK;IAAC,CACL,CAAC;EAAA,CACL,CAAC;AAEL;AAEA,eAAeP,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["__","__experimentalVStack","VStack","privateApis","blockEditorPrivateApis","ScreenHeader","Palette","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","ColorPanel","StylesColorPanel","ScreenColors","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","settings","children","title","description","className","spacing","inheritedValue","value","onChange"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tColorPanel: StylesColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenColors() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palette colors and the application of those colors on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t<Palette />\n\t\t\t\t\t<StylesColorPanel\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,OAAO,MAAM,WAAW;AAC/B,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAM;EACLC,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,UAAU,EAAEC;AACb,CAAC,GAAGX,MAAM,CAAEH,sBAAuB,CAAC;AAEpC,SAASe,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,KAAK,CAAE,GAAGN,cAAc,CAAE,EAAE,EAAEO,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGV,cAAc,CAAE,EAAE,EAAEO,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEG,WAAW,CAAE,GAAGV,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMW,QAAQ,GAAGV,0BAA0B,CAAES,WAAY,CAAC;EAE1D,oBACCd,KAAA,CAAAE,SAAA;IAAAc,QAAA,gBACClB,IAAA,CAACJ,YAAY;MACZuB,KAAK,EAAG5B,EAAE,CAAE,QAAS,CAAG;MACxB6B,WAAW,EAAG7B,EAAE,CACf,sEACD;IAAG,CACH,CAAC,eACFS,IAAA;MAAKqB,SAAS,EAAC,gCAAgC;MAAAH,QAAA,eAC9ChB,KAAA,CAACT,MAAM;QAAC6B,OAAO,EAAG,CAAG;QAAAJ,QAAA,gBACpBlB,IAAA,CAACH,OAAO,IAAE,CAAC,eACXG,IAAA,CAACS,gBAAgB;UAChBc,cAAc,EAAGT,cAAgB;UACjCU,KAAK,EAAGb,KAAO;UACfc,QAAQ,EAAGV,QAAU;UACrBE,QAAQ,EAAGA;QAAU,CACrB,CAAC;MAAA,CACK;IAAC,CACL,CAAC;EAAA,CACL,CAAC;AAEL;AAEA,eAAeP,YAAY","ignoreList":[]}
@@ -10,9 +10,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
10
10
  */
11
11
  import { unlock } from '../../lock-unlock';
12
12
  import ScreenHeader from './header';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { Fragment as _Fragment } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
14
  const {
17
15
  useGlobalStyle,
18
16
  AdvancedPanel: StylesAdvancedPanel
@@ -29,7 +27,7 @@ function ScreenCSS() {
29
27
  children: [/*#__PURE__*/_jsx(ScreenHeader, {
30
28
  title: __('CSS'),
31
29
  description: /*#__PURE__*/_jsxs(_Fragment, {
32
- children: [description, /*#__PURE__*/_jsx(ExternalLink, {
30
+ children: [description, /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx(ExternalLink, {
33
31
  href: __('https://developer.wordpress.org/advanced-administration/wordpress/css/'),
34
32
  className: "edit-site-global-styles-screen-css-help-link",
35
33
  children: __('Learn more about CSS')
@@ -1 +1 @@
1
- {"version":3,"names":["__","ExternalLink","privateApis","blockEditorPrivateApis","unlock","ScreenHeader","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","useGlobalStyle","AdvancedPanel","StylesAdvancedPanel","ScreenCSS","description","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","children","title","href","className","value","onChange","inheritedValue"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-css.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ScreenHeader from './header';\n\nconst { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenCSS() {\n\tconst description = __(\n\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t);\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://developer.wordpress.org/advanced-administration/wordpress/css/'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-css-help-link\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about CSS' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-css\">\n\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenCSS;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,MAAM,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEpC,MAAM;EAAEC,cAAc;EAAEC,aAAa,EAAEC;AAAoB,CAAC,GAAGV,MAAM,CACpED,sBACD,CAAC;AAED,SAASY,SAASA,CAAA,EAAG;EACpB,MAAMC,WAAW,GAAGhB,EAAE,CACrB,uEACD,CAAC;EACD,MAAM,CAAEiB,KAAK,CAAE,GAAGL,cAAc,CAAE,EAAE,EAAEM,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGT,cAAc,CAAE,EAAE,EAAEM,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EAEH,oBACCR,KAAA,CAAAF,SAAA;IAAAa,QAAA,gBACCf,IAAA,CAACF,YAAY;MACZkB,KAAK,EAAGvB,EAAE,CAAE,KAAM,CAAG;MACrBgB,WAAW,eACVL,KAAA,CAAAF,SAAA;QAAAa,QAAA,GACGN,WAAW,eACbT,IAAA,CAACN,YAAY;UACZuB,IAAI,EAAGxB,EAAE,CACR,wEACD,CAAG;UACHyB,SAAS,EAAC,8CAA8C;UAAAH,QAAA,EAEtDtB,EAAE,CAAE,sBAAuB;QAAC,CACjB,CAAC;MAAA,CACd;IACF,CACD,CAAC,eACFO,IAAA;MAAKkB,SAAS,EAAC,oCAAoC;MAAAH,QAAA,eAClDf,IAAA,CAACO,mBAAmB;QACnBY,KAAK,EAAGT,KAAO;QACfU,QAAQ,EAAGN,QAAU;QACrBO,cAAc,EAAGR;MAAgB,CACjC;IAAC,CACE,CAAC;EAAA,CACL,CAAC;AAEL;AAEA,eAAeL,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["__","ExternalLink","privateApis","blockEditorPrivateApis","unlock","ScreenHeader","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","useGlobalStyle","AdvancedPanel","StylesAdvancedPanel","ScreenCSS","description","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","children","title","href","className","value","onChange","inheritedValue"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-css.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ScreenHeader from './header';\n\nconst { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenCSS() {\n\tconst description = __(\n\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t);\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://developer.wordpress.org/advanced-administration/wordpress/css/'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-css-help-link\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about CSS' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-css\">\n\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenCSS;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,MAAM,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpC,MAAM;EAAEC,cAAc;EAAEC,aAAa,EAAEC;AAAoB,CAAC,GAAGV,MAAM,CACpED,sBACD,CAAC;AAED,SAASY,SAASA,CAAA,EAAG;EACpB,MAAMC,WAAW,GAAGhB,EAAE,CACrB,uEACD,CAAC;EACD,MAAM,CAAEiB,KAAK,CAAE,GAAGL,cAAc,CAAE,EAAE,EAAEM,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGT,cAAc,CAAE,EAAE,EAAEM,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EAEH,oBACCR,KAAA,CAAAF,SAAA;IAAAa,QAAA,gBACCf,IAAA,CAACF,YAAY;MACZkB,KAAK,EAAGvB,EAAE,CAAE,KAAM,CAAG;MACrBgB,WAAW,eACVL,KAAA,CAAAF,SAAA;QAAAa,QAAA,GACGN,WAAW,eACbT,IAAA,SAAK,CAAC,eACNA,IAAA,CAACN,YAAY;UACZuB,IAAI,EAAGxB,EAAE,CACR,wEACD,CAAG;UACHyB,SAAS,EAAC,8CAA8C;UAAAH,QAAA,EAEtDtB,EAAE,CAAE,sBAAuB;QAAC,CACjB,CAAC;MAAA,CACd;IACF,CACD,CAAC,eACFO,IAAA;MAAKkB,SAAS,EAAC,oCAAoC;MAAAH,QAAA,eAClDf,IAAA,CAACO,mBAAmB;QACnBY,KAAK,EAAGT,KAAO;QACfU,QAAQ,EAAGN,QAAU;QACrBO,cAAc,EAAGR;MAAgB,CACjC;IAAC,CACE,CAAC;EAAA,CACL,CAAC;AAEL;AAEA,eAAeL,SAAS","ignoreList":[]}
@@ -10,9 +10,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
10
10
  import DimensionsPanel from './dimensions-panel';
11
11
  import ScreenHeader from './header';
12
12
  import { unlock } from '../../lock-unlock';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { Fragment as _Fragment } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
14
  const {
17
15
  useHasDimensionsPanel,
18
16
  useGlobalSetting,
@@ -1 +1 @@
1
- {"version":3,"names":["__","privateApis","blockEditorPrivateApis","DimensionsPanel","ScreenHeader","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","useHasDimensionsPanel","useGlobalSetting","useSettingsForBlockElement","ScreenLayout","rawSettings","settings","hasDimensionsPanel","children","title"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DimensionsPanel from './dimensions-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasDimensionsPanel, useGlobalSetting, useSettingsForBlockElement } =\n\tunlock( blockEditorPrivateApis );\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC,qBAAqB;EAAEC,gBAAgB;EAAEC;AAA2B,CAAC,GAC5ET,MAAM,CAAEH,sBAAuB,CAAC;AAEjC,SAASa,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,WAAW,CAAE,GAAGH,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMI,QAAQ,GAAGH,0BAA0B,CAAEE,WAAY,CAAC;EAC1D,MAAME,kBAAkB,GAAGN,qBAAqB,CAAEK,QAAS,CAAC;EAE5D,oBACCN,KAAA,CAAAF,SAAA;IAAAU,QAAA,gBACCZ,IAAA,CAACH,YAAY;MAACgB,KAAK,EAAGpB,EAAE,CAAE,QAAS;IAAG,CAAE,CAAC,EACvCkB,kBAAkB,iBAAIX,IAAA,CAACJ,eAAe,IAAE,CAAC;EAAA,CAC1C,CAAC;AAEL;AAEA,eAAeY,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["__","privateApis","blockEditorPrivateApis","DimensionsPanel","ScreenHeader","unlock","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","useHasDimensionsPanel","useGlobalSetting","useSettingsForBlockElement","ScreenLayout","rawSettings","settings","hasDimensionsPanel","children","title"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-layout.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DimensionsPanel from './dimensions-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasDimensionsPanel, useGlobalSetting, useSettingsForBlockElement } =\n\tunlock( blockEditorPrivateApis );\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,YAAY,MAAM,UAAU;AACnC,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC,qBAAqB;EAAEC,gBAAgB;EAAEC;AAA2B,CAAC,GAC5ET,MAAM,CAAEH,sBAAuB,CAAC;AAEjC,SAASa,YAAYA,CAAA,EAAG;EACvB,MAAM,CAAEC,WAAW,CAAE,GAAGH,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMI,QAAQ,GAAGH,0BAA0B,CAAEE,WAAY,CAAC;EAC1D,MAAME,kBAAkB,GAAGN,qBAAqB,CAAEK,QAAS,CAAC;EAE5D,oBACCN,KAAA,CAAAF,SAAA;IAAAU,QAAA,gBACCZ,IAAA,CAACH,YAAY;MAACgB,KAAK,EAAGpB,EAAE,CAAE,QAAS;IAAG,CAAE,CAAC,EACvCkB,kBAAkB,iBAAIX,IAAA,CAACJ,eAAe,IAAE,CAAC;EAAA,CAC1C,CAAC;AAEL;AAEA,eAAeY,YAAY","ignoreList":[]}