@wordpress/edit-site 5.12.0 → 5.12.2

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 (904) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/build/components/add-new-pattern/index.js +99 -0
  3. package/build/components/add-new-pattern/index.js.map +1 -0
  4. package/build/components/add-new-template/add-custom-template-modal-content.js +9 -23
  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 +2 -10
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/add-new-template/new-template.js +75 -22
  9. package/build/components/add-new-template/new-template.js.map +1 -1
  10. package/build/components/app/index.js +2 -2
  11. package/build/components/app/index.js.map +1 -1
  12. package/build/components/block-editor/back-button.js +5 -3
  13. package/build/components/block-editor/back-button.js.map +1 -1
  14. package/build/components/block-editor/constants.js +9 -0
  15. package/build/components/block-editor/constants.js.map +1 -0
  16. package/build/components/block-editor/editor-canvas.js +8 -8
  17. package/build/components/block-editor/editor-canvas.js.map +1 -1
  18. package/build/components/block-editor/get-block-editor-provider.js +42 -0
  19. package/build/components/block-editor/get-block-editor-provider.js.map +1 -0
  20. package/build/components/block-editor/index.js +6 -132
  21. package/build/components/block-editor/index.js.map +1 -1
  22. package/build/components/block-editor/providers/default-block-editor-provider.js +58 -0
  23. package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
  24. package/build/components/block-editor/providers/navigation-block-editor-provider.js +117 -0
  25. package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
  26. package/build/components/block-editor/site-editor-canvas.js +137 -0
  27. package/build/components/block-editor/site-editor-canvas.js.map +1 -0
  28. package/build/components/block-editor/use-site-editor-settings.js +82 -0
  29. package/build/components/block-editor/use-site-editor-settings.js.map +1 -0
  30. package/build/components/canvas-spinner/index.js +18 -1
  31. package/build/components/canvas-spinner/index.js.map +1 -1
  32. package/build/components/create-pattern-modal/index.js +125 -0
  33. package/build/components/create-pattern-modal/index.js.map +1 -0
  34. package/build/components/create-template-part-modal/index.js +50 -6
  35. package/build/components/create-template-part-modal/index.js.map +1 -1
  36. package/build/components/editor/index.js +24 -13
  37. package/build/components/editor/index.js.map +1 -1
  38. package/build/components/editor-canvas-container/index.js +22 -4
  39. package/build/components/editor-canvas-container/index.js.map +1 -1
  40. package/build/components/global-styles/color-indicator-wrapper.js +4 -5
  41. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  42. package/build/components/global-styles/color-palette-panel.js +2 -2
  43. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  44. package/build/components/global-styles/dimensions-panel.js +2 -2
  45. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  46. package/build/components/global-styles/global-styles-provider.js +12 -16
  47. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  48. package/build/components/global-styles/gradients-palette-panel.js +2 -2
  49. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  50. package/build/components/global-styles/hooks.js +3 -3
  51. package/build/components/global-styles/hooks.js.map +1 -1
  52. package/build/components/global-styles/icon-with-current-color.js +4 -5
  53. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  54. package/build/components/global-styles/navigation-button.js +10 -11
  55. package/build/components/global-styles/navigation-button.js.map +1 -1
  56. package/build/components/global-styles/palette.js +3 -3
  57. package/build/components/global-styles/palette.js.map +1 -1
  58. package/build/components/global-styles/preview.js +2 -2
  59. package/build/components/global-styles/preview.js.map +1 -1
  60. package/build/components/global-styles/root-menu.js +2 -2
  61. package/build/components/global-styles/root-menu.js.map +1 -1
  62. package/build/components/global-styles/screen-block-list.js +2 -2
  63. package/build/components/global-styles/screen-block-list.js.map +1 -1
  64. package/build/components/global-styles/screen-block.js +2 -2
  65. package/build/components/global-styles/screen-block.js.map +1 -1
  66. package/build/components/global-styles/screen-colors.js +2 -2
  67. package/build/components/global-styles/screen-colors.js.map +1 -1
  68. package/build/components/global-styles/screen-css.js +2 -2
  69. package/build/components/global-styles/screen-css.js.map +1 -1
  70. package/build/components/global-styles/screen-layout.js +2 -2
  71. package/build/components/global-styles/screen-layout.js.map +1 -1
  72. package/build/components/global-styles/screen-revisions/index.js +4 -4
  73. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  74. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +2 -2
  75. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  76. package/build/components/global-styles/screen-root.js +2 -2
  77. package/build/components/global-styles/screen-root.js.map +1 -1
  78. package/build/components/global-styles/screen-typography.js +2 -2
  79. package/build/components/global-styles/screen-typography.js.map +1 -1
  80. package/build/components/global-styles/style-variations-container.js +11 -3
  81. package/build/components/global-styles/style-variations-container.js.map +1 -1
  82. package/build/components/global-styles/typography-panel.js +2 -2
  83. package/build/components/global-styles/typography-panel.js.map +1 -1
  84. package/build/components/global-styles/typography-preview.js +2 -2
  85. package/build/components/global-styles/typography-preview.js.map +1 -1
  86. package/build/components/global-styles/ui.js +95 -36
  87. package/build/components/global-styles/ui.js.map +1 -1
  88. package/build/components/global-styles-renderer/index.js +2 -2
  89. package/build/components/global-styles-renderer/index.js.map +1 -1
  90. package/build/components/header-edit-mode/document-actions/index.js +55 -22
  91. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  92. package/build/components/header-edit-mode/index.js +41 -16
  93. package/build/components/header-edit-mode/index.js.map +1 -1
  94. package/build/components/header-edit-mode/more-menu/index.js +36 -2
  95. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  96. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -7
  97. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  98. package/build/components/header-edit-mode/undo-redo/redo.js +2 -6
  99. package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  100. package/build/components/header-edit-mode/undo-redo/undo.js +2 -6
  101. package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  102. package/build/components/keyboard-shortcut-help-modal/index.js +2 -1
  103. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  104. package/build/components/keyboard-shortcuts/edit-mode.js +39 -3
  105. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  106. package/build/components/keyboard-shortcuts/index.js +7 -2
  107. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  108. package/build/components/keyboard-shortcuts/register.js +10 -1
  109. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  110. package/build/components/layout/hooks.js +21 -0
  111. package/build/components/layout/hooks.js.map +1 -1
  112. package/build/components/layout/index.js +126 -34
  113. package/build/components/layout/index.js.map +1 -1
  114. package/build/components/list/index.js +2 -2
  115. package/build/components/list/index.js.map +1 -1
  116. package/build/components/page/header.js +41 -0
  117. package/build/components/page/header.js.map +1 -0
  118. package/build/components/page/index.js +49 -0
  119. package/build/components/page/index.js.map +1 -0
  120. package/build/components/page-content-focus-manager/back-to-page-notification.js +73 -0
  121. package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
  122. package/build/components/page-content-focus-manager/constants.js +9 -0
  123. package/build/components/page-content-focus-manager/constants.js.map +1 -0
  124. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +60 -0
  125. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
  126. package/build/components/page-content-focus-manager/edit-template-notification.js +121 -0
  127. package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
  128. package/build/components/page-content-focus-manager/index.js +37 -0
  129. package/build/components/page-content-focus-manager/index.js.map +1 -0
  130. package/build/components/page-library/grid-item.js +169 -0
  131. package/build/components/page-library/grid-item.js.map +1 -0
  132. package/build/components/page-library/grid.js +49 -0
  133. package/build/components/page-library/grid.js.map +1 -0
  134. package/build/components/page-library/index.js +61 -0
  135. package/build/components/page-library/index.js.map +1 -0
  136. package/build/components/page-library/no-patterns.js +20 -0
  137. package/build/components/page-library/no-patterns.js.map +1 -0
  138. package/build/components/page-library/patterns-list.js +108 -0
  139. package/build/components/page-library/patterns-list.js.map +1 -0
  140. package/build/components/page-library/search-items.js +172 -0
  141. package/build/components/page-library/search-items.js.map +1 -0
  142. package/build/components/page-library/use-library-settings.js +53 -0
  143. package/build/components/page-library/use-library-settings.js.map +1 -0
  144. package/build/components/page-library/use-patterns.js +194 -0
  145. package/build/components/page-library/use-patterns.js.map +1 -0
  146. package/build/components/page-library/utils.js +30 -0
  147. package/build/components/page-library/utils.js.map +1 -0
  148. package/build/components/page-main/index.js +46 -0
  149. package/build/components/page-main/index.js.map +1 -0
  150. package/build/components/page-templates/index.js +101 -0
  151. package/build/components/page-templates/index.js.map +1 -0
  152. package/build/components/preferences-modal/enable-feature.js +9 -8
  153. package/build/components/preferences-modal/enable-feature.js.map +1 -1
  154. package/build/components/preferences-modal/index.js +30 -0
  155. package/build/components/preferences-modal/index.js.map +1 -1
  156. package/build/components/resizable-frame/index.js +6 -4
  157. package/build/components/resizable-frame/index.js.map +1 -1
  158. package/build/components/revisions/index.js +2 -2
  159. package/build/components/revisions/index.js.map +1 -1
  160. package/build/components/routes/link.js +7 -10
  161. package/build/components/routes/link.js.map +1 -1
  162. package/build/components/routes/use-title.js +2 -2
  163. package/build/components/routes/use-title.js.map +1 -1
  164. package/build/components/save-button/index.js +15 -11
  165. package/build/components/save-button/index.js.map +1 -1
  166. package/build/components/save-hub/index.js +2 -2
  167. package/build/components/save-hub/index.js.map +1 -1
  168. package/build/components/save-panel/index.js +5 -7
  169. package/build/components/save-panel/index.js.map +1 -1
  170. package/build/components/secondary-sidebar/inserter-sidebar.js +4 -8
  171. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  172. package/build/components/secondary-sidebar/list-view-sidebar.js +47 -10
  173. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  174. package/build/components/sidebar/index.js +12 -8
  175. package/build/components/sidebar/index.js.map +1 -1
  176. package/build/components/sidebar-button/index.js +2 -4
  177. package/build/components/sidebar-button/index.js.map +1 -1
  178. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +22 -8
  179. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  180. package/build/components/sidebar-edit-mode/index.js +8 -6
  181. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  182. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +84 -0
  183. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
  184. package/build/components/sidebar-edit-mode/page-panels/index.js +51 -38
  185. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  186. package/build/components/sidebar-edit-mode/page-panels/page-content.js +35 -0
  187. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
  188. package/build/components/sidebar-edit-mode/page-panels/page-status.js +192 -0
  189. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
  190. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +45 -0
  191. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
  192. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +98 -0
  193. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
  194. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +4 -7
  195. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  196. package/build/components/sidebar-edit-mode/settings-header/index.js +19 -6
  197. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  198. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +2 -2
  199. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/template-panel/index.js +10 -6
  201. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  202. package/build/components/sidebar-navigation-item/index.js +11 -7
  203. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  204. package/build/components/sidebar-navigation-screen/index.js +24 -9
  205. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  206. package/build/components/sidebar-navigation-screen-details-footer/index.js +36 -0
  207. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
  208. package/build/components/sidebar-navigation-screen-details-panel/index.js +58 -0
  209. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
  210. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +22 -0
  211. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
  212. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +35 -0
  213. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
  214. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +22 -0
  215. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
  216. package/build/components/sidebar-navigation-screen-global-styles/index.js +28 -16
  217. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  218. package/build/components/sidebar-navigation-screen-library/category-item.js +48 -0
  219. package/build/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
  220. package/build/components/sidebar-navigation-screen-library/index.js +112 -0
  221. package/build/components/sidebar-navigation-screen-library/index.js.map +1 -0
  222. package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +36 -0
  223. package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
  224. package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js +76 -0
  225. package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
  226. package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js +41 -0
  227. package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
  228. package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js +40 -0
  229. package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
  230. package/build/components/sidebar-navigation-screen-main/index.js +12 -13
  231. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  232. package/build/components/sidebar-navigation-screen-navigation-item/index.js +2 -2
  233. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +42 -0
  235. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
  236. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +41 -0
  237. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
  238. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +47 -92
  239. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +84 -0
  241. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
  242. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +71 -0
  243. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
  244. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +63 -0
  245. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
  246. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +49 -0
  247. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
  248. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +167 -0
  249. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
  250. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  251. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +58 -8
  253. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +57 -10
  255. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +21 -50
  257. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-page/index.js +14 -34
  259. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-page/page-details.js +29 -27
  261. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-page/status-label.js +8 -7
  263. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  264. package/build/components/sidebar-navigation-screen-pages/index.js +9 -8
  265. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  266. package/build/components/sidebar-navigation-screen-pattern/index.js +66 -0
  267. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
  268. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +41 -0
  269. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
  270. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +33 -0
  271. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
  272. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +40 -0
  273. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
  274. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +47 -0
  275. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
  276. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +82 -0
  277. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
  278. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +80 -0
  279. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
  280. package/build/components/sidebar-navigation-screen-template/home-template-details.js +212 -0
  281. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
  282. package/build/components/sidebar-navigation-screen-template/index.js +21 -7
  283. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  284. package/build/components/sidebar-navigation-screen-templates/index.js +11 -11
  285. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  286. package/build/components/site-hub/index.js +10 -12
  287. package/build/components/site-hub/index.js.map +1 -1
  288. package/build/components/style-book/index.js +10 -11
  289. package/build/components/style-book/index.js.map +1 -1
  290. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -4
  291. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  292. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +4 -4
  293. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  294. package/build/components/sync-state-with-url/use-sync-path-with-url.js +12 -2
  295. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  296. package/build/components/table/index.js +29 -0
  297. package/build/components/table/index.js.map +1 -0
  298. package/build/components/template-part-converter/convert-to-template-part.js +3 -21
  299. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  300. package/build/components/welcome-guide/editor.js +1 -1
  301. package/build/components/welcome-guide/editor.js.map +1 -1
  302. package/build/components/welcome-guide/styles.js +4 -3
  303. package/build/components/welcome-guide/styles.js.map +1 -1
  304. package/build/hooks/commands/use-common-commands.js +212 -0
  305. package/build/hooks/commands/use-common-commands.js.map +1 -0
  306. package/build/hooks/commands/use-edit-mode-commands.js +196 -24
  307. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  308. package/build/hooks/index.js +2 -0
  309. package/build/hooks/index.js.map +1 -1
  310. package/build/hooks/navigation-menu-edit.js +95 -0
  311. package/build/hooks/navigation-menu-edit.js.map +1 -0
  312. package/build/hooks/push-changes-to-global-styles/index.js +5 -3
  313. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  314. package/build/hooks/template-part-edit.js +6 -9
  315. package/build/hooks/template-part-edit.js.map +1 -1
  316. package/build/index.js +1 -0
  317. package/build/index.js.map +1 -1
  318. package/build/{private-apis.js → lock-unlock.js} +1 -1
  319. package/build/lock-unlock.js.map +1 -0
  320. package/build/store/actions.js +45 -9
  321. package/build/store/actions.js.map +1 -1
  322. package/build/store/index.js +3 -3
  323. package/build/store/index.js.map +1 -1
  324. package/build/store/reducer.js +7 -6
  325. package/build/store/reducer.js.map +1 -1
  326. package/build/store/selectors.js +42 -17
  327. package/build/store/selectors.js.map +1 -1
  328. package/build/utils/get-is-list-page.js +12 -5
  329. package/build/utils/get-is-list-page.js.map +1 -1
  330. package/build/utils/is-previewing-theme.js +2 -2
  331. package/build/utils/is-previewing-theme.js.map +1 -1
  332. package/build/utils/use-activate-theme.js +3 -3
  333. package/build/utils/use-activate-theme.js.map +1 -1
  334. package/build/utils/use-debounced-input.js +26 -0
  335. package/build/utils/use-debounced-input.js.map +1 -0
  336. package/build-module/components/add-new-pattern/index.js +82 -0
  337. package/build-module/components/add-new-pattern/index.js.map +1 -0
  338. package/build-module/components/add-new-template/add-custom-template-modal-content.js +7 -20
  339. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  340. package/build-module/components/add-new-template/index.js +2 -8
  341. package/build-module/components/add-new-template/index.js.map +1 -1
  342. package/build-module/components/add-new-template/new-template.js +76 -22
  343. package/build-module/components/add-new-template/new-template.js.map +1 -1
  344. package/build-module/components/app/index.js +1 -1
  345. package/build-module/components/app/index.js.map +1 -1
  346. package/build-module/components/block-editor/back-button.js +4 -2
  347. package/build-module/components/block-editor/back-button.js.map +1 -1
  348. package/build-module/components/block-editor/constants.js +2 -0
  349. package/build-module/components/block-editor/constants.js.map +1 -0
  350. package/build-module/components/block-editor/editor-canvas.js +6 -5
  351. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  352. package/build-module/components/block-editor/get-block-editor-provider.js +31 -0
  353. package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -0
  354. package/build-module/components/block-editor/index.js +9 -127
  355. package/build-module/components/block-editor/index.js.map +1 -1
  356. package/build-module/components/block-editor/providers/default-block-editor-provider.js +42 -0
  357. package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
  358. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +102 -0
  359. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
  360. package/build-module/components/block-editor/site-editor-canvas.js +115 -0
  361. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -0
  362. package/build-module/components/block-editor/use-site-editor-settings.js +67 -0
  363. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -0
  364. package/build-module/components/canvas-spinner/index.js +15 -1
  365. package/build-module/components/canvas-spinner/index.js.map +1 -1
  366. package/build-module/components/create-pattern-modal/index.js +113 -0
  367. package/build-module/components/create-pattern-modal/index.js.map +1 -0
  368. package/build-module/components/create-template-part-modal/index.js +47 -7
  369. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  370. package/build-module/components/editor/index.js +24 -13
  371. package/build-module/components/editor/index.js.map +1 -1
  372. package/build-module/components/editor-canvas-container/index.js +19 -2
  373. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  374. package/build-module/components/global-styles/color-indicator-wrapper.js +4 -4
  375. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  376. package/build-module/components/global-styles/color-palette-panel.js +1 -1
  377. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  378. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  379. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  380. package/build-module/components/global-styles/global-styles-provider.js +10 -15
  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 +1 -1
  383. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  384. package/build-module/components/global-styles/hooks.js +1 -1
  385. package/build-module/components/global-styles/hooks.js.map +1 -1
  386. package/build-module/components/global-styles/icon-with-current-color.js +4 -4
  387. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  388. package/build-module/components/global-styles/navigation-button.js +10 -8
  389. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  390. package/build-module/components/global-styles/palette.js +2 -2
  391. package/build-module/components/global-styles/palette.js.map +1 -1
  392. package/build-module/components/global-styles/preview.js +1 -1
  393. package/build-module/components/global-styles/preview.js.map +1 -1
  394. package/build-module/components/global-styles/root-menu.js +1 -1
  395. package/build-module/components/global-styles/root-menu.js.map +1 -1
  396. package/build-module/components/global-styles/screen-block-list.js +1 -1
  397. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  398. package/build-module/components/global-styles/screen-block.js +1 -1
  399. package/build-module/components/global-styles/screen-block.js.map +1 -1
  400. package/build-module/components/global-styles/screen-colors.js +1 -1
  401. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  402. package/build-module/components/global-styles/screen-css.js +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 +1 -1
  405. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  406. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  407. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  408. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -1
  409. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  410. package/build-module/components/global-styles/screen-root.js +1 -1
  411. package/build-module/components/global-styles/screen-root.js.map +1 -1
  412. package/build-module/components/global-styles/screen-typography.js +1 -1
  413. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  414. package/build-module/components/global-styles/style-variations-container.js +11 -3
  415. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  416. package/build-module/components/global-styles/typography-panel.js +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 +1 -1
  419. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  420. package/build-module/components/global-styles/ui.js +94 -35
  421. package/build-module/components/global-styles/ui.js.map +1 -1
  422. package/build-module/components/global-styles-renderer/index.js +1 -1
  423. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  424. package/build-module/components/header-edit-mode/document-actions/index.js +55 -22
  425. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  426. package/build-module/components/header-edit-mode/index.js +42 -17
  427. package/build-module/components/header-edit-mode/index.js.map +1 -1
  428. package/build-module/components/header-edit-mode/more-menu/index.js +35 -3
  429. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  430. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -4
  431. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  432. package/build-module/components/header-edit-mode/undo-redo/redo.js +2 -3
  433. package/build-module/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  434. package/build-module/components/header-edit-mode/undo-redo/undo.js +2 -3
  435. package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  436. package/build-module/components/keyboard-shortcut-help-modal/index.js +2 -1
  437. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  438. package/build-module/components/keyboard-shortcuts/edit-mode.js +36 -3
  439. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  440. package/build-module/components/keyboard-shortcuts/index.js +7 -2
  441. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  442. package/build-module/components/keyboard-shortcuts/register.js +10 -1
  443. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  444. package/build-module/components/layout/hooks.js +21 -0
  445. package/build-module/components/layout/hooks.js.map +1 -1
  446. package/build-module/components/layout/index.js +119 -28
  447. package/build-module/components/layout/index.js.map +1 -1
  448. package/build-module/components/list/index.js +1 -1
  449. package/build-module/components/list/index.js.map +1 -1
  450. package/build-module/components/page/header.js +33 -0
  451. package/build-module/components/page/header.js.map +1 -0
  452. package/build-module/components/page/index.js +37 -0
  453. package/build-module/components/page/index.js.map +1 -0
  454. package/build-module/components/page-content-focus-manager/back-to-page-notification.js +59 -0
  455. package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
  456. package/build-module/components/page-content-focus-manager/constants.js +2 -0
  457. package/build-module/components/page-content-focus-manager/constants.js.map +1 -0
  458. package/build-module/components/{page-content-lock/use-disable-non-content-blocks.js → page-content-focus-manager/disable-non-page-content-blocks.js} +18 -9
  459. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
  460. package/build-module/components/page-content-focus-manager/edit-template-notification.js +110 -0
  461. package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
  462. package/build-module/components/page-content-focus-manager/index.js +23 -0
  463. package/build-module/components/page-content-focus-manager/index.js.map +1 -0
  464. package/build-module/components/page-library/grid-item.js +149 -0
  465. package/build-module/components/page-library/grid-item.js.map +1 -0
  466. package/build-module/components/page-library/grid.js +38 -0
  467. package/build-module/components/page-library/grid.js.map +1 -0
  468. package/build-module/components/page-library/index.js +43 -0
  469. package/build-module/components/page-library/index.js.map +1 -0
  470. package/build-module/components/page-library/no-patterns.js +12 -0
  471. package/build-module/components/page-library/no-patterns.js.map +1 -0
  472. package/build-module/components/page-library/patterns-list.js +87 -0
  473. package/build-module/components/page-library/patterns-list.js.map +1 -0
  474. package/build-module/components/page-library/search-items.js +156 -0
  475. package/build-module/components/page-library/search-items.js.map +1 -0
  476. package/build-module/components/page-library/use-library-settings.js +40 -0
  477. package/build-module/components/page-library/use-library-settings.js.map +1 -0
  478. package/build-module/components/page-library/use-patterns.js +176 -0
  479. package/build-module/components/page-library/use-patterns.js.map +1 -0
  480. package/build-module/components/page-library/utils.js +13 -0
  481. package/build-module/components/page-library/utils.js.map +1 -0
  482. package/build-module/components/page-main/index.js +32 -0
  483. package/build-module/components/page-main/index.js.map +1 -0
  484. package/build-module/components/page-templates/index.js +80 -0
  485. package/build-module/components/page-templates/index.js.map +1 -0
  486. package/build-module/components/preferences-modal/enable-feature.js +9 -5
  487. package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
  488. package/build-module/components/preferences-modal/index.js +27 -0
  489. package/build-module/components/preferences-modal/index.js.map +1 -1
  490. package/build-module/components/resizable-frame/index.js +5 -3
  491. package/build-module/components/resizable-frame/index.js.map +1 -1
  492. package/build-module/components/revisions/index.js +1 -1
  493. package/build-module/components/revisions/index.js.map +1 -1
  494. package/build-module/components/routes/link.js +6 -6
  495. package/build-module/components/routes/link.js.map +1 -1
  496. package/build-module/components/routes/use-title.js +1 -1
  497. package/build-module/components/routes/use-title.js.map +1 -1
  498. package/build-module/components/save-button/index.js +15 -11
  499. package/build-module/components/save-button/index.js.map +1 -1
  500. package/build-module/components/save-hub/index.js +1 -1
  501. package/build-module/components/save-hub/index.js.map +1 -1
  502. package/build-module/components/save-panel/index.js +3 -4
  503. package/build-module/components/save-panel/index.js.map +1 -1
  504. package/build-module/components/secondary-sidebar/inserter-sidebar.js +4 -5
  505. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  506. package/build-module/components/secondary-sidebar/list-view-sidebar.js +44 -10
  507. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  508. package/build-module/components/sidebar/index.js +10 -7
  509. package/build-module/components/sidebar/index.js.map +1 -1
  510. package/build-module/components/sidebar-button/index.js +2 -3
  511. package/build-module/components/sidebar-button/index.js.map +1 -1
  512. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +19 -6
  513. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  514. package/build-module/components/sidebar-edit-mode/index.js +8 -6
  515. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  516. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +71 -0
  517. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
  518. package/build-module/components/sidebar-edit-mode/page-panels/index.js +51 -40
  519. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  520. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +23 -0
  521. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
  522. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +176 -0
  523. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
  524. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +33 -0
  525. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
  526. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +85 -0
  527. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
  528. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +4 -4
  529. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  530. package/build-module/components/sidebar-edit-mode/settings-header/index.js +20 -7
  531. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  532. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
  533. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  534. package/build-module/components/sidebar-edit-mode/template-panel/index.js +9 -6
  535. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-item/index.js +11 -7
  537. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  538. package/build-module/components/sidebar-navigation-screen/index.js +24 -9
  539. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  540. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +27 -0
  541. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
  542. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +30 -0
  543. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
  544. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
  545. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
  546. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +24 -0
  547. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
  548. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
  549. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
  550. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +23 -11
  551. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-library/category-item.js +37 -0
  553. package/build-module/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
  554. package/build-module/components/sidebar-navigation-screen-library/index.js +87 -0
  555. package/build-module/components/sidebar-navigation-screen-library/index.js.map +1 -0
  556. package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +25 -0
  557. package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
  558. package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js +61 -0
  559. package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
  560. package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js +34 -0
  561. package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
  562. package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js +27 -0
  563. package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
  564. package/build-module/components/sidebar-navigation-screen-main/index.js +13 -13
  565. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  567. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  568. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +33 -0
  569. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
  570. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +26 -0
  571. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
  572. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +45 -90
  573. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  574. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +70 -0
  575. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
  576. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +58 -0
  577. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
  578. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +56 -0
  579. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
  580. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +35 -0
  581. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
  582. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +155 -0
  583. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
  584. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  585. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  586. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +57 -9
  587. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  588. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +55 -7
  589. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  590. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +22 -50
  591. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  592. package/build-module/components/sidebar-navigation-screen-page/index.js +14 -34
  593. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  594. package/build-module/components/sidebar-navigation-screen-page/page-details.js +28 -28
  595. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  596. package/build-module/components/sidebar-navigation-screen-page/status-label.js +9 -8
  597. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  598. package/build-module/components/sidebar-navigation-screen-pages/index.js +8 -6
  599. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  600. package/build-module/components/sidebar-navigation-screen-pattern/index.js +46 -0
  601. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
  602. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
  603. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
  604. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +22 -0
  605. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
  606. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +27 -0
  607. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
  608. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +34 -0
  609. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
  610. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
  611. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
  612. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +64 -0
  613. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
  614. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +192 -0
  615. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
  616. package/build-module/components/sidebar-navigation-screen-template/index.js +18 -6
  617. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  618. package/build-module/components/sidebar-navigation-screen-templates/index.js +11 -10
  619. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  620. package/build-module/components/site-hub/index.js +8 -9
  621. package/build-module/components/site-hub/index.js.map +1 -1
  622. package/build-module/components/style-book/index.js +9 -9
  623. package/build-module/components/style-book/index.js.map +1 -1
  624. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +13 -3
  625. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  626. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  627. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  628. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +11 -1
  629. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  630. package/build-module/components/table/index.js +21 -0
  631. package/build-module/components/table/index.js.map +1 -0
  632. package/build-module/components/template-part-converter/convert-to-template-part.js +4 -20
  633. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  634. package/build-module/components/welcome-guide/editor.js +1 -1
  635. package/build-module/components/welcome-guide/editor.js.map +1 -1
  636. package/build-module/components/welcome-guide/styles.js +5 -3
  637. package/build-module/components/welcome-guide/styles.js.map +1 -1
  638. package/build-module/hooks/commands/use-common-commands.js +194 -0
  639. package/build-module/hooks/commands/use-common-commands.js.map +1 -0
  640. package/build-module/hooks/commands/use-edit-mode-commands.js +196 -26
  641. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  642. package/build-module/hooks/index.js +1 -0
  643. package/build-module/hooks/index.js.map +1 -1
  644. package/build-module/hooks/navigation-menu-edit.js +77 -0
  645. package/build-module/hooks/navigation-menu-edit.js.map +1 -0
  646. package/build-module/hooks/push-changes-to-global-styles/index.js +4 -2
  647. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  648. package/build-module/hooks/template-part-edit.js +5 -5
  649. package/build-module/hooks/template-part-edit.js.map +1 -1
  650. package/build-module/index.js +1 -0
  651. package/build-module/index.js.map +1 -1
  652. package/build-module/{private-apis.js → lock-unlock.js} +1 -1
  653. package/build-module/lock-unlock.js.map +1 -0
  654. package/build-module/store/actions.js +39 -7
  655. package/build-module/store/actions.js.map +1 -1
  656. package/build-module/store/index.js +1 -1
  657. package/build-module/store/index.js.map +1 -1
  658. package/build-module/store/reducer.js +6 -5
  659. package/build-module/store/reducer.js.map +1 -1
  660. package/build-module/store/selectors.js +37 -15
  661. package/build-module/store/selectors.js.map +1 -1
  662. package/build-module/utils/get-is-list-page.js +12 -5
  663. package/build-module/utils/get-is-list-page.js.map +1 -1
  664. package/build-module/utils/is-previewing-theme.js +2 -2
  665. package/build-module/utils/is-previewing-theme.js.map +1 -1
  666. package/build-module/utils/use-activate-theme.js +2 -2
  667. package/build-module/utils/use-activate-theme.js.map +1 -1
  668. package/build-module/utils/use-debounced-input.js +17 -0
  669. package/build-module/utils/use-debounced-input.js.map +1 -0
  670. package/build-style/style-rtl.css +424 -38
  671. package/build-style/style.css +424 -38
  672. package/package.json +44 -40
  673. package/src/components/add-new-pattern/index.js +92 -0
  674. package/src/components/add-new-template/add-custom-template-modal-content.js +1 -13
  675. package/src/components/add-new-template/index.js +0 -3
  676. package/src/components/add-new-template/new-template.js +121 -26
  677. package/src/components/add-new-template/style.scss +30 -2
  678. package/src/components/app/index.js +1 -1
  679. package/src/components/block-editor/back-button.js +5 -2
  680. package/src/components/block-editor/constants.js +1 -0
  681. package/src/components/block-editor/editor-canvas.js +1 -1
  682. package/src/components/block-editor/get-block-editor-provider.js +29 -0
  683. package/src/components/block-editor/index.js +15 -199
  684. package/src/components/block-editor/providers/default-block-editor-provider.js +44 -0
  685. package/src/components/block-editor/providers/navigation-block-editor-provider.js +114 -0
  686. package/src/components/block-editor/site-editor-canvas.js +155 -0
  687. package/src/components/block-editor/style.scss +6 -0
  688. package/src/components/block-editor/use-site-editor-settings.js +91 -0
  689. package/src/components/canvas-spinner/index.js +11 -1
  690. package/src/components/create-pattern-modal/index.js +134 -0
  691. package/src/components/create-pattern-modal/style.scss +3 -0
  692. package/src/components/create-template-part-modal/index.js +64 -4
  693. package/src/components/editor/index.js +25 -15
  694. package/src/components/editor/style.scss +4 -0
  695. package/src/components/editor-canvas-container/index.js +21 -4
  696. package/src/components/global-styles/color-palette-panel.js +1 -1
  697. package/src/components/global-styles/dimensions-panel.js +1 -1
  698. package/src/components/global-styles/global-styles-provider.js +10 -14
  699. package/src/components/global-styles/gradients-palette-panel.js +1 -1
  700. package/src/components/global-styles/hooks.js +1 -1
  701. package/src/components/global-styles/palette.js +2 -2
  702. package/src/components/global-styles/preview.js +1 -1
  703. package/src/components/global-styles/root-menu.js +1 -1
  704. package/src/components/global-styles/screen-block-list.js +1 -1
  705. package/src/components/global-styles/screen-block.js +1 -1
  706. package/src/components/global-styles/screen-colors.js +1 -1
  707. package/src/components/global-styles/screen-css.js +1 -1
  708. package/src/components/global-styles/screen-layout.js +1 -1
  709. package/src/components/global-styles/screen-revisions/index.js +1 -1
  710. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -1
  711. package/src/components/global-styles/screen-root.js +1 -1
  712. package/src/components/global-styles/screen-typography.js +1 -1
  713. package/src/components/global-styles/stories/index.js +1 -1
  714. package/src/components/global-styles/style-variations-container.js +13 -3
  715. package/src/components/global-styles/style.scss +11 -0
  716. package/src/components/global-styles/typography-panel.js +1 -1
  717. package/src/components/global-styles/typography-preview.js +1 -1
  718. package/src/components/global-styles/ui.js +115 -46
  719. package/src/components/global-styles-renderer/index.js +1 -1
  720. package/src/components/header-edit-mode/document-actions/index.js +51 -26
  721. package/src/components/header-edit-mode/document-actions/style.scss +9 -5
  722. package/src/components/header-edit-mode/index.js +100 -58
  723. package/src/components/header-edit-mode/more-menu/index.js +52 -7
  724. package/src/components/keyboard-shortcuts/edit-mode.js +40 -3
  725. package/src/components/keyboard-shortcuts/index.js +5 -1
  726. package/src/components/keyboard-shortcuts/register.js +11 -1
  727. package/src/components/layout/hooks.js +21 -0
  728. package/src/components/layout/index.js +207 -110
  729. package/src/components/layout/style.scss +65 -1
  730. package/src/components/list/index.js +1 -1
  731. package/src/components/page/header.js +38 -0
  732. package/src/components/page/index.js +38 -0
  733. package/src/components/page/style.scss +38 -0
  734. package/src/components/page-content-focus-manager/back-to-page-notification.js +70 -0
  735. package/src/components/{page-content-lock → page-content-focus-manager}/constants.js +1 -1
  736. package/src/components/{page-content-lock/use-disable-non-content-blocks.js → page-content-focus-manager/disable-non-page-content-blocks.js} +15 -7
  737. package/src/components/page-content-focus-manager/edit-template-notification.js +108 -0
  738. package/src/components/page-content-focus-manager/index.js +26 -0
  739. package/src/components/page-library/grid-item.js +179 -0
  740. package/src/components/page-library/grid.js +39 -0
  741. package/src/components/page-library/index.js +39 -0
  742. package/src/components/page-library/no-patterns.js +12 -0
  743. package/src/components/page-library/patterns-list.js +114 -0
  744. package/src/components/page-library/search-items.js +171 -0
  745. package/src/components/page-library/style.scss +105 -0
  746. package/src/components/page-library/use-library-settings.js +51 -0
  747. package/src/components/page-library/use-patterns.js +238 -0
  748. package/src/components/page-library/utils.js +21 -0
  749. package/src/components/page-main/index.js +27 -0
  750. package/src/components/page-templates/index.js +104 -0
  751. package/src/components/preferences-modal/enable-feature.js +5 -2
  752. package/src/components/preferences-modal/index.js +25 -0
  753. package/src/components/resizable-frame/index.js +3 -1
  754. package/src/components/revisions/index.js +1 -1
  755. package/src/components/routes/link.js +2 -2
  756. package/src/components/routes/use-title.js +1 -1
  757. package/src/components/save-button/index.js +14 -11
  758. package/src/components/save-hub/index.js +1 -1
  759. package/src/components/save-panel/index.js +1 -1
  760. package/src/components/secondary-sidebar/list-view-sidebar.js +53 -6
  761. package/src/components/sidebar/index.js +11 -7
  762. package/src/components/sidebar-button/style.scss +1 -1
  763. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +42 -29
  764. package/src/components/sidebar-edit-mode/index.js +8 -6
  765. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +69 -0
  766. package/src/components/sidebar-edit-mode/page-panels/index.js +53 -53
  767. package/src/components/sidebar-edit-mode/page-panels/page-content.js +27 -0
  768. package/src/components/sidebar-edit-mode/page-panels/page-status.js +233 -0
  769. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +35 -0
  770. package/src/components/sidebar-edit-mode/page-panels/publish-date.js +94 -0
  771. package/src/components/sidebar-edit-mode/page-panels/style.scss +31 -0
  772. package/src/components/sidebar-edit-mode/settings-header/index.js +18 -9
  773. package/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
  774. package/src/components/sidebar-edit-mode/template-panel/index.js +9 -6
  775. package/src/components/sidebar-navigation-item/index.js +6 -2
  776. package/src/components/sidebar-navigation-item/style.scss +8 -1
  777. package/src/components/sidebar-navigation-screen/index.js +22 -8
  778. package/src/components/sidebar-navigation-screen/style.scss +30 -9
  779. package/src/components/sidebar-navigation-screen-details-footer/index.js +45 -0
  780. package/src/components/sidebar-navigation-screen-details-footer/style.scss +5 -0
  781. package/src/components/sidebar-navigation-screen-details-panel/index.js +40 -0
  782. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
  783. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +29 -0
  784. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
  785. package/src/components/sidebar-navigation-screen-details-panel/style.scss +25 -0
  786. package/src/components/sidebar-navigation-screen-global-styles/index.js +24 -6
  787. package/src/components/sidebar-navigation-screen-global-styles/style.scss +0 -3
  788. package/src/components/sidebar-navigation-screen-library/category-item.js +43 -0
  789. package/src/components/sidebar-navigation-screen-library/index.js +136 -0
  790. package/src/components/sidebar-navigation-screen-library/style.scss +3 -0
  791. package/src/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +32 -0
  792. package/src/components/sidebar-navigation-screen-library/use-pattern-categories.js +64 -0
  793. package/src/components/sidebar-navigation-screen-library/use-template-part-areas.js +33 -0
  794. package/src/components/sidebar-navigation-screen-library/use-theme-patterns.js +44 -0
  795. package/src/components/sidebar-navigation-screen-main/index.js +11 -14
  796. package/src/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  797. package/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +45 -0
  798. package/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js +24 -0
  799. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +50 -96
  800. package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +89 -0
  801. package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +51 -0
  802. package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +62 -0
  803. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +39 -0
  804. package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +15 -0
  805. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +179 -0
  806. package/src/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  807. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +73 -14
  808. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +61 -2
  809. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +25 -47
  810. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +4 -0
  811. package/src/components/sidebar-navigation-screen-page/index.js +19 -58
  812. package/src/components/sidebar-navigation-screen-page/page-details.js +42 -39
  813. package/src/components/sidebar-navigation-screen-page/status-label.js +23 -19
  814. package/src/components/sidebar-navigation-screen-page/style.scss +1 -18
  815. package/src/components/sidebar-navigation-screen-pages/index.js +30 -29
  816. package/src/components/sidebar-navigation-screen-pattern/index.js +44 -0
  817. package/src/components/sidebar-navigation-screen-pattern/style.scss +25 -0
  818. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
  819. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +21 -0
  820. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +30 -0
  821. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +33 -0
  822. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
  823. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +86 -0
  824. package/src/components/sidebar-navigation-screen-template/home-template-details.js +230 -0
  825. package/src/components/sidebar-navigation-screen-template/index.js +19 -5
  826. package/src/components/sidebar-navigation-screen-template/style.scss +37 -14
  827. package/src/components/sidebar-navigation-screen-templates/index.js +18 -25
  828. package/src/components/site-hub/index.js +13 -9
  829. package/src/components/site-hub/style.scss +4 -3
  830. package/src/components/style-book/index.js +1 -1
  831. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -3
  832. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  833. package/src/components/sync-state-with-url/use-sync-path-with-url.js +11 -1
  834. package/src/components/table/index.js +33 -0
  835. package/src/components/table/style.scss +37 -0
  836. package/src/components/template-part-converter/convert-to-template-part.js +4 -27
  837. package/src/components/welcome-guide/editor.js +1 -1
  838. package/src/components/welcome-guide/styles.js +5 -3
  839. package/src/hooks/commands/use-common-commands.js +186 -0
  840. package/src/hooks/commands/use-edit-mode-commands.js +183 -28
  841. package/src/hooks/index.js +1 -0
  842. package/src/hooks/navigation-menu-edit.js +95 -0
  843. package/src/hooks/push-changes-to-global-styles/index.js +1 -1
  844. package/src/hooks/template-part-edit.js +1 -1
  845. package/src/index.js +1 -0
  846. package/src/store/actions.js +40 -8
  847. package/src/store/index.js +1 -1
  848. package/src/store/reducer.js +6 -5
  849. package/src/store/selectors.js +39 -9
  850. package/src/store/test/actions.js +8 -8
  851. package/src/store/test/reducer.js +11 -11
  852. package/src/store/test/selectors.js +10 -8
  853. package/src/style.scss +13 -2
  854. package/src/utils/get-is-list-page.js +16 -4
  855. package/src/utils/is-previewing-theme.js +4 -2
  856. package/src/utils/use-activate-theme.js +3 -2
  857. package/src/utils/use-debounced-input.js +17 -0
  858. package/build/components/add-new-template/new-template-part.js +0 -113
  859. package/build/components/add-new-template/new-template-part.js.map +0 -1
  860. package/build/components/page-content-lock/constants.js +0 -9
  861. package/build/components/page-content-lock/constants.js.map +0 -1
  862. package/build/components/page-content-lock/index.js +0 -29
  863. package/build/components/page-content-lock/index.js.map +0 -1
  864. package/build/components/page-content-lock/use-disable-non-content-blocks.js +0 -49
  865. package/build/components/page-content-lock/use-disable-non-content-blocks.js.map +0 -1
  866. package/build/components/page-content-lock/use-page-content-lock-notifications.js +0 -112
  867. package/build/components/page-content-lock/use-page-content-lock-notifications.js.map +0 -1
  868. package/build/components/sidebar-edit-mode/page-panels/content-blocks-list.js +0 -79
  869. package/build/components/sidebar-edit-mode/page-panels/content-blocks-list.js.map +0 -1
  870. package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -52
  871. package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
  872. package/build/components/sidebar-navigation-screen-template-part/index.js +0 -105
  873. package/build/components/sidebar-navigation-screen-template-part/index.js.map +0 -1
  874. package/build/components/sidebar-navigation-subtitle/index.js +0 -17
  875. package/build/components/sidebar-navigation-subtitle/index.js.map +0 -1
  876. package/build/private-apis.js.map +0 -1
  877. package/build-module/components/add-new-template/new-template-part.js +0 -93
  878. package/build-module/components/add-new-template/new-template-part.js.map +0 -1
  879. package/build-module/components/page-content-lock/constants.js +0 -2
  880. package/build-module/components/page-content-lock/constants.js.map +0 -1
  881. package/build-module/components/page-content-lock/index.js +0 -14
  882. package/build-module/components/page-content-lock/index.js.map +0 -1
  883. package/build-module/components/page-content-lock/use-disable-non-content-blocks.js.map +0 -1
  884. package/build-module/components/page-content-lock/use-page-content-lock-notifications.js +0 -98
  885. package/build-module/components/page-content-lock/use-page-content-lock-notifications.js.map +0 -1
  886. package/build-module/components/sidebar-edit-mode/page-panels/content-blocks-list.js +0 -67
  887. package/build-module/components/sidebar-edit-mode/page-panels/content-blocks-list.js.map +0 -1
  888. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -39
  889. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
  890. package/build-module/components/sidebar-navigation-screen-template-part/index.js +0 -86
  891. package/build-module/components/sidebar-navigation-screen-template-part/index.js.map +0 -1
  892. package/build-module/components/sidebar-navigation-subtitle/index.js +0 -9
  893. package/build-module/components/sidebar-navigation-subtitle/index.js.map +0 -1
  894. package/build-module/private-apis.js.map +0 -1
  895. package/src/components/add-new-template/new-template-part.js +0 -109
  896. package/src/components/page-content-lock/index.js +0 -14
  897. package/src/components/page-content-lock/use-page-content-lock-notifications.js +0 -128
  898. package/src/components/sidebar-edit-mode/page-panels/content-blocks-list.js +0 -77
  899. package/src/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -47
  900. package/src/components/sidebar-navigation-screen-template-part/index.js +0 -103
  901. package/src/components/sidebar-navigation-screen-templates/style.scss +0 -4
  902. package/src/components/sidebar-navigation-subtitle/index.js +0 -5
  903. package/src/components/sidebar-navigation-subtitle/style.scss +0 -7
  904. /package/src/{private-apis.js → lock-unlock.js} +0 -0
@@ -16,7 +16,7 @@ import { __, sprintf } from '@wordpress/i18n';
16
16
 
17
17
  import ScreenHeader from './header';
18
18
  import BlockPreviewPanel from './block-preview-panel';
19
- import { unlock } from '../../private-apis';
19
+ import { unlock } from '../../lock-unlock';
20
20
  import Subtitle from './subtitle';
21
21
  import { useBlockVariations, VariationsPanel } from './variations-panel';
22
22
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasEffectsPanel","useHasFiltersPanel","useGlobalStyle","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","setSettings","settings","blockType","blockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasEffectsPanel","hasFiltersPanel","hasVariationsPanel","length","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeBorders","radius","newBorder","updatedBorder","label","title","customDuotone"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,YAAT,QAA6B,mBAA7B;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SACCC,SADD,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,6BAA6B,IAAIC,eAHlC,QAIO,uBAJP;AAKA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,SAASC,kBAAT,EAA6BC,eAA7B,QAAoD,oBAApD;;AAEA,SAASC,kBAAT,CAA6BC,MAA7B,EAAsC;AACrC,MAAK,CAAEA,MAAP,EAAgB;AACf,WAAOA,MAAP;AACA;;AA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B,IA/CF,EAuDGQ,eAAe,IAChB,cAAC,kBAAD;AACC,IAAA,cAAc,EAAGa,wBADlB;AAEC,IAAA,KAAK,EAAGE,eAFT;AAGC,IAAA,QAAQ,EAAG1B,QAHZ;AAIC,IAAA,QAAQ,EAAG,EACV,GAAGG,QADO;AAEV5C,MAAAA,KAAK,EAAE,EACN,GAAG4C,QAAQ,CAAC5C,KADN;AAEN6E,QAAAA,aAAa,EAAE,KAFT,CAEgB;;AAFhB;AAFG,KAJZ;AAWC,IAAA,qBAAqB;AAXtB,IAxDF,EAsEGtB,UAAU,IACX,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGlE,EAAE,CAAE,UAAF,CAArB;AAAsC,IAAA,WAAW,EAAG;AAApD,KACC,yBACGC,OAAO,EACR;AACAD,EAAAA,EAAE,CACD,+DADC,CAFM,EAKRwD,SAAS,EAAE+B,KALH,CADV,CADD,EAUC,cAAC,mBAAD;AACC,IAAA,KAAK,EAAG1E,KADT;AAEC,IAAA,QAAQ,EAAGuC,QAFZ;AAGC,IAAA,cAAc,EAAGD;AAHlB,IAVD,CAvEF,CADD;AA2FA;;AAED,eAAeR,WAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../private-apis';\nimport Subtitle from './subtitle';\nimport { useBlockVariations, VariationsPanel } from './variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasEffectsPanel = useHasEffectsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ style, settings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== settings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ {\n\t\t\t\t\t\t...settings,\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...settings.color,\n\t\t\t\t\t\t\tcustomDuotone: false, //TO FIX: Custom duotone only works on the block level right now\n\t\t\t\t\t\t},\n\t\t\t\t\t} }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"names":["getBlockType","privateApis","blockEditorPrivateApis","useMemo","useSelect","store","coreStore","PanelBody","__experimentalVStack","VStack","__experimentalHasSplitBorders","hasSplitBorders","__","sprintf","ScreenHeader","BlockPreviewPanel","unlock","Subtitle","useBlockVariations","VariationsPanel","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasEffectsPanel","useHasFiltersPanel","useGlobalStyle","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","AdvancedPanel","StylesAdvancedPanel","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","setSettings","settings","blockType","blockVariations","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasEffectsPanel","hasFiltersPanel","hasVariationsPanel","length","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeBorders","radius","newBorder","updatedBorder","label","title","customDuotone"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,YAAT,QAA6B,mBAA7B;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SACCC,SADD,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,6BAA6B,IAAIC,eAHlC,QAIO,uBAJP;AAKA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,SAASC,kBAAT,EAA6BC,eAA7B,QAAoD,oBAApD;;AAEA,SAASC,kBAAT,CAA6BC,MAA7B,EAAsC;AACrC,MAAK,CAAEA,MAAP,EAAgB;AACf,WAAOA,MAAP;AACA;;AAED,QAAMC,eAAe,GAAGD,MAAM,CAACE,KAAP,IAAgBF,MAAM,CAACG,KAA/C;;AAEA,MAAK,CAAEH,MAAM,CAACI,KAAT,IAAkBH,eAAvB,EAAyC;AACxC,WAAO,EAAE,GAAGD,MAAL;AAAaI,MAAAA,KAAK,EAAE;AAApB,KAAP;AACA;;AAED,MAAKJ,MAAM,CAACI,KAAP,IAAgB,CAAEH,eAAvB,EAAyC;AACxC,WAAOI,SAAP;AACA;;AAED,SAAOL,MAAP;AACA;;AAED,SAASM,sBAAT,CAAiCN,MAAjC,EAA0C;AACzC,MAAK,CAAEA,MAAP,EAAgB;AACf,WAAOA,MAAP;AACA;;AAED,MAAKV,eAAe,CAAEU,MAA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AW,EAAG;AAApD,KACC,yBACGC,OAAO,EACR;AACAD,EAAAA,EAAE,CACD,+DADC,CAFM,EAKRwD,SAAS,EAAE+B,KALH,CADV,CADD,EAUC,cAAC,mBAAD;AACC,IAAA,KAAK,EAAG1E,KADT;AAEC,IAAA,QAAQ,EAAGuC,QAFZ;AAGC,IAAA,cAAc,EAAGD;AAHlB,IAVD,CAvEF,CADD;AA2FA;;AAED,eAAeR,WAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { useBlockVariations, VariationsPanel } from './variations-panel';\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasEffectsPanel = useHasEffectsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ style, settings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== settings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ {\n\t\t\t\t\t\t...settings,\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...settings.color,\n\t\t\t\t\t\t\tcustomDuotone: false, //TO FIX: Custom duotone only works on the block level right now\n\t\t\t\t\t\t},\n\t\t\t\t\t} }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"]}
@@ -13,7 +13,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
13
13
  import ScreenHeader from './header';
14
14
  import Palette from './palette';
15
15
  import BlockPreviewPanel from './block-preview-panel';
16
- import { unlock } from '../../private-apis';
16
+ import { unlock } from '../../lock-unlock';
17
17
  const {
18
18
  useGlobalStyle,
19
19
  useGlobalSetting,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-colors.js"],"names":["__","__experimentalVStack","VStack","privateApis","blockEditorPrivateApis","ScreenHeader","Palette","BlockPreviewPanel","unlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","ColorPanel","StylesColorPanel","ScreenColors","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","settings"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,oBAAoB,IAAIC,MAAjC,QAA+C,uBAA/C;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,SAASC,MAAT,QAAuB,oBAAvB;AAEA,MAAM;AACLC,EAAAA,cADK;AAELC,EAAAA,gBAFK;AAGLC,EAAAA,0BAHK;AAILC,EAAAA,UAAU,EAAEC;AAJP,IAKFL,MAAM,CAAEJ,sBAAF,CALV;;AAOA,SAASU,YAAT,GAAwB;AACvB,QAAM,CAAEC,KAAF,IAAYN,cAAc,CAAE,EAAF,EAAMO,SAAN,EAAiB,MAAjB,EAAyB;AACxDC,IAAAA,kBAAkB,EAAE;AADoC,GAAzB,CAAhC;AAGA,QAAM,CAAEC,cAAF,EAAkBC,QAAlB,IAA+BV,cAAc,CAAE,EAAF,EAAMO,SAAN,EAAiB,KAAjB,EAAwB;AAC1EC,IAAAA,kBAAkB,EAAE;AADsD,GAAxB,CAAnD;AAGA,QAAM,CAAEG,WAAF,IAAkBV,gBAAgB,CAAE,EAAF,CAAxC;AACA,QAAMW,QAAQ,GAAGV,0BAA0B,CAAES,WAAF,CAA3C;AAEA,SACC,8BACC,cAAC,YAAD;AACC,IAAA,KAAK,EAAGpB,EAAE,CAAE,QAAF,CADX;AAEC,IAAA,WAAW,EAAGA,EAAE,CACf,iFADe;AAFjB,IADD,EAQC,cAAC,iBAAD,OARD,EAUC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACC,cAAC,OAAD,OADD,EAGC,cAAC,gBAAD;AACC,IAAA,cAAc,EAAGkB,cADlB;AAEC,IAAA,KAAK,EAAGH,KAFT;AAGC,IAAA,QAAQ,EAAGI,QAHZ;AAIC,IAAA,QAAQ,EAAGE;AAJZ,IAHD,CADD,CAVD,CADD;AAyBA;;AAED,eAAeP,YAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../private-apis';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tColorPanel: StylesColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenColors() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage palettes and the default color of different global elements on the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<BlockPreviewPanel />\n\n\t\t\t<div className=\"edit-site-global-styles-screen-colors\">\n\t\t\t\t<VStack spacing={ 10 }>\n\t\t\t\t\t<Palette />\n\n\t\t\t\t\t<StylesColorPanel\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-colors.js"],"names":["__","__experimentalVStack","VStack","privateApis","blockEditorPrivateApis","ScreenHeader","Palette","BlockPreviewPanel","unlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","ColorPanel","StylesColorPanel","ScreenColors","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","settings"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,oBAAoB,IAAIC,MAAjC,QAA+C,uBAA/C;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AAEA,MAAM;AACLC,EAAAA,cADK;AAELC,EAAAA,gBAFK;AAGLC,EAAAA,0BAHK;AAILC,EAAAA,UAAU,EAAEC;AAJP,IAKFL,MAAM,CAAEJ,sBAAF,CALV;;AAOA,SAASU,YAAT,GAAwB;AACvB,QAAM,CAAEC,KAAF,IAAYN,cAAc,CAAE,EAAF,EAAMO,SAAN,EAAiB,MAAjB,EAAyB;AACxDC,IAAAA,kBAAkB,EAAE;AADoC,GAAzB,CAAhC;AAGA,QAAM,CAAEC,cAAF,EAAkBC,QAAlB,IAA+BV,cAAc,CAAE,EAAF,EAAMO,SAAN,EAAiB,KAAjB,EAAwB;AAC1EC,IAAAA,kBAAkB,EAAE;AADsD,GAAxB,CAAnD;AAGA,QAAM,CAAEG,WAAF,IAAkBV,gBAAgB,CAAE,EAAF,CAAxC;AACA,QAAMW,QAAQ,GAAGV,0BAA0B,CAAES,WAAF,CAA3C;AAEA,SACC,8BACC,cAAC,YAAD;AACC,IAAA,KAAK,EAAGpB,EAAE,CAAE,QAAF,CADX;AAEC,IAAA,WAAW,EAAGA,EAAE,CACf,iFADe;AAFjB,IADD,EAQC,cAAC,iBAAD,OARD,EAUC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACC,cAAC,OAAD,OADD,EAGC,cAAC,gBAAD;AACC,IAAA,cAAc,EAAGkB,cADlB;AAEC,IAAA,KAAK,EAAGH,KAFT;AAGC,IAAA,QAAQ,EAAGI,QAHZ;AAIC,IAAA,QAAQ,EAAGE;AAJZ,IAHD,CADD,CAVD,CADD;AAyBA;;AAED,eAAeP,YAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tColorPanel: StylesColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenColors() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage palettes and the default color of different global elements on the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<BlockPreviewPanel />\n\n\t\t\t<div className=\"edit-site-global-styles-screen-colors\">\n\t\t\t\t<VStack spacing={ 10 }>\n\t\t\t\t\t<Palette />\n\n\t\t\t\t\t<StylesColorPanel\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n"]}
@@ -10,7 +10,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
10
10
  * Internal dependencies
11
11
  */
12
12
 
13
- import { unlock } from '../../private-apis';
13
+ import { unlock } from '../../lock-unlock';
14
14
  import ScreenHeader from './header';
15
15
  const {
16
16
  useGlobalStyle,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-css.js"],"names":["__","ExternalLink","privateApis","blockEditorPrivateApis","unlock","ScreenHeader","useGlobalStyle","AdvancedPanel","StylesAdvancedPanel","ScreenCSS","description","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,YAAT,QAA6B,uBAA7B;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,OAAOC,YAAP,MAAyB,UAAzB;AAEA,MAAM;AAAEC,EAAAA,cAAF;AAAkBC,EAAAA,aAAa,EAAEC;AAAjC,IAAyDJ,MAAM,CACpED,sBADoE,CAArE;;AAIA,SAASM,SAAT,GAAqB;AACpB,QAAMC,WAAW,GAAGV,EAAE,CACrB,uEADqB,CAAtB;;AAGA,QAAM,CAAEW,KAAF,IAAYL,cAAc,CAAE,EAAF,EAAMM,SAAN,EAAiB,MAAjB,EAAyB;AACxDC,IAAAA,kBAAkB,EAAE;AADoC,GAAzB,CAAhC;AAGA,QAAM,CAAEC,cAAF,EAAkBC,QAAlB,IAA+BT,cAAc,CAAE,EAAF,EAAMM,SAAN,EAAiB,KAAjB,EAAwB;AAC1EC,IAAAA,kBAAkB,EAAE;AADsD,GAAxB,CAAnD;AAIA,SACC,8BACC,cAAC,YAAD;AACC,IAAA,KAAK,EAAGb,EAAE,CAAE,KAAF,CADX;AAEC,IAAA,WAAW,EACV,8BACGU,WADH,EAEC,cAAC,YAAD;AACC,MAAA,IAAI,EAAC,kDADN;AAEC,MAAA,SAAS,EAAC;AAFX,OAIGV,EAAE,CAAE,sBAAF,CAJL,CAFD;AAHF,IADD,EAeC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,mBAAD;AACC,IAAA,KAAK,EAAGW,KADT;AAEC,IAAA,QAAQ,EAAGI,QAFZ;AAGC,IAAA,cAAc,EAAGD;AAHlB,IADD,CAfD,CADD;AAyBA;;AAED,eAAeL,SAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../private-apis';\nimport ScreenHeader from './header';\n\nconst { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenCSS() {\n\tconst description = __(\n\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t);\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref=\"https://wordpress.org/documentation/article/css/\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-css-help-link\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about CSS' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-css\">\n\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenCSS;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-css.js"],"names":["__","ExternalLink","privateApis","blockEditorPrivateApis","unlock","ScreenHeader","useGlobalStyle","AdvancedPanel","StylesAdvancedPanel","ScreenCSS","description","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,YAAT,QAA6B,uBAA7B;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,OAAOC,YAAP,MAAyB,UAAzB;AAEA,MAAM;AAAEC,EAAAA,cAAF;AAAkBC,EAAAA,aAAa,EAAEC;AAAjC,IAAyDJ,MAAM,CACpED,sBADoE,CAArE;;AAIA,SAASM,SAAT,GAAqB;AACpB,QAAMC,WAAW,GAAGV,EAAE,CACrB,uEADqB,CAAtB;;AAGA,QAAM,CAAEW,KAAF,IAAYL,cAAc,CAAE,EAAF,EAAMM,SAAN,EAAiB,MAAjB,EAAyB;AACxDC,IAAAA,kBAAkB,EAAE;AADoC,GAAzB,CAAhC;AAGA,QAAM,CAAEC,cAAF,EAAkBC,QAAlB,IAA+BT,cAAc,CAAE,EAAF,EAAMM,SAAN,EAAiB,KAAjB,EAAwB;AAC1EC,IAAAA,kBAAkB,EAAE;AADsD,GAAxB,CAAnD;AAIA,SACC,8BACC,cAAC,YAAD;AACC,IAAA,KAAK,EAAGb,EAAE,CAAE,KAAF,CADX;AAEC,IAAA,WAAW,EACV,8BACGU,WADH,EAEC,cAAC,YAAD;AACC,MAAA,IAAI,EAAC,kDADN;AAEC,MAAA,SAAS,EAAC;AAFX,OAIGV,EAAE,CAAE,sBAAF,CAJL,CAFD;AAHF,IADD,EAeC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,mBAAD;AACC,IAAA,KAAK,EAAGW,KADT;AAEC,IAAA,QAAQ,EAAGI,QAFZ;AAGC,IAAA,cAAc,EAAGD;AAHlB,IADD,CAfD,CADD;AAyBA;;AAED,eAAeL,SAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ScreenHeader from './header';\n\nconst { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenCSS() {\n\tconst description = __(\n\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t);\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref=\"https://wordpress.org/documentation/article/css/\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-css-help-link\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about CSS' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-css\">\n\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenCSS;\n"]}
@@ -12,7 +12,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
12
12
  import DimensionsPanel from './dimensions-panel';
13
13
  import ScreenHeader from './header';
14
14
  import BlockPreviewPanel from './block-preview-panel';
15
- import { unlock } from '../../private-apis';
15
+ import { unlock } from '../../lock-unlock';
16
16
  const {
17
17
  useHasDimensionsPanel,
18
18
  useGlobalSetting,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-layout.js"],"names":["__","privateApis","blockEditorPrivateApis","DimensionsPanel","ScreenHeader","BlockPreviewPanel","unlock","useHasDimensionsPanel","useGlobalSetting","useSettingsForBlockElement","ScreenLayout","rawSettings","settings","hasDimensionsPanel"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,SAASC,MAAT,QAAuB,oBAAvB;AAEA,MAAM;AAAEC,EAAAA,qBAAF;AAAyBC,EAAAA,gBAAzB;AAA2CC,EAAAA;AAA3C,IACLH,MAAM,CAAEJ,sBAAF,CADP;;AAGA,SAASQ,YAAT,GAAwB;AACvB,QAAM,CAAEC,WAAF,IAAkBH,gBAAgB,CAAE,EAAF,CAAxC;AACA,QAAMI,QAAQ,GAAGH,0BAA0B,CAAEE,WAAF,CAA3C;AACA,QAAME,kBAAkB,GAAGN,qBAAqB,CAAEK,QAAF,CAAhD;AACA,SACC,8BACC,cAAC,YAAD;AAAc,IAAA,KAAK,EAAGZ,EAAE,CAAE,QAAF;AAAxB,IADD,EAEC,cAAC,iBAAD,OAFD,EAGGa,kBAAkB,IAAI,cAAC,eAAD,OAHzB,CADD;AAOA;;AAED,eAAeH,YAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DimensionsPanel from './dimensions-panel';\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../private-apis';\n\nconst { useHasDimensionsPanel, useGlobalSetting, useSettingsForBlockElement } =\n\tunlock( blockEditorPrivateApis );\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t<BlockPreviewPanel />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-layout.js"],"names":["__","privateApis","blockEditorPrivateApis","DimensionsPanel","ScreenHeader","BlockPreviewPanel","unlock","useHasDimensionsPanel","useGlobalSetting","useSettingsForBlockElement","ScreenLayout","rawSettings","settings","hasDimensionsPanel"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AAEA,MAAM;AAAEC,EAAAA,qBAAF;AAAyBC,EAAAA,gBAAzB;AAA2CC,EAAAA;AAA3C,IACLH,MAAM,CAAEJ,sBAAF,CADP;;AAGA,SAASQ,YAAT,GAAwB;AACvB,QAAM,CAAEC,WAAF,IAAkBH,gBAAgB,CAAE,EAAF,CAAxC;AACA,QAAMI,QAAQ,GAAGH,0BAA0B,CAAEE,WAAF,CAA3C;AACA,QAAME,kBAAkB,GAAGN,qBAAqB,CAAEK,QAAF,CAAhD;AACA,SACC,8BACC,cAAC,YAAD;AAAc,IAAA,KAAK,EAAGZ,EAAE,CAAE,QAAF;AAAxB,IADD,EAEC,cAAC,iBAAD,OAFD,EAGGa,kBAAkB,IAAI,cAAC,eAAD,OAHzB,CADD;AAOA;;AAED,eAAeH,YAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DimensionsPanel from './dimensions-panel';\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasDimensionsPanel, useGlobalSetting, useSettingsForBlockElement } =\n\tunlock( blockEditorPrivateApis );\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t<BlockPreviewPanel />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n"]}
@@ -13,7 +13,7 @@ import { privateApis as blockEditorPrivateApis, store as blockEditorStore } from
13
13
  */
14
14
 
15
15
  import ScreenHeader from '../header';
16
- import { unlock } from '../../../private-apis';
16
+ import { unlock } from '../../../lock-unlock';
17
17
  import Revisions from '../../revisions';
18
18
  import SidebarFixedBottom from '../../sidebar-edit-mode/sidebar-fixed-bottom';
19
19
  import { store as editSiteStore } from '../../../store';
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/index.js"],"names":["__","Button","__experimentalUseNavigator","useNavigator","__experimentalConfirmDialog","ConfirmDialog","Spinner","useSelect","useDispatch","useContext","useState","useEffect","privateApis","blockEditorPrivateApis","store","blockEditorStore","ScreenHeader","unlock","Revisions","SidebarFixedBottom","editSiteStore","useGlobalStylesRevisions","RevisionsButtons","GlobalStylesContext","areGlobalStyleConfigsEqual","ScreenRevisions","goBack","user","userConfig","setUserConfig","blocks","editorCanvasContainerView","select","getEditorCanvasContainerView","getBlocks","revisions","isLoading","hasUnsavedChanges","selectedRevisionId","setSelectedRevisionId","globalStylesRevision","setGlobalStylesRevision","isLoadingRevisionWithUnsavedChanges","setIsLoadingRevisionWithUnsavedChanges","setEditorCanvasContainerView","onCloseRevisions","restoreRevision","revision","styles","settings","selectRevision","id","isLoadButtonEnabled"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,MADD,EAECC,0BAA0B,IAAIC,YAF/B,EAGCC,2BAA2B,IAAIC,a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BACGA,EAAE,CACH,4DADG,CADL,CAND,CAXD,CAhDF,CADD;AA4EA;;AAED,eAAeyB,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tSpinner,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext, useState, useEffect } from '@wordpress/element';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from '../header';\nimport { unlock } from '../../../private-apis';\nimport Revisions from '../../revisions';\nimport SidebarFixedBottom from '../../sidebar-edit-mode/sidebar-fixed-bottom';\nimport { store as editSiteStore } from '../../../store';\nimport useGlobalStylesRevisions from './use-global-styles-revisions';\nimport RevisionsButtons from './revisions-buttons';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenRevisions() {\n\tconst { goBack } = useNavigator();\n\tconst { user: userConfig, setUserConfig } =\n\t\tuseContext( GlobalStylesContext );\n\tconst { blocks, editorCanvasContainerView } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\teditorCanvasContainerView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tblocks: select( blockEditorStore ).getBlocks(),\n\t\t};\n\t}, [] );\n\tconst { revisions, isLoading, hasUnsavedChanges } =\n\t\tuseGlobalStylesRevisions();\n\tconst [ selectedRevisionId, setSelectedRevisionId ] = useState();\n\tconst [ globalStylesRevision, setGlobalStylesRevision ] =\n\t\tuseState( userConfig );\n\tconst [\n\t\tisLoadingRevisionWithUnsavedChanges,\n\t\tsetIsLoadingRevisionWithUnsavedChanges,\n\t] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tuseEffect( () => {\n\t\tif ( editorCanvasContainerView !== 'global-styles-revisions' ) {\n\t\t\tgoBack();\n\t\t\tsetEditorCanvasContainerView( editorCanvasContainerView );\n\t\t}\n\t}, [ editorCanvasContainerView ] );\n\n\tconst onCloseRevisions = () => {\n\t\tgoBack();\n\t};\n\n\tconst restoreRevision = ( revision ) => {\n\t\tsetUserConfig( () => ( {\n\t\t\tstyles: revision?.styles,\n\t\t\tsettings: revision?.settings,\n\t\t} ) );\n\t\tsetIsLoadingRevisionWithUnsavedChanges( false );\n\t\tonCloseRevisions();\n\t};\n\n\tconst selectRevision = ( revision ) => {\n\t\tsetGlobalStylesRevision( {\n\t\t\tstyles: revision?.styles,\n\t\t\tsettings: revision?.settings,\n\t\t\tid: revision?.id,\n\t\t} );\n\t\tsetSelectedRevisionId( revision?.id );\n\t};\n\n\tconst isLoadButtonEnabled =\n\t\t!! globalStylesRevision?.id &&\n\t\t! areGlobalStyleConfigsEqual( globalStylesRevision, userConfig );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Revisions' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Revisions are added to the timeline when style changes are saved.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t{ isLoading && (\n\t\t\t\t<Spinner className=\"edit-site-global-styles-screen-revisions__loading\" />\n\t\t\t) }\n\t\t\t{ ! isLoading && (\n\t\t\t\t<Revisions\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tuserConfig={ globalStylesRevision }\n\t\t\t\t\tonClose={ onCloseRevisions }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-global-styles-screen-revisions\">\n\t\t\t\t<RevisionsButtons\n\t\t\t\t\tonChange={ selectRevision }\n\t\t\t\t\tselectedRevisionId={ selectedRevisionId }\n\t\t\t\t\tuserRevisions={ revisions }\n\t\t\t\t/>\n\t\t\t\t{ isLoadButtonEnabled && (\n\t\t\t\t\t<SidebarFixedBottom>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__button\"\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t! globalStylesRevision?.id ||\n\t\t\t\t\t\t\t\tglobalStylesRevision?.id === 'unsaved'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tif ( hasUnsavedChanges ) {\n\t\t\t\t\t\t\t\t\tsetIsLoadingRevisionWithUnsavedChanges(\n\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\trestoreRevision( globalStylesRevision );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Apply' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</SidebarFixedBottom>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ isLoadingRevisionWithUnsavedChanges && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\ttitle={ __(\n\t\t\t\t\t\t'Loading this revision will discard all unsaved changes.'\n\t\t\t\t\t) }\n\t\t\t\t\tisOpen={ isLoadingRevisionWithUnsavedChanges }\n\t\t\t\t\tconfirmButtonText={ __( ' Discard unsaved changes' ) }\n\t\t\t\t\tonConfirm={ () => restoreRevision( globalStylesRevision ) }\n\t\t\t\t\tonCancel={ () =>\n\t\t\t\t\t\tsetIsLoadingRevisionWithUnsavedChanges( false )\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<>\n\t\t\t\t\t\t<h2>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Loading this revision will discard all unsaved changes.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Do you want to replace your unsaved changes in the editor?'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</>\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenRevisions;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/index.js"],"names":["__","Button","__experimentalUseNavigator","useNavigator","__experimentalConfirmDialog","ConfirmDialog","Spinner","useSelect","useDispatch","useContext","useState","useEffect","privateApis","blockEditorPrivateApis","store","blockEditorStore","ScreenHeader","unlock","Revisions","SidebarFixedBottom","editSiteStore","useGlobalStylesRevisions","RevisionsButtons","GlobalStylesContext","areGlobalStyleConfigsEqual","ScreenRevisions","goBack","user","userConfig","setUserConfig","blocks","editorCanvasContainerView","select","getEditorCanvasContainerView","getBlocks","revisions","isLoading","hasUnsavedChanges","selectedRevisionId","setSelectedRevisionId","globalStylesRevision","setGlobalStylesRevision","isLoadingRevisionWithUnsavedChanges","setIsLoadingRevisionWithUnsavedChanges","setEditorCanvasContainerView","onCloseRevisions","restoreRevision","revision","styles","settings","selectRevision","id","isLoadButtonEnabled"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,MADD,EAECC,0BAA0B,IAAIC,YAF/B,EAGCC,2BAA2B,IAAIC,aAHhC,EAICC,OAJD,QAKO,uBALP;AAMA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,UAAT,EAAqBC,QAArB,EAA+BC,SAA/B,QAAgD,oBAAhD;AACA,SACCC,WAAW,IAAIC,sBADhB,EAECC,KAAK,IAAIC,gBAFV,QAGO,yBAHP;AAKA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,WAAzB;AACA,SAASC,MAAT,QAAuB,sBAAvB;AACA,OAAOC,SAAP,MAAsB,iBAAtB;AACA,OAAOC,kBAAP,MAA+B,8CAA/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QAAQ,EAAGK,cADZ;AAEC,IAAA,kBAAkB,EAAGZ,kBAFtB;AAGC,IAAA,aAAa,EAAGH;AAHjB,IADD,EAMGiB,mBAAmB,IACpB,cAAC,kBAAD,QACC,cAAC,MAAD;AACC,IAAA,OAAO,EAAC,SADT;AAEC,IAAA,SAAS,EAAC,kDAFX;AAGC,IAAA,QAAQ,EACP,CAAEZ,oBAAoB,EAAEW,EAAxB,IACAX,oBAAoB,EAAEW,EAAtB,KAA6B,SAL/B;AAOC,IAAA,OAAO,EAAG,MAAM;AACf,UAAKd,iBAAL,EAAyB;AACxBM,QAAAA,sCAAsC,CACrC,IADqC,CAAtC;AAGA,OAJD,MAIO;AACNG,QAAAA,eAAe,CAAEN,oBAAF,CAAf;AACA;AACD;AAfF,KAiBGxC,EAAE,CAAE,OAAF,CAjBL,CADD,CAPF,CAjBD,EA+CG0C,mCAAmC,IACpC,cAAC,aAAD;AACC,IAAA,KAAK,EAAG1C,EAAE,CACT,yDADS,CADX;AAIC,IAAA,MAAM,EAAG0C,mCAJV;AAKC,IAAA,iBAAiB,EAAG1C,EAAE,CAAE,0BAAF,CALvB;AAMC,IAAA,SAAS,EAAG,MAAM8C,eAAe,CAAEN,oBAAF,CANlC;AAOC,IAAA,QAAQ,EAAG,MACVG,sCAAsC,CAAE,KAAF;AARxC,KAWC,8BACC,0BACG3C,EAAE,CACH,yDADG,CADL,CADD,EAMC,yBACGA,EAAE,CACH,4DADG,CADL,CAND,CAXD,CAhDF,CADD;AA4EA;;AAED,eAAeyB,eAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tSpinner,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext, useState, useEffect } from '@wordpress/element';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from '../header';\nimport { unlock } from '../../../lock-unlock';\nimport Revisions from '../../revisions';\nimport SidebarFixedBottom from '../../sidebar-edit-mode/sidebar-fixed-bottom';\nimport { store as editSiteStore } from '../../../store';\nimport useGlobalStylesRevisions from './use-global-styles-revisions';\nimport RevisionsButtons from './revisions-buttons';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenRevisions() {\n\tconst { goBack } = useNavigator();\n\tconst { user: userConfig, setUserConfig } =\n\t\tuseContext( GlobalStylesContext );\n\tconst { blocks, editorCanvasContainerView } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\teditorCanvasContainerView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tblocks: select( blockEditorStore ).getBlocks(),\n\t\t};\n\t}, [] );\n\tconst { revisions, isLoading, hasUnsavedChanges } =\n\t\tuseGlobalStylesRevisions();\n\tconst [ selectedRevisionId, setSelectedRevisionId ] = useState();\n\tconst [ globalStylesRevision, setGlobalStylesRevision ] =\n\t\tuseState( userConfig );\n\tconst [\n\t\tisLoadingRevisionWithUnsavedChanges,\n\t\tsetIsLoadingRevisionWithUnsavedChanges,\n\t] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tuseEffect( () => {\n\t\tif ( editorCanvasContainerView !== 'global-styles-revisions' ) {\n\t\t\tgoBack();\n\t\t\tsetEditorCanvasContainerView( editorCanvasContainerView );\n\t\t}\n\t}, [ editorCanvasContainerView ] );\n\n\tconst onCloseRevisions = () => {\n\t\tgoBack();\n\t};\n\n\tconst restoreRevision = ( revision ) => {\n\t\tsetUserConfig( () => ( {\n\t\t\tstyles: revision?.styles,\n\t\t\tsettings: revision?.settings,\n\t\t} ) );\n\t\tsetIsLoadingRevisionWithUnsavedChanges( false );\n\t\tonCloseRevisions();\n\t};\n\n\tconst selectRevision = ( revision ) => {\n\t\tsetGlobalStylesRevision( {\n\t\t\tstyles: revision?.styles,\n\t\t\tsettings: revision?.settings,\n\t\t\tid: revision?.id,\n\t\t} );\n\t\tsetSelectedRevisionId( revision?.id );\n\t};\n\n\tconst isLoadButtonEnabled =\n\t\t!! globalStylesRevision?.id &&\n\t\t! areGlobalStyleConfigsEqual( globalStylesRevision, userConfig );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Revisions' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Revisions are added to the timeline when style changes are saved.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t{ isLoading && (\n\t\t\t\t<Spinner className=\"edit-site-global-styles-screen-revisions__loading\" />\n\t\t\t) }\n\t\t\t{ ! isLoading && (\n\t\t\t\t<Revisions\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tuserConfig={ globalStylesRevision }\n\t\t\t\t\tonClose={ onCloseRevisions }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-global-styles-screen-revisions\">\n\t\t\t\t<RevisionsButtons\n\t\t\t\t\tonChange={ selectRevision }\n\t\t\t\t\tselectedRevisionId={ selectedRevisionId }\n\t\t\t\t\tuserRevisions={ revisions }\n\t\t\t\t/>\n\t\t\t\t{ isLoadButtonEnabled && (\n\t\t\t\t\t<SidebarFixedBottom>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__button\"\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t! globalStylesRevision?.id ||\n\t\t\t\t\t\t\t\tglobalStylesRevision?.id === 'unsaved'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tif ( hasUnsavedChanges ) {\n\t\t\t\t\t\t\t\t\tsetIsLoadingRevisionWithUnsavedChanges(\n\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\trestoreRevision( globalStylesRevision );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Apply' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</SidebarFixedBottom>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ isLoadingRevisionWithUnsavedChanges && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\ttitle={ __(\n\t\t\t\t\t\t'Loading this revision will discard all unsaved changes.'\n\t\t\t\t\t) }\n\t\t\t\t\tisOpen={ isLoadingRevisionWithUnsavedChanges }\n\t\t\t\t\tconfirmButtonText={ __( ' Discard unsaved changes' ) }\n\t\t\t\t\tonConfirm={ () => restoreRevision( globalStylesRevision ) }\n\t\t\t\t\tonCancel={ () =>\n\t\t\t\t\t\tsetIsLoadingRevisionWithUnsavedChanges( false )\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<>\n\t\t\t\t\t\t<h2>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Loading this revision will discard all unsaved changes.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Do you want to replace your unsaved changes in the editor?'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</>\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenRevisions;\n"]}
@@ -9,7 +9,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
9
9
  * Internal dependencies
10
10
  */
11
11
 
12
- import { unlock } from '../../../private-apis';
12
+ import { unlock } from '../../../lock-unlock';
13
13
  const SITE_EDITOR_AUTHORS_QUERY = {
14
14
  per_page: -1,
15
15
  _fields: 'id,name,avatar_urls',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/use-global-styles-revisions.js"],"names":["useSelect","store","coreStore","useContext","useMemo","privateApis","blockEditorPrivateApis","unlock","SITE_EDITOR_AUTHORS_QUERY","per_page","_fields","context","capabilities","EMPTY_ARRAY","GlobalStylesContext","useGlobalStylesRevisions","user","userConfig","authors","currentUser","isDirty","revisions","select","__experimentalGetDirtyEntityRecords","getCurrentUser","getUsers","getCurrentThemeGlobalStylesRevisions","dirtyEntityRecords","_currentUser","_isDirty","length","globalStylesRevisions","_authors","_modifiedRevisions","hasUnsavedChanges","isLoading","map","revision","author","find","id","isLatest","Object","keys","unsavedRevision","styles","settings","name","avatar_urls","modified","Date","unshift"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,UAAT,EAAqBC,OAArB,QAAoC,oBAApC;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,uBAAvB;AAEA,MAAMC,yBAAyB,GAAG;AACjCC,EAAAA,QAAQ,EAAE,CAAC,CADsB;AAEjCC,EAAAA,OAAO,EAAE,qBAFwB;AAGjCC,EAAAA,OAAO,EAAE,MAHwB;AAIjCC,EAAAA,YAAY,EAAE,CAAE,oBAAF;AAJmB,CAAlC;AAMA,MAAMC,WAAW,GAAG,EAApB;AACA,MAAM;AAAEC,EAAAA;AAAF,IAA0BP,MAAM,CAAED,sBAAF,CAAtC;AACA,eAAe,SAASS,wBAAT,GAAoC;AAClD,QAAM;AAAEC,IAAAA,IAAI,EAAEC;AAAR,MAAuBd,UAAU,CAAEW,mBAAF,CAAvC;AACA,QAAM;AAAEI,IAAAA,OAAF;AAAWC,IAAAA,WAAX;AAAwBC,I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CAAF,CAAlB,CAAwBO,EAAxB,KAA+B,SAApC,EAAgD;AAC/CP,MAAAA,kBAAkB,CAAE,CAAF,CAAlB,CAAwBQ,QAAxB,GAAmC,IAAnC;AACA,KAvBoB,CAyBrB;;;AACA,QACCrB,OAAO,IACPH,UADA,IAEAyB,MAAM,CAACC,IAAP,CAAa1B,UAAb,EAA0Ba,MAA1B,GAAmC,CAFnC,IAGAX,WAJD,EAKE;AACD,YAAMyB,eAAe,GAAG;AACvBJ,QAAAA,EAAE,EAAE,SADmB;AAEvBK,QAAAA,MAAM,EAAE5B,UAAU,EAAE4B,MAFG;AAGvBC,QAAAA,QAAQ,EAAE7B,UAAU,EAAE6B,QAHC;AAIvBR,QAAAA,MAAM,EAAE;AACPS,UAAAA,IAAI,EAAE5B,WAAW,EAAE4B,IADZ;AAEPC,UAAAA,WAAW,EAAE7B,WAAW,EAAE6B;AAFnB,SAJe;AAQvBC,QAAAA,QAAQ,EAAE,IAAIC,IAAJ;AARa,OAAxB;;AAWAjB,MAAAA,kBAAkB,CAACkB,OAAnB,CAA4BP,eAA5B;AACA;;AAED,WAAO;AACNvB,MAAAA,SAAS,EAAEY,kBADL;AAENC,MAAAA,iBAAiB,EAAEd,OAFb;AAGNe,MAAAA,SAAS,EAAE;AAHL,KAAP;AAKA,GAnDa,EAmDX,CAAEf,OAAF,EAAWC,SAAX,EAAsBF,WAAtB,EAAmCD,OAAnC,EAA4CD,UAA5C,CAnDW,CAAd;AAoDA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../private-apis';\n\nconst SITE_EDITOR_AUTHORS_QUERY = {\n\tper_page: -1,\n\t_fields: 'id,name,avatar_urls',\n\tcontext: 'view',\n\tcapabilities: [ 'edit_theme_options' ],\n};\nconst EMPTY_ARRAY = [];\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\nexport default function useGlobalStylesRevisions() {\n\tconst { user: userConfig } = useContext( GlobalStylesContext );\n\tconst { authors, currentUser, isDirty, revisions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetCurrentUser,\n\t\t\t\tgetUsers,\n\t\t\t\tgetCurrentThemeGlobalStylesRevisions,\n\t\t\t} = select( coreStore );\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tconst _currentUser = getCurrentUser();\n\t\t\tconst _isDirty = dirtyEntityRecords.length > 0;\n\t\t\tconst globalStylesRevisions =\n\t\t\t\tgetCurrentThemeGlobalStylesRevisions() || EMPTY_ARRAY;\n\t\t\tconst _authors =\n\t\t\t\tgetUsers( SITE_EDITOR_AUTHORS_QUERY ) || EMPTY_ARRAY;\n\n\t\t\treturn {\n\t\t\t\tauthors: _authors,\n\t\t\t\tcurrentUser: _currentUser,\n\t\t\t\tisDirty: _isDirty,\n\t\t\t\trevisions: globalStylesRevisions,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\treturn useMemo( () => {\n\t\tlet _modifiedRevisions = [];\n\t\tif ( ! authors.length || ! revisions.length ) {\n\t\t\treturn {\n\t\t\t\trevisions: _modifiedRevisions,\n\t\t\t\thasUnsavedChanges: isDirty,\n\t\t\t\tisLoading: true,\n\t\t\t};\n\t\t}\n\n\t\t// Adds author details to each revision.\n\t\t_modifiedRevisions = revisions.map( ( revision ) => {\n\t\t\treturn {\n\t\t\t\t...revision,\n\t\t\t\tauthor: authors.find(\n\t\t\t\t\t( author ) => author.id === revision.author\n\t\t\t\t),\n\t\t\t};\n\t\t} );\n\n\t\t// Flags the most current saved revision.\n\t\tif ( _modifiedRevisions[ 0 ].id !== 'unsaved' ) {\n\t\t\t_modifiedRevisions[ 0 ].isLatest = true;\n\t\t}\n\n\t\t// Adds an item for unsaved changes.\n\t\tif (\n\t\t\tisDirty &&\n\t\t\tuserConfig &&\n\t\t\tObject.keys( userConfig ).length > 0 &&\n\t\t\tcurrentUser\n\t\t) {\n\t\t\tconst unsavedRevision = {\n\t\t\t\tid: 'unsaved',\n\t\t\t\tstyles: userConfig?.styles,\n\t\t\t\tsettings: userConfig?.settings,\n\t\t\t\tauthor: {\n\t\t\t\t\tname: currentUser?.name,\n\t\t\t\t\tavatar_urls: currentUser?.avatar_urls,\n\t\t\t\t},\n\t\t\t\tmodified: new Date(),\n\t\t\t};\n\n\t\t\t_modifiedRevisions.unshift( unsavedRevision );\n\t\t}\n\n\t\treturn {\n\t\t\trevisions: _modifiedRevisions,\n\t\t\thasUnsavedChanges: isDirty,\n\t\t\tisLoading: false,\n\t\t};\n\t}, [ isDirty, revisions, currentUser, authors, userConfig ] );\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/use-global-styles-revisions.js"],"names":["useSelect","store","coreStore","useContext","useMemo","privateApis","blockEditorPrivateApis","unlock","SITE_EDITOR_AUTHORS_QUERY","per_page","_fields","context","capabilities","EMPTY_ARRAY","GlobalStylesContext","useGlobalStylesRevisions","user","userConfig","authors","currentUser","isDirty","revisions","select","__experimentalGetDirtyEntityRecords","getCurrentUser","getUsers","getCurrentThemeGlobalStylesRevisions","dirtyEntityRecords","_currentUser","_isDirty","length","globalStylesRevisions","_authors","_modifiedRevisions","hasUnsavedChanges","isLoading","map","revision","author","find","id","isLatest","Object","keys","unsavedRevision","styles","settings","name","avatar_urls","modified","Date","unshift"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,UAAT,EAAqBC,OAArB,QAAoC,oBAApC;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,sBAAvB;AAEA,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SAAS,EAAE;AAHL,KAAP;AAKA,GAnDa,EAmDX,CAAEf,OAAF,EAAWC,SAAX,EAAsBF,WAAtB,EAAmCD,OAAnC,EAA4CD,UAA5C,CAnDW,CAAd;AAoDA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst SITE_EDITOR_AUTHORS_QUERY = {\n\tper_page: -1,\n\t_fields: 'id,name,avatar_urls',\n\tcontext: 'view',\n\tcapabilities: [ 'edit_theme_options' ],\n};\nconst EMPTY_ARRAY = [];\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\nexport default function useGlobalStylesRevisions() {\n\tconst { user: userConfig } = useContext( GlobalStylesContext );\n\tconst { authors, currentUser, isDirty, revisions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetCurrentUser,\n\t\t\t\tgetUsers,\n\t\t\t\tgetCurrentThemeGlobalStylesRevisions,\n\t\t\t} = select( coreStore );\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tconst _currentUser = getCurrentUser();\n\t\t\tconst _isDirty = dirtyEntityRecords.length > 0;\n\t\t\tconst globalStylesRevisions =\n\t\t\t\tgetCurrentThemeGlobalStylesRevisions() || EMPTY_ARRAY;\n\t\t\tconst _authors =\n\t\t\t\tgetUsers( SITE_EDITOR_AUTHORS_QUERY ) || EMPTY_ARRAY;\n\n\t\t\treturn {\n\t\t\t\tauthors: _authors,\n\t\t\t\tcurrentUser: _currentUser,\n\t\t\t\tisDirty: _isDirty,\n\t\t\t\trevisions: globalStylesRevisions,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\treturn useMemo( () => {\n\t\tlet _modifiedRevisions = [];\n\t\tif ( ! authors.length || ! revisions.length ) {\n\t\t\treturn {\n\t\t\t\trevisions: _modifiedRevisions,\n\t\t\t\thasUnsavedChanges: isDirty,\n\t\t\t\tisLoading: true,\n\t\t\t};\n\t\t}\n\n\t\t// Adds author details to each revision.\n\t\t_modifiedRevisions = revisions.map( ( revision ) => {\n\t\t\treturn {\n\t\t\t\t...revision,\n\t\t\t\tauthor: authors.find(\n\t\t\t\t\t( author ) => author.id === revision.author\n\t\t\t\t),\n\t\t\t};\n\t\t} );\n\n\t\t// Flags the most current saved revision.\n\t\tif ( _modifiedRevisions[ 0 ].id !== 'unsaved' ) {\n\t\t\t_modifiedRevisions[ 0 ].isLatest = true;\n\t\t}\n\n\t\t// Adds an item for unsaved changes.\n\t\tif (\n\t\t\tisDirty &&\n\t\t\tuserConfig &&\n\t\t\tObject.keys( userConfig ).length > 0 &&\n\t\t\tcurrentUser\n\t\t) {\n\t\t\tconst unsavedRevision = {\n\t\t\t\tid: 'unsaved',\n\t\t\t\tstyles: userConfig?.styles,\n\t\t\t\tsettings: userConfig?.settings,\n\t\t\t\tauthor: {\n\t\t\t\t\tname: currentUser?.name,\n\t\t\t\t\tavatar_urls: currentUser?.avatar_urls,\n\t\t\t\t},\n\t\t\t\tmodified: new Date(),\n\t\t\t};\n\n\t\t\t_modifiedRevisions.unshift( unsavedRevision );\n\t\t}\n\n\t\treturn {\n\t\t\trevisions: _modifiedRevisions,\n\t\t\thasUnsavedChanges: isDirty,\n\t\t\tisLoading: false,\n\t\t};\n\t}, [ isDirty, revisions, currentUser, authors, userConfig ] );\n}\n"]}
@@ -17,7 +17,7 @@ import { IconWithCurrentColor } from './icon-with-current-color';
17
17
  import { NavigationButtonAsItem } from './navigation-button';
18
18
  import RootMenu from './root-menu';
19
19
  import StylesPreview from './preview';
20
- import { unlock } from '../../private-apis';
20
+ import { unlock } from '../../lock-unlock';
21
21
 
22
22
  function ScreenRoot() {
23
23
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-root.js"],"names":["__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalSpacer","Spacer","__experimentalVStack","VStack","FlexItem","CardBody","Card","CardDivider","CardMedia","isRTL","__","chevronLeft","chevronRight","useSelect","store","coreStore","privateApis","blockEditorPrivateApis","IconWithCurrentColor","NavigationButtonAsItem","RootMenu","StylesPreview","unlock","ScreenRoot","useGlobalStyle","customCSS","hasVariations","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","__experimentalGetCurrentThemeGlobalStylesVariations","globalStylesId","globalStyles","undefined","length","_links"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,uBAAuB,IAAIC,SAD5B,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,oBAAoB,IAAIC,MAHzB,EAICC,oBAAoB,IAAIC,MAJzB,EAKCC,QALD,EAMCC,QAND,EAOCC,IAPD,EAQCC,WARD,EASCC,SATD,QAUO,uBAVP;AAWA,SAASC,KAAT,EAAgBC,EAAhB,QAA0B,iBAA1B;AACA,SAASC,WAAT,EAAsBC,YAAtB,QAA0C,kBAA1C;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,oBAAT,QAAqC,2BAArC;AACA,SAASC,sBAAT,QAAuC,qBAAvC;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,aAAP,MAA0B,WAA1B;AACA,SAASC,MAAT,QAAuB,oBAAvB;;AAEA,SAASC,UAAT,GAAsB;AACrB,QAAM;AAAEC,IAAAA;AAAF,MAAqBF,MAAM,CAAEL,sBAAF,CAAjC;AACA,QAAM,CAAEQ,SAAF,IAAgBD,cAAc,CAAE,KAAF,CAApC;AAEA,QAAM;AAAEE,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,MAAgCd,S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AAC,MARV;AASC,IAAA,YAAY,EAAG;AAThB,KAWGF,EAAE,CACH,iEADG,CAXL,CADD,EAgBC,cAAC,SAAD,QACC,cAAC,sBAAD;AACC,IAAA,IAAI,EAAC,SADN;AAEC,kBAAaA,EAAE,CAAE,eAAF;AAFhB,KAIC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACC,cAAC,QAAD,QAAYA,EAAE,CAAE,QAAF,CAAd,CADD,EAEC,cAAC,oBAAD;AACC,IAAA,IAAI,EAAGD,KAAK,KAAKE,WAAL,GAAmBC;AADhC,IAFD,CAJD,CADD,CAhBD,CAjCD,EAgEGe,UAAU,IAAI,CAAC,CAAEF,SAAjB,IACD,8BACC,cAAC,WAAD,OADD,EAEC,cAAC,QAAD,QACC,cAAC,MAAD;AACC,IAAA,EAAE,EAAC,GADJ;AAEC,IAAA,UAAU,EAAG,CAFd;AAGC,IAAA,QAAQ,EAAC,MAHV;AAIC,IAAA,YAAY,EAAG;AAJhB,KAMGf,EAAE,CACH,uEADG,CANL,CADD,EAWC,cAAC,SAAD,QACC,cAAC,sBAAD;AACC,IAAA,IAAI,EAAC,MADN;AAEC,kBAAaA,EAAE,CAAE,gBAAF;AAFhB,KAIC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACC,cAAC,QAAD,QACGA,EAAE,CAAE,gBAAF,CADL,CADD,EAIC,cAAC,oBAAD;AACC,IAAA,IAAI,EACHD,KAAK,KAAKE,WAAL,GAAmBC;AAF1B,IAJD,CAJD,CADD,CAXD,CAFD,CAjEF,CADD;AAqGA;;AAED,eAAeW,UAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport StylesPreview from './preview';\nimport { unlock } from '../../private-apis';\n\nfunction ScreenRoot() {\n\tconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card size=\"small\" className=\"edit-site-global-styles-screen-root\">\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardMedia>\n\t\t\t\t\t\t\t<StylesPreview />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/variations\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tpath=\"/blocks\"\n\t\t\t\t\t\taria-label={ __( 'Blocks styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/css\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</CardBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Card>\n\t);\n}\n\nexport default ScreenRoot;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-root.js"],"names":["__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalSpacer","Spacer","__experimentalVStack","VStack","FlexItem","CardBody","Card","CardDivider","CardMedia","isRTL","__","chevronLeft","chevronRight","useSelect","store","coreStore","privateApis","blockEditorPrivateApis","IconWithCurrentColor","NavigationButtonAsItem","RootMenu","StylesPreview","unlock","ScreenRoot","useGlobalStyle","customCSS","hasVariations","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","__experimentalGetCurrentThemeGlobalStylesVariations","globalStylesId","globalStyles","undefined","length","_links"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,uBAAuB,IAAIC,SAD5B,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,oBAAoB,IAAIC,MAHzB,EAICC,oBAAoB,IAAIC,MAJzB,EAKCC,QALD,EAMCC,QAND,EAOCC,IAPD,EAQCC,WARD,EASCC,SATD,QAUO,uBAVP;AAWA,SAASC,KAAT,EAAgBC,EAAhB,QAA0B,iBAA1B;AACA,SAASC,WAAT,EAAsBC,YAAtB,QAA0C,kBAA1C;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,oBAAT,QAAqC,2BAArC;AACA,SAASC,sBAAT,QAAuC,qBAAvC;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,aAAP,MAA0B,WAA1B;AACA,SAASC,MAAT,QAAuB,mBAAvB;;AAEA,SAASC,UAAT,GAAsB;AACrB,QAAM;AAAEC,IAAAA;AAAF,MAAqBF,MAAM,CAAEL,sBAAF,CAAjC;AACA,QAAM,CAAEQ,SAAF,IAAgBD,cAAc,CAAE,KAAF,CAApC;AAEA,QAAM;AAAEE,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,MAAgCd,SAAS,CAAIe,MAAF,IAAc;AAAA;;AAC9D,UAAM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F,EAAE,CACH,iEADG,CAXL,CADD,EAgBC,cAAC,SAAD,QACC,cAAC,sBAAD;AACC,IAAA,IAAI,EAAC,SADN;AAEC,kBAAaA,EAAE,CAAE,eAAF;AAFhB,KAIC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACC,cAAC,QAAD,QAAYA,EAAE,CAAE,QAAF,CAAd,CADD,EAEC,cAAC,oBAAD;AACC,IAAA,IAAI,EAAGD,KAAK,KAAKE,WAAL,GAAmBC;AADhC,IAFD,CAJD,CADD,CAhBD,CAjCD,EAgEGe,UAAU,IAAI,CAAC,CAAEF,SAAjB,IACD,8BACC,cAAC,WAAD,OADD,EAEC,cAAC,QAAD,QACC,cAAC,MAAD;AACC,IAAA,EAAE,EAAC,GADJ;AAEC,IAAA,UAAU,EAAG,CAFd;AAGC,IAAA,QAAQ,EAAC,MAHV;AAIC,IAAA,YAAY,EAAG;AAJhB,KAMGf,EAAE,CACH,uEADG,CANL,CADD,EAWC,cAAC,SAAD,QACC,cAAC,sBAAD;AACC,IAAA,IAAI,EAAC,MADN;AAEC,kBAAaA,EAAE,CAAE,gBAAF;AAFhB,KAIC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACC,cAAC,QAAD,QACGA,EAAE,CAAE,gBAAF,CADL,CADD,EAIC,cAAC,oBAAD;AACC,IAAA,IAAI,EACHD,KAAK,KAAKE,WAAL,GAAmBC;AAF1B,IAJD,CAJD,CADD,CAXD,CAFD,CAjEF,CADD;AAqGA;;AAED,eAAeW,UAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport StylesPreview from './preview';\nimport { unlock } from '../../lock-unlock';\n\nfunction ScreenRoot() {\n\tconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card size=\"small\" className=\"edit-site-global-styles-screen-root\">\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardMedia>\n\t\t\t\t\t\t\t<StylesPreview />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/variations\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tpath=\"/blocks\"\n\t\t\t\t\t\taria-label={ __( 'Blocks styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/css\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</CardBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Card>\n\t);\n}\n\nexport default ScreenRoot;\n"]}
@@ -14,7 +14,7 @@ import ScreenHeader from './header';
14
14
  import { NavigationButtonAsItem } from './navigation-button';
15
15
  import Subtitle from './subtitle';
16
16
  import BlockPreviewPanel from './block-preview-panel';
17
- import { unlock } from '../../private-apis';
17
+ import { unlock } from '../../lock-unlock';
18
18
  const {
19
19
  useGlobalStyle
20
20
  } = unlock(blockEditorPrivateApis);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["__","sprintf","__experimentalItemGroup","ItemGroup","__experimentalVStack","VStack","__experimentalHStack","HStack","FlexItem","privateApis","blockEditorPrivateApis","ScreenHeader","NavigationButtonAsItem","Subtitle","BlockPreviewPanel","unlock","useGlobalStyle","Item","parentMenu","element","label","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","gradientValue","color","navigationButtonLabel","background","ScreenTypography"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SACCC,uBAAuB,IAAIC,SAD5B,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,oBAAoB,IAAIC,MAHzB,EAICC,QAJD,QAKO,uBALP;AAMA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,SAASC,sBAAT,QAAuC,qBAAvC;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,SAASC,MAAT,QAAuB,oBAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAqBD,MAAM,CAAEL,sBAAF,CAAjC;;AAEA,SAASO,IAAT,CAAe;AAAEC,EAAAA,UAAF;AAAcC,EAAAA,OAAd;AAAuBC,EAAAA;AAAvB,CAAf,EAAgD;AAC/C,QAAMC,MAAM,GACXF,OAAO,KAAK,MAAZ,IAAsB,CAAEA,OAAxB,GAAkC,EAAlC,GAAwC,YAAYA,OAAS,GAD9D;AAEA,QAAMG,WAAW,GAChBH,OAAO,KAAK,MAAZ,GACG;AACAI,IAAAA,cAAc,EA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roup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../private-apis';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction Item( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing'\n\t);\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\tletterSpacing,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction ScreenTypography() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage the typography settings for different elements.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<BlockPreviewPanel />\n\n\t\t\t<div className=\"edit-site-global-styles-screen-typography\">\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"text\"\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"link\"\n\t\t\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"heading\"\n\t\t\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"caption\"\n\t\t\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"button\"\n\t\t\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["__","sprintf","__experimentalItemGroup","ItemGroup","__experimentalVStack","VStack","__experimentalHStack","HStack","FlexItem","privateApis","blockEditorPrivateApis","ScreenHeader","NavigationButtonAsItem","Subtitle","BlockPreviewPanel","unlock","useGlobalStyle","Item","parentMenu","element","label","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","gradientValue","color","navigationButtonLabel","background","ScreenTypography"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SACCC,uBAAuB,IAAIC,SAD5B,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,oBAAoB,IAAIC,MAHzB,EAICC,QAJD,QAKO,uBALP;AAMA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,SAASC,sBAAT,QAAuC,qBAAvC;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAqBD,MAAM,CAAEL,sBAAF,CAAjC;;AAEA,SAASO,IAAT,CAAe;AAAEC,EAAAA,UAAF;AAAcC,EAAAA,OAAd;AAAuBC,EAAAA;AAAvB,CAAf,EAAgD;AAC/C,QAAMC,MAAM,GACXF,OAAO,KAAK,MAAZ,IAAsB,CAAEA,OAAxB,GAAkC,EAAlC,GAAwC,YAAYA,OAAS,GAD9D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Content":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction Item( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing'\n\t);\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\tletterSpacing,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction ScreenTypography() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage the typography settings for different elements.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<BlockPreviewPanel />\n\n\t\t\t<div className=\"edit-site-global-styles-screen-typography\">\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"text\"\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"link\"\n\t\t\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"heading\"\n\t\t\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"caption\"\n\t\t\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"button\"\n\t\t\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"]}
@@ -13,7 +13,7 @@ import { useSelect } from '@wordpress/data';
13
13
  import { useMemo, useContext, useState } from '@wordpress/element';
14
14
  import { ENTER } from '@wordpress/keycodes';
15
15
  import { __experimentalGrid as Grid } from '@wordpress/components';
16
- import { __ } from '@wordpress/i18n';
16
+ import { __, sprintf } from '@wordpress/i18n';
17
17
  import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
18
18
  /**
19
19
  * Internal dependencies
@@ -21,7 +21,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
21
21
 
22
22
  import { mergeBaseAndUserConfigs } from './global-styles-provider';
23
23
  import StylesPreview from './preview';
24
- import { unlock } from '../../private-apis';
24
+ import { unlock } from '../../lock-unlock';
25
25
  const {
26
26
  GlobalStylesContext,
27
27
  areGlobalStyleConfigsEqual
@@ -69,6 +69,14 @@ function Variation({
69
69
  const isActive = useMemo(() => {
70
70
  return areGlobalStyleConfigsEqual(user, variation);
71
71
  }, [user, variation]);
72
+ let label = variation?.title;
73
+
74
+ if (variation?.description) {
75
+ label = sprintf(
76
+ /* translators: %1$s: variation title. %2$s variation description. */
77
+ __('%1$s (%2$s)'), variation?.title, variation?.description);
78
+ }
79
+
72
80
  return createElement(GlobalStylesContext.Provider, {
73
81
  value: context
74
82
  }, createElement("div", {
@@ -79,7 +87,7 @@ function Variation({
79
87
  onClick: selectVariation,
80
88
  onKeyDown: selectOnEnter,
81
89
  tabIndex: "0",
82
- "aria-label": variation?.title,
90
+ "aria-label": label,
83
91
  "aria-current": isActive,
84
92
  onFocus: () => setIsFocused(true),
85
93
  onBlur: () => setIsFocused(false)
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"names":["classnames","store","coreStore","useSelect","useMemo","useContext","useState","ENTER","__experimentalGrid","Grid","__","privateApis","blockEditorPrivateApis","mergeBaseAndUserConfigs","StylesPreview","unlock","GlobalStylesContext","areGlobalStyleConfigsEqual","Variation","variation","isFocused","setIsFocused","base","user","setUserConfig","context","settings","styles","merged","selectVariation","selectOnEnter","event","keyCode","preventDefault","isActive","title","StyleVariationsContainer","variations","select","__experimentalGetCurrentThemeGlobalStylesVariations","withEmptyVariation","map","index"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,OAAT,EAAkBC,UAAlB,EAA8BC,QAA9B,QAA8C,oBAA9C;AACA,SAASC,KAAT,QAAsB,qBAAtB;AACA,SAASC,kBAAkB,IAAIC,IAA/B,QAA2C,uBAA3C;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,uBAAT,QAAwC,0BAAxC;AACA,OAAOC,aAAP,MAA0B,WAA1B;AACA,SAASC,MAAT,QAAuB,oBAAvB;AAEA,MAAM;AAAEC,EAAAA,mBAAF;AAAuBC,EAAAA;AAAvB,IAAsDF,MAAM,CACjEH,sBADiE,CAAlE;;AAIA,SAASM,SAAT,CAAoB;AAAEC,EAAAA;AAAF,CAApB,EAAoC;AACnC,QAAM,CAAEC,SAAF,EAAaC,YAAb,IAA8Bf,QAAQ,CAAE,KAAF,CAA5C;AACA,QAAM;AAAEgB,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA;AAAd,MAAgC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EAAauB,KAAb,KACzB,cAAC,SAAD;AAAW,IAAA,GAAG,EAAGA,KAAjB;AAAyB,IAAA,SAAS,EAAGvB;AAArC,IADC,CAJH,CADD;AAUA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport StylesPreview from './preview';\nimport { unlock } from '../../private-apis';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction Variation( { variation } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo( () => {\n\t\treturn {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t};\n\t}, [ variation, base ] );\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => {\n\t\t\treturn {\n\t\t\t\tsettings: variation.settings,\n\t\t\t\tstyles: variation.styles,\n\t\t\t};\n\t\t} );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo( () => {\n\t\treturn areGlobalStyleConfigsEqual( user, variation );\n\t}, [ user, variation ] );\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ variation?.title }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t<StylesPreview\n\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\twithHoverView\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n\nexport default function StyleVariationsContainer() {\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\tconst withEmptyVariation = useMemo( () => {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( variations ?? [] ).map( ( variation ) => ( {\n\t\t\t\t...variation,\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t} ) ),\n\t\t];\n\t}, [ variations ] );\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t>\n\t\t\t{ withEmptyVariation.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation } />\n\t\t\t) ) }\n\t\t</Grid>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"names":["classnames","store","coreStore","useSelect","useMemo","useContext","useState","ENTER","__experimentalGrid","Grid","__","sprintf","privateApis","blockEditorPrivateApis","mergeBaseAndUserConfigs","StylesPreview","unlock","GlobalStylesContext","areGlobalStyleConfigsEqual","Variation","variation","isFocused","setIsFocused","base","user","setUserConfig","context","settings","styles","merged","selectVariation","selectOnEnter","event","keyCode","preventDefault","isActive","label","title","description","StyleVariationsContainer","variations","select","__experimentalGetCurrentThemeGlobalStylesVariations","withEmptyVariation","map","index"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,OAAT,EAAkBC,UAAlB,EAA8BC,QAA9B,QAA8C,oBAA9C;AACA,SAASC,KAAT,QAAsB,qBAAtB;AACA,SAASC,kBAAkB,IAAIC,IAA/B,QAA2C,uBAA3C;AACA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,uBAAT,QAAwC,0BAAxC;AACA,OAAOC,aAAP,MAA0B,WAA1B;AACA,SAASC,MAAT,QAAuB,mBAAvB;AAEA,MAAM;AAAEC,EAAAA,mBAAF;AAAuBC,EAAAA;AAAvB,IAAsDF,MAAM,CACjEH,sBADiE,CAAlE;;AAIA,SAASM,SAAT,CAAoB;AAAEC,EAAAA;AAAF,CAApB,EAAoC;AACnC,QAAM,CAAEC,SAAF,EAAaC,YAAb,IAA8BhB,QAAQ,CAAE,KAAF,CAA5C;AACA,QAAM;AAAEiB,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA;AAAd,MAAgCpB,UAAU,CAAEY,mBAAF,CAAhD;AACA,QAAMS,OAAO,GAAGtB,OAAO,CAAE,MA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AEY,UAAF,CAb+B,CAAlC;AAeA,SACC,cAAC,IAAD;AACC,IAAA,OAAO,EAAG,CADX;AAEC,IAAA,SAAS,EAAC;AAFX,KAIGG,kBAAkB,CAACC,GAAnB,CAAwB,CAAExB,SAAF,EAAayB,KAAb,KACzB,cAAC,SAAD;AAAW,IAAA,GAAG,EAAGA,KAAjB;AAAyB,IAAA,SAAS,EAAGzB;AAArC,IADC,CAJH,CADD;AAUA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport StylesPreview from './preview';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction Variation( { variation } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo( () => {\n\t\treturn {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t};\n\t}, [ variation, base ] );\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => {\n\t\t\treturn {\n\t\t\t\tsettings: variation.settings,\n\t\t\t\tstyles: variation.styles,\n\t\t\t};\n\t\t} );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo( () => {\n\t\treturn areGlobalStyleConfigsEqual( user, variation );\n\t}, [ user, variation ] );\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ label }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t<StylesPreview\n\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\twithHoverView\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n\nexport default function StyleVariationsContainer() {\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\tconst withEmptyVariation = useMemo( () => {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( variations ?? [] ).map( ( variation ) => ( {\n\t\t\t\t...variation,\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t} ) ),\n\t\t];\n\t}, [ variations ] );\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t>\n\t\t\t{ withEmptyVariation.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation } />\n\t\t\t) ) }\n\t\t</Grid>\n\t);\n}\n"]}
@@ -8,7 +8,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
8
8
  * Internal dependencies
9
9
  */
10
10
 
11
- import { unlock } from '../../private-apis';
11
+ import { unlock } from '../../lock-unlock';
12
12
  const {
13
13
  useGlobalStyle,
14
14
  useGlobalSetting,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"names":["privateApis","blockEditorPrivateApis","unlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,oBAAvB;AAEA,MAAM;AACLC,EAAAA,cADK;AAELC,EAAAA,gBAFK;AAGLC,EAAAA,0BAHK;AAILC,EAAAA,eAAe,EAAEC;AAJZ,IAKFL,MAAM,CAAED,sBAAF,CALV;AAOA,eAAe,SAASK,eAAT,CAA0B;AAAEE,EAAAA,OAAF;AAAWC,EAAAA;AAAX,CAA1B,EAAsD;AACpE,MAAIC,WAAW,GAAG,EAAlB;;AACA,MAAKF,OAAO,KAAK,SAAjB,EAA6B;AAC5BE,IAAAA,WAAW,GAAGA,WAAW,CAACC,MAAZ,CAAoB,CAAE,UAAF,EAAcF,YAAd,CAApB,CAAd;AACA,GAFD,MAEO,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAA5B,EAAqC;AAC3CE,IAAAA,WAAW,GAAGA,WAAW,CAACC,MAAZ,CAAoB,CAAE,UAAF,EAAcH,OAAd,CAApB,CAAd;AACA;;AACD,QAAMI,MAAM,GAAGF,WAAW,CAACG,IAAZ,CAAkB,GAAlB,CAAf;AAEA,QAAM,CAAEC,KAAF,IAAYX,cAAc,CAAES,MAAF,EAAUG,SAAV,EAAqB,MAArB,EAA6B;AAC5DC,IAAAA,kBAAkB,EAAE;AADwC,GAA7B,CAAhC;AAGA,QAAM,CAAEC,cAAF,EAAkBC,QAAlB,IAA+Bf,cAAc,CAClDS,MADkD,EAElDG,SAFkD,EAGlD,KAHkD,EAIlD;AACCC,IAAAA,kBAAkB,EAAE;AADrB,GAJkD,CAAnD;AAQA,QAAM,CAAEG,WAAF,IAAkBf,gBAAgB,CAAE,EAAF,CAAxC;AACA,QAAMgB,WAAW,GAAGZ,OAAO,KAAK,SAAZ,GAAwBC,YAAxB,GAAuCD,OAA3D;AACA,QAAMa,QAAQ,GAAGhB,0BAA0B,CAC1Cc,WAD0C,EAE1CJ,SAF0C,EAG1CK,WAH0C,CAA3C;AAMA,SACC,cAAC,qBAAD;AACC,IAAA,cAAc,EAAGH,cADlB;AAEC,IAAA,KAAK,EAAGH,KAFT;AAGC,IAAA,QAAQ,EAAGI,QAHZ;AAIC,IAAA,QAAQ,EAAGG;AAJZ,IADD;AAQA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../private-apis';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tTypographyPanel: StylesTypographyPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPanel( { element, headingLevel } ) {\n\tlet prefixParts = [];\n\tif ( element === 'heading' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', headingLevel ] );\n\t} else if ( element && element !== 'text' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', element ] );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle(\n\t\tprefix,\n\t\tundefined,\n\t\t'all',\n\t\t{\n\t\t\tshouldDecodeEncode: false,\n\t\t}\n\t);\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst usedElement = element === 'heading' ? headingLevel : element;\n\tconst settings = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tundefined,\n\t\tusedElement\n\t);\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"names":["privateApis","blockEditorPrivateApis","unlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,mBAAvB;AAEA,MAAM;AACLC,EAAAA,cADK;AAELC,EAAAA,gBAFK;AAGLC,EAAAA,0BAHK;AAILC,EAAAA,eAAe,EAAEC;AAJZ,IAKFL,MAAM,CAAED,sBAAF,CALV;AAOA,eAAe,SAASK,eAAT,CAA0B;AAAEE,EAAAA,OAAF;AAAWC,EAAAA;AAAX,CAA1B,EAAsD;AACpE,MAAIC,WAAW,GAAG,EAAlB;;AACA,MAAKF,OAAO,KAAK,SAAjB,EAA6B;AAC5BE,IAAAA,WAAW,GAAGA,WAAW,CAACC,MAAZ,CAAoB,CAAE,UAAF,EAAcF,YAAd,CAApB,CAAd;AACA,GAFD,MAEO,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAA5B,EAAqC;AAC3CE,IAAAA,WAAW,GAAGA,WAAW,CAACC,MAAZ,CAAoB,CAAE,UAAF,EAAcH,OAAd,CAApB,CAAd;AACA;;AACD,QAAMI,MAAM,GAAGF,WAAW,CAACG,IAAZ,CAAkB,GAAlB,CAAf;AAEA,QAAM,CAAEC,KAAF,IAAYX,cAAc,CAAES,MAAF,EAAUG,SAAV,EAAqB,MAArB,EAA6B;AAC5DC,IAAAA,kBAAkB,EAAE;AADwC,GAA7B,CAAhC;AAGA,QAAM,CAAEC,cAAF,EAAkBC,QAAlB,IAA+Bf,cAAc,CAClDS,MADkD,EAElDG,SAFkD,EAGlD,KAHkD,EAIlD;AACCC,IAAAA,kBAAkB,EAAE;AADrB,GAJkD,CAAnD;AAQA,QAAM,CAAEG,WAAF,IAAkBf,gBAAgB,CAAE,EAAF,CAAxC;AACA,QAAMgB,WAAW,GAAGZ,OAAO,KAAK,SAAZ,GAAwBC,YAAxB,GAAuCD,OAA3D;AACA,QAAMa,QAAQ,GAAGhB,0BAA0B,CAC1Cc,WAD0C,EAE1CJ,SAF0C,EAG1CK,WAH0C,CAA3C;AAMA,SACC,cAAC,qBAAD;AACC,IAAA,cAAc,EAAGH,cADlB;AAEC,IAAA,KAAK,EAAGH,KAFT;AAGC,IAAA,QAAQ,EAAGI,QAHZ;AAIC,IAAA,QAAQ,EAAGG;AAJZ,IADD;AAQA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tTypographyPanel: StylesTypographyPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPanel( { element, headingLevel } ) {\n\tlet prefixParts = [];\n\tif ( element === 'heading' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', headingLevel ] );\n\t} else if ( element && element !== 'text' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', element ] );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle(\n\t\tprefix,\n\t\tundefined,\n\t\t'all',\n\t\t{\n\t\t\tshouldDecodeEncode: false,\n\t\t}\n\t);\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst usedElement = element === 'heading' ? headingLevel : element;\n\tconst settings = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tundefined,\n\t\tusedElement\n\t);\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t/>\n\t);\n}\n"]}
@@ -8,7 +8,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
8
8
  * Internal dependencies
9
9
  */
10
10
 
11
- import { unlock } from '../../private-apis';
11
+ import { unlock } from '../../lock-unlock';
12
12
  const {
13
13
  useGlobalStyle
14
14
  } = unlock(blockEditorPrivateApis);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-preview.js"],"names":["privateApis","blockEditorPrivateApis","unlock","useGlobalStyle","TypographyPreview","name","element","headingLevel","prefix","fontFamily","gradientValue","backgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","background"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,oBAAvB;A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C,IAAA,SAAS,EAAC,8BADX;AAEC,IAAA,KAAK,EAAG;AACPT,MAAAA,UAAU,EAAEA,UAAF,aAAEA,UAAF,cAAEA,UAAF,GAAgB,OADnB;AAEPU,MAAAA,UAAU,EAAET,aAAF,aAAEA,aAAF,cAAEA,aAAF,GAAmBC,eAFtB;AAGPC,MAAAA,KAHO;AAIPC,MAAAA,QAJO;AAKPC,MAAAA,SALO;AAMPC,MAAAA,UANO;AAOPC,MAAAA,aAPO;AAQP,SAAGC;AARI;AAFT,UADD;AAiBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../private-apis';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPreview( { name, element, headingLevel } ) {\n\tlet prefix = '';\n\tif ( element === 'heading' ) {\n\t\tprefix = `elements.${ headingLevel }.`;\n\t} else if ( element && element !== 'text' ) {\n\t\tprefix = `elements.${ element }.`;\n\t}\n\n\tconst [ fontFamily ] = useGlobalStyle(\n\t\tprefix + 'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient', name );\n\tconst [ backgroundColor ] = useGlobalStyle(\n\t\tprefix + 'color.background',\n\t\tname\n\t);\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text', name );\n\tconst [ fontSize ] = useGlobalStyle( prefix + 'typography.fontSize', name );\n\tconst [ fontStyle ] = useGlobalStyle(\n\t\tprefix + 'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight ] = useGlobalStyle(\n\t\tprefix + 'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing',\n\t\tname\n\t);\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"edit-site-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\tcolor,\n\t\t\t\tfontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tletterSpacing,\n\t\t\t\t...extraStyles,\n\t\t\t} }\n\t\t>\n\t\t\tAa\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-preview.js"],"names":["privateApis","blockEditorPrivateApis","unlock","useGlobalStyle","TypographyPreview","name","element","headingLevel","prefix","fontFamily","gradientValue","backgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","background"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,mBAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAqBD,MAAM,CAAED,sBAAF,CAAjC;AAEA,eAAe,SAASG,iBAAT,CAA4B;AAAEC,EAAAA,IAAF;AAAQC,EAAAA,OAAR;AAAiBC,EAAAA;AAAjB,CAA5B,EAA8D;AAC5E,MAAIC,MAAM,GAAG,EAAb;;AACA,MAAKF,OAAO,KAAK,SAAjB,EAA6B;AAC5BE,IAAAA,MAAM,GAAI,YAAYD,YAAc,GAApC;AACA,GAFD,MAEO,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAA5B,EAAqC;AAC3CE,IAAAA,MAAM,GAAI,YAAYF,OAAS,GAA/B;AACA;;AAED,QAAM,CAAEG,UAAF,IAAiBN,cAAc,CACpCK,MAAM,GAAG,uBAD2B,EAEpCH,IAFoC,CAArC;AAIA,QAAM,CAAEK,aAAF,IAAoBP,cAAc,CAAEK,MAAM,GAAG,gBAAX,EAA6BH,IAA7B,CAAxC;AACA,QAAM,CAAEM,eAAF,IAAsBR,cAAc,CACzCK,MAAM,GAAG,kBADgC,EAEzCH,IAFyC,CAA1C;AAIA,QAAM,CAAEO,KAAF,IAAYT,cAAc,CAAEK,MAAM,GAAG,YAAX,EAAyBH,IAAzB,CAAhC;AACA,QAAM,CAAEQ,QAAF,IAAeV,cAAc,CAAEK,MAAM,GAAG,qBAAX,EAAkCH,IAAlC,CAAnC;AACA,QAAM,CAAES,SAAF,IAAgBX,cAAc,CACnCK,MAAM,GAAG,sBAD0B,EAEnCH,IAFmC,CAApC;AAIA,QAAM,CAAEU,UAAF,IAAiBZ,cAAc,CACpCK,MAAM,GAAG,uBAD2B,EAEpCH,IAFoC,CAArC;AAIA,QAAM,CAAEW,aAAF,IAAoBb,cAAc,CACvCK,MAAM,GAAG,0BAD8B,EAEvCH,IAFuC,CAAxC;AAIA,QAAMY,WAAW,GAChBX,OAAO,KAAK,MAAZ,GACG;AACAY,IAAAA,cAAc,EAAE;AADhB,GADH,GAIG,EALJ;AAOA,SACC;AACC,IAAA,SAAS,EAAC,8BADX;AAEC,IAAA,KAAK,EAAG;AACPT,MAAAA,UAAU,EAAEA,UAAF,aAAEA,UAAF,cAAEA,UAAF,GAAgB,OADnB;AAEPU,MAAAA,UAAU,EAAET,aAAF,aAAEA,aAAF,cAAEA,aAAF,GAAmBC,eAFtB;AAGPC,MAAAA,KAHO;AAIPC,MAAAA,QAJO;AAKPC,MAAAA,SALO;AAMPC,MAAAA,UANO;AAOPC,MAAAA,aAPO;AAQP,SAAGC;AARI;AAFT,UADD;AAiBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPreview( { name, element, headingLevel } ) {\n\tlet prefix = '';\n\tif ( element === 'heading' ) {\n\t\tprefix = `elements.${ headingLevel }.`;\n\t} else if ( element && element !== 'text' ) {\n\t\tprefix = `elements.${ element }.`;\n\t}\n\n\tconst [ fontFamily ] = useGlobalStyle(\n\t\tprefix + 'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient', name );\n\tconst [ backgroundColor ] = useGlobalStyle(\n\t\tprefix + 'color.background',\n\t\tname\n\t);\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text', name );\n\tconst [ fontSize ] = useGlobalStyle( prefix + 'typography.fontSize', name );\n\tconst [ fontStyle ] = useGlobalStyle(\n\t\tprefix + 'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight ] = useGlobalStyle(\n\t\tprefix + 'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing',\n\t\tname\n\t);\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"edit-site-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\tcolor,\n\t\t\t\tfontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tletterSpacing,\n\t\t\t\t...extraStyles,\n\t\t\t} }\n\t\t>\n\t\t\tAa\n\t\t</div>\n\t);\n}\n"]}