@wordpress/edit-site 5.32.0 → 5.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (809) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-page/index.js.map +1 -1
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  5. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  6. package/build/components/add-new-template/index.js +282 -13
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/add-new-template/utils.js +22 -11
  9. package/build/components/add-new-template/utils.js.map +1 -1
  10. package/build/components/app/index.js.map +1 -1
  11. package/build/components/async/index.js +51 -0
  12. package/build/components/async/index.js.map +1 -0
  13. package/build/components/block-editor/block-inspector-button.js +10 -9
  14. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  15. package/build/components/block-editor/editor-canvas.js +15 -6
  16. package/build/components/block-editor/editor-canvas.js.map +1 -1
  17. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  18. package/build/components/block-editor/resizable-editor.js.map +1 -1
  19. package/build/components/block-editor/resize-handle.js.map +1 -1
  20. package/build/components/block-editor/site-editor-canvas.js +5 -1
  21. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  22. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  23. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  24. package/build/components/canvas-loader/index.js.map +1 -1
  25. package/build/components/code-editor/index.js.map +1 -1
  26. package/build/components/create-template-part-modal/index.js.map +1 -1
  27. package/build/components/editor/index.js +35 -8
  28. package/build/components/editor/index.js.map +1 -1
  29. package/build/components/editor-canvas-container/index.js.map +1 -1
  30. package/build/components/error-boundary/index.js.map +1 -1
  31. package/build/components/error-boundary/warning.js.map +1 -1
  32. package/build/components/global-styles/background-panel.js +13 -1
  33. package/build/components/global-styles/background-panel.js.map +1 -1
  34. package/build/components/global-styles/block-preview-panel.js +6 -1
  35. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  36. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  37. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  38. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  39. package/build/components/global-styles/font-families.js +1 -1
  40. package/build/components/global-styles/font-families.js.map +1 -1
  41. package/build/components/global-styles/font-family-item.js.map +1 -1
  42. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  43. package/build/components/global-styles/font-library-modal/context.js +60 -32
  44. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  45. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  46. package/build/components/global-styles/font-library-modal/font-collection.js +11 -4
  47. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  49. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/index.js +1 -1
  51. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/installed-fonts.js +10 -9
  53. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  55. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  57. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  59. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  61. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  63. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  65. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  66. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  67. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  68. package/build/components/global-styles/header.js.map +1 -1
  69. package/build/components/global-styles/highlighted-colors.js +1 -1
  70. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  71. package/build/components/global-styles/hooks.js +11 -3
  72. package/build/components/global-styles/hooks.js.map +1 -1
  73. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  74. package/build/components/global-styles/index.js.map +1 -1
  75. package/build/components/global-styles/navigation-button.js.map +1 -1
  76. package/build/components/global-styles/palette.js.map +1 -1
  77. package/build/components/global-styles/preview-colors.js.map +1 -1
  78. package/build/components/global-styles/preview-iframe.js.map +1 -1
  79. package/build/components/global-styles/preview-styles.js.map +1 -1
  80. package/build/components/global-styles/root-menu.js +2 -2
  81. package/build/components/global-styles/root-menu.js.map +1 -1
  82. package/build/components/global-styles/screen-background.js +1 -1
  83. package/build/components/global-styles/screen-background.js.map +1 -1
  84. package/build/components/global-styles/screen-block-list.js.map +1 -1
  85. package/build/components/global-styles/screen-block.js.map +1 -1
  86. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  87. package/build/components/global-styles/screen-colors.js.map +1 -1
  88. package/build/components/global-styles/screen-css.js.map +1 -1
  89. package/build/components/global-styles/screen-layout.js.map +1 -1
  90. package/build/components/global-styles/screen-revisions/index.js +1 -1
  91. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  92. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  93. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  94. package/build/components/global-styles/screen-root.js.map +1 -1
  95. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  96. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  97. package/build/components/global-styles/screen-typography.js.map +1 -1
  98. package/build/components/global-styles/style-variations-container.js.map +1 -1
  99. package/build/components/global-styles/subtitle.js.map +1 -1
  100. package/build/components/global-styles/typography-elements.js.map +1 -1
  101. package/build/components/global-styles/typography-example.js.map +1 -1
  102. package/build/components/global-styles/typography-panel.js.map +1 -1
  103. package/build/components/global-styles/typography-preview.js.map +1 -1
  104. package/build/components/global-styles/ui.js +1 -1
  105. package/build/components/global-styles/ui.js.map +1 -1
  106. package/build/components/global-styles/utils.js.map +1 -1
  107. package/build/components/global-styles/variations/variation.js.map +1 -1
  108. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  109. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  110. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  111. package/build/components/global-styles-renderer/index.js.map +1 -1
  112. package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
  113. package/build/components/header-edit-mode/index.js +4 -4
  114. package/build/components/header-edit-mode/index.js.map +1 -1
  115. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  116. package/build/components/header-edit-mode/more-menu/index.js +10 -12
  117. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  118. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  119. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  120. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  121. package/build/components/keyboard-shortcuts/edit-mode.js +0 -23
  122. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  123. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  124. package/build/components/keyboard-shortcuts/register.js +0 -18
  125. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  126. package/build/components/layout/animation.js +3 -2
  127. package/build/components/layout/animation.js.map +1 -1
  128. package/build/components/layout/hooks.js.map +1 -1
  129. package/build/components/layout/index.js +13 -48
  130. package/build/components/layout/index.js.map +1 -1
  131. package/build/components/layout/router.js +73 -7
  132. package/build/components/layout/router.js.map +1 -1
  133. package/build/components/media/index.js.map +1 -1
  134. package/build/components/page/header.js.map +1 -1
  135. package/build/components/page/index.js +5 -2
  136. package/build/components/page/index.js.map +1 -1
  137. package/build/components/page-pages/index.js +15 -17
  138. package/build/components/page-pages/index.js.map +1 -1
  139. package/build/components/page-patterns/dataviews-pattern-actions.js +5 -4
  140. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  141. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  142. package/build/components/page-patterns/header.js +2 -2
  143. package/build/components/page-patterns/header.js.map +1 -1
  144. package/build/components/page-patterns/index.js +124 -17
  145. package/build/components/page-patterns/index.js.map +1 -1
  146. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  147. package/build/components/page-patterns/search-items.js +2 -1
  148. package/build/components/page-patterns/search-items.js.map +1 -1
  149. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  150. package/build/components/page-patterns/use-patterns.js +5 -10
  151. package/build/components/page-patterns/use-patterns.js.map +1 -1
  152. package/build/components/page-patterns/utils.js.map +1 -1
  153. package/build/components/page-templates-template-parts/add-new-template-part.js +2 -1
  154. package/build/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  155. package/build/components/page-templates-template-parts/hooks.js.map +1 -1
  156. package/build/components/page-templates-template-parts/index.js +13 -25
  157. package/build/components/page-templates-template-parts/index.js.map +1 -1
  158. package/build/components/pagination/index.js.map +1 -1
  159. package/build/components/pattern-modal/duplicate.js +6 -3
  160. package/build/components/pattern-modal/duplicate.js.map +1 -1
  161. package/build/components/pattern-modal/index.js.map +1 -1
  162. package/build/components/pattern-modal/rename.js +6 -3
  163. package/build/components/pattern-modal/rename.js.map +1 -1
  164. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  165. package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
  166. package/build/components/rename-post-menu-item/index.js.map +1 -0
  167. package/build/components/resizable-frame/index.js +1 -5
  168. package/build/components/resizable-frame/index.js.map +1 -1
  169. package/build/components/revisions/index.js.map +1 -1
  170. package/build/components/routes/link.js.map +1 -1
  171. package/build/components/routes/use-title.js.map +1 -1
  172. package/build/components/save-button/index.js.map +1 -1
  173. package/build/components/save-hub/index.js.map +1 -1
  174. package/build/components/save-panel/index.js +3 -3
  175. package/build/components/save-panel/index.js.map +1 -1
  176. package/build/components/sidebar/index.js +41 -75
  177. package/build/components/sidebar/index.js.map +1 -1
  178. package/build/components/sidebar-button/index.js.map +1 -1
  179. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  180. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  181. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  182. package/build/components/sidebar-dataviews/default-views.js +1 -1
  183. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  184. package/build/components/sidebar-dataviews/index.js +1 -1
  185. package/build/components/sidebar-dataviews/index.js.map +1 -1
  186. package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
  187. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  188. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  189. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  190. package/build/components/sidebar-edit-mode/index.js +29 -54
  191. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  192. package/build/components/sidebar-edit-mode/page-panels/index.js +23 -2
  193. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  194. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  195. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  196. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +2 -2
  197. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  198. package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
  199. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  201. package/build/components/sidebar-edit-mode/template-panel/index.js +1 -1
  202. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  203. package/build/components/sidebar-navigation-item/index.js +31 -0
  204. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  205. package/build/components/sidebar-navigation-screen/index.js +36 -9
  206. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  207. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  208. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  209. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  210. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  211. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  212. package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -2
  213. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  214. package/build/components/sidebar-navigation-screen-main/index.js +6 -15
  215. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  216. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  217. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  218. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
  219. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  220. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  221. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  223. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  224. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  225. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  226. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  227. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  229. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  230. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  231. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  232. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  233. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-page/index.js +22 -12
  235. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  237. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-pattern/index.js +14 -5
  239. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  241. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  243. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  245. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  246. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  247. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-patterns/index.js +33 -27
  249. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  251. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  253. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  255. package/build/components/sidebar-navigation-screen-template/index.js +10 -7
  256. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  257. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  259. package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  260. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  261. package/build/components/site-hub/index.js +22 -21
  262. package/build/components/site-hub/index.js.map +1 -1
  263. package/build/components/site-icon/index.js.map +1 -1
  264. package/build/components/start-template-options/index.js.map +1 -1
  265. package/build/components/style-book/index.js.map +1 -1
  266. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -5
  267. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  268. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  269. package/build/components/table/index.js.map +1 -1
  270. package/build/components/template-actions/index.js +7 -8
  271. package/build/components/template-actions/index.js.map +1 -1
  272. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  273. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  274. package/build/components/template-part-converter/index.js.map +1 -1
  275. package/build/components/use-edited-entity-record/index.js.map +1 -1
  276. package/build/components/welcome-guide/editor.js.map +1 -1
  277. package/build/components/welcome-guide/image.js.map +1 -1
  278. package/build/components/welcome-guide/index.js.map +1 -1
  279. package/build/components/welcome-guide/page.js.map +1 -1
  280. package/build/components/welcome-guide/styles.js +6 -3
  281. package/build/components/welcome-guide/styles.js.map +1 -1
  282. package/build/components/welcome-guide/template.js.map +1 -1
  283. package/build/hooks/commands/use-common-commands.js.map +1 -1
  284. package/build/hooks/commands/use-edit-mode-commands.js +10 -28
  285. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  286. package/build/hooks/components.js.map +1 -1
  287. package/build/hooks/index.js.map +1 -1
  288. package/build/hooks/push-changes-to-global-styles/index.js +3 -40
  289. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  290. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  291. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  292. package/build/index.js +3 -8
  293. package/build/index.js.map +1 -1
  294. package/build/lock-unlock.js.map +1 -1
  295. package/build/store/actions.js +21 -96
  296. package/build/store/actions.js.map +1 -1
  297. package/build/store/constants.js.map +1 -1
  298. package/build/store/index.js +1 -1
  299. package/build/store/index.js.map +1 -1
  300. package/build/store/private-actions.js +1 -85
  301. package/build/store/private-actions.js.map +1 -1
  302. package/build/store/private-selectors.js.map +1 -1
  303. package/build/store/reducer.js.map +1 -1
  304. package/build/store/selectors.js.map +1 -1
  305. package/build/utils/clone-deep.js.map +1 -1
  306. package/build/utils/constants.js +2 -1
  307. package/build/utils/constants.js.map +1 -1
  308. package/build/utils/get-is-list-page.js.map +1 -1
  309. package/build/utils/is-previewing-theme.js.map +1 -1
  310. package/build/utils/is-template-removable.js.map +1 -1
  311. package/build/utils/is-template-revertable.js.map +1 -1
  312. package/build/utils/math.js.map +1 -1
  313. package/build/utils/set-nested-value.js +44 -0
  314. package/build/utils/set-nested-value.js.map +1 -0
  315. package/build/utils/template-part-create.js.map +1 -1
  316. package/build/utils/use-activate-theme.js.map +1 -1
  317. package/build/utils/use-actual-current-theme.js.map +1 -1
  318. package/build-module/components/add-new-page/index.js.map +1 -1
  319. package/build-module/components/add-new-pattern/index.js.map +1 -1
  320. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  321. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  322. package/build-module/components/add-new-template/index.js +283 -14
  323. package/build-module/components/add-new-template/index.js.map +1 -1
  324. package/build-module/components/add-new-template/utils.js +21 -11
  325. package/build-module/components/add-new-template/utils.js.map +1 -1
  326. package/build-module/components/app/index.js.map +1 -1
  327. package/build-module/components/async/index.js +44 -0
  328. package/build-module/components/async/index.js.map +1 -0
  329. package/build-module/components/block-editor/block-inspector-button.js +9 -8
  330. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  331. package/build-module/components/block-editor/editor-canvas.js +16 -7
  332. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  333. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  334. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  335. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  336. package/build-module/components/block-editor/site-editor-canvas.js +5 -1
  337. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  338. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  339. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  340. package/build-module/components/canvas-loader/index.js.map +1 -1
  341. package/build-module/components/code-editor/index.js.map +1 -1
  342. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  343. package/build-module/components/editor/index.js +35 -8
  344. package/build-module/components/editor/index.js.map +1 -1
  345. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  346. package/build-module/components/error-boundary/index.js.map +1 -1
  347. package/build-module/components/error-boundary/warning.js.map +1 -1
  348. package/build-module/components/global-styles/background-panel.js +14 -1
  349. package/build-module/components/global-styles/background-panel.js.map +1 -1
  350. package/build-module/components/global-styles/block-preview-panel.js +6 -1
  351. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  352. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  353. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  354. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  355. package/build-module/components/global-styles/font-families.js.map +1 -1
  356. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  357. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  358. package/build-module/components/global-styles/font-library-modal/context.js +59 -32
  359. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  360. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  361. package/build-module/components/global-styles/font-library-modal/font-collection.js +12 -5
  362. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  363. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  364. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  365. package/build-module/components/global-styles/font-library-modal/index.js +2 -2
  366. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  367. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +11 -10
  368. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  369. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  370. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  371. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  373. package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  375. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  376. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  377. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  379. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  380. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  381. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  382. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  383. package/build-module/components/global-styles/header.js.map +1 -1
  384. package/build-module/components/global-styles/highlighted-colors.js +1 -1
  385. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  386. package/build-module/components/global-styles/hooks.js +11 -3
  387. package/build-module/components/global-styles/hooks.js.map +1 -1
  388. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  389. package/build-module/components/global-styles/index.js.map +1 -1
  390. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  391. package/build-module/components/global-styles/palette.js.map +1 -1
  392. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  393. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  394. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  395. package/build-module/components/global-styles/root-menu.js +2 -2
  396. package/build-module/components/global-styles/root-menu.js.map +1 -1
  397. package/build-module/components/global-styles/screen-background.js +1 -1
  398. package/build-module/components/global-styles/screen-background.js.map +1 -1
  399. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  400. package/build-module/components/global-styles/screen-block.js.map +1 -1
  401. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  402. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  403. package/build-module/components/global-styles/screen-css.js.map +1 -1
  404. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  405. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  406. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  407. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  408. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  409. package/build-module/components/global-styles/screen-root.js.map +1 -1
  410. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  411. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  412. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  413. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  414. package/build-module/components/global-styles/subtitle.js.map +1 -1
  415. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  416. package/build-module/components/global-styles/typography-example.js.map +1 -1
  417. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  418. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  419. package/build-module/components/global-styles/ui.js.map +1 -1
  420. package/build-module/components/global-styles/utils.js.map +1 -1
  421. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  422. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  423. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  424. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  425. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  426. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
  427. package/build-module/components/header-edit-mode/index.js +3 -3
  428. package/build-module/components/header-edit-mode/index.js.map +1 -1
  429. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  430. package/build-module/components/header-edit-mode/more-menu/index.js +8 -8
  431. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  432. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  433. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  434. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  435. package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -23
  436. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  437. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  438. package/build-module/components/keyboard-shortcuts/register.js +0 -18
  439. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  440. package/build-module/components/layout/animation.js +4 -3
  441. package/build-module/components/layout/animation.js.map +1 -1
  442. package/build-module/components/layout/hooks.js.map +1 -1
  443. package/build-module/components/layout/index.js +13 -48
  444. package/build-module/components/layout/index.js.map +1 -1
  445. package/build-module/components/layout/router.js +73 -7
  446. package/build-module/components/layout/router.js.map +1 -1
  447. package/build-module/components/media/index.js.map +1 -1
  448. package/build-module/components/page/header.js.map +1 -1
  449. package/build-module/components/page/index.js +5 -2
  450. package/build-module/components/page/index.js.map +1 -1
  451. package/build-module/components/page-pages/index.js +14 -16
  452. package/build-module/components/page-pages/index.js.map +1 -1
  453. package/build-module/components/page-patterns/dataviews-pattern-actions.js +5 -4
  454. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  455. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  456. package/build-module/components/page-patterns/header.js +2 -2
  457. package/build-module/components/page-patterns/header.js.map +1 -1
  458. package/build-module/components/page-patterns/index.js +126 -19
  459. package/build-module/components/page-patterns/index.js.map +1 -1
  460. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  461. package/build-module/components/page-patterns/search-items.js +3 -2
  462. package/build-module/components/page-patterns/search-items.js.map +1 -1
  463. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  464. package/build-module/components/page-patterns/use-patterns.js +2 -6
  465. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  466. package/build-module/components/page-patterns/utils.js.map +1 -1
  467. package/build-module/components/page-templates-template-parts/add-new-template-part.js +3 -2
  468. package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  469. package/build-module/components/page-templates-template-parts/hooks.js.map +1 -1
  470. package/build-module/components/page-templates-template-parts/index.js +13 -25
  471. package/build-module/components/page-templates-template-parts/index.js.map +1 -1
  472. package/build-module/components/pagination/index.js.map +1 -1
  473. package/build-module/components/pattern-modal/duplicate.js +4 -1
  474. package/build-module/components/pattern-modal/duplicate.js.map +1 -1
  475. package/build-module/components/pattern-modal/index.js.map +1 -1
  476. package/build-module/components/pattern-modal/rename.js +4 -1
  477. package/build-module/components/pattern-modal/rename.js.map +1 -1
  478. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  479. package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
  480. package/build-module/components/rename-post-menu-item/index.js.map +1 -0
  481. package/build-module/components/resizable-frame/index.js +1 -5
  482. package/build-module/components/resizable-frame/index.js.map +1 -1
  483. package/build-module/components/revisions/index.js.map +1 -1
  484. package/build-module/components/routes/link.js.map +1 -1
  485. package/build-module/components/routes/use-title.js.map +1 -1
  486. package/build-module/components/save-button/index.js.map +1 -1
  487. package/build-module/components/save-hub/index.js.map +1 -1
  488. package/build-module/components/save-panel/index.js +2 -2
  489. package/build-module/components/save-panel/index.js.map +1 -1
  490. package/build-module/components/sidebar/index.js +42 -75
  491. package/build-module/components/sidebar/index.js.map +1 -1
  492. package/build-module/components/sidebar-button/index.js.map +1 -1
  493. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  494. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  495. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  496. package/build-module/components/sidebar-dataviews/default-views.js +1 -1
  497. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  498. package/build-module/components/sidebar-dataviews/index.js +1 -1
  499. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  500. package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
  501. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  502. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  503. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  504. package/build-module/components/sidebar-edit-mode/index.js +28 -53
  505. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  506. package/build-module/components/sidebar-edit-mode/page-panels/index.js +23 -2
  507. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  508. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  509. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  510. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
  511. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  512. package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
  513. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  514. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  515. package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -1
  516. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  517. package/build-module/components/sidebar-navigation-item/index.js +31 -0
  518. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  519. package/build-module/components/sidebar-navigation-screen/index.js +37 -10
  520. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  521. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  522. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  523. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  524. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  525. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  526. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -3
  527. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  528. package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
  529. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  530. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  531. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  532. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
  533. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  534. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  535. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  537. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  538. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  539. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  540. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  541. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  543. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  544. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  545. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  546. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  547. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  548. package/build-module/components/sidebar-navigation-screen-page/index.js +24 -14
  549. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  550. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  551. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-pattern/index.js +14 -5
  553. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  554. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  555. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  556. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  557. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  559. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  561. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-patterns/index.js +34 -28
  563. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  565. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  567. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  568. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  569. package/build-module/components/sidebar-navigation-screen-template/index.js +12 -8
  570. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  571. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  572. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  573. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  574. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  575. package/build-module/components/site-hub/index.js +22 -21
  576. package/build-module/components/site-hub/index.js.map +1 -1
  577. package/build-module/components/site-icon/index.js.map +1 -1
  578. package/build-module/components/start-template-options/index.js.map +1 -1
  579. package/build-module/components/style-book/index.js.map +1 -1
  580. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -5
  581. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  582. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  583. package/build-module/components/table/index.js.map +1 -1
  584. package/build-module/components/template-actions/index.js +7 -8
  585. package/build-module/components/template-actions/index.js.map +1 -1
  586. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  587. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  588. package/build-module/components/template-part-converter/index.js.map +1 -1
  589. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  590. package/build-module/components/welcome-guide/editor.js.map +1 -1
  591. package/build-module/components/welcome-guide/image.js.map +1 -1
  592. package/build-module/components/welcome-guide/index.js.map +1 -1
  593. package/build-module/components/welcome-guide/page.js.map +1 -1
  594. package/build-module/components/welcome-guide/styles.js +6 -3
  595. package/build-module/components/welcome-guide/styles.js.map +1 -1
  596. package/build-module/components/welcome-guide/template.js.map +1 -1
  597. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  598. package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
  599. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  600. package/build-module/hooks/components.js.map +1 -1
  601. package/build-module/hooks/index.js.map +1 -1
  602. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
  603. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  604. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  605. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  606. package/build-module/index.js +4 -6
  607. package/build-module/index.js.map +1 -1
  608. package/build-module/lock-unlock.js.map +1 -1
  609. package/build-module/store/actions.js +16 -92
  610. package/build-module/store/actions.js.map +1 -1
  611. package/build-module/store/constants.js.map +1 -1
  612. package/build-module/store/index.js.map +1 -1
  613. package/build-module/store/private-actions.js +0 -83
  614. package/build-module/store/private-actions.js.map +1 -1
  615. package/build-module/store/private-selectors.js.map +1 -1
  616. package/build-module/store/reducer.js.map +1 -1
  617. package/build-module/store/selectors.js.map +1 -1
  618. package/build-module/utils/clone-deep.js.map +1 -1
  619. package/build-module/utils/constants.js +1 -0
  620. package/build-module/utils/constants.js.map +1 -1
  621. package/build-module/utils/get-is-list-page.js.map +1 -1
  622. package/build-module/utils/is-previewing-theme.js.map +1 -1
  623. package/build-module/utils/is-template-removable.js.map +1 -1
  624. package/build-module/utils/is-template-revertable.js.map +1 -1
  625. package/build-module/utils/math.js.map +1 -1
  626. package/build-module/utils/set-nested-value.js +38 -0
  627. package/build-module/utils/set-nested-value.js.map +1 -0
  628. package/build-module/utils/template-part-create.js.map +1 -1
  629. package/build-module/utils/use-activate-theme.js.map +1 -1
  630. package/build-module/utils/use-actual-current-theme.js.map +1 -1
  631. package/build-style/style-rtl.css +172 -585
  632. package/build-style/style.css +172 -585
  633. package/package.json +43 -44
  634. package/src/components/add-new-template/index.js +412 -12
  635. package/src/components/add-new-template/style.scss +0 -22
  636. package/src/components/add-new-template/utils.js +44 -24
  637. package/src/components/async/index.js +43 -0
  638. package/src/components/block-editor/block-inspector-button.js +9 -11
  639. package/src/components/block-editor/editor-canvas.js +45 -21
  640. package/src/components/block-editor/site-editor-canvas.js +6 -1
  641. package/src/components/editor/index.js +50 -13
  642. package/src/components/global-styles/background-panel.js +16 -0
  643. package/src/components/global-styles/block-preview-panel.js +6 -1
  644. package/src/components/global-styles/font-library-modal/context.js +76 -51
  645. package/src/components/global-styles/font-library-modal/font-collection.js +247 -223
  646. package/src/components/global-styles/font-library-modal/index.js +2 -2
  647. package/src/components/global-styles/font-library-modal/installed-fonts.js +156 -147
  648. package/src/components/global-styles/font-library-modal/style.scss +31 -13
  649. package/src/components/global-styles/highlighted-colors.js +1 -1
  650. package/src/components/global-styles/hooks.js +20 -3
  651. package/src/components/global-styles/root-menu.js +2 -2
  652. package/src/components/global-styles/screen-background.js +1 -1
  653. package/src/components/global-styles/screen-revisions/index.js +1 -1
  654. package/src/components/header-edit-mode/index.js +3 -5
  655. package/src/components/header-edit-mode/more-menu/index.js +6 -17
  656. package/src/components/header-edit-mode/style.scss +1 -1
  657. package/src/components/keyboard-shortcuts/edit-mode.js +0 -29
  658. package/src/components/keyboard-shortcuts/register.js +0 -20
  659. package/src/components/layout/animation.js +6 -3
  660. package/src/components/layout/index.js +12 -50
  661. package/src/components/layout/router.js +75 -12
  662. package/src/components/layout/style.scss +15 -37
  663. package/src/components/page/index.js +7 -2
  664. package/src/components/page-pages/index.js +33 -23
  665. package/src/components/page-pages/style.scss +29 -22
  666. package/src/components/page-patterns/dataviews-pattern-actions.js +5 -6
  667. package/src/components/page-patterns/header.js +4 -2
  668. package/src/components/page-patterns/index.js +168 -56
  669. package/src/components/page-patterns/search-items.js +3 -0
  670. package/src/components/page-patterns/style.scss +7 -6
  671. package/src/components/page-patterns/use-patterns.js +2 -6
  672. package/src/components/page-templates-template-parts/add-new-template-part.js +4 -2
  673. package/src/components/page-templates-template-parts/index.js +24 -39
  674. package/src/components/pattern-modal/duplicate.js +2 -1
  675. package/src/components/pattern-modal/rename.js +2 -1
  676. package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
  677. package/src/components/resizable-frame/index.js +2 -6
  678. package/src/components/save-panel/index.js +2 -2
  679. package/src/components/sidebar/index.js +52 -100
  680. package/src/components/sidebar/style.scss +41 -6
  681. package/src/components/sidebar-dataviews/default-views.js +1 -1
  682. package/src/components/sidebar-dataviews/index.js +1 -1
  683. package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
  684. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
  685. package/src/components/sidebar-edit-mode/index.js +39 -75
  686. package/src/components/sidebar-edit-mode/page-panels/index.js +25 -2
  687. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +20 -12
  688. package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -6
  689. package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
  690. package/src/components/sidebar-edit-mode/style.scss +1 -1
  691. package/src/components/sidebar-edit-mode/template-panel/index.js +1 -1
  692. package/src/components/sidebar-navigation-item/index.js +29 -0
  693. package/src/components/sidebar-navigation-screen/index.js +29 -12
  694. package/src/components/sidebar-navigation-screen/style.scss +1 -21
  695. package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -11
  696. package/src/components/sidebar-navigation-screen-main/index.js +11 -23
  697. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  698. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
  699. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  700. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
  701. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  702. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
  703. package/src/components/sidebar-navigation-screen-page/index.js +23 -13
  704. package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
  705. package/src/components/sidebar-navigation-screen-pattern/index.js +9 -6
  706. package/src/components/sidebar-navigation-screen-patterns/index.js +70 -60
  707. package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
  708. package/src/components/sidebar-navigation-screen-template/index.js +8 -12
  709. package/src/components/sidebar-navigation-screen-templates-browse/index.js +2 -7
  710. package/src/components/site-hub/index.js +80 -90
  711. package/src/components/site-hub/style.scss +14 -34
  712. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +50 -35
  713. package/src/components/template-actions/index.js +8 -11
  714. package/src/components/welcome-guide/style.scss +1 -1
  715. package/src/components/welcome-guide/styles.js +6 -5
  716. package/src/hooks/commands/use-edit-mode-commands.js +12 -33
  717. package/src/hooks/push-changes-to-global-styles/index.js +1 -40
  718. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
  719. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
  720. package/src/index.js +9 -10
  721. package/src/store/actions.js +25 -141
  722. package/src/store/private-actions.js +0 -133
  723. package/src/store/test/actions.js +7 -2
  724. package/src/style.scss +0 -2
  725. package/src/utils/constants.js +1 -0
  726. package/src/utils/set-nested-value.js +39 -0
  727. package/build/components/add-new-template/new-template.js +0 -298
  728. package/build/components/add-new-template/new-template.js.map +0 -1
  729. package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
  730. package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  731. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
  732. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  733. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
  734. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  735. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  736. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  737. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
  738. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  739. package/build/components/keyboard-shortcut-help-modal/index.js +0 -119
  740. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  741. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
  742. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  743. package/build/components/page-actions/index.js +0 -35
  744. package/build/components/page-actions/index.js.map +0 -1
  745. package/build/components/page-actions/trash-page-menu-item.js +0 -54
  746. package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
  747. package/build/components/page-templates-template-parts/actions.js +0 -207
  748. package/build/components/page-templates-template-parts/actions.js.map +0 -1
  749. package/build/components/preferences-modal/index.js +0 -38
  750. package/build/components/preferences-modal/index.js.map +0 -1
  751. package/build/components/sidebar-edit-mode/constants.js +0 -9
  752. package/build/components/sidebar-edit-mode/constants.js.map +0 -1
  753. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
  754. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  755. package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
  756. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  757. package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
  758. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  759. package/build/components/template-actions/rename-menu-item.js.map +0 -1
  760. package/build-module/components/add-new-template/new-template.js +0 -290
  761. package/build-module/components/add-new-template/new-template.js.map +0 -1
  762. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
  763. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  764. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  765. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  766. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
  767. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  768. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  769. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  770. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
  771. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  772. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -110
  773. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  774. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
  775. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  776. package/build-module/components/page-actions/index.js +0 -27
  777. package/build-module/components/page-actions/index.js.map +0 -1
  778. package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
  779. package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
  780. package/build-module/components/page-templates-template-parts/actions.js +0 -199
  781. package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
  782. package/build-module/components/preferences-modal/index.js +0 -30
  783. package/build-module/components/preferences-modal/index.js.map +0 -1
  784. package/build-module/components/sidebar-edit-mode/constants.js +0 -3
  785. package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
  786. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
  787. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  788. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
  789. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  790. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
  791. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  792. package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
  793. package/src/components/add-new-template/new-template.js +0 -429
  794. package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
  795. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  796. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
  797. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  798. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  799. package/src/components/keyboard-shortcut-help-modal/index.js +0 -151
  800. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
  801. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  802. package/src/components/page-actions/index.js +0 -30
  803. package/src/components/page-actions/trash-page-menu-item.js +0 -63
  804. package/src/components/page-templates-template-parts/actions.js +0 -277
  805. package/src/components/preferences-modal/index.js +0 -29
  806. package/src/components/sidebar-edit-mode/constants.js +0 -2
  807. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
  808. package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
  809. package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
@@ -1 +1 @@
1
- {"version":3,"names":["_compose","require","_components","_i18n","_blockEditor","_subtitle","_interopRequireDefault","_lockUnlock","useGlobalSetting","unlock","blockEditorPrivateApis","mobilePopoverProps","placement","offset","noop","GradientPalettePanel","name","themeGradients","setThemeGradients","baseThemeGradients","defaultGradients","setDefaultGradients","baseDefaultGradients","customGradients","setCustomGradients","defaultPaletteEnabled","customDuotone","defaultDuotone","themeDuotone","defaultDuotoneEnabled","duotonePalette","isMobileViewport","useViewportMatch","popoverProps","undefined","_react","createElement","__experimentalVStack","className","spacing","length","__experimentalPaletteEdit","canReset","canOnlyChangeValues","gradients","onChange","paletteLabel","__","paletteLabelHeadingLevel","paletteLabelLevel","emptyMessage","slugPrefix","default","level","__experimentalSpacer","margin","DuotonePicker","disableCustomDuotone","disableCustomColors","clearable"],"sources":["@wordpress/edit-site/src/components/global-styles/gradients-palette-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalSpacer as Spacer,\n\tDuotonePicker,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nconst noop = () => {};\n\nexport default function GradientPalettePanel( { name } ) {\n\tconst [ themeGradients, setThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname\n\t);\n\tconst [ baseThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultGradients, setDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname\n\t);\n\tconst [ baseDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customGradients, setCustomGradients ] = useGlobalSetting(\n\t\t'color.gradients.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultGradients',\n\t\tname\n\t);\n\n\tconst [ customDuotone ] = useGlobalSetting( 'color.duotone.custom' ) || [];\n\tconst [ defaultDuotone ] =\n\t\tuseGlobalSetting( 'color.duotone.default' ) || [];\n\tconst [ themeDuotone ] = useGlobalSetting( 'color.duotone.theme' ) || [];\n\tconst [ defaultDuotoneEnabled ] = useGlobalSetting(\n\t\t'color.defaultDuotone'\n\t);\n\n\tconst duotonePalette = [\n\t\t...( customDuotone || [] ),\n\t\t...( themeDuotone || [] ),\n\t\t...( defaultDuotone && defaultDuotoneEnabled ? defaultDuotone : [] ),\n\t];\n\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-global-styles-gradient-palette-panel\"\n\t\t\tspacing={ 10 }\n\t\t>\n\t\t\t{ !! themeGradients && !! themeGradients.length && (\n\t\t\t\t<PaletteEdit\n\t\t\t\t\tcanReset={ themeGradients !== baseThemeGradients }\n\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\tgradients={ themeGradients }\n\t\t\t\t\tonChange={ setThemeGradients }\n\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! defaultGradients &&\n\t\t\t\t!! defaultGradients.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultGradients !== baseDefaultGradients }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tgradients={ defaultGradients }\n\t\t\t\t\t\tonChange={ setDefaultGradients }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t<PaletteEdit\n\t\t\t\tgradients={ customGradients }\n\t\t\t\tonChange={ setCustomGradients }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelLevel={ 3 }\n\t\t\t\temptyMessage={ __(\n\t\t\t\t\t'Custom gradients are empty! Add some gradients to create your own palette.'\n\t\t\t\t) }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t\t{ !! duotonePalette && !! duotonePalette.length && (\n\t\t\t\t<div>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Duotone' ) }</Subtitle>\n\t\t\t\t\t<Spacer margin={ 3 } />\n\t\t\t\t\t<DuotonePicker\n\t\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\t\tdisableCustomDuotone\n\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tonChange={ noop }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAjBA;AACA;AACA;;AAWA;AACA;AACA;;AAIA,MAAM;EAAEO;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAC7D,MAAMC,kBAAkB,GAAG;EAAEC,SAAS,EAAE,cAAc;EAAEC,MAAM,EAAE;AAAE,CAAC;AAEnE,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAEN,SAASC,oBAAoBA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACxD,MAAM,CAAEC,cAAc,EAAEC,iBAAiB,CAAE,GAAGV,gBAAgB,CAC7D,uBAAuB,EACvBQ,IACD,CAAC;EACD,MAAM,CAAEG,kBAAkB,CAAE,GAAGX,gBAAgB,CAC9C,uBAAuB,EACvBQ,IAAI,EACJ,MACD,CAAC;EACD,MAAM,CAAEI,gBAAgB,EAAEC,mBAAmB,CAAE,GAAGb,gBAAgB,CACjE,yBAAyB,EACzBQ,IACD,CAAC;EACD,MAAM,CAAEM,oBAAoB,CAAE,GAAGd,gBAAgB,CA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AAGA,cAAgB;IACjC2B,oBAAoB;IACpBC,mBAAmB;IACnBC,SAAS,EAAG,KAAO;IACnBd,QAAQ,EAAG/B;EAAM,CACjB,CACG,CAEC,CAAC;AAEX"}
1
+ {"version":3,"names":["_compose","require","_components","_i18n","_blockEditor","_subtitle","_interopRequireDefault","_lockUnlock","useGlobalSetting","unlock","blockEditorPrivateApis","mobilePopoverProps","placement","offset","noop","GradientPalettePanel","name","themeGradients","setThemeGradients","baseThemeGradients","defaultGradients","setDefaultGradients","baseDefaultGradients","customGradients","setCustomGradients","defaultPaletteEnabled","customDuotone","defaultDuotone","themeDuotone","defaultDuotoneEnabled","duotonePalette","isMobileViewport","useViewportMatch","popoverProps","undefined","_react","createElement","__experimentalVStack","className","spacing","length","__experimentalPaletteEdit","canReset","canOnlyChangeValues","gradients","onChange","paletteLabel","__","paletteLabelHeadingLevel","paletteLabelLevel","emptyMessage","slugPrefix","default","level","__experimentalSpacer","margin","DuotonePicker","disableCustomDuotone","disableCustomColors","clearable"],"sources":["@wordpress/edit-site/src/components/global-styles/gradients-palette-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalSpacer as Spacer,\n\tDuotonePicker,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nconst noop = () => {};\n\nexport default function GradientPalettePanel( { name } ) {\n\tconst [ themeGradients, setThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname\n\t);\n\tconst [ baseThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultGradients, setDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname\n\t);\n\tconst [ baseDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customGradients, setCustomGradients ] = useGlobalSetting(\n\t\t'color.gradients.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultGradients',\n\t\tname\n\t);\n\n\tconst [ customDuotone ] = useGlobalSetting( 'color.duotone.custom' ) || [];\n\tconst [ defaultDuotone ] =\n\t\tuseGlobalSetting( 'color.duotone.default' ) || [];\n\tconst [ themeDuotone ] = useGlobalSetting( 'color.duotone.theme' ) || [];\n\tconst [ defaultDuotoneEnabled ] = useGlobalSetting(\n\t\t'color.defaultDuotone'\n\t);\n\n\tconst duotonePalette = [\n\t\t...( customDuotone || [] ),\n\t\t...( themeDuotone || [] ),\n\t\t...( defaultDuotone && defaultDuotoneEnabled ? defaultDuotone : [] ),\n\t];\n\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-global-styles-gradient-palette-panel\"\n\t\t\tspacing={ 10 }\n\t\t>\n\t\t\t{ !! themeGradients && !! themeGradients.length && (\n\t\t\t\t<PaletteEdit\n\t\t\t\t\tcanReset={ themeGradients !== baseThemeGradients }\n\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\tgradients={ themeGradients }\n\t\t\t\t\tonChange={ setThemeGradients }\n\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! defaultGradients &&\n\t\t\t\t!! defaultGradients.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultGradients !== baseDefaultGradients }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tgradients={ defaultGradients }\n\t\t\t\t\t\tonChange={ setDefaultGradients }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t<PaletteEdit\n\t\t\t\tgradients={ customGradients }\n\t\t\t\tonChange={ setCustomGradients }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelLevel={ 3 }\n\t\t\t\temptyMessage={ __(\n\t\t\t\t\t'Custom gradients are empty! Add some gradients to create your own palette.'\n\t\t\t\t) }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t\t{ !! duotonePalette && !! duotonePalette.length && (\n\t\t\t\t<div>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Duotone' ) }</Subtitle>\n\t\t\t\t\t<Spacer margin={ 3 } />\n\t\t\t\t\t<DuotonePicker\n\t\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\t\tdisableCustomDuotone\n\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tonChange={ noop }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAjBA;AACA;AACA;;AAWA;AACA;AACA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GrB,kBAAoB;IAC/BsB,YAAY,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;IAC/BE,iBAAiB,EAAG,CAAG;IACvBC,YAAY,EAAG,IAAAH,QAAE,EAChB,4EACD,CAAG;IACHI,UAAU,EAAC,SAAS;IACpBlB,YAAY,EAAGA;EAAc,CAC7B,CAAC,EACA,CAAC,CAAEH,cAAc,IAAI,CAAC,CAAEA,cAAc,CAACU,MAAM,IAC9C,IAAAL,MAAA,CAAAC,aAAA,eACC,IAAAD,MAAA,CAAAC,aAAA,EAAC/B,SAAA,CAAA+C,OAAQ;IAACC,KAAK,EAAG;EAAG,GAAG,IAAAN,QAAE,EAAE,SAAU,CAAa,CAAC,EACpD,IAAAZ,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAAoD,oBAAM;IAACC,MAAM,EAAG;EAAG,CAAE,CAAC,EACvB,IAAApB,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAAsD,aAAa;IACb1B,cAAc,EAAGA,cAAgB;IACjC2B,oBAAoB;IACpBC,mBAAmB;IACnBC,SAAS,EAAG,KAAO;IACnBd,QAAQ,EAAG/B;EAAM,CACjB,CACG,CAEC,CAAC;AAEX","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_icons","ScreenHeader","title","description","onBack","_react","createElement","__experimentalVStack","spacing","__experimentalView","__experimentalSpacer","marginBottom","paddingX","paddingY","__experimentalHStack","__experimentalNavigatorToParentButton","style","minWidth","padding","icon","isRTL","chevronRight","chevronLeft","size","label","__","onClick","__experimentalHeading","className","level","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/header.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHeading as Heading,\n\t__experimentalView as View,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\n\nfunction ScreenHeader( { title, description, onBack } ) {\n\treturn (\n\t\t<VStack spacing={ 0 }>\n\t\t\t<View>\n\t\t\t\t<Spacer marginBottom={ 0 } paddingX={ 4 } paddingY={ 3 }>\n\t\t\t\t\t<HStack spacing={ 2 }>\n\t\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t// TODO: This style override is also used in ToolsPanelHeader.\n\t\t\t\t\t\t\t\t// It should be supported out-of-the-box by Button.\n\t\t\t\t\t\t\t\t{ minWidth: 24, padding: 0 }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tonClick={ onBack }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer>\n\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-header\"\n\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t</HStack>\n\t\t\t\t</Spacer>\n\t\t\t</View>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"edit-site-global-styles-header__description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default ScreenHeader;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAZA;AACA;AACA;;AAYA,SAASG,YAAYA,CAAE;EAAEC,KAAK;EAAEC,WAAW;EAAEC;AAAO,CAAC,EAAG;EACvD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,oBAAM;IAACC,OAAO,EAAG;EAAG,GACpB,IAAAH,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAY,kBAAI,QACJ,IAAAJ,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAa,oBAAM;IAACC,YAAY,EAAG,CAAG;IAACC,QAAQ,EAAG,CAAG;IAACC,QAAQ,EAAG;EAAG,GACvD,IAAAR,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAiB,oBAAM;IAACN,OAAO,EAAG;EAAG,GACpB,IAAAH,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAkB,qCAAuB;IACvBC,KAAK;IACJ;IACA;IACA;MAAEC,QAAQ,EAAE,EAAE;MAAEC,OAAO,EAAE;IAAE,CAC3B;IACDC,IAAI,EAAG,IAAAC,WAAK,EAAC,CAAC,GAAGC,mBAAY,GAAGC,kBAAa;IAC7CC,IAAI,EAAC,OAAO;IACZC,KAAK,EAAG,IAAAC,QAAE,EAAE,MAAO,CAAG;IACtBC,OAAO,EAAGtB;EAAQ,CAClB,CAAC,EACF,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAa,oBAAM,QACN,IAAAL,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAA8B,qBAAO;IACPC,SAAS,EAAC,gCAAgC;IAC1CC,KAAK,EAAG,CAAG;IACXN,IAAI,EAAG;EAAI,GAETrB,KACM,CACF,CACD,CACD,CACH,CAAC,EACLC,WAAW,IACZ,IAAAE,MAAA,CAAAC,aAAA;IAAGsB,SAAS,EAAC;EAA6C,GACvDzB,WACA,CAEG,CAAC;AAEX;AAAC,IAAA2B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc/B,YAAY"}
1
+ {"version":3,"names":["_components","require","_i18n","_icons","ScreenHeader","title","description","onBack","_react","createElement","__experimentalVStack","spacing","__experimentalView","__experimentalSpacer","marginBottom","paddingX","paddingY","__experimentalHStack","__experimentalNavigatorToParentButton","style","minWidth","padding","icon","isRTL","chevronRight","chevronLeft","size","label","__","onClick","__experimentalHeading","className","level","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/header.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHeading as Heading,\n\t__experimentalView as View,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\n\nfunction ScreenHeader( { title, description, onBack } ) {\n\treturn (\n\t\t<VStack spacing={ 0 }>\n\t\t\t<View>\n\t\t\t\t<Spacer marginBottom={ 0 } paddingX={ 4 } paddingY={ 3 }>\n\t\t\t\t\t<HStack spacing={ 2 }>\n\t\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t// TODO: This style override is also used in ToolsPanelHeader.\n\t\t\t\t\t\t\t\t// It should be supported out-of-the-box by Button.\n\t\t\t\t\t\t\t\t{ minWidth: 24, padding: 0 }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tonClick={ onBack }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer>\n\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-header\"\n\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t</HStack>\n\t\t\t\t</Spacer>\n\t\t\t</View>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"edit-site-global-styles-header__description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default ScreenHeader;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAZA;AACA;AACA;;AAYA,SAASG,YAAYA,CAAE;EAAEC,KAAK;EAAEC,WAAW;EAAEC;AAAO,CAAC,EAAG;EACvD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,oBAAM;IAACC,OAAO,EAAG;EAAG,GACpB,IAAAH,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAY,kBAAI,QACJ,IAAAJ,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAa,oBAAM;IAACC,YAAY,EAAG,CAAG;IAACC,QAAQ,EAAG,CAAG;IAACC,QAAQ,EAAG;EAAG,GACvD,IAAAR,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAiB,oBAAM;IAACN,OAAO,EAAG;EAAG,GACpB,IAAAH,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAkB,qCAAuB;IACvBC,KAAK;IACJ;IACA;IACA;MAAEC,QAAQ,EAAE,EAAE;MAAEC,OAAO,EAAE;IAAE,CAC3B;IACDC,IAAI,EAAG,IAAAC,WAAK,EAAC,CAAC,GAAGC,mBAAY,GAAGC,kBAAa;IAC7CC,IAAI,EAAC,OAAO;IACZC,KAAK,EAAG,IAAAC,QAAE,EAAE,MAAO,CAAG;IACtBC,OAAO,EAAGtB;EAAQ,CAClB,CAAC,EACF,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAa,oBAAM,QACN,IAAAL,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAA8B,qBAAO;IACPC,SAAS,EAAC,gCAAgC;IAC1CC,KAAK,EAAG,CAAG;IACXN,IAAI,EAAG;EAAI,GAETrB,KACM,CACF,CACD,CACD,CACH,CAAC,EACLC,WAAW,IACZ,IAAAE,MAAA,CAAAC,aAAA;IAAGsB,SAAS,EAAC;EAA6C,GACvDzB,WACA,CAEG,CAAC;AAEX;AAAC,IAAA2B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc/B,YAAY","ignoreList":[]}
@@ -27,7 +27,7 @@ function HighlightedColors({
27
27
  slug,
28
28
  color
29
29
  }, index) => (0, _react.createElement)(_components.__unstableMotion.div, {
30
- key: slug,
30
+ key: `${slug}-${index}`,
31
31
  style: {
32
32
  height: scaledSwatchSize,
33
33
  width: scaledSwatchSize,
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_hooks","HighlightedColors","normalizedColorSwatchSize","ratio","highlightedColors","useStylesPreviewColors","scaledSwatchSize","map","slug","color","index","_react","createElement","__unstableMotion","div","key","style","height","width","background","borderRadius","animate","scale","opacity","initial","transition","delay"],"sources":["@wordpress/edit-site/src/components/global-styles/highlighted-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useStylesPreviewColors } from './hooks';\n\nexport default function HighlightedColors( {\n\tnormalizedColorSwatchSize,\n\tratio,\n} ) {\n\tconst { highlightedColors } = useStylesPreviewColors();\n\tconst scaledSwatchSize = normalizedColorSwatchSize * ratio;\n\treturn highlightedColors.map( ( { slug, color }, index ) => (\n\t\t<motion.div\n\t\t\tkey={ slug }\n\t\t\tstyle={ {\n\t\t\t\theight: scaledSwatchSize,\n\t\t\t\twidth: scaledSwatchSize,\n\t\t\t\tbackground: color,\n\t\t\t\tborderRadius: scaledSwatchSize / 2,\n\t\t\t} }\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: index === 1 ? 0.2 : 0.1,\n\t\t\t} }\n\t\t/>\n\t) );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASE,iBAAiBA,CAAE;EAC1CC,yBAAyB;EACzBC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAkB,CAAC,GAAG,IAAAC,6BAAsB,EAAC,CAAC;EACtD,MAAMC,gBAAgB,GAAGJ,yBAAyB,GAAGC,KAAK;EAC1D,OAAOC,iBAAiB,CAACG,GAAG,CAAE,CAAE;IAAEC,IAAI;IAAEC;EAAM,CAAC,EAAEC,KAAK,KACrD,IAAAC,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAe,gBAAM,CAACC,GAAG;IACVC,GAAG,EAAGP,IAAM;IACZQ,KAAK,EAAG;MACPC,MAAM,EAAEX,gBAAgB;MACxBY,KAAK,EAAEZ,gBAAgB;MACvBa,UAAU,EAAEV,KAAK;MACjBW,YAAY,EAAEd,gBAAgB,GAAG;IAClC,CAAG;IACHe,OAAO,EAAG;MACTC,KAAK,EAAE,CAAC;MACRC,OAAO,EAAE;IACV,CAAG;IACHC,OAAO,EAAG;MACTF,KAAK,EAAE,GAAG;MACVC,OAAO,EAAE;IACV,CAAG;IACHE,UAAU,EAAG;MACZC,KAAK,EAAEhB,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG;IAC5B;EAAG,CACH,CACA,CAAC;AACJ"}
1
+ {"version":3,"names":["_components","require","_hooks","HighlightedColors","normalizedColorSwatchSize","ratio","highlightedColors","useStylesPreviewColors","scaledSwatchSize","map","slug","color","index","_react","createElement","__unstableMotion","div","key","style","height","width","background","borderRadius","animate","scale","opacity","initial","transition","delay"],"sources":["@wordpress/edit-site/src/components/global-styles/highlighted-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useStylesPreviewColors } from './hooks';\n\nexport default function HighlightedColors( {\n\tnormalizedColorSwatchSize,\n\tratio,\n} ) {\n\tconst { highlightedColors } = useStylesPreviewColors();\n\tconst scaledSwatchSize = normalizedColorSwatchSize * ratio;\n\treturn highlightedColors.map( ( { slug, color }, index ) => (\n\t\t<motion.div\n\t\t\tkey={ `${ slug }-${ index }` }\n\t\t\tstyle={ {\n\t\t\t\theight: scaledSwatchSize,\n\t\t\t\twidth: scaledSwatchSize,\n\t\t\t\tbackground: color,\n\t\t\t\tborderRadius: scaledSwatchSize / 2,\n\t\t\t} }\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: index === 1 ? 0.2 : 0.1,\n\t\t\t} }\n\t\t/>\n\t) );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASE,iBAAiBA,CAAE;EAC1CC,yBAAyB;EACzBC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAkB,CAAC,GAAG,IAAAC,6BAAsB,EAAC,CAAC;EACtD,MAAMC,gBAAgB,GAAGJ,yBAAyB,GAAGC,KAAK;EAC1D,OAAOC,iBAAiB,CAACG,GAAG,CAAE,CAAE;IAAEC,IAAI;IAAEC;EAAM,CAAC,EAAEC,KAAK,KACrD,IAAAC,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAe,gBAAM,CAACC,GAAG;IACVC,GAAG,EAAI,GAAGP,IAAM,IAAIE,KAAO,EAAG;IAC9BM,KAAK,EAAG;MACPC,MAAM,EAAEX,gBAAgB;MACxBY,KAAK,EAAEZ,gBAAgB;MACvBa,UAAU,EAAEV,KAAK;MACjBW,YAAY,EAAEd,gBAAgB,GAAG;IAClC,CAAG;IACHe,OAAO,EAAG;MACTC,KAAK,EAAE,CAAC;MACRC,OAAO,EAAE;IACV,CAAG;IACHC,OAAO,EAAG;MACTF,KAAK,EAAE,GAAG;MACVC,OAAO,EAAE;IACV,CAAG;IACHE,UAAU,EAAG;MACZC,KAAK,EAAEhB,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG;IAC5B;EAAG,CACH,CACA,CAAC;AACJ","ignoreList":[]}
@@ -65,15 +65,23 @@ function useStylesPreviewColors() {
65
65
  const [textColor = 'black'] = useGlobalStyle('color.text');
66
66
  const [backgroundColor = 'white'] = useGlobalStyle('color.background');
67
67
  const [headingColor = textColor] = useGlobalStyle('elements.h1.color.text');
68
+ const [linkColor = headingColor] = useGlobalStyle('elements.link.color.text');
69
+ const [buttonBackgroundColor = linkColor] = useGlobalStyle('elements.button.color.background');
68
70
  const [coreColors] = useGlobalSetting('color.palette.core');
69
71
  const [themeColors] = useGlobalSetting('color.palette.theme');
70
72
  const [customColors] = useGlobalSetting('color.palette.custom');
71
73
  const paletteColors = (themeColors !== null && themeColors !== void 0 ? themeColors : []).concat(customColors !== null && customColors !== void 0 ? customColors : []).concat(coreColors !== null && coreColors !== void 0 ? coreColors : []);
72
- const highlightedColors = paletteColors.filter(
73
- // we exclude these two colors because they are already visible in the preview.
74
+ const textColorObject = paletteColors.filter(({
75
+ color
76
+ }) => color === textColor);
77
+ const buttonBackgroundColorObject = paletteColors.filter(({
78
+ color
79
+ }) => color === buttonBackgroundColor);
80
+ const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter(
81
+ // we exclude these background color because it is already visible in the preview.
74
82
  ({
75
83
  color
76
- }) => color !== backgroundColor && color !== headingColor).slice(0, 2);
84
+ }) => color !== backgroundColor).slice(0, 2);
77
85
  return {
78
86
  paletteColors,
79
87
  highlightedColors
@@ -1 +1 @@
1
- {"version":3,"names":["_colord","require","_a11y","_interopRequireDefault","_blocks","_blockEditor","_element","_i18n","_globalStylesProvider","_useThemeStyleVariationsByProperty","_utils","_lockUnlock","_data","useGlobalSetting","useGlobalStyle","GlobalStylesContext","unlock","blockEditorPrivateApis","extend","a11yPlugin","useColorRandomizer","name","themeColors","setThemeColors","randomizeColors","randomRotationValue","Math","floor","random","newColors","map","colorObject","color","newColor","colord","rotate","toHex","window","__experimentalEnableColorRandomizer","useStylesPreviewColors","textColor","backgroundColor","headingColor","coreColors","customColors","paletteColors","concat","highlightedColors","filter","slice","useSupportedStyles","element","supportedPanels","useSelect","select","blocksStore","getSupportedStyles","useColorVariations","colorVariations","useCurrentMergeThemeStyleVariationsWithUserConfig","property","length","variation","settings","styles","title","__","Object","keys","useTypographyVariations","typographyVariations","base","useContext","values","reduce","acc","bodyFontFamily","headingFontFamily","getFontFamilies","mergeBaseAndUserConfigs"],"sources":["@wordpress/edit-site/src/components/global-styles/hooks.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useContext } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { getFontFamilies } from './utils';\nimport { unlock } from '../../lock-unlock';\nimport { useSelect } from '@wordpress/data';\n\nconst { useGlobalSetting, useGlobalStyle, GlobalStylesContext } = unlock(\n\tblockEditorPrivateApis\n);\n\n// Enable colord's a11y plugin.\nextend( [ a11yPlugin ] );\n\nexport function useColorRandomizer( name ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\n\tfunction randomizeColors() {\n\t\t/* eslint-disable no-restricted-syntax */\n\t\tconst randomRotationValue = Math.floor( Math.random() * 225 );\n\t\t/* eslint-enable no-restricted-syntax */\n\n\t\tconst newColors = themeColors.map( ( colorObject ) => {\n\t\t\tconst { color } = colorObject;\n\t\t\tconst newColor = colord( color )\n\t\t\t\t.rotate( randomRotationValue )\n\t\t\t\t.toHex();\n\n\t\t\treturn {\n\t\t\t\t...colorObject,\n\t\t\t\tcolor: newColor,\n\t\t\t};\n\t\t} );\n\n\t\tsetThemeColors( newColors );\n\t}\n\n\treturn window.__experimentalEnableColorRandomizer\n\t\t? [ randomizeColors ]\n\t\t: [];\n}\n\nexport function useStylesPreviewColors() {\n\tconst [ textColor = 'black' ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ headingColor = textColor ] = useGlobalStyle(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ coreColors ] = useGlobalSetting( 'color.palette.core' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\n\tconst paletteColors = ( themeColors ?? [] )\n\t\t.concat( customColors ?? [] )\n\t\t.concat( coreColors ?? [] );\n\tconst highlightedColors = paletteColors\n\t\t.filter(\n\t\t\t// we exclude these two colors because they are already visible in the preview.\n\t\t\t( { color } ) => color !== backgroundColor && color !== headingColor\n\t\t)\n\t\t.slice( 0, 2 );\n\n\treturn {\n\t\tpaletteColors,\n\t\thighlightedColors,\n\t};\n}\n\nexport function useSupportedStyles( name, element ) {\n\tconst { supportedPanels } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tsupportedPanels: unlock(\n\t\t\t\t\tselect( blocksStore )\n\t\t\t\t).getSupportedStyles( name, element ),\n\t\t\t};\n\t\t},\n\t\t[ name, element ]\n\t);\n\n\treturn supportedPanels;\n}\n\nexport function useColorVariations() {\n\tconst colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig( {\n\t\tproperty: 'color',\n\t} );\n\t/*\n\t * Filter out variations with no settings or styles.\n\t */\n\treturn colorVariations?.length\n\t\t? colorVariations.filter( ( variation ) => {\n\t\t\t\tconst { settings, styles, title } = variation;\n\t\t\t\treturn (\n\t\t\t\t\ttitle === __( 'Default' ) || // Always preseve the default variation.\n\t\t\t\t\tObject.keys( settings ).length > 0 ||\n\t\t\t\t\tObject.keys( styles ).length > 0\n\t\t\t\t);\n\t\t } )\n\t\t: [];\n}\n\nexport function useTypographyVariations() {\n\tconst typographyVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( {\n\t\t\tproperty: 'typography',\n\t\t} );\n\n\tconst { base } = useContext( GlobalStylesContext );\n\t/*\n\t * Filter duplicate variations based on whether the variaitons\n\t * have different heading and body font families.\n\t */\n\treturn typographyVariations?.length\n\t\t? Object.values(\n\t\t\t\ttypographyVariations.reduce( ( acc, variation ) => {\n\t\t\t\t\tconst [ bodyFontFamily, headingFontFamily ] =\n\t\t\t\t\t\tgetFontFamilies(\n\t\t\t\t\t\t\tmergeBaseAndUserConfigs( base, variation )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t// Always preseve the default variation.\n\t\t\t\t\tif ( variation?.title === 'Default' ) {\n\t\t\t\t\t\tacc[\n\t\t\t\t\t\t\t`${ headingFontFamily?.name }:${ bodyFontFamily?.name }`\n\t\t\t\t\t\t] = variation;\n\t\t\t\t\t} else if (\n\t\t\t\t\t\theadingFontFamily?.name &&\n\t\t\t\t\t\tbodyFontFamily?.name &&\n\t\t\t\t\t\t! acc[\n\t\t\t\t\t\t\t`${ headingFontFamily?.name }:${ bodyFontFamily?.name }`\n\t\t\t\t\t\t]\n\t\t\t\t\t) {\n\t\t\t\t\t\tacc[\n\t\t\t\t\t\t\t`${ headingFontFamily?.name }:${ bodyFontFamily?.name }`\n\t\t\t\t\t\t] = variation;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} )\n\t\t )\n\t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cAAc,EAAEvD,IAAM,EAAC,CACxD,GAAGyC,SAAS;IACd,CAAC,MAAM,IACNe,iBAAiB,EAAExD,IAAI,IACvBuD,cAAc,EAAEvD,IAAI,IACpB,CAAEsD,GAAG,CACH,GAAGE,iBAAiB,EAAExD,IAAM,IAAIuD,cAAc,EAAEvD,IAAM,EAAC,CACxD,EACA;MACDsD,GAAG,CACD,GAAGE,iBAAiB,EAAExD,IAAM,IAAIuD,cAAc,EAAEvD,IAAM,EAAC,CACxD,GAAGyC,SAAS;IACd;IACA,OAAOa,GAAG;EACX,CAAC,EAAE,CAAC,CAAE,CACN,CAAC,GACD,EAAE;AACN"}
1
+ {"version":3,"names":["_colord","require","_a11y","_interopRequireDefault","_blocks","_blockEditor","_element","_i18n","_globalStylesProvider","_useThemeStyleVariationsByProperty","_utils","_lockUnlock","_data","useGlobalSetting","useGlobalStyle","GlobalStylesContext","unlock","blockEditorPrivateApis","extend","a11yPlugin","useColorRandomizer","name","themeColors","setThemeColors","randomizeColors","randomRotationValue","Math","floor","random","newColors","map","colorObject","color","newColor","colord","rotate","toHex","window","__experimentalEnableColorRandomizer","useStylesPreviewColors","textColor","backgroundColor","headingColor","linkColor","buttonBackgroundColor","coreColors","customColors","paletteColors","concat","textColorObject","filter","buttonBackgroundColorObject","highlightedColors","slice","useSupportedStyles","element","supportedPanels","useSelect","select","blocksStore","getSupportedStyles","useColorVariations","colorVariations","useCurrentMergeThemeStyleVariationsWithUserConfig","property","length","variation","settings","styles","title","__","Object","keys","useTypographyVariations","typographyVariations","base","useContext","values","reduce","acc","bodyFontFamily","headingFontFamily","getFontFamilies","mergeBaseAndUserConfigs"],"sources":["@wordpress/edit-site/src/components/global-styles/hooks.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useContext } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { getFontFamilies } from './utils';\nimport { unlock } from '../../lock-unlock';\nimport { useSelect } from '@wordpress/data';\n\nconst { useGlobalSetting, useGlobalStyle, GlobalStylesContext } = unlock(\n\tblockEditorPrivateApis\n);\n\n// Enable colord's a11y plugin.\nextend( [ a11yPlugin ] );\n\nexport function useColorRandomizer( name ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\n\tfunction randomizeColors() {\n\t\t/* eslint-disable no-restricted-syntax */\n\t\tconst randomRotationValue = Math.floor( Math.random() * 225 );\n\t\t/* eslint-enable no-restricted-syntax */\n\n\t\tconst newColors = themeColors.map( ( colorObject ) => {\n\t\t\tconst { color } = colorObject;\n\t\t\tconst newColor = colord( color )\n\t\t\t\t.rotate( randomRotationValue )\n\t\t\t\t.toHex();\n\n\t\t\treturn {\n\t\t\t\t...colorObject,\n\t\t\t\tcolor: newColor,\n\t\t\t};\n\t\t} );\n\n\t\tsetThemeColors( newColors );\n\t}\n\n\treturn window.__experimentalEnableColorRandomizer\n\t\t? [ randomizeColors ]\n\t\t: [];\n}\n\nexport function useStylesPreviewColors() {\n\tconst [ textColor = 'black' ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ headingColor = textColor ] = useGlobalStyle(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ linkColor = headingColor ] = useGlobalStyle(\n\t\t'elements.link.color.text'\n\t);\n\n\tconst [ buttonBackgroundColor = linkColor ] = useGlobalStyle(\n\t\t'elements.button.color.background'\n\t);\n\tconst [ coreColors ] = useGlobalSetting( 'color.palette.core' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\n\tconst paletteColors = ( themeColors ?? [] )\n\t\t.concat( customColors ?? [] )\n\t\t.concat( coreColors ?? [] );\n\n\tconst textColorObject = paletteColors.filter(\n\t\t( { color } ) => color === textColor\n\t);\n\tconst buttonBackgroundColorObject = paletteColors.filter(\n\t\t( { color } ) => color === buttonBackgroundColor\n\t);\n\n\tconst highlightedColors = textColorObject\n\t\t.concat( buttonBackgroundColorObject )\n\t\t.concat( paletteColors )\n\t\t.filter(\n\t\t\t// we exclude these background color because it is already visible in the preview.\n\t\t\t( { color } ) => color !== backgroundColor\n\t\t)\n\t\t.slice( 0, 2 );\n\n\treturn {\n\t\tpaletteColors,\n\t\thighlightedColors,\n\t};\n}\n\nexport function useSupportedStyles( name, element ) {\n\tconst { supportedPanels } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tsupportedPanels: unlock(\n\t\t\t\t\tselect( blocksStore )\n\t\t\t\t).getSupportedStyles( name, element ),\n\t\t\t};\n\t\t},\n\t\t[ name, element ]\n\t);\n\n\treturn supportedPanels;\n}\n\nexport function useColorVariations() {\n\tconst colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig( {\n\t\tproperty: 'color',\n\t} );\n\t/*\n\t * Filter out variations with no settings or styles.\n\t */\n\treturn colorVariations?.length\n\t\t? colorVariations.filter( ( variation ) => {\n\t\t\t\tconst { settings, styles, title } = variation;\n\t\t\t\treturn (\n\t\t\t\t\ttitle === __( 'Default' ) || // Always preseve the default variation.\n\t\t\t\t\tObject.keys( settings ).length > 0 ||\n\t\t\t\t\tObject.keys( styles ).length > 0\n\t\t\t\t);\n\t\t } )\n\t\t: [];\n}\n\nexport function useTypographyVariations() {\n\tconst typographyVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( {\n\t\t\tproperty: 'typography',\n\t\t} );\n\n\tconst { base } = useContext( GlobalStylesContext );\n\t/*\n\t * Filter duplicate variations based on whether the variaitons\n\t * have different heading and body font families.\n\t */\n\treturn typographyVariations?.length\n\t\t? Object.values(\n\t\t\t\ttypographyVariations.reduce( ( acc, variation ) => {\n\t\t\t\t\tconst [ bodyFontFamily, headingFontFamily ] =\n\t\t\t\t\t\tgetFontFamilies(\n\t\t\t\t\t\t\tmergeBaseAndUserConfigs( base, variation )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t// Always preseve the default variation.\n\t\t\t\t\tif ( variation?.title === 'Default' ) {\n\t\t\t\t\t\tacc[\n\t\t\t\t\t\t\t`${ headingFontFamily?.name }:${ bodyFontFamily?.name }`\n\t\t\t\t\t\t] = variation;\n\t\t\t\t\t} else if (\n\t\t\t\t\t\theadingFontFamily?.name &&\n\t\t\t\t\t\tbodyFontFamily?.name &&\n\t\t\t\t\t\t! acc[\n\t\t\t\t\t\t\t`${ headingFontFamily?.name }:${ bodyFontFamily?.name }`\n\t\t\t\t\t\t]\n\t\t\t\t\t) {\n\t\t\t\t\t\tacc[\n\t\t\t\t\t\t\t`${ headingFontFamily?.name }:${ bodyFontFamily?.name }`\n\t\t\t\t\t\t] = variation;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} )\n\t\t )\n\t\t: [];\n}\n"],"mappings":";;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,qBAAA,GAAAP,OAAA;AACA,IAAAQ,kCAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AArBA;AACA;AACA;;AAIA;AACA;AACA;;AAMA;AACA;AACA;;AAOA,MA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AG6C,SAAS;IACd,CAAC,MAAM,IACNe,iBAAiB,EAAE5D,IAAI,IACvB2D,cAAc,EAAE3D,IAAI,IACpB,CAAE0D,GAAG,CACH,GAAGE,iBAAiB,EAAE5D,IAAM,IAAI2D,cAAc,EAAE3D,IAAM,EAAC,CACxD,EACA;MACD0D,GAAG,CACD,GAAGE,iBAAiB,EAAE5D,IAAM,IAAI2D,cAAc,EAAE3D,IAAM,EAAC,CACxD,GAAG6C,SAAS;IACd;IACA,OAAOa,GAAG;EACX,CAAC,EAAE,CAAC,CAAE,CACN,CAAC,GACD,EAAE;AACN","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_components","IconWithCurrentColor","className","props","_react","createElement","Icon","classnames"],"sources":["@wordpress/edit-site/src/components/global-styles/icon-with-current-color.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\n\nexport function IconWithCurrentColor( { className, ...props } ) {\n\treturn (\n\t\t<Icon\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-icon-with-current-color'\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,SAASE,oBAAoBA,CAAE;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EAC/D,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAM,IAAI;IACJJ,SAAS,EAAG,IAAAK,mBAAU,EACrBL,SAAS,EACT,iDACD,CAAG;IAAA,GACEC;EAAK,CACV,CAAC;AAEJ"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_components","IconWithCurrentColor","className","props","_react","createElement","Icon","classnames"],"sources":["@wordpress/edit-site/src/components/global-styles/icon-with-current-color.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\n\nexport function IconWithCurrentColor( { className, ...props } ) {\n\treturn (\n\t\t<Icon\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-icon-with-current-color'\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,SAASE,oBAAoBA,CAAE;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EAC/D,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAM,IAAI;IACJJ,SAAS,EAAG,IAAAK,mBAAU,EACrBL,SAAS,EACT,iDACD,CAAG;IAAA,GACEC;EAAK,CACV,CAAC;AAEJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_ui","_interopRequireDefault","require"],"sources":["@wordpress/edit-site/src/components/global-styles/index.js"],"sourcesContent":["export { default as GlobalStylesUI } from './ui';\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA"}
1
+ {"version":3,"names":["_ui","_interopRequireDefault","require"],"sources":["@wordpress/edit-site/src/components/global-styles/index.js"],"sourcesContent":["export { default as GlobalStylesUI } from './ui';\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_iconWithCurrentColor","GenericNavigationButton","icon","children","props","_react","createElement","__experimentalItem","__experimentalHStack","justify","IconWithCurrentColor","size","FlexItem","NavigationButtonAsItem","__experimentalNavigatorButton","as","NavigationBackButtonAsItem","__experimentalNavigatorToParentButton"],"sources":["@wordpress/edit-site/src/components/global-styles/navigation-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n\t__experimentalItem as Item,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\n\nfunction GenericNavigationButton( { icon, children, ...props } ) {\n\treturn (\n\t\t<Item { ...props }>\n\t\t\t{ icon && (\n\t\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t\t<IconWithCurrentColor icon={ icon } size={ 24 } />\n\t\t\t\t\t<FlexItem>{ children }</FlexItem>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ ! icon && children }\n\t\t</Item>\n\t);\n}\n\nfunction NavigationButtonAsItem( props ) {\n\treturn <NavigatorButton as={ GenericNavigationButton } { ...props } />;\n}\n\nfunction NavigationBackButtonAsItem( props ) {\n\treturn (\n\t\t<NavigatorToParentButton as={ GenericNavigationButton } { ...props } />\n\t);\n}\n\nexport { NavigationButtonAsItem, NavigationBackButtonAsItem };\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAWA,IAAAC,qBAAA,GAAAD,OAAA;AAdA;AACA;AACA;;AASA;AACA;AACA;;AAGA,SAASE,uBAAuBA,CAAE;EAAEC,IAAI;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,EAAG;EAChE,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAS,kBAAI;IAAA,GAAMH;EAAK,GACbF,IAAI,IACL,IAAAG,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAU,oBAAM;IAACC,OAAO,EAAC;EAAY,GAC3B,IAAAJ,MAAA,CAAAC,aAAA,EAACN,qBAAA,CAAAU,oBAAoB;IAACR,IAAI,EAAGA,IAAM;IAACS,IAAI,EAAG;EAAI,CAAE,CAAC,EAClD,IAAAN,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAc,QAAQ,QAAGT,QAAoB,CACzB,CACR,EACC,CAAED,IAAI,IAAIC,QACP,CAAC;AAET;AAEA,SAASU,sBAAsBA,CAAET,KAAK,EAAG;EACxC,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAgB,6BAAe;IAACC,EAAE,EAAGd,uBAAyB;IAAA,GAAMG;EAAK,CAAI,CAAC;AACvE;AAEA,SAASY,0BAA0BA,CAAEZ,KAAK,EAAG;EAC5C,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAmB,qCAAuB;IAACF,EAAE,EAAGd,uBAAyB;IAAA,GAAMG;EAAK,CAAI,CAAC;AAEzE"}
1
+ {"version":3,"names":["_components","require","_iconWithCurrentColor","GenericNavigationButton","icon","children","props","_react","createElement","__experimentalItem","__experimentalHStack","justify","IconWithCurrentColor","size","FlexItem","NavigationButtonAsItem","__experimentalNavigatorButton","as","NavigationBackButtonAsItem","__experimentalNavigatorToParentButton"],"sources":["@wordpress/edit-site/src/components/global-styles/navigation-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n\t__experimentalItem as Item,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\n\nfunction GenericNavigationButton( { icon, children, ...props } ) {\n\treturn (\n\t\t<Item { ...props }>\n\t\t\t{ icon && (\n\t\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t\t<IconWithCurrentColor icon={ icon } size={ 24 } />\n\t\t\t\t\t<FlexItem>{ children }</FlexItem>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ ! icon && children }\n\t\t</Item>\n\t);\n}\n\nfunction NavigationButtonAsItem( props ) {\n\treturn <NavigatorButton as={ GenericNavigationButton } { ...props } />;\n}\n\nfunction NavigationBackButtonAsItem( props ) {\n\treturn (\n\t\t<NavigatorToParentButton as={ GenericNavigationButton } { ...props } />\n\t);\n}\n\nexport { NavigationButtonAsItem, NavigationBackButtonAsItem };\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAWA,IAAAC,qBAAA,GAAAD,OAAA;AAdA;AACA;AACA;;AASA;AACA;AACA;;AAGA,SAASE,uBAAuBA,CAAE;EAAEC,IAAI;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,EAAG;EAChE,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAS,kBAAI;IAAA,GAAMH;EAAK,GACbF,IAAI,IACL,IAAAG,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAU,oBAAM;IAACC,OAAO,EAAC;EAAY,GAC3B,IAAAJ,MAAA,CAAAC,aAAA,EAACN,qBAAA,CAAAU,oBAAoB;IAACR,IAAI,EAAGA,IAAM;IAACS,IAAI,EAAG;EAAI,CAAE,CAAC,EAClD,IAAAN,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAc,QAAQ,QAAGT,QAAoB,CACzB,CACR,EACC,CAAED,IAAI,IAAIC,QACP,CAAC;AAET;AAEA,SAASU,sBAAsBA,CAAET,KAAK,EAAG;EACxC,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAgB,6BAAe;IAACC,EAAE,EAAGd,uBAAyB;IAAA,GAAMG;EAAK,CAAI,CAAC;AACvE;AAEA,SAASY,0BAA0BA,CAAEZ,KAAK,EAAG;EAC5C,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,WAAA,CAAAmB,qCAAuB;IAACF,EAAE,EAAGd,uBAAyB;IAAA,GAAMG;EAAK,CAAI,CAAC;AAEzE","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_icons","_element","_blockEditor","_subtitle","_interopRequireDefault","_navigationButton","_hooks","_colorIndicatorWrapper","_lockUnlock","useGlobalSetting","unlock","blockEditorPrivateApis","EMPTY_COLORS","Palette","name","customColors","themeColors","defaultColors","defaultPaletteEnabled","randomizeThemeColors","useColorRandomizer","colors","useMemo","screenPath","encodeURIComponent","paletteButtonText","length","sprintf","_n","__","_react","createElement","__experimentalVStack","spacing","default","level","__experimentalItemGroup","isBordered","isSeparated","NavigationButtonAsItem","path","__experimentalHStack","direction","__experimentalZStack","isLayered","offset","slice","map","color","index","key","ColorIndicator","colorValue","FlexItem","className","window","__experimentalEnableColorRandomizer","Button","variant","icon","shuffle","onClick","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/palette.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n\t__experimentalZStack as ZStack,\n\t__experimentalVStack as VStack,\n\tColorIndicator,\n\tButton,\n} from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { shuffle } from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { useColorRandomizer } from './hooks';\nimport ColorIndicatorWrapper from './color-indicator-wrapper';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nconst EMPTY_COLORS = [];\n\nfunction Palette( { name } ) {\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ defaultColors ] = useGlobalSetting( 'color.palette.default' );\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\n\tconst [ randomizeThemeColors ] = useColorRandomizer();\n\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( customColors || EMPTY_COLORS ),\n\t\t\t...( themeColors || EMPTY_COLORS ),\n\t\t\t...( defaultColors && defaultPaletteEnabled\n\t\t\t\t? defaultColors\n\t\t\t\t: EMPTY_COLORS ),\n\t\t],\n\t\t[ customColors, themeColors, defaultColors, defaultPaletteEnabled ]\n\t);\n\n\tconst screenPath = ! name\n\t\t? '/colors/palette'\n\t\t: '/blocks/' + encodeURIComponent( name ) + '/colors/palette';\n\tconst paletteButtonText =\n\t\tcolors.length > 0\n\t\t\t? sprintf(\n\t\t\t\t\t// Translators: %d: Number of palette colors.\n\t\t\t\t\t_n( '%d color', '%d colors', colors.length ),\n\t\t\t\t\tcolors.length\n\t\t\t )\n\t\t\t: __( 'Add custom colors' );\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Palette' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\tpath={ screenPath }\n\t\t\t\t\taria-label={ __( 'Color palettes' ) }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tdirection={\n\t\t\t\t\t\t\tcolors.length === 0 ? 'row-reverse' : 'row'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t\t\t\t\t{ colors\n\t\t\t\t\t\t\t\t.slice( 0, 5 )\n\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t<ColorIndicatorWrapper\n\t\t\t\t\t\t\t\t\t\tkey={ `${ color }-${ index }` }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ColorIndicator colorValue={ color } />\n\t\t\t\t\t\t\t\t\t</ColorIndicatorWrapper>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ZStack>\n\t\t\t\t\t\t<FlexItem className=\"edit-site-global-styles-screen-colors__palette-count\">\n\t\t\t\t\t\t\t{ paletteButtonText }\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t</HStack>\n\t\t\t\t</NavigationButtonAsItem>\n\t\t\t</ItemGroup>\n\t\t\t{ window.__experimentalEnableColorRandomizer &&\n\t\t\t\tthemeColors?.length > 0 && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\ticon={ shuffle }\n\t\t\t\t\t\tonClick={ randomizeThemeColors }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Randomize colors' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default Palette;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,SAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,sBAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAxBA;AACA;AACA;;AAeA;AACA;AACA;;AAOA,MAAM;EAAEW;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,MAAMC,YAAY,GAAG,EAAE;AAEvB,SAASC,OAAOA,CAAE;EAAEC;AAAK,CAAC,EAAG;EAC5B,MAAM,CAAEC,YAAY,CAAE,GAAGN,gBAAgB,CAAE,sBAAuB,CAAC;EACnE,MAAM,CAAEO,WAAW,CAAE,GAAGP,gBAAgB,CAAE,qBAAsB,CAAC;EACjE,MAAM,CAAEQ,aAAa,CAAE,GAAGR,gBAAgB,CAAE,uB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AC,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAA4C,oBAAM;IACNC,SAAS,EACRrB,MAAM,CAACK,MAAM,KAAK,CAAC,GAAG,aAAa,GAAG;EACtC,GAED,IAAAI,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAA8C,oBAAM;IAACC,SAAS,EAAG,KAAO;IAACC,MAAM,EAAG,CAAC;EAAG,GACtCxB,MAAM,CACNyB,KAAK,CAAE,CAAC,EAAE,CAAE,CAAC,CACbC,GAAG,CAAE,CAAE;IAAEC;EAAM,CAAC,EAAEC,KAAK,KACvB,IAAAnB,MAAA,CAAAC,aAAA,EAACxB,sBAAA,CAAA2B,OAAqB;IACrBgB,GAAG,EAAI,GAAGF,KAAO,IAAIC,KAAO;EAAG,GAE/B,IAAAnB,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAAsD,cAAc;IAACC,UAAU,EAAGJ;EAAO,CAAE,CAChB,CACtB,CACI,CAAC,EACT,IAAAlB,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAAwD,QAAQ;IAACC,SAAS,EAAC;EAAsD,GACvE7B,iBACO,CACH,CACe,CACd,CAAC,EACV8B,MAAM,CAACC,mCAAmC,IAC3CxC,WAAW,EAAEU,MAAM,GAAG,CAAC,IACtB,IAAAI,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAA4D,MAAM;IACNC,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAGC,cAAS;IAChBC,OAAO,EAAG1C;EAAsB,GAE9B,IAAAU,QAAE,EAAE,kBAAmB,CAClB,CAEH,CAAC;AAEX;AAAC,IAAAiC,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAEcrB,OAAO"}
1
+ {"version":3,"names":["_components","require","_i18n","_icons","_element","_blockEditor","_subtitle","_interopRequireDefault","_navigationButton","_hooks","_colorIndicatorWrapper","_lockUnlock","useGlobalSetting","unlock","blockEditorPrivateApis","EMPTY_COLORS","Palette","name","customColors","themeColors","defaultColors","defaultPaletteEnabled","randomizeThemeColors","useColorRandomizer","colors","useMemo","screenPath","encodeURIComponent","paletteButtonText","length","sprintf","_n","__","_react","createElement","__experimentalVStack","spacing","default","level","__experimentalItemGroup","isBordered","isSeparated","NavigationButtonAsItem","path","__experimentalHStack","direction","__experimentalZStack","isLayered","offset","slice","map","color","index","key","ColorIndicator","colorValue","FlexItem","className","window","__experimentalEnableColorRandomizer","Button","variant","icon","shuffle","onClick","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/palette.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n\t__experimentalZStack as ZStack,\n\t__experimentalVStack as VStack,\n\tColorIndicator,\n\tButton,\n} from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { shuffle } from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { useColorRandomizer } from './hooks';\nimport ColorIndicatorWrapper from './color-indicator-wrapper';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nconst EMPTY_COLORS = [];\n\nfunction Palette( { name } ) {\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ defaultColors ] = useGlobalSetting( 'color.palette.default' );\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\n\tconst [ randomizeThemeColors ] = useColorRandomizer();\n\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( customColors || EMPTY_COLORS ),\n\t\t\t...( themeColors || EMPTY_COLORS ),\n\t\t\t...( defaultColors && defaultPaletteEnabled\n\t\t\t\t? defaultColors\n\t\t\t\t: EMPTY_COLORS ),\n\t\t],\n\t\t[ customColors, themeColors, defaultColors, defaultPaletteEnabled ]\n\t);\n\n\tconst screenPath = ! name\n\t\t? '/colors/palette'\n\t\t: '/blocks/' + encodeURIComponent( name ) + '/colors/palette';\n\tconst paletteButtonText =\n\t\tcolors.length > 0\n\t\t\t? sprintf(\n\t\t\t\t\t// Translators: %d: Number of palette colors.\n\t\t\t\t\t_n( '%d color', '%d colors', colors.length ),\n\t\t\t\t\tcolors.length\n\t\t\t )\n\t\t\t: __( 'Add custom colors' );\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Palette' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\tpath={ screenPath }\n\t\t\t\t\taria-label={ __( 'Color palettes' ) }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tdirection={\n\t\t\t\t\t\t\tcolors.length === 0 ? 'row-reverse' : 'row'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t\t\t\t\t{ colors\n\t\t\t\t\t\t\t\t.slice( 0, 5 )\n\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t<ColorIndicatorWrapper\n\t\t\t\t\t\t\t\t\t\tkey={ `${ color }-${ index }` }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ColorIndicator colorValue={ color } />\n\t\t\t\t\t\t\t\t\t</ColorIndicatorWrapper>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ZStack>\n\t\t\t\t\t\t<FlexItem className=\"edit-site-global-styles-screen-colors__palette-count\">\n\t\t\t\t\t\t\t{ paletteButtonText }\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t</HStack>\n\t\t\t\t</NavigationButtonAsItem>\n\t\t\t</ItemGroup>\n\t\t\t{ window.__experimentalEnableColorRandomizer &&\n\t\t\t\tthemeColors?.length > 0 && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\ticon={ shuffle }\n\t\t\t\t\t\tonClick={ randomizeThemeColors }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Randomize colors' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default Palette;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,SAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,sBAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAxBA;AACA;AACA;;AAeA;AACA;AACA;;AAOA,MAAM;EAAEW;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,MAAMC,YAAY,GAAG,EAAE;AAEvB,SAASC,OAAOA,CAAE;EAAEC;AAAK,CAAC,EAAG;EAC5B,MAAM,CAAEC,YAAY,CAAE,GAAGN,gBAAgB,CAAE,sBAAuB,CAAC;EACnE,MAAM,CAAEO,WAAW,CAAE,GAAGP,gBAAgB,CAAE,qBAAsB,CAAC;EACjE,MAAM,CAAEQ,aAAa,CAAE,GAAGR,gBAAgB,CAAE,uBAAwB,CAAC;EAErE,MAAM,CAAES,qBAAqB,CAAE,GAAGT,gBAAgB,CACjD,sBAAsB,EACtBK,IACD,CAAC;EAED,MAAM,CAAEK,oBAAoB,CAAE,GAAG,IAAAC,yBAAkB,EAAC,CAAC;EAErD,MA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A,CAAA8C,oBAAM;IAACC,SAAS,EAAG,KAAO;IAACC,MAAM,EAAG,CAAC;EAAG,GACtCxB,MAAM,CACNyB,KAAK,CAAE,CAAC,EAAE,CAAE,CAAC,CACbC,GAAG,CAAE,CAAE;IAAEC;EAAM,CAAC,EAAEC,KAAK,KACvB,IAAAnB,MAAA,CAAAC,aAAA,EAACxB,sBAAA,CAAA2B,OAAqB;IACrBgB,GAAG,EAAI,GAAGF,KAAO,IAAIC,KAAO;EAAG,GAE/B,IAAAnB,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAAsD,cAAc;IAACC,UAAU,EAAGJ;EAAO,CAAE,CAChB,CACtB,CACI,CAAC,EACT,IAAAlB,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAAwD,QAAQ;IAACC,SAAS,EAAC;EAAsD,GACvE7B,iBACO,CACH,CACe,CACd,CAAC,EACV8B,MAAM,CAACC,mCAAmC,IAC3CxC,WAAW,EAAEU,MAAM,GAAG,CAAC,IACtB,IAAAI,MAAA,CAAAC,aAAA,EAAClC,WAAA,CAAA4D,MAAM;IACNC,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAGC,cAAS;IAChBC,OAAO,EAAG1C;EAAsB,GAE9B,IAAAU,QAAE,EAAE,kBAAmB,CAClB,CAEH,CAAC;AAEX;AAAC,IAAAiC,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAEcrB,OAAO","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_highlightedColors","_interopRequireDefault","_previewIframe","firstFrameVariants","start","scale","opacity","hover","StylesPreviewColors","label","isFocused","withHoverView","_react","createElement","default","ratio","key","__unstableMotion","div","variants","style","height","overflow","__experimentalHStack","spacing","justify","normalizedColorSwatchSize","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/preview-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport HighlightedColors from './highlighted-colors';\nimport PreviewIframe from './preview-iframe';\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 StylesPreviewColors = ( { label, isFocused, withHoverView } ) => {\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={ 5 * 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<HighlightedColors\n\t\t\t\t\t\t\tnormalizedColorSwatchSize={ 56 }\n\t\t\t\t\t\t\tratio={ ratio }\n\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</PreviewIframe>\n\t);\n};\n\nexport default StylesPreviewColors;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAMI,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,mBAAmB,GAAGA,CAAE;EAAEC,KAAK;EAAEC,SAAS;EAAEC;AAAc,CAAC,KAAM;EACtE,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACX,cAAA,CAAAY,OAAa;IACbL,KAAK,EAAGA,KAAO;IACfC,SAAS,EAAGA,SAAW;IACvBC,aAAa,EAAGA;EAAe,GAE7B,CAAE;IAAEI,KAAK;IAAEC;EAAI,CAAC,KACjB,IAAAJ,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAmB,gBAAM,CAACC,GAAG;IACVF,GAAG,EAAGA,GAAK;IACXG,QAAQ,EAAGhB,kBAAoB;IAC/BiB,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEH,IAAAV,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAyB,oBAAM;IACNC,OAAO,EAAG,CAAC,GAAGT,KAAO;IACrBU,OAAO,EAAC,QAAQ;IAChBL,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEH,IAAAV,MAAA,CAAAC,aAAA,EAACb,kBAAA,CAAAc,OAAiB;IACjBY,yBAAyB,EAAG,EAAI;IAChCX,KAAK,EAAGA;EAAO,CACf,CACM,CACG,CAEC,CAAC;AAElB,CAAC;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAAd,OAAA,GAEaN,mBAAmB"}
1
+ {"version":3,"names":["_components","require","_highlightedColors","_interopRequireDefault","_previewIframe","firstFrameVariants","start","scale","opacity","hover","StylesPreviewColors","label","isFocused","withHoverView","_react","createElement","default","ratio","key","__unstableMotion","div","variants","style","height","overflow","__experimentalHStack","spacing","justify","normalizedColorSwatchSize","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/preview-colors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport HighlightedColors from './highlighted-colors';\nimport PreviewIframe from './preview-iframe';\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 StylesPreviewColors = ( { label, isFocused, withHoverView } ) => {\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={ 5 * 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<HighlightedColors\n\t\t\t\t\t\t\tnormalizedColorSwatchSize={ 56 }\n\t\t\t\t\t\t\tratio={ ratio }\n\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</PreviewIframe>\n\t);\n};\n\nexport default StylesPreviewColors;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAMI,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,mBAAmB,GAAGA,CAAE;EAAEC,KAAK;EAAEC,SAAS;EAAEC;AAAc,CAAC,KAAM;EACtE,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACX,cAAA,CAAAY,OAAa;IACbL,KAAK,EAAGA,KAAO;IACfC,SAAS,EAAGA,SAAW;IACvBC,aAAa,EAAGA;EAAe,GAE7B,CAAE;IAAEI,KAAK;IAAEC;EAAI,CAAC,KACjB,IAAAJ,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAmB,gBAAM,CAACC,GAAG;IACVF,GAAG,EAAGA,GAAK;IACXG,QAAQ,EAAGhB,kBAAoB;IAC/BiB,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEH,IAAAV,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAyB,oBAAM;IACNC,OAAO,EAAG,CAAC,GAAGT,KAAO;IACrBU,OAAO,EAAC,QAAQ;IAChBL,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEH,IAAAV,MAAA,CAAAC,aAAA,EAACb,kBAAA,CAAAc,OAAiB;IACjBY,yBAAyB,EAAG,EAAI;IAChCX,KAAK,EAAGA;EAAO,CACf,CACM,CACG,CAEC,CAAC;AAElB,CAAC;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAAd,OAAA,GAEaN,mBAAmB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_components","_compose","_element","_lockUnlock","useGlobalStyle","useGlobalStylesOutput","unlock","blockEditorPrivateApis","normalizedWidth","normalizedHeight","THROTTLE_OPTIONS","leading","trailing","PreviewIframe","children","label","isFocused","withHoverView","backgroundColor","gradientValue","styles","disableMotion","useReducedMotion","isHovered","setIsHovered","useState","containerResizeListener","width","useResizeObserver","throttledWidth","setThrottledWidthState","ratioState","setRatioState","setThrottledWidth","useThrottle","useLayoutEffect","newRatio","ratioDiff","isRatioDiffBigEnough","Math","abs","fallbackRatio","ratio","editorStyles","useMemo","css","isGlobalStyles","isReady","_react","createElement","Fragment","style","position","__unstableIframe","className","height","onMouseEnter","onMouseLeave","tabIndex","__unstableEditorStyles","__unstableMotion","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":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAnBA;AACA;AACA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,YAAY,EAAGA,CAAA,KAAMhC,YAAY,CAAE,IAAK,CAAG;IAC3CiC,YAAY,EAAGA,CAAA,KAAMjC,YAAY,CAAE,KAAM,CAAG;IAC5CkC,QAAQ,EAAG,CAAC;EAAG,GAEf,IAAAV,MAAA,CAAAC,aAAA,EAACnD,YAAA,CAAA6D,sBAAY;IAACvC,MAAM,EAAGuB;EAAc,CAAE,CAAC,EACxC,IAAAK,MAAA,CAAAC,aAAA,EAACjD,WAAA,CAAA4D,gBAAM,CAACC,GAAG;IACVV,KAAK,EAAG;MACPI,MAAM,EAAE9C,gBAAgB,GAAGiC,KAAK;MAChCf,KAAK,EAAE,MAAM;MACbmC,UAAU,EAAE3C,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,eAAe;MAC5C6C,MAAM,EAAE9C,aAAa,GAAG,SAAS,GAAG+C;IACrC,CAAG;IACHC,OAAO,EAAC,OAAO;IACfC,OAAO,EACN,CAAE3C,SAAS,IAAIP,SAAS,KACxB,CAAEK,aAAa,IACfN,KAAK,GACF,OAAO,GACP;EACH,GAEC,EAAE,CACFoD,MAAM,CAAErD,QAAS,CAAC,CAAC;EAAA,CACnBsD,GAAG,CAAE,CAAEC,KAAK,EAAEC,GAAG,KAAMD,KAAK,CAAE;IAAE3B,KAAK;IAAE4B;EAAI,CAAE,CAAE,CACtC,CACL,CAER,CAAC;AAEL"}
1
+ {"version":3,"names":["_blockEditor","require","_components","_compose","_element","_lockUnlock","useGlobalStyle","useGlobalStylesOutput","unlock","blockEditorPrivateApis","normalizedWidth","normalizedHeight","THROTTLE_OPTIONS","leading","trailing","PreviewIframe","children","label","isFocused","withHoverView","backgroundColor","gradientValue","styles","disableMotion","useReducedMotion","isHovered","setIsHovered","useState","containerResizeListener","width","useResizeObserver","throttledWidth","setThrottledWidthState","ratioState","setRatioState","setThrottledWidth","useThrottle","useLayoutEffect","newRatio","ratioDiff","isRatioDiffBigEnough","Math","abs","fallbackRatio","ratio","editorStyles","useMemo","css","isGlobalStyles","isReady","_react","createElement","Fragment","style","position","__unstableIframe","className","height","onMouseEnter","onMouseLeave","tabIndex","__unstableEditorStyles","__unstableMotion","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":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAnBA;AACA;AACA;;AAcA;AACA;AACA;;AAGA,MAAM;EAAEK,cAAc;EAAEC;AAAsB,CAAC,GAAG,IAAAC,kBAAM,EACvDC,wBACD,CAAC;AAED,MAAMC,eAAe,GAAG,GAAG;AAC3B,MAAMC,gBAAgB,GAA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,MAAA,CAAAC,aAAA,EAACnD,YAAA,CAAA6D,sBAAY;IAACvC,MAAM,EAAGuB;EAAc,CAAE,CAAC,EACxC,IAAAK,MAAA,CAAAC,aAAA,EAACjD,WAAA,CAAA4D,gBAAM,CAACC,GAAG;IACVV,KAAK,EAAG;MACPI,MAAM,EAAE9C,gBAAgB,GAAGiC,KAAK;MAChCf,KAAK,EAAE,MAAM;MACbmC,UAAU,EAAE3C,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAID,eAAe;MAC5C6C,MAAM,EAAE9C,aAAa,GAAG,SAAS,GAAG+C;IACrC,CAAG;IACHC,OAAO,EAAC,OAAO;IACfC,OAAO,EACN,CAAE3C,SAAS,IAAIP,SAAS,KACxB,CAAEK,aAAa,IACfN,KAAK,GACF,OAAO,GACP;EACH,GAEC,EAAE,CACFoD,MAAM,CAAErD,QAAS,CAAC,CAAC;EAAA,CACnBsD,GAAG,CAAE,CAAEC,KAAK,EAAEC,GAAG,KAAMD,KAAK,CAAE;IAAE3B,KAAK;IAAE4B;EAAI,CAAE,CAAE,CACtC,CACL,CAER,CAAC;AAEL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_components","_lockUnlock","_hooks","_typographyExample","_interopRequireDefault","_highlightedColors","_previewIframe","useGlobalStyle","unlock","blockEditorPrivateApis","firstFrameVariants","start","scale","opacity","hover","midFrameVariants","secondFrameVariants","PreviewStyles","label","isFocused","withHoverView","variation","fontWeight","fontFamily","headingFontFamily","headingFontWeight","textColor","headingColor","paletteColors","useStylesPreviewColors","_react","createElement","default","ratio","key","__unstableMotion","div","variants","style","height","overflow","__experimentalHStack","spacing","justify","fontSize","__experimentalVStack","normalizedColorSwatchSize","width","position","top","filter","slice","map","color","index","background","flexGrow","padding","boxSizing","lineHeight","textAlign","_default","exports"],"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\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,MAAM,EAAE,MAAM;MACdQ,KAAK,EAAE,MAAM;MACbP,QAAQ,EAAE,QAAQ;MAClBQ,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE;IACN;EAAG,GAEH,IAAAnB,MAAA,CAAAC,aAAA,EAAC/B,WAAA,CAAA6C,oBAAM;IACNH,OAAO,EAAG,CAAC,GAAGT,KAAO;IACrBU,OAAO,EAAC,QAAQ;IAChBL,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE,QAAQ;MAClBiB,OAAO,EAAE,EAAE,GAAGxB,KAAK;MACnByB,SAAS,EAAE;IACZ;EAAG,GAEDxC,KAAK,IACN,IAAAY,MAAA,CAAAC,aAAA;IACCO,KAAK,EAAG;MACPM,QAAQ,EAAE,EAAE,GAAGX,KAAK;MACpBV,UAAU,EAAEC,iBAAiB;MAC7B6B,KAAK,EAAE1B,YAAY;MACnBL,UAAU,EAAEG,iBAAiB;MAC7BkC,UAAU,EAAE,KAAK;MACjBC,SAAS,EAAE;IACZ;EAAG,GAED1C,KACE,CAEC,CACG,CAEC,CAAC;AAElB,CAAC;AAAC,IAAA2C,QAAA,GAAAC,OAAA,CAAA9B,OAAA,GAEaf,aAAa"}
1
+ {"version":3,"names":["_blockEditor","require","_components","_lockUnlock","_hooks","_typographyExample","_interopRequireDefault","_highlightedColors","_previewIframe","useGlobalStyle","unlock","blockEditorPrivateApis","firstFrameVariants","start","scale","opacity","hover","midFrameVariants","secondFrameVariants","PreviewStyles","label","isFocused","withHoverView","variation","fontWeight","fontFamily","headingFontFamily","headingFontWeight","textColor","headingColor","paletteColors","useStylesPreviewColors","_react","createElement","default","ratio","key","__unstableMotion","div","variants","style","height","overflow","__experimentalHStack","spacing","justify","fontSize","__experimentalVStack","normalizedColorSwatchSize","width","position","top","filter","slice","map","color","index","background","flexGrow","padding","boxSizing","lineHeight","textAlign","_default","exports"],"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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,EAAGrB,mBAAqB;IAChCsB,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdQ,KAAK,EAAE,MAAM;MACbP,QAAQ,EAAE,QAAQ;MAClBQ,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE;IACN;EAAG,GAEH,IAAAnB,MAAA,CAAAC,aAAA,EAAC/B,WAAA,CAAA6C,oBAAM;IACNH,OAAO,EAAG,CAAC,GAAGT,KAAO;IACrBU,OAAO,EAAC,QAAQ;IAChBL,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE,QAAQ;MAClBiB,OAAO,EAAE,EAAE,GAAGxB,KAAK;MACnByB,SAAS,EAAE;IACZ;EAAG,GAEDxC,KAAK,IACN,IAAAY,MAAA,CAAAC,aAAA;IACCO,KAAK,EAAG;MACPM,QAAQ,EAAE,EAAE,GAAGX,KAAK;MACpBV,UAAU,EAAEC,iBAAiB;MAC7B6B,KAAK,EAAE1B,YAAY;MACnBL,UAAU,EAAEG,iBAAiB;MAC7BkC,UAAU,EAAE,KAAK;MACjBC,SAAS,EAAE;IACZ;EAAG,GAED1C,KACE,CAEC,CACG,CAEC,CAAC;AAElB,CAAC;AAAC,IAAA2C,QAAA,GAAAC,OAAA,CAAA9B,OAAA,GAEaf,aAAa","ignoreList":[]}
@@ -50,8 +50,8 @@ function RootMenu() {
50
50
  }, (0, _i18n.__)('Layout')), hasBackgroundPanel && (0, _react.createElement)(_navigationButton.NavigationButtonAsItem, {
51
51
  icon: _icons.image,
52
52
  path: "/background",
53
- "aria-label": (0, _i18n.__)('Background styles')
54
- }, (0, _i18n.__)('Background'))));
53
+ "aria-label": (0, _i18n.__)('Background image styles')
54
+ }, (0, _i18n.__)('Background image'))));
55
55
  }
56
56
  var _default = exports.default = RootMenu;
57
57
  //# sourceMappingURL=root-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_icons","_i18n","_blockEditor","_navigationButton","_lockUnlock","useHasDimensionsPanel","useHasTypographyPanel","useHasColorPanel","useGlobalSetting","useSettingsForBlockElement","useHasBackgroundPanel","unlock","blockEditorPrivateApis","RootMenu","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasDimensionsPanel","hasLayoutPanel","hasBackgroundPanel","_react","createElement","Fragment","__experimentalItemGroup","NavigationButtonAsItem","icon","typography","path","__","color","layout","image","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/root-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { typography, color, layout, image } 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\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasDimensionsPanel;\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup>\n\t\t\t\t{ hasTypographyPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ typography }\n\t\t\t\t\t\tpath=\"/typography\"\n\t\t\t\t\t\taria-label={ __( 'Typography styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Typography' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasColorPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ color }\n\t\t\t\t\t\tpath=\"/colors\"\n\t\t\t\t\t\taria-label={ __( 'Colors styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Colors' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasLayoutPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\tpath=\"/layout\"\n\t\t\t\t\t\taria-label={ __( 'Layout styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Layout' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasBackgroundPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ image }\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</ItemGroup>\n\t\t</>\n\t);\n}\n\nexport default RootMenu;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EACLM,qBAAqB;EACrBC,qBAAqB;EACrBC,gBAAgB;EAChBC,gBAAgB;EAChBC,0BAA0B;EAC1BC;AACD,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEpC,SAASC,QAAQA,CAAA,EAAG;EACnB,MAAM,CAAEC,WAAW,CAAE,GAAGN,gBAAgB,CAAE,EAAG,CAAC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AAC,QAAE,EAAE,mBAAoB;EAAG,GAEtC,IAAAA,QAAE,EAAE,YAAa,CACI,CAEf,CACV,CAAC;AAEL;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEctB,QAAQ"}
1
+ {"version":3,"names":["_components","require","_icons","_i18n","_blockEditor","_navigationButton","_lockUnlock","useHasDimensionsPanel","useHasTypographyPanel","useHasColorPanel","useGlobalSetting","useSettingsForBlockElement","useHasBackgroundPanel","unlock","blockEditorPrivateApis","RootMenu","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasDimensionsPanel","hasLayoutPanel","hasBackgroundPanel","_react","createElement","Fragment","__experimentalItemGroup","NavigationButtonAsItem","icon","typography","path","__","color","layout","image","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/root-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { typography, color, layout, image } 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\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasDimensionsPanel;\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup>\n\t\t\t\t{ hasTypographyPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ typography }\n\t\t\t\t\t\tpath=\"/typography\"\n\t\t\t\t\t\taria-label={ __( 'Typography styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Typography' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasColorPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ color }\n\t\t\t\t\t\tpath=\"/colors\"\n\t\t\t\t\t\taria-label={ __( 'Colors styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Colors' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasLayoutPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\tpath=\"/layout\"\n\t\t\t\t\t\taria-label={ __( 'Layout styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Layout' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasBackgroundPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ image }\n\t\t\t\t\t\tpath=\"/background\"\n\t\t\t\t\t\taria-label={ __( 'Background image styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Background image' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nexport default RootMenu;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MA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,SAAS;IACd,cAAa,IAAAC,QAAE,EAAE,eAAgB;EAAG,GAElC,IAAAA,QAAE,EAAE,QAAS,CACQ,CACxB,EACCT,kBAAkB,IACnB,IAAAC,MAAA,CAAAC,aAAA,EAACnB,iBAAA,CAAAsB,sBAAsB;IACtBC,IAAI,EAAGM,YAAO;IACdJ,IAAI,EAAC,aAAa;IAClB,cAAa,IAAAC,QAAE,EAAE,yBAA0B;EAAG,GAE5C,IAAAA,QAAE,EAAE,kBAAmB,CACF,CAEf,CACV,CAAC;AAEL;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEctB,QAAQ","ignoreList":[]}
@@ -27,7 +27,7 @@ function ScreenBackground() {
27
27
  const [settings] = useGlobalSetting('');
28
28
  const hasBackgroundPanel = useHasBackgroundPanel(settings);
29
29
  return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_header.default, {
30
- title: (0, _i18n.__)('Background')
30
+ title: (0, _i18n.__)('Background image')
31
31
  }), hasBackgroundPanel && (0, _react.createElement)(_backgroundPanel.default, null));
32
32
  }
33
33
  var _default = exports.default = ScreenBackground;
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_blockEditor","_backgroundPanel","_interopRequireDefault","_header","_lockUnlock","useHasBackgroundPanel","useGlobalSetting","unlock","blockEditorPrivateApis","ScreenBackground","settings","hasBackgroundPanel","_react","createElement","Fragment","default","title","__","_default","exports"],"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';\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 title={ __( 'Background' ) } />\n\t\t\t{ hasBackgroundPanel && <BackgroundPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenBackground;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,gBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAXA;AACA;AACA;;AAIA;AACA;AACA;;AAKA,MAAM;EAAEM,qBAAqB;EAAEC;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EACzDC,wBACD,CAAC;AAED,SAASC,gBAAgBA,CAAA,EAAG;EAC3B,MAAM,CAAEC,QAAQ,CAAE,GAAGJ,gBAAgB,CAAE,EAAG,CAAC;EAC3C,MAAMK,kBAAkB,GAAGN,qBAAqB,CAAEK,QAAS,CAAC;EAC5D,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAY,OAAY;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,YAAa;EAAG,CAAE,CAAC,EAC3CN,kBAAkB,IAAI,IAAAC,MAAA,CAAAC,aAAA,EAACZ,gBAAA,CAAAc,OAAe,MAAE,CACzC,CAAC;AAEL;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAJ,OAAA,GAEcN,gBAAgB"}
1
+ {"version":3,"names":["_i18n","require","_blockEditor","_backgroundPanel","_interopRequireDefault","_header","_lockUnlock","useHasBackgroundPanel","useGlobalSetting","unlock","blockEditorPrivateApis","ScreenBackground","settings","hasBackgroundPanel","_react","createElement","Fragment","default","title","__","_default","exports"],"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';\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 title={ __( 'Background image' ) } />\n\t\t\t{ hasBackgroundPanel && <BackgroundPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenBackground;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,gBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAXA;AACA;AACA;;AAIA;AACA;AACA;;AAKA,MAAM;EAAEM,qBAAqB;EAAEC;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EACzDC,wBACD,CAAC;AAED,SAASC,gBAAgBA,CAAA,EAAG;EAC3B,MAAM,CAAEC,QAAQ,CAAE,GAAGJ,gBAAgB,CAAE,EAAG,CAAC;EAC3C,MAAMK,kBAAkB,GAAGN,qBAAqB,CAAEK,QAAS,CAAC;EAC5D,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAY,OAAY;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,kBAAmB;EAAG,CAAE,CAAC,EACjDN,kBAAkB,IAAI,IAAAC,MAAA,CAAAC,aAAA,EAACZ,gBAAA,CAAAc,OAAe,MAAE,CACzC,CAAC;AAEL;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAJ,OAAA,GAEcN,gBAAgB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_i18n","_components","_data","_element","_blockEditor","_compose","_a11y","_variationsPanel","_header","_interopRequireDefault","_navigationButton","_lockUnlock","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","unlock","blockEditorPrivateApis","useSortedBlockTypes","blockItems","useSelect","select","blocksStore","getBlockTypes","groupByType","blocks","block","core","noncore","type","name","startsWith","push","coreItems","nonCoreItems","reduce","useBlockHasGlobalStyles","blockName","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasLayoutPanel","hasVariationsPanel","useBlockVariations","length","hasGlobalStyles","BlockMenuItem","hasBlockMenuItem","navigationButtonLabel","sprintf","__","title","_react","createElement","NavigationButtonAsItem","path","encodeURIComponent","__experimentalHStack","justify","BlockIcon","icon","FlexItem","BlockList","filterValue","sortedBlockTypes","debouncedSpeak","useDebounce","speak","isMatchingSearchTerm","filteredBlockTypes","filter","blockType","blockTypesListRef","useRef","useEffect","count","current","childElementCount","resultsFoundMessage","_n","ref","className","map","key","MemoizedBlockList","memo","ScreenBlockList","setFilterValue","useState","deferredFilterValue","useDeferredValue","Fragment","default","description","SearchControl","__nextHasNoMarginBottom","onChange","value","label","placeholder","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block-list.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tFlexItem,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseDeferredValue,\n\tmemo,\n} from '@wordpress/element';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { useBlockVariations } from './variations/variations-panel';\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction useSortedBlockTypes() {\n\tconst blockItems = useSelect(\n\t\t( select ) => select( blocksStore ).getBlockTypes(),\n\t\t[]\n\t);\n\t// Ensure core blocks are prioritized in the returned results,\n\t// because third party blocks can be registered earlier than\n\t// the core blocks (usually by using the `init` action),\n\t// thus affecting the display order.\n\t// We don't sort reusable blocks as they are handled differently.\n\tconst groupByType = ( blocks, block ) => {\n\t\tconst { core, noncore } = blocks;\n\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\t\ttype.push( block );\n\t\treturn blocks;\n\t};\n\tconst { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(\n\t\tgroupByType,\n\t\t{ core: [], noncore: [] }\n\t);\n\treturn [ ...coreItems, ...nonCoreItems ];\n}\n\nexport function useBlockHasGlobalStyles( blockName ) {\n\tconst [ rawSettings ] = useGlobalSetting( '', blockName );\n\tconst settings = useSettingsForBlockElement( rawSettings, blockName );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;\n\tconst hasVariationsPanel = !! useBlockVariations( blockName )?.length;\n\tconst hasGlobalStyles =\n\t\thasTypographyPanel ||\n\t\thasColorPanel ||\n\t\thasLayoutPanel ||\n\t\thasVariationsPanel;\n\treturn hasGlobalStyles;\n}\n\nfunction BlockMenuItem( { block } ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t__( '%s block styles' ),\n\t\tblock.title\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<BlockIcon icon={ block.icon } />\n\t\t\t\t<FlexItem>{ block.title }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction BlockList( { filterValue } ) {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst { isMatchingSearchTerm } = useSelect( blocksStore );\n\n\tconst filteredBlockTypes = ! filterValue\n\t\t? sortedBlockTypes\n\t\t: sortedBlockTypes.filter( ( blockType ) =>\n\t\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t );\n\n\tconst blockTypesListRef = useRef();\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\t// We extract the results from the wrapper div's `ref` because\n\t\t// filtered items can contain items that will eventually not\n\t\t// render and there is no reliable way to detect when a child\n\t\t// will return `null`.\n\t\t// TODO: We should find a better way of handling this as it's\n\t\t// fragile and depends on the number of rendered elements of `BlockMenuItem`,\n\t\t// which is now one.\n\t\t// @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116\n\t\tconst count = blockTypesListRef.current.childElementCount;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage, count );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ blockTypesListRef }\n\t\t\tclassName=\"edit-site-block-types-item-list\"\n\t\t>\n\t\t\t{ filteredBlockTypes.map( ( block ) => (\n\t\t\t\t<BlockMenuItem\n\t\t\t\t\tblock={ block }\n\t\t\t\t\tkey={ 'menu-itemblock-' + block.name }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n\nconst MemoizedBlockList = memo( BlockList );\n\nfunction ScreenBlockList() {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst deferredFilterValue = useDeferredValue( filterValue );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Blocks' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of specific blocks and for the whole site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tclassName=\"edit-site-block-types-search\"\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search for blocks' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t\t<MemoizedBlockList filterValue={ deferredFilterValue } />\n\t\t</>\n\t);\n}\n\nexport default ScreenBlockList;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAOA,IAAAK,YAAA,GAAAL,OAAA;AAIA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AAKA,IAAAQ,gBAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,iBAAA,G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GAAG,IAAAC,iBAAQ,EAAE,EAAG,CAAC;EACtD,MAAMC,mBAAmB,GAAG,IAAAC,yBAAgB,EAAE3B,WAAY,CAAC;EAE3D,OACC,IAAAX,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAuC,QAAA,QACC,IAAAvC,MAAA,CAAAC,aAAA,EAAClD,OAAA,CAAAyF,OAAY;IACZzC,KAAK,EAAG,IAAAD,QAAE,EAAE,QAAS,CAAG;IACxB2C,WAAW,EAAG,IAAA3C,QAAE,EACf,qEACD;EAAG,CACH,CAAC,EACF,IAAAE,MAAA,CAAAC,aAAA,EAACzD,WAAA,CAAAkG,aAAa;IACbC,uBAAuB;IACvBd,SAAS,EAAC,8BAA8B;IACxCe,QAAQ,EAAGT,cAAgB;IAC3BU,KAAK,EAAGlC,WAAa;IACrBmC,KAAK,EAAG,IAAAhD,QAAE,EAAE,mBAAoB,CAAG;IACnCiD,WAAW,EAAG,IAAAjD,QAAE,EAAE,QAAS;EAAG,CAC9B,CAAC,EACF,IAAAE,MAAA,CAAAC,aAAA,EAAC+B,iBAAiB;IAACrB,WAAW,EAAG0B;EAAqB,CAAE,CACvD,CAAC;AAEL;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEcN,eAAe"}
1
+ {"version":3,"names":["_blocks","require","_i18n","_components","_data","_element","_blockEditor","_compose","_a11y","_variationsPanel","_header","_interopRequireDefault","_navigationButton","_lockUnlock","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","unlock","blockEditorPrivateApis","useSortedBlockTypes","blockItems","useSelect","select","blocksStore","getBlockTypes","groupByType","blocks","block","core","noncore","type","name","startsWith","push","coreItems","nonCoreItems","reduce","useBlockHasGlobalStyles","blockName","rawSettings","settings","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasLayoutPanel","hasVariationsPanel","useBlockVariations","length","hasGlobalStyles","BlockMenuItem","hasBlockMenuItem","navigationButtonLabel","sprintf","__","title","_react","createElement","NavigationButtonAsItem","path","encodeURIComponent","__experimentalHStack","justify","BlockIcon","icon","FlexItem","BlockList","filterValue","sortedBlockTypes","debouncedSpeak","useDebounce","speak","isMatchingSearchTerm","filteredBlockTypes","filter","blockType","blockTypesListRef","useRef","useEffect","count","current","childElementCount","resultsFoundMessage","_n","ref","className","map","key","MemoizedBlockList","memo","ScreenBlockList","setFilterValue","useState","deferredFilterValue","useDeferredValue","Fragment","default","description","SearchControl","__nextHasNoMarginBottom","onChange","value","label","placeholder","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block-list.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tFlexItem,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseDeferredValue,\n\tmemo,\n} from '@wordpress/element';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { useBlockVariations } from './variations/variations-panel';\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction useSortedBlockTypes() {\n\tconst blockItems = useSelect(\n\t\t( select ) => select( blocksStore ).getBlockTypes(),\n\t\t[]\n\t);\n\t// Ensure core blocks are prioritized in the returned results,\n\t// because third party blocks can be registered earlier than\n\t// the core blocks (usually by using the `init` action),\n\t// thus affecting the display order.\n\t// We don't sort reusable blocks as they are handled differently.\n\tconst groupByType = ( blocks, block ) => {\n\t\tconst { core, noncore } = blocks;\n\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\t\ttype.push( block );\n\t\treturn blocks;\n\t};\n\tconst { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(\n\t\tgroupByType,\n\t\t{ core: [], noncore: [] }\n\t);\n\treturn [ ...coreItems, ...nonCoreItems ];\n}\n\nexport function useBlockHasGlobalStyles( blockName ) {\n\tconst [ rawSettings ] = useGlobalSetting( '', blockName );\n\tconst settings = useSettingsForBlockElement( rawSettings, blockName );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;\n\tconst hasVariationsPanel = !! useBlockVariations( blockName )?.length;\n\tconst hasGlobalStyles =\n\t\thasTypographyPanel ||\n\t\thasColorPanel ||\n\t\thasLayoutPanel ||\n\t\thasVariationsPanel;\n\treturn hasGlobalStyles;\n}\n\nfunction BlockMenuItem( { block } ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t__( '%s block styles' ),\n\t\tblock.title\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<BlockIcon icon={ block.icon } />\n\t\t\t\t<FlexItem>{ block.title }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction BlockList( { filterValue } ) {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst { isMatchingSearchTerm } = useSelect( blocksStore );\n\n\tconst filteredBlockTypes = ! filterValue\n\t\t? sortedBlockTypes\n\t\t: sortedBlockTypes.filter( ( blockType ) =>\n\t\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t );\n\n\tconst blockTypesListRef = useRef();\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\t// We extract the results from the wrapper div's `ref` because\n\t\t// filtered items can contain items that will eventually not\n\t\t// render and there is no reliable way to detect when a child\n\t\t// will return `null`.\n\t\t// TODO: We should find a better way of handling this as it's\n\t\t// fragile and depends on the number of rendered elements of `BlockMenuItem`,\n\t\t// which is now one.\n\t\t// @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116\n\t\tconst count = blockTypesListRef.current.childElementCount;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage, count );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ blockTypesListRef }\n\t\t\tclassName=\"edit-site-block-types-item-list\"\n\t\t>\n\t\t\t{ filteredBlockTypes.map( ( block ) => (\n\t\t\t\t<BlockMenuItem\n\t\t\t\t\tblock={ block }\n\t\t\t\t\tkey={ 'menu-itemblock-' + block.name }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n\nconst MemoizedBlockList = memo( BlockList );\n\nfunction ScreenBlockList() {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst deferredFilterValue = useDeferredValue( filterValue );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Blocks' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of specific blocks and for the whole site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tclassName=\"edit-site-block-types-search\"\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search for blocks' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t\t<MemoizedBlockList filterValue={ deferredFilterValue } />\n\t\t</>\n\t);\n}\n\nexport default ScreenBlockList;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAOA,IAAAK,YAAA,GAAAL,OAAA;AAIA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AAKA,IAAAQ,gBAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,iBAAA,GAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AA/BA;AACA;AACA;;AAuBA;AACA;AACA;;AAMA,MAAM;EACLa,qBAAqB;EACrBC,qBAAqB;EACrBC,iBAAiB;EACjBC,gBAAgB;EAChBC,0BAA0B;EAC1BC;AACD,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEpC,SAASC,mBAAmBA,CAAA,EAAG;EAC9B,MAAMC,UAAU,GAAG,IAAAC,eAAS,EACzBC,MAAM,IAAMA,MAAM,CAAEC,aAAY,CAAC,CAACC,aAAa,CAAC,CAAC,EACnD,EACD,CAAC;EACD;EACA;EACA;EACA;EACA;EACA,MAAMC,WAAW,GAAGA,CAAEC,MAAM,EAAEC,KAAK,KAAM;IACxC,MAAM;MAAEC,IAAI;MAAEC;IAAQ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