@wordpress/edit-site 5.15.0 → 5.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1027) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-page/index.js +3 -13
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +12 -24
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +9 -28
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +3 -10
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/new-template.js +19 -49
  13. package/build/components/add-new-template/new-template.js.map +1 -1
  14. package/build/components/add-new-template/template-actions-loading-screen.js +1 -3
  15. package/build/components/add-new-template/template-actions-loading-screen.js.map +1 -1
  16. package/build/components/add-new-template/utils.js +52 -102
  17. package/build/components/add-new-template/utils.js.map +1 -1
  18. package/build/components/app/index.js +2 -19
  19. package/build/components/app/index.js.map +1 -1
  20. package/build/components/block-editor/back-button.js +1 -11
  21. package/build/components/block-editor/back-button.js.map +1 -1
  22. package/build/components/block-editor/block-inspector-button.js +3 -14
  23. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  24. package/build/components/block-editor/constants.js.map +1 -1
  25. package/build/components/block-editor/editor-canvas.js +5 -14
  26. package/build/components/block-editor/editor-canvas.js.map +1 -1
  27. package/build/components/block-editor/get-block-editor-provider.js +0 -7
  28. package/build/components/block-editor/get-block-editor-provider.js.map +1 -1
  29. package/build/components/block-editor/index.js +10 -15
  30. package/build/components/block-editor/index.js.map +1 -1
  31. package/build/components/block-editor/inserter-media-categories.js +30 -45
  32. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  33. package/build/components/block-editor/providers/default-block-editor-provider.js +1 -10
  34. package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
  35. package/build/components/block-editor/providers/navigation-block-editor-provider.js +10 -19
  36. package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
  37. package/build/components/block-editor/resizable-editor.js +3 -8
  38. package/build/components/block-editor/resizable-editor.js.map +1 -1
  39. package/build/components/block-editor/resize-handle.js +1 -7
  40. package/build/components/block-editor/resize-handle.js.map +1 -1
  41. package/build/components/block-editor/site-editor-canvas.js +6 -22
  42. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  43. package/build/components/block-editor/use-site-editor-settings.js +35 -26
  44. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  45. package/build/components/canvas-spinner/index.js +31 -5
  46. package/build/components/canvas-spinner/index.js.map +1 -1
  47. package/build/components/code-editor/index.js +3 -18
  48. package/build/components/code-editor/index.js.map +1 -1
  49. package/build/components/create-template-part-modal/index.js +4 -19
  50. package/build/components/create-template-part-modal/index.js.map +1 -1
  51. package/build/components/editor/index.js +33 -49
  52. package/build/components/editor/index.js.map +1 -1
  53. package/build/components/editor-canvas-container/index.js +2 -28
  54. package/build/components/editor-canvas-container/index.js.map +1 -1
  55. package/build/components/error-boundary/index.js +1 -12
  56. package/build/components/error-boundary/index.js.map +1 -1
  57. package/build/components/error-boundary/warning.js +1 -7
  58. package/build/components/error-boundary/warning.js.map +1 -1
  59. package/build/components/global-styles/block-preview-panel.js +22 -13
  60. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  61. package/build/components/global-styles/color-indicator-wrapper.js +1 -6
  62. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  63. package/build/components/global-styles/color-palette-panel.js +1 -8
  64. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  65. package/build/components/global-styles/dimensions-panel.js +14 -16
  66. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  67. package/build/components/global-styles/global-styles-provider.js +13 -29
  68. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  69. package/build/components/global-styles/gradients-palette-panel.js +1 -11
  70. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  71. package/build/components/global-styles/header.js +3 -7
  72. package/build/components/global-styles/header.js.map +1 -1
  73. package/build/components/global-styles/hooks.js +26 -15
  74. package/build/components/global-styles/hooks.js.map +1 -1
  75. package/build/components/global-styles/icon-with-current-color.js +1 -5
  76. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  77. package/build/components/global-styles/index.js +0 -2
  78. package/build/components/global-styles/index.js.map +1 -1
  79. package/build/components/global-styles/navigation-button.js +3 -7
  80. package/build/components/global-styles/navigation-button.js.map +1 -1
  81. package/build/components/global-styles/palette.js +3 -15
  82. package/build/components/global-styles/palette.js.map +1 -1
  83. package/build/components/global-styles/preview.js +7 -18
  84. package/build/components/global-styles/preview.js.map +1 -1
  85. package/build/components/global-styles/root-menu.js +1 -10
  86. package/build/components/global-styles/root-menu.js.map +1 -1
  87. package/build/components/global-styles/screen-block-list.js +10 -32
  88. package/build/components/global-styles/screen-block-list.js.map +1 -1
  89. package/build/components/global-styles/screen-block.js +44 -49
  90. package/build/components/global-styles/screen-block.js.map +1 -1
  91. package/build/components/global-styles/screen-color-palette.js +1 -9
  92. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  93. package/build/components/global-styles/screen-colors.js +2 -14
  94. package/build/components/global-styles/screen-colors.js.map +1 -1
  95. package/build/components/global-styles/screen-css.js +1 -10
  96. package/build/components/global-styles/screen-css.js.map +1 -1
  97. package/build/components/global-styles/screen-layout.js +2 -13
  98. package/build/components/global-styles/screen-layout.js.map +1 -1
  99. package/build/components/global-styles/screen-revisions/index.js +17 -28
  100. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  101. package/build/components/global-styles/screen-revisions/revisions-buttons.js +23 -39
  102. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  103. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +40 -43
  104. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  105. package/build/components/global-styles/screen-root.js +2 -20
  106. package/build/components/global-styles/screen-root.js.map +1 -1
  107. package/build/components/global-styles/screen-style-variations.js +6 -15
  108. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  109. package/build/components/global-styles/screen-typography-element.js +2 -12
  110. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  111. package/build/components/global-styles/screen-typography.js +4 -17
  112. package/build/components/global-styles/screen-typography.js.map +1 -1
  113. package/build/components/global-styles/style-variations-container.js +9 -28
  114. package/build/components/global-styles/style-variations-container.js.map +1 -1
  115. package/build/components/global-styles/subtitle.js +1 -4
  116. package/build/components/global-styles/subtitle.js.map +1 -1
  117. package/build/components/global-styles/typography-panel.js +1 -7
  118. package/build/components/global-styles/typography-panel.js.map +1 -1
  119. package/build/components/global-styles/typography-preview.js +1 -7
  120. package/build/components/global-styles/typography-preview.js.map +1 -1
  121. package/build/components/global-styles/ui.js +14 -62
  122. package/build/components/global-styles/ui.js.map +1 -1
  123. package/build/components/global-styles/utils.js +0 -2
  124. package/build/components/global-styles/utils.js.map +1 -1
  125. package/build/components/global-styles/variations-panel.js +1 -9
  126. package/build/components/global-styles/variations-panel.js.map +1 -1
  127. package/build/components/global-styles-renderer/index.js +3 -11
  128. package/build/components/global-styles-renderer/index.js.map +1 -1
  129. package/build/components/header-edit-mode/document-actions/index.js +14 -53
  130. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  131. package/build/components/header-edit-mode/index.js +8 -36
  132. package/build/components/header-edit-mode/index.js.map +1 -1
  133. package/build/components/header-edit-mode/mode-switcher/index.js +2 -11
  134. package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
  135. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -14
  136. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  137. package/build/components/header-edit-mode/more-menu/index.js +2 -24
  138. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  139. package/build/components/header-edit-mode/more-menu/site-export.js +1 -14
  140. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  141. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +1 -6
  142. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  143. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -8
  144. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  145. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -4
  146. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  147. package/build/components/header-edit-mode/tools-more-menu-group/index.js +1 -5
  148. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  149. package/build/components/header-edit-mode/undo-redo/redo.js +5 -12
  150. package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  151. package/build/components/header-edit-mode/undo-redo/undo.js +5 -12
  152. package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  153. package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
  154. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  155. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -8
  156. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  157. package/build/components/keyboard-shortcut-help-modal/index.js +4 -24
  158. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  159. package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -5
  160. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  161. package/build/components/keyboard-shortcuts/edit-mode.js +10 -29
  162. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  163. package/build/components/keyboard-shortcuts/global.js +1 -9
  164. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  165. package/build/components/keyboard-shortcuts/register.js +1 -7
  166. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  167. package/build/components/layout/hooks.js +2 -9
  168. package/build/components/layout/hooks.js.map +1 -1
  169. package/build/components/layout/index.js +23 -49
  170. package/build/components/layout/index.js.map +1 -1
  171. package/build/components/list/added-by.js +10 -23
  172. package/build/components/list/added-by.js.map +1 -1
  173. package/build/components/list/header.js +1 -10
  174. package/build/components/list/header.js.map +1 -1
  175. package/build/components/list/index.js +8 -20
  176. package/build/components/list/index.js.map +1 -1
  177. package/build/components/list/table.js +5 -16
  178. package/build/components/list/table.js.map +1 -1
  179. package/build/components/list/use-register-shortcuts.js +1 -5
  180. package/build/components/list/use-register-shortcuts.js.map +1 -1
  181. package/build/components/page/header.js +1 -3
  182. package/build/components/page/header.js.map +1 -1
  183. package/build/components/page/index.js +4 -10
  184. package/build/components/page/index.js.map +1 -1
  185. package/build/components/page-actions/index.js +1 -7
  186. package/build/components/page-actions/index.js.map +1 -1
  187. package/build/components/page-actions/trash-page-menu-item.js +4 -13
  188. package/build/components/page-actions/trash-page-menu-item.js.map +1 -1
  189. package/build/components/page-content-focus-manager/back-to-page-notification.js +1 -9
  190. package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
  191. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +8 -18
  192. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  193. package/build/components/page-content-focus-manager/edit-template-notification.js +0 -16
  194. package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
  195. package/build/components/page-content-focus-manager/index.js +1 -8
  196. package/build/components/page-content-focus-manager/index.js.map +1 -1
  197. package/build/components/page-main/index.js +1 -11
  198. package/build/components/page-main/index.js.map +1 -1
  199. package/build/components/page-patterns/duplicate-menu-item.js +22 -49
  200. package/build/components/page-patterns/duplicate-menu-item.js.map +1 -1
  201. package/build/components/page-patterns/grid-item.js +12 -32
  202. package/build/components/page-patterns/grid-item.js.map +1 -1
  203. package/build/components/page-patterns/grid.js +1 -5
  204. package/build/components/page-patterns/grid.js.map +1 -1
  205. package/build/components/page-patterns/header.js +1 -11
  206. package/build/components/page-patterns/header.js.map +1 -1
  207. package/build/components/page-patterns/index.js +6 -15
  208. package/build/components/page-patterns/index.js.map +1 -1
  209. package/build/components/page-patterns/no-patterns.js +1 -3
  210. package/build/components/page-patterns/no-patterns.js.map +1 -1
  211. package/build/components/page-patterns/pagination.js +7 -7
  212. package/build/components/page-patterns/pagination.js.map +1 -1
  213. package/build/components/page-patterns/patterns-list.js +16 -24
  214. package/build/components/page-patterns/patterns-list.js.map +1 -1
  215. package/build/components/page-patterns/rename-menu-item.js +5 -14
  216. package/build/components/page-patterns/rename-menu-item.js.map +1 -1
  217. package/build/components/page-patterns/search-items.js +27 -38
  218. package/build/components/page-patterns/search-items.js.map +1 -1
  219. package/build/components/page-patterns/use-pattern-settings.js +5 -10
  220. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  221. package/build/components/page-patterns/use-patterns.js +28 -30
  222. package/build/components/page-patterns/use-patterns.js.map +1 -1
  223. package/build/components/page-patterns/utils.js +0 -2
  224. package/build/components/page-patterns/utils.js.map +1 -1
  225. package/build/components/page-template-parts/add-new-template-part.js +1 -13
  226. package/build/components/page-template-parts/add-new-template-part.js.map +1 -1
  227. package/build/components/page-template-parts/index.js +2 -15
  228. package/build/components/page-template-parts/index.js.map +1 -1
  229. package/build/components/page-templates/index.js +2 -29
  230. package/build/components/page-templates/index.js.map +1 -1
  231. package/build/components/plugin-template-setting-panel/index.js +2 -3
  232. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  233. package/build/components/preferences-modal/enable-feature.js +1 -7
  234. package/build/components/preferences-modal/enable-feature.js.map +1 -1
  235. package/build/components/preferences-modal/index.js +1 -16
  236. package/build/components/preferences-modal/index.js.map +1 -1
  237. package/build/components/resizable-frame/index.js +33 -61
  238. package/build/components/resizable-frame/index.js.map +1 -1
  239. package/build/components/revisions/index.js +5 -17
  240. package/build/components/revisions/index.js.map +1 -1
  241. package/build/components/routes/link.js +3 -14
  242. package/build/components/routes/link.js.map +1 -1
  243. package/build/components/routes/use-title.js +5 -16
  244. package/build/components/routes/use-title.js.map +1 -1
  245. package/build/components/save-button/index.js +7 -22
  246. package/build/components/save-button/index.js.map +1 -1
  247. package/build/components/save-hub/index.js +17 -33
  248. package/build/components/save-hub/index.js.map +1 -1
  249. package/build/components/save-panel/index.js +6 -28
  250. package/build/components/save-panel/index.js.map +1 -1
  251. package/build/components/secondary-sidebar/inserter-sidebar.js +1 -9
  252. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  253. package/build/components/secondary-sidebar/list-view-sidebar.js +21 -32
  254. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  255. package/build/components/sidebar/index.js +1 -25
  256. package/build/components/sidebar/index.js.map +1 -1
  257. package/build/components/sidebar-button/index.js +3 -6
  258. package/build/components/sidebar-button/index.js.map +1 -1
  259. package/build/components/sidebar-edit-mode/constants.js.map +1 -1
  260. package/build/components/sidebar-edit-mode/default-sidebar.js +2 -5
  261. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  262. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +1 -18
  263. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  264. package/build/components/sidebar-edit-mode/index.js +1 -24
  265. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  266. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +11 -20
  267. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  268. package/build/components/sidebar-edit-mode/page-panels/index.js +3 -18
  269. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  270. package/build/components/sidebar-edit-mode/page-panels/page-content.js +1 -6
  271. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  272. package/build/components/sidebar-edit-mode/page-panels/page-status.js +3 -20
  273. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  274. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +1 -6
  275. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  276. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +3 -15
  277. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
  278. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -5
  279. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  280. package/build/components/sidebar-edit-mode/settings-header/index.js +14 -25
  281. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  282. package/build/components/sidebar-edit-mode/sidebar-card/index.js +1 -5
  283. package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
  284. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -5
  285. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  286. package/build/components/sidebar-edit-mode/template-panel/index.js +14 -27
  287. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  288. package/build/components/sidebar-edit-mode/template-panel/last-revision.js +2 -17
  289. package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
  290. package/build/components/sidebar-edit-mode/template-panel/template-actions.js +1 -11
  291. package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  292. package/build/components/sidebar-edit-mode/template-panel/template-areas.js +1 -15
  293. package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
  294. package/build/components/sidebar-navigation-item/index.js +1 -7
  295. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  296. package/build/components/sidebar-navigation-screen/index.js +21 -28
  297. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  298. package/build/components/sidebar-navigation-screen-details-footer/index.js +2 -7
  299. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  300. package/build/components/sidebar-navigation-screen-details-panel/index.js +1 -7
  301. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  302. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +1 -3
  303. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  304. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -5
  305. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  306. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +1 -3
  307. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  308. package/build/components/sidebar-navigation-screen-global-styles/index.js +47 -82
  309. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  310. package/build/components/sidebar-navigation-screen-main/index.js +3 -14
  311. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  312. package/build/components/sidebar-navigation-screen-main/template-part-hint.js +1 -10
  313. package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
  314. package/build/components/sidebar-navigation-screen-navigation-item/index.js +1 -13
  315. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  316. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +3 -5
  317. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  318. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +3 -8
  319. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
  320. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +5 -25
  321. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  322. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -16
  323. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  324. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -13
  325. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  326. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -8
  327. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  328. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -10
  329. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  330. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +11 -32
  331. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  332. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +3 -6
  333. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  334. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  335. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +18 -39
  336. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  337. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +12 -18
  338. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  339. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +7 -15
  340. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  341. package/build/components/sidebar-navigation-screen-page/index.js +6 -23
  342. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  343. package/build/components/sidebar-navigation-screen-page/page-details.js +9 -32
  344. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  345. package/build/components/sidebar-navigation-screen-page/status-label.js +3 -17
  346. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  347. package/build/components/sidebar-navigation-screen-pages/index.js +8 -31
  348. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  349. package/build/components/sidebar-navigation-screen-pattern/index.js +11 -25
  350. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  351. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -7
  352. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  353. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +1 -5
  354. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  355. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +2 -8
  356. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  357. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +5 -10
  358. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  359. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +11 -21
  360. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  361. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +46 -44
  362. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  363. package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -13
  364. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  365. package/build/components/sidebar-navigation-screen-patterns/index.js +4 -31
  366. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  367. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -6
  368. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  369. package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js +1 -5
  370. package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
  371. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -12
  372. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  373. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +6 -8
  374. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  375. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -8
  376. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  377. package/build/components/sidebar-navigation-screen-template/home-template-details.js +7 -31
  378. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  379. package/build/components/sidebar-navigation-screen-template/index.js +1 -20
  380. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  381. package/build/components/sidebar-navigation-screen-templates/index.js +5 -26
  382. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  383. package/build/components/sidebar-navigation-screen-templates-browse/index.js +8 -7
  384. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  385. package/build/components/site-hub/index.js +8 -22
  386. package/build/components/site-hub/index.js.map +1 -1
  387. package/build/components/site-icon/index.js +1 -12
  388. package/build/components/site-icon/index.js.map +1 -1
  389. package/build/components/start-template-options/index.js +3 -26
  390. package/build/components/start-template-options/index.js.map +1 -1
  391. package/build/components/style-book/index.js +23 -34
  392. package/build/components/style-book/index.js.map +1 -1
  393. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -25
  394. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  395. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +6 -14
  396. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  397. package/build/components/sync-state-with-url/use-sync-path-with-url.js +9 -19
  398. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  399. package/build/components/table/index.js +0 -2
  400. package/build/components/table/index.js.map +1 -1
  401. package/build/components/template-actions/index.js +2 -21
  402. package/build/components/template-actions/index.js.map +1 -1
  403. package/build/components/template-actions/rename-menu-item.js +7 -15
  404. package/build/components/template-actions/rename-menu-item.js.map +1 -1
  405. package/build/components/template-part-converter/convert-to-regular.js +1 -8
  406. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  407. package/build/components/template-part-converter/convert-to-template-part.js +4 -15
  408. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  409. package/build/components/template-part-converter/index.js +3 -10
  410. package/build/components/template-part-converter/index.js.map +1 -1
  411. package/build/components/use-edited-entity-record/index.js +2 -15
  412. package/build/components/use-edited-entity-record/index.js.map +1 -1
  413. package/build/components/welcome-guide/editor.js +1 -10
  414. package/build/components/welcome-guide/editor.js.map +1 -1
  415. package/build/components/welcome-guide/image.js +0 -2
  416. package/build/components/welcome-guide/image.js.map +1 -1
  417. package/build/components/welcome-guide/index.js +1 -7
  418. package/build/components/welcome-guide/index.js.map +1 -1
  419. package/build/components/welcome-guide/page.js +1 -9
  420. package/build/components/welcome-guide/page.js.map +1 -1
  421. package/build/components/welcome-guide/styles.js +1 -12
  422. package/build/components/welcome-guide/styles.js.map +1 -1
  423. package/build/components/welcome-guide/template.js +1 -9
  424. package/build/components/welcome-guide/template.js.map +1 -1
  425. package/build/hooks/commands/use-common-commands.js +173 -133
  426. package/build/hooks/commands/use-common-commands.js.map +1 -1
  427. package/build/hooks/commands/use-edit-mode-commands.js +115 -54
  428. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  429. package/build/hooks/components.js +1 -2
  430. package/build/hooks/components.js.map +1 -1
  431. package/build/hooks/index.js +0 -3
  432. package/build/hooks/index.js.map +1 -1
  433. package/build/hooks/navigation-menu-edit.js +11 -24
  434. package/build/hooks/navigation-menu-edit.js.map +1 -1
  435. package/build/hooks/push-changes-to-global-styles/index.js +223 -96
  436. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  437. package/build/hooks/template-part-edit.js +7 -19
  438. package/build/hooks/template-part-edit.js.map +1 -1
  439. package/build/index.js +8 -31
  440. package/build/index.js.map +1 -1
  441. package/build/lock-unlock.js +1 -2
  442. package/build/lock-unlock.js.map +1 -1
  443. package/build/store/actions.js +33 -98
  444. package/build/store/actions.js.map +1 -1
  445. package/build/store/constants.js +0 -1
  446. package/build/store/constants.js.map +1 -1
  447. package/build/store/index.js +1 -12
  448. package/build/store/index.js.map +1 -1
  449. package/build/store/private-actions.js +7 -14
  450. package/build/store/private-actions.js.map +1 -1
  451. package/build/store/private-selectors.js +1 -3
  452. package/build/store/private-selectors.js.map +1 -1
  453. package/build/store/reducer.js +12 -38
  454. package/build/store/reducer.js.map +1 -1
  455. package/build/store/selectors.js +23 -60
  456. package/build/store/selectors.js.map +1 -1
  457. package/build/store/utils.js +13 -16
  458. package/build/store/utils.js.map +1 -1
  459. package/build/utils/get-is-list-page.js +2 -2
  460. package/build/utils/get-is-list-page.js.map +1 -1
  461. package/build/utils/is-previewing-theme.js +1 -4
  462. package/build/utils/is-previewing-theme.js.map +1 -1
  463. package/build/utils/is-template-removable.js +0 -2
  464. package/build/utils/is-template-removable.js.map +1 -1
  465. package/build/utils/is-template-revertable.js +0 -3
  466. package/build/utils/is-template-revertable.js.map +1 -1
  467. package/build/utils/template-part-create.js +3 -15
  468. package/build/utils/template-part-create.js.map +1 -1
  469. package/build/utils/use-activate-theme.js +2 -5
  470. package/build/utils/use-activate-theme.js.map +1 -1
  471. package/build/utils/use-debounced-input.js +6 -10
  472. package/build/utils/use-debounced-input.js.map +1 -1
  473. package/build-module/components/add-new-page/index.js +2 -7
  474. package/build-module/components/add-new-page/index.js.map +1 -1
  475. package/build-module/components/add-new-pattern/index.js +11 -11
  476. package/build-module/components/add-new-pattern/index.js.map +1 -1
  477. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
  478. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  479. package/build-module/components/add-new-template/add-custom-template-modal-content.js +9 -21
  480. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  481. package/build-module/components/add-new-template/index.js +3 -6
  482. package/build-module/components/add-new-template/index.js.map +1 -1
  483. package/build-module/components/add-new-template/new-template.js +20 -34
  484. package/build-module/components/add-new-template/new-template.js.map +1 -1
  485. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -1
  486. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +1 -1
  487. package/build-module/components/add-new-template/utils.js +52 -82
  488. package/build-module/components/add-new-template/utils.js.map +1 -1
  489. package/build-module/components/app/index.js +2 -6
  490. package/build-module/components/app/index.js.map +1 -1
  491. package/build-module/components/block-editor/back-button.js +1 -6
  492. package/build-module/components/block-editor/back-button.js.map +1 -1
  493. package/build-module/components/block-editor/block-inspector-button.js +3 -5
  494. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  495. package/build-module/components/block-editor/constants.js.map +1 -1
  496. package/build-module/components/block-editor/editor-canvas.js +6 -8
  497. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  498. package/build-module/components/block-editor/get-block-editor-provider.js +1 -4
  499. package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -1
  500. package/build-module/components/block-editor/index.js +10 -6
  501. package/build-module/components/block-editor/index.js.map +1 -1
  502. package/build-module/components/block-editor/inserter-media-categories.js +31 -41
  503. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  504. package/build-module/components/block-editor/providers/default-block-editor-provider.js +1 -2
  505. package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
  506. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +10 -11
  507. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
  508. package/build-module/components/block-editor/resizable-editor.js +5 -6
  509. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  510. package/build-module/components/block-editor/resize-handle.js +0 -3
  511. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  512. package/build-module/components/block-editor/site-editor-canvas.js +5 -8
  513. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  514. package/build-module/components/block-editor/use-site-editor-settings.js +34 -20
  515. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  516. package/build-module/components/canvas-spinner/index.js +31 -4
  517. package/build-module/components/canvas-spinner/index.js.map +1 -1
  518. package/build-module/components/code-editor/index.js +4 -9
  519. package/build-module/components/code-editor/index.js.map +1 -1
  520. package/build-module/components/create-template-part-modal/index.js +4 -8
  521. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  522. package/build-module/components/editor/index.js +34 -24
  523. package/build-module/components/editor/index.js.map +1 -1
  524. package/build-module/components/editor-canvas-container/index.js +4 -18
  525. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  526. package/build-module/components/error-boundary/index.js +1 -7
  527. package/build-module/components/error-boundary/index.js.map +1 -1
  528. package/build-module/components/error-boundary/warning.js +0 -3
  529. package/build-module/components/error-boundary/warning.js.map +1 -1
  530. package/build-module/components/global-styles/block-preview-panel.js +22 -10
  531. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  532. package/build-module/components/global-styles/color-indicator-wrapper.js +1 -4
  533. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  534. package/build-module/components/global-styles/color-palette-panel.js +1 -2
  535. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  536. package/build-module/components/global-styles/dimensions-panel.js +14 -13
  537. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  538. package/build-module/components/global-styles/global-styles-provider.js +14 -22
  539. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  540. package/build-module/components/global-styles/gradients-palette-panel.js +1 -4
  541. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  542. package/build-module/components/global-styles/header.js +2 -4
  543. package/build-module/components/global-styles/header.js.map +1 -1
  544. package/build-module/components/global-styles/hooks.js +26 -7
  545. package/build-module/components/global-styles/hooks.js.map +1 -1
  546. package/build-module/components/global-styles/icon-with-current-color.js +1 -2
  547. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  548. package/build-module/components/global-styles/index.js.map +1 -1
  549. package/build-module/components/global-styles/navigation-button.js +3 -7
  550. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  551. package/build-module/components/global-styles/palette.js +3 -5
  552. package/build-module/components/global-styles/palette.js.map +1 -1
  553. package/build-module/components/global-styles/preview.js +7 -14
  554. package/build-module/components/global-styles/preview.js.map +1 -1
  555. package/build-module/components/global-styles/root-menu.js +1 -4
  556. package/build-module/components/global-styles/root-menu.js.map +1 -1
  557. package/build-module/components/global-styles/screen-block-list.js +10 -20
  558. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  559. package/build-module/components/global-styles/screen-block.js +44 -38
  560. package/build-module/components/global-styles/screen-block.js.map +1 -1
  561. package/build-module/components/global-styles/screen-color-palette.js +1 -4
  562. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  563. package/build-module/components/global-styles/screen-colors.js +2 -6
  564. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  565. package/build-module/components/global-styles/screen-css.js +1 -5
  566. package/build-module/components/global-styles/screen-css.js.map +1 -1
  567. package/build-module/components/global-styles/screen-layout.js +2 -6
  568. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  569. package/build-module/components/global-styles/screen-revisions/index.js +18 -17
  570. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  571. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +25 -37
  572. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  573. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +39 -36
  574. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  575. package/build-module/components/global-styles/screen-root.js +2 -9
  576. package/build-module/components/global-styles/screen-root.js.map +1 -1
  577. package/build-module/components/global-styles/screen-style-variations.js +6 -9
  578. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  579. package/build-module/components/global-styles/screen-typography-element.js +2 -6
  580. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  581. package/build-module/components/global-styles/screen-typography.js +4 -8
  582. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  583. package/build-module/components/global-styles/style-variations-container.js +10 -18
  584. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  585. package/build-module/components/global-styles/subtitle.js +0 -3
  586. package/build-module/components/global-styles/subtitle.js.map +1 -1
  587. package/build-module/components/global-styles/typography-panel.js +1 -4
  588. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  589. package/build-module/components/global-styles/typography-preview.js +1 -4
  590. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  591. package/build-module/components/global-styles/ui.js +15 -37
  592. package/build-module/components/global-styles/ui.js.map +1 -1
  593. package/build-module/components/global-styles/utils.js +0 -1
  594. package/build-module/components/global-styles/utils.js.map +1 -1
  595. package/build-module/components/global-styles/variations-panel.js +0 -4
  596. package/build-module/components/global-styles/variations-panel.js.map +1 -1
  597. package/build-module/components/global-styles-renderer/index.js +3 -6
  598. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  599. package/build-module/components/header-edit-mode/document-actions/index.js +17 -44
  600. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  601. package/build-module/components/header-edit-mode/index.js +9 -18
  602. package/build-module/components/header-edit-mode/index.js.map +1 -1
  603. package/build-module/components/header-edit-mode/mode-switcher/index.js +4 -7
  604. package/build-module/components/header-edit-mode/mode-switcher/index.js.map +1 -1
  605. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -6
  606. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  607. package/build-module/components/header-edit-mode/more-menu/index.js +2 -6
  608. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  609. package/build-module/components/header-edit-mode/more-menu/site-export.js +1 -6
  610. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  611. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +0 -1
  612. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  613. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +1 -2
  614. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  615. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -2
  616. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  617. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -3
  618. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  619. package/build-module/components/header-edit-mode/undo-redo/redo.js +4 -5
  620. package/build-module/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  621. package/build-module/components/header-edit-mode/undo-redo/undo.js +4 -5
  622. package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  623. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  624. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -4
  625. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  626. package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -15
  627. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  628. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -4
  629. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  630. package/build-module/components/keyboard-shortcuts/edit-mode.js +10 -18
  631. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  632. package/build-module/components/keyboard-shortcuts/global.js +1 -6
  633. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  634. package/build-module/components/keyboard-shortcuts/register.js +0 -2
  635. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  636. package/build-module/components/layout/hooks.js +2 -4
  637. package/build-module/components/layout/hooks.js.map +1 -1
  638. package/build-module/components/layout/index.js +25 -19
  639. package/build-module/components/layout/index.js.map +1 -1
  640. package/build-module/components/list/added-by.js +12 -15
  641. package/build-module/components/list/added-by.js.map +1 -1
  642. package/build-module/components/list/header.js +1 -4
  643. package/build-module/components/list/header.js.map +1 -1
  644. package/build-module/components/list/index.js +8 -6
  645. package/build-module/components/list/index.js.map +1 -1
  646. package/build-module/components/list/table.js +5 -7
  647. package/build-module/components/list/table.js.map +1 -1
  648. package/build-module/components/list/use-register-shortcuts.js +1 -0
  649. package/build-module/components/list/use-register-shortcuts.js.map +1 -1
  650. package/build-module/components/page/header.js +1 -1
  651. package/build-module/components/page/header.js.map +1 -1
  652. package/build-module/components/page/index.js +5 -6
  653. package/build-module/components/page/index.js.map +1 -1
  654. package/build-module/components/page-actions/index.js +1 -2
  655. package/build-module/components/page-actions/index.js.map +1 -1
  656. package/build-module/components/page-actions/trash-page-menu-item.js +3 -6
  657. package/build-module/components/page-actions/trash-page-menu-item.js.map +1 -1
  658. package/build-module/components/page-content-focus-manager/back-to-page-notification.js +3 -4
  659. package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
  660. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +7 -10
  661. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  662. package/build-module/components/page-content-focus-manager/edit-template-notification.js +2 -12
  663. package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
  664. package/build-module/components/page-content-focus-manager/index.js +1 -2
  665. package/build-module/components/page-content-focus-manager/index.js.map +1 -1
  666. package/build-module/components/page-main/index.js +1 -4
  667. package/build-module/components/page-main/index.js.map +1 -1
  668. package/build-module/components/page-patterns/duplicate-menu-item.js +22 -40
  669. package/build-module/components/page-patterns/duplicate-menu-item.js.map +1 -1
  670. package/build-module/components/page-patterns/grid-item.js +13 -18
  671. package/build-module/components/page-patterns/grid-item.js.map +1 -1
  672. package/build-module/components/page-patterns/grid.js +0 -2
  673. package/build-module/components/page-patterns/grid.js.map +1 -1
  674. package/build-module/components/page-patterns/header.js +1 -4
  675. package/build-module/components/page-patterns/header.js.map +1 -1
  676. package/build-module/components/page-patterns/index.js +6 -5
  677. package/build-module/components/page-patterns/index.js.map +1 -1
  678. package/build-module/components/page-patterns/no-patterns.js +0 -1
  679. package/build-module/components/page-patterns/no-patterns.js.map +1 -1
  680. package/build-module/components/page-patterns/pagination.js +6 -4
  681. package/build-module/components/page-patterns/pagination.js.map +1 -1
  682. package/build-module/components/page-patterns/patterns-list.js +17 -9
  683. package/build-module/components/page-patterns/patterns-list.js.map +1 -1
  684. package/build-module/components/page-patterns/rename-menu-item.js +5 -8
  685. package/build-module/components/page-patterns/rename-menu-item.js.map +1 -1
  686. package/build-module/components/page-patterns/search-items.js +28 -32
  687. package/build-module/components/page-patterns/search-items.js.map +1 -1
  688. package/build-module/components/page-patterns/use-pattern-settings.js +5 -4
  689. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  690. package/build-module/components/page-patterns/use-patterns.js +28 -21
  691. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  692. package/build-module/components/page-patterns/utils.js.map +1 -1
  693. package/build-module/components/page-template-parts/add-new-template-part.js +1 -4
  694. package/build-module/components/page-template-parts/add-new-template-part.js.map +1 -1
  695. package/build-module/components/page-template-parts/index.js +2 -4
  696. package/build-module/components/page-template-parts/index.js.map +1 -1
  697. package/build-module/components/page-templates/index.js +3 -17
  698. package/build-module/components/page-templates/index.js.map +1 -1
  699. package/build-module/components/plugin-template-setting-panel/index.js +1 -1
  700. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  701. package/build-module/components/preferences-modal/enable-feature.js +0 -3
  702. package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
  703. package/build-module/components/preferences-modal/index.js +1 -8
  704. package/build-module/components/preferences-modal/index.js.map +1 -1
  705. package/build-module/components/resizable-frame/index.js +37 -56
  706. package/build-module/components/resizable-frame/index.js.map +1 -1
  707. package/build-module/components/revisions/index.js +5 -7
  708. package/build-module/components/revisions/index.js.map +1 -1
  709. package/build-module/components/routes/link.js +3 -8
  710. package/build-module/components/routes/link.js.map +1 -1
  711. package/build-module/components/routes/use-title.js +5 -7
  712. package/build-module/components/routes/use-title.js.map +1 -1
  713. package/build-module/components/save-button/index.js +7 -15
  714. package/build-module/components/save-button/index.js.map +1 -1
  715. package/build-module/components/save-hub/index.js +17 -20
  716. package/build-module/components/save-hub/index.js.map +1 -1
  717. package/build-module/components/save-panel/index.js +7 -17
  718. package/build-module/components/save-panel/index.js.map +1 -1
  719. package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
  720. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  721. package/build-module/components/secondary-sidebar/list-view-sidebar.js +21 -19
  722. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  723. package/build-module/components/sidebar/index.js +1 -5
  724. package/build-module/components/sidebar/index.js.map +1 -1
  725. package/build-module/components/sidebar-button/index.js +3 -3
  726. package/build-module/components/sidebar-button/index.js.map +1 -1
  727. package/build-module/components/sidebar-edit-mode/constants.js.map +1 -1
  728. package/build-module/components/sidebar-edit-mode/default-sidebar.js +2 -2
  729. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  730. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +1 -6
  731. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  732. package/build-module/components/sidebar-edit-mode/index.js +1 -7
  733. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  734. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +11 -13
  735. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  736. package/build-module/components/sidebar-edit-mode/page-panels/index.js +3 -5
  737. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  738. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +1 -2
  739. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  740. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +2 -11
  741. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  742. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +0 -2
  743. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  744. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +2 -7
  745. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
  746. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -3
  747. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  748. package/build-module/components/sidebar-edit-mode/settings-header/index.js +15 -17
  749. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  750. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +1 -2
  751. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
  752. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -2
  753. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  754. package/build-module/components/sidebar-edit-mode/template-panel/index.js +15 -15
  755. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  756. package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js +2 -11
  757. package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
  758. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +1 -4
  759. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  760. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +1 -10
  761. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
  762. package/build-module/components/sidebar-navigation-item/index.js +1 -2
  763. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  764. package/build-module/components/sidebar-navigation-screen/index.js +21 -18
  765. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  766. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -4
  767. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  768. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -4
  769. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  770. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -1
  771. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  772. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -2
  773. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  774. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -1
  775. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  776. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +47 -64
  777. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  778. package/build-module/components/sidebar-navigation-screen-main/index.js +3 -3
  779. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  780. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +0 -4
  781. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
  782. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -2
  783. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  784. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +2 -2
  785. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  786. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +2 -3
  787. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
  788. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +5 -13
  789. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  790. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -9
  791. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  792. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -7
  793. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  794. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +2 -6
  795. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  796. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -2
  797. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  798. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +10 -27
  799. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  800. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
  801. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  802. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  803. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +20 -24
  804. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  805. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +12 -9
  806. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  807. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +8 -8
  808. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  809. package/build-module/components/sidebar-navigation-screen-page/index.js +6 -6
  810. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  811. package/build-module/components/sidebar-navigation-screen-page/page-details.js +11 -22
  812. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  813. package/build-module/components/sidebar-navigation-screen-page/status-label.js +3 -13
  814. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  815. package/build-module/components/sidebar-navigation-screen-pages/index.js +8 -17
  816. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  817. package/build-module/components/sidebar-navigation-screen-pattern/index.js +11 -12
  818. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  819. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -2
  820. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  821. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -2
  822. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  823. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +2 -3
  824. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  825. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +4 -5
  826. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  827. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +12 -18
  828. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  829. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +47 -34
  830. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  831. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -9
  832. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  833. package/build-module/components/sidebar-navigation-screen-patterns/index.js +4 -14
  834. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  835. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -2
  836. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  837. package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js +0 -1
  838. package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
  839. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -7
  840. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  841. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +5 -5
  842. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  843. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -2
  844. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  845. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +7 -18
  846. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  847. package/build-module/components/sidebar-navigation-screen-template/index.js +0 -6
  848. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  849. package/build-module/components/sidebar-navigation-screen-templates/index.js +5 -14
  850. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  851. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +8 -2
  852. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  853. package/build-module/components/site-hub/index.js +9 -9
  854. package/build-module/components/site-hub/index.js.map +1 -1
  855. package/build-module/components/site-icon/index.js +1 -6
  856. package/build-module/components/site-icon/index.js.map +1 -1
  857. package/build-module/components/start-template-options/index.js +3 -14
  858. package/build-module/components/start-template-options/index.js.map +1 -1
  859. package/build-module/components/style-book/index.js +24 -24
  860. package/build-module/components/style-book/index.js.map +1 -1
  861. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -15
  862. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  863. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +6 -8
  864. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  865. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +9 -14
  866. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  867. package/build-module/components/table/index.js.map +1 -1
  868. package/build-module/components/template-actions/index.js +2 -9
  869. package/build-module/components/template-actions/index.js.map +1 -1
  870. package/build-module/components/template-actions/rename-menu-item.js +6 -8
  871. package/build-module/components/template-actions/rename-menu-item.js.map +1 -1
  872. package/build-module/components/template-part-converter/convert-to-regular.js +0 -3
  873. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  874. package/build-module/components/template-part-converter/convert-to-template-part.js +4 -5
  875. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  876. package/build-module/components/template-part-converter/index.js +3 -5
  877. package/build-module/components/template-part-converter/index.js.map +1 -1
  878. package/build-module/components/use-edited-entity-record/index.js +2 -7
  879. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  880. package/build-module/components/welcome-guide/editor.js +1 -4
  881. package/build-module/components/welcome-guide/editor.js.map +1 -1
  882. package/build-module/components/welcome-guide/image.js.map +1 -1
  883. package/build-module/components/welcome-guide/index.js +0 -1
  884. package/build-module/components/welcome-guide/index.js.map +1 -1
  885. package/build-module/components/welcome-guide/page.js +1 -5
  886. package/build-module/components/welcome-guide/page.js.map +1 -1
  887. package/build-module/components/welcome-guide/styles.js +1 -5
  888. package/build-module/components/welcome-guide/styles.js.map +1 -1
  889. package/build-module/components/welcome-guide/template.js +1 -5
  890. package/build-module/components/welcome-guide/template.js.map +1 -1
  891. package/build-module/hooks/commands/use-common-commands.js +174 -119
  892. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  893. package/build-module/hooks/commands/use-edit-mode-commands.js +117 -41
  894. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  895. package/build-module/hooks/components.js.map +1 -1
  896. package/build-module/hooks/index.js.map +1 -1
  897. package/build-module/hooks/navigation-menu-edit.js +11 -14
  898. package/build-module/hooks/navigation-menu-edit.js.map +1 -1
  899. package/build-module/hooks/push-changes-to-global-styles/index.js +223 -87
  900. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  901. package/build-module/hooks/template-part-edit.js +7 -9
  902. package/build-module/hooks/template-part-edit.js.map +1 -1
  903. package/build-module/index.js +10 -15
  904. package/build-module/index.js.map +1 -1
  905. package/build-module/lock-unlock.js.map +1 -1
  906. package/build-module/store/actions.js +35 -53
  907. package/build-module/store/actions.js.map +1 -1
  908. package/build-module/store/constants.js.map +1 -1
  909. package/build-module/store/index.js +1 -1
  910. package/build-module/store/index.js.map +1 -1
  911. package/build-module/store/private-actions.js +8 -9
  912. package/build-module/store/private-actions.js.map +1 -1
  913. package/build-module/store/private-selectors.js +1 -1
  914. package/build-module/store/private-selectors.js.map +1 -1
  915. package/build-module/store/reducer.js +13 -29
  916. package/build-module/store/reducer.js.map +1 -1
  917. package/build-module/store/selectors.js +26 -31
  918. package/build-module/store/selectors.js.map +1 -1
  919. package/build-module/store/utils.js +13 -13
  920. package/build-module/store/utils.js.map +1 -1
  921. package/build-module/utils/get-is-list-page.js +2 -1
  922. package/build-module/utils/get-is-list-page.js.map +1 -1
  923. package/build-module/utils/is-previewing-theme.js +0 -1
  924. package/build-module/utils/is-previewing-theme.js.map +1 -1
  925. package/build-module/utils/is-template-removable.js +0 -1
  926. package/build-module/utils/is-template-removable.js.map +1 -1
  927. package/build-module/utils/is-template-revertable.js +0 -2
  928. package/build-module/utils/is-template-revertable.js.map +1 -1
  929. package/build-module/utils/template-part-create.js +3 -7
  930. package/build-module/utils/template-part-create.js.map +1 -1
  931. package/build-module/utils/use-activate-theme.js +2 -2
  932. package/build-module/utils/use-activate-theme.js.map +1 -1
  933. package/build-module/utils/use-debounced-input.js +5 -7
  934. package/build-module/utils/use-debounced-input.js.map +1 -1
  935. package/build-style/style-rtl.css +102 -72
  936. package/build-style/style.css +102 -72
  937. package/package.json +41 -40
  938. package/src/components/add-new-pattern/index.js +6 -3
  939. package/src/components/block-editor/index.js +4 -3
  940. package/src/components/block-editor/providers/navigation-block-editor-provider.js +2 -3
  941. package/src/components/block-editor/use-site-editor-settings.js +22 -2
  942. package/src/components/canvas-spinner/index.js +21 -3
  943. package/src/components/canvas-spinner/style.scss +5 -2
  944. package/src/components/editor/index.js +18 -4
  945. package/src/components/global-styles/block-preview-panel.js +26 -15
  946. package/src/components/global-styles/global-styles-provider.js +7 -2
  947. package/src/components/global-styles/hooks.js +27 -1
  948. package/src/components/global-styles/preview.js +3 -13
  949. package/src/components/global-styles/screen-block.js +15 -0
  950. package/src/components/global-styles/screen-colors.js +0 -4
  951. package/src/components/global-styles/screen-layout.js +0 -2
  952. package/src/components/global-styles/screen-revisions/index.js +68 -60
  953. package/src/components/global-styles/screen-revisions/revisions-buttons.js +57 -46
  954. package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +24 -1
  955. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +70 -48
  956. package/src/components/global-styles/screen-typography.js +0 -4
  957. package/src/components/global-styles/style-variations-container.js +2 -0
  958. package/src/components/global-styles/ui.js +1 -1
  959. package/src/components/header-edit-mode/document-actions/index.js +20 -29
  960. package/src/components/header-edit-mode/document-actions/style.scss +54 -28
  961. package/src/components/header-edit-mode/index.js +1 -1
  962. package/src/components/header-edit-mode/style.scss +0 -9
  963. package/src/components/keyboard-shortcuts/edit-mode.js +4 -5
  964. package/src/components/layout/index.js +38 -22
  965. package/src/components/layout/style.scss +2 -2
  966. package/src/components/page/index.js +8 -8
  967. package/src/components/page/style.scss +8 -5
  968. package/src/components/page-actions/trash-page-menu-item.js +5 -1
  969. package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +2 -5
  970. package/src/components/page-patterns/duplicate-menu-item.js +18 -39
  971. package/src/components/page-patterns/patterns-list.js +25 -12
  972. package/src/components/page-patterns/style.scss +9 -8
  973. package/src/components/page-patterns/use-patterns.js +28 -6
  974. package/src/components/page-template-parts/index.js +0 -1
  975. package/src/components/page-templates/index.js +6 -19
  976. package/src/components/resizable-frame/index.js +10 -25
  977. package/src/components/save-button/index.js +2 -0
  978. package/src/components/save-hub/index.js +6 -1
  979. package/src/components/save-hub/style.scss +1 -1
  980. package/src/components/sidebar-edit-mode/default-sidebar.js +1 -0
  981. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +13 -5
  982. package/src/components/sidebar-edit-mode/template-panel/index.js +15 -11
  983. package/src/components/sidebar-navigation-screen/index.js +24 -16
  984. package/src/components/sidebar-navigation-screen/style.scss +4 -0
  985. package/src/components/sidebar-navigation-screen-details-panel/style.scss +1 -0
  986. package/src/components/sidebar-navigation-screen-global-styles/index.js +48 -44
  987. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +3 -4
  988. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +4 -4
  989. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +38 -25
  990. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +1 -4
  991. package/src/components/sidebar-navigation-screen-page/index.js +3 -3
  992. package/src/components/sidebar-navigation-screen-pages/index.js +10 -5
  993. package/src/components/sidebar-navigation-screen-pattern/index.js +2 -5
  994. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -1
  995. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +11 -1
  996. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +69 -44
  997. package/src/components/sidebar-navigation-screen-patterns/category-item.js +5 -13
  998. package/src/components/sidebar-navigation-screen-patterns/index.js +1 -9
  999. package/src/components/sidebar-navigation-screen-template/home-template-details.js +4 -2
  1000. package/src/components/sidebar-navigation-screen-templates/index.js +2 -10
  1001. package/src/components/sidebar-navigation-screen-templates-browse/index.js +10 -0
  1002. package/src/components/site-hub/index.js +4 -2
  1003. package/src/components/site-hub/style.scss +1 -2
  1004. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -8
  1005. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -4
  1006. package/src/components/table/style.scss +1 -0
  1007. package/src/components/template-actions/index.js +1 -5
  1008. package/src/components/use-edited-entity-record/index.js +1 -6
  1009. package/src/hooks/commands/use-common-commands.js +206 -85
  1010. package/src/hooks/commands/use-edit-mode-commands.js +149 -36
  1011. package/src/hooks/navigation-menu-edit.js +1 -5
  1012. package/src/hooks/push-changes-to-global-styles/index.js +240 -68
  1013. package/src/store/private-actions.js +5 -1
  1014. package/src/style.scss +0 -1
  1015. package/src/utils/use-debounced-input.js +8 -7
  1016. package/build/components/create-pattern-modal/index.js +0 -129
  1017. package/build/components/create-pattern-modal/index.js.map +0 -1
  1018. package/build/utils/normalize-record-key.js +0 -19
  1019. package/build/utils/normalize-record-key.js.map +0 -1
  1020. package/build-module/components/create-pattern-modal/index.js +0 -116
  1021. package/build-module/components/create-pattern-modal/index.js.map +0 -1
  1022. package/build-module/utils/normalize-record-key.js +0 -12
  1023. package/build-module/utils/normalize-record-key.js.map +0 -1
  1024. package/src/components/create-pattern-modal/index.js +0 -136
  1025. package/src/components/create-pattern-modal/style.scss +0 -3
  1026. package/src/utils/normalize-record-key.js +0 -11
  1027. /package/src/components/global-styles/stories/{index.js → index.story.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"names":["SLOT_FILL_NAME","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","GlobalStylesActionMenu","toggle","preferencesStore","canEditCSS","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","goTo","loadCustomCSS","moreVertical","onClose","RevisionsCountBadge","className","children","GlobalStylesRevisionsMenu","setIsListViewOpened","editSiteStore","revisionsCount","count","useGlobalStylesReset","blockEditorPrivateApis","canReset","onReset","setEditorCanvasContainerView","loadRevisions","hasRevisions","backup","GlobalStylesNavigationScreen","props","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","name","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","length","GlobalStylesStyleBook","navigator","path","location","encodeURIComponent","startsWith","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","GlobalStylesUI","blocks","block"],"mappings":";;;;;;;;;AA4BA;;AAzBA;;AAKA;;AAUA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAjDA;A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AC5B,IAFd;AAGC,IAAA,UAAU,EAAG,aAAaU,kBAAkB,CAAEkB,KAAK,CAAC5B,IAAR;AAH7C,IADC,CAnEH,EA2EG,iBAAiBwB,yBAAjB,IACD,4BAAC,qBAAD,OA5EF,EA+EC,4BAAC,yBAAD,OA/ED,EAgFC,4BAAC,sBAAD,OAhFD,EAiFC,4BAAC,qBAAD,OAjFD,EAkFC,4BAAC,qCAAD,OAlFD,CADD;AAsFA;;eAEcE,c","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { backup, moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst { toggle } = useDispatch( preferencesStore );\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 { goTo } = useNavigator();\n\tconst loadCustomCSS = () => goTo( '/css' );\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction RevisionsCountBadge( { className, children } ) {\n\treturn (\n\t\t<span\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-sidebar__revisions-count-badge'\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</span>\n\t);\n}\nfunction GlobalStylesRevisionsMenu() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\tconst { revisionsCount } = 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\trevisionsCount:\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0,\n\t\t};\n\t}, [] );\n\tconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { goTo } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadRevisions = () => {\n\t\tsetIsListViewOpened( false );\n\t\tgoTo( '/revisions' );\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t};\n\tconst hasRevisions = revisionsCount >= 2;\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t{ canReset || hasRevisions ? (\n\t\t\t\t<DropdownMenu icon={ backup } label={ __( 'Revisions' ) }>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ hasRevisions && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ loadRevisions }\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t<RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t\t\t{ revisionsCount }\n\t\t\t\t\t\t\t\t\t\t</RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Revision history' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset to defaults' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t</DropdownMenu>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\t\ticon={ backup }\n\t\t\t\t\tdisabled\n\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t/>\n\t\t\t) }\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tif ( editorCanvasContainerView === 'global-styles-revisions' ) {\n\t\t\t// Switching to the revisions container view should\n\t\t\t// redirect to the revisions screen.\n\t\t\tgoTo( '/revisions' );\n\t\t} else if (\n\t\t\t!! editorCanvasContainerView &&\n\t\t\tlocation?.path === '/revisions'\n\t\t) {\n\t\t\t// Switching to any container other than revisions should\n\t\t\t// redirect from the revisions screen to the root global styles screen.\n\t\t\tgoTo( '/' );\n\t\t} else if ( editorCanvasContainerView === 'global-styles-css' ) {\n\t\t\tgoTo( '/css' );\n\t\t}\n\n\t\t// location?.path is not a dependency because we don't want to track it.\n\t\t// Doing so will cause an infinite loop. We could abstract logic to avoid\n\t\t// having to disable the check later.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ editorCanvasContainerView, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesRevisionsMenu />\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"]}
1
+ {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_components","_blocks","_data","_blockEditor","_i18n","_preferences","_icons","_coreData","_screenRoot","_screenBlockList","_interopRequireWildcard","_screenBlock","_screenTypography","_screenTypographyElement","_screenColors","_screenColorPalette","_screenLayout","_screenStyleVariations","_styleBook","_screenCss","_screenRevisions","_lockUnlock","_store","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SLOT_FILL_NAME","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","createSlotFill","exports","GlobalStylesActionMenu","toggle","useDispatch","preferencesStore","canEditCSS","useSelect","select","_globalStyles$_links$","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","goTo","useNavigator","loadCustomCSS","createElement","DropdownMenu","icon","moreVertical","label","__","onClose","MenuGroup","MenuItem","onClick","RevisionsCountBadge","className","children","classnames","GlobalStylesRevisionsMenu","setIsListViewOpened","editSiteStore","revisionsCount","_globalStyles$_links$2","count","useGlobalStylesReset","unlock","blockEditorPrivateApis","canReset","onReset","setEditorCanvasContainerView","loadRevisions","hasRevisions","backup","disabled","Button","__experimentalIsFocusable","GlobalStylesNavigationScreen","props","__experimentalNavigatorScreen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","Fragment","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","useBlockHasGlobalStyles","useEffect","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","GlobalStylesUI","blocks","getBlockTypes","__experimentalNavigatorProvider","initialPath","element","block","_default"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { backup, moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst { toggle } = useDispatch( preferencesStore );\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 { goTo } = useNavigator();\n\tconst loadCustomCSS = () => goTo( '/css' );\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction RevisionsCountBadge( { className, children } ) {\n\treturn (\n\t\t<span\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-sidebar__revisions-count-badge'\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</span>\n\t);\n}\nfunction GlobalStylesRevisionsMenu() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\tconst { revisionsCount } = 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\trevisionsCount:\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0,\n\t\t};\n\t}, [] );\n\tconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { goTo } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadRevisions = () => {\n\t\tsetIsListViewOpened( false );\n\t\tgoTo( '/revisions' );\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t};\n\tconst hasRevisions = revisionsCount > 0;\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t{ canReset || hasRevisions ? (\n\t\t\t\t<DropdownMenu icon={ backup } label={ __( 'Revisions' ) }>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ hasRevisions && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ loadRevisions }\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t<RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t\t\t{ revisionsCount }\n\t\t\t\t\t\t\t\t\t\t</RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Revision history' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset to defaults' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t</DropdownMenu>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\t\ticon={ backup }\n\t\t\t\t\tdisabled\n\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t/>\n\t\t\t) }\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tif ( editorCanvasContainerView === 'global-styles-revisions' ) {\n\t\t\t// Switching to the revisions container view should\n\t\t\t// redirect to the revisions screen.\n\t\t\tgoTo( '/revisions' );\n\t\t} else if (\n\t\t\t!! editorCanvasContainerView &&\n\t\t\tlocation?.path === '/revisions'\n\t\t) {\n\t\t\t// Switching to any container other than revisions should\n\t\t\t// redirect from the revisions screen to the root global styles screen.\n\t\t\tgoTo( '/' );\n\t\t} else if ( editorCanvasContainerView === 'global-styles-css' ) {\n\t\t\tgoTo( '/css' );\n\t\t}\n\n\t\t// location?.path is not a dependency because we don't want to track it.\n\t\t// Doing so will cause an infinite loop. We could abstract logic to avoid\n\t\t// having to disable the check later.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ editorCanvasContainerView, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesRevisionsMenu />\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":";;;;;;;AA4BA,IAAAA,QAAA,GAAAC,OAAA;AAzBA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AAUA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAIA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAMA,IAAAW,WAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,gBAAA,GAAAC,uBAAA,CAAAb,OAAA;AAIA,IAAAc,YAAA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E,CACL,CAC7B,CAAC,EAEH,IAAAxH,QAAA,CAAA0E,aAAA,EAACgD,cAAc,MAAE,CAAC,EAEhB8B,MAAM,CAACpC,GAAG,CAAIyC,KAAK,IACpB,IAAA7J,QAAA,CAAA0E,aAAA,EAACgD,cAAc;IACd/E,GAAG,EAAG,gBAAgB,GAAGkH,KAAK,CAACrC,IAAM;IACrCA,IAAI,EAAGqC,KAAK,CAACrC,IAAM;IACnBP,UAAU,EAAG,UAAU,GAAGmB,kBAAkB,CAAEyB,KAAK,CAACrC,IAAK;EAAG,CAC5D,CACA,CAAC,EAED,YAAY,KAAK6B,yBAAyB,IAC3C,IAAArJ,QAAA,CAAA0E,aAAA,EAACsD,qBAAqB,MAAE,CACxB,EAED,IAAAhI,QAAA,CAAA0E,aAAA,EAACc,yBAAyB,MAAE,CAAC,EAC7B,IAAAxF,QAAA,CAAA0E,aAAA,EAAClB,sBAAsB,MAAE,CAAC,EAC1B,IAAAxD,QAAA,CAAA0E,aAAA,EAAC6D,qBAAqB,MAAE,CAAC,EACzB,IAAAvI,QAAA,CAAA0E,aAAA,EAAC0E,qCAAqC,MAAE,CACtB,CAAC;AAEtB;AAAC,IAAAU,QAAA,GAEcP,cAAc;AAAAhG,OAAA,CAAArB,OAAA,GAAA4H,QAAA"}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getVariationClassName = getVariationClassName;
7
-
8
7
  /**
9
8
  *
10
9
  * @param {string} variation The variation name.
@@ -15,7 +14,6 @@ function getVariationClassName(variation) {
15
14
  if (!variation) {
16
15
  return '';
17
16
  }
18
-
19
17
  return `is-style-${variation}`;
20
18
  }
21
19
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/utils.js"],"names":["getVariationClassName","variation"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAT,CAAgCC,SAAhC,EAA4C;AAClD,MAAK,CAAEA,SAAP,EAAmB;AAClB,WAAO,EAAP;AACA;;AACD,SAAQ,YAAYA,SAAW,EAA/B;AACA","sourcesContent":["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n"]}
1
+ {"version":3,"names":["getVariationClassName","variation"],"sources":["@wordpress/edit-site/src/components/global-styles/utils.js"],"sourcesContent":["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAqBA,CAAEC,SAAS,EAAG;EAClD,IAAK,CAAEA,SAAS,EAAG;IAClB,OAAO,EAAE;EACV;EACA,OAAQ,YAAYA,SAAW,EAAC;AACjC"}
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.VariationsPanel = VariationsPanel;
7
7
  exports.useBlockVariations = useBlockVariations;
8
-
9
8
  var _element = require("@wordpress/element");
10
-
11
9
  var _blocks = require("@wordpress/blocks");
12
-
13
10
  var _data = require("@wordpress/data");
14
-
15
11
  var _components = require("@wordpress/components");
16
-
17
12
  var _navigationButton = require("./navigation-button");
18
-
19
13
  /**
20
14
  * WordPress dependencies
21
15
  */
@@ -23,10 +17,10 @@ var _navigationButton = require("./navigation-button");
23
17
  /**
24
18
  * Internal dependencies
25
19
  */
20
+
26
21
  function getCoreBlockStyles(blockStyles) {
27
22
  return blockStyles?.filter(style => style.source === 'block');
28
23
  }
29
-
30
24
  function useBlockVariations(name) {
31
25
  const blockStyles = (0, _data.useSelect)(select => {
32
26
  const {
@@ -37,7 +31,6 @@ function useBlockVariations(name) {
37
31
  const coreBlockStyles = getCoreBlockStyles(blockStyles);
38
32
  return coreBlockStyles;
39
33
  }
40
-
41
34
  function VariationsPanel({
42
35
  name
43
36
  }) {
@@ -49,7 +42,6 @@ function VariationsPanel({
49
42
  if (style?.isDefault) {
50
43
  return null;
51
44
  }
52
-
53
45
  return (0, _element.createElement)(_navigationButton.NavigationButtonAsItem, {
54
46
  key: index,
55
47
  path: '/blocks/' + encodeURIComponent(name) + '/variations/' + encodeURIComponent(style.name),
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/variations-panel.js"],"names":["getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","select","getBlockStyles","blocksStore","coreBlockStyles","VariationsPanel","map","index","isDefault","encodeURIComponent","label"],"mappings":";;;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAIA;AACA;AACA;AAIA,SAASA,kBAAT,CAA6BC,WAA7B,EAA2C;AAC1C,SAAOA,WAAW,EAAEC,MAAb,CAAuBC,KAAF,IAAaA,KAAK,CAACC,MAAN,KAAiB,OAAnD,CAAP;AACA;;AAEM,SAASC,kBAAT,CAA6BC,IAA7B,EAAoC;AAC1C,QAAML,WAAW,GAAG,qBACjBM,MAAF,IAAc;AACb,UAAM;AAAEC,MAAAA;AAAF,QAAqBD,MAAM,CAAEE,aAAF,CAAjC;AACA,WAAOD,cAAc,CAAEF,IAAF,CAArB;AACA,GAJkB,EAKnB,CAAEA,IAAF,CALmB,CAApB;AAOA,QAAMI,eAAe,GAAGV,kBAAkB,CAAEC,WAAF,CAA1C;AACA,SAAOS,eAAP;AACA;;AAEM,SAASC,eAAT,CAA0B;AAAEL,EAAAA;AAAF,CAA1B,EAAqC;AAC3C,QAAMI,eAAe,GAAGL,kBAAkB,CAAEC,IAAF,CAA1C;AAEA,SACC,4BAAC,mCAAD;AAAW,IAAA,UAAU,MAArB;AAAsB,IAAA,WAAW;AAAjC,KACGI,eAAe,CAACE,GAAhB,CAAqB,CAAET,KAAF,EAASU,KAAT,KAAoB;AAC1C,QAAKV,KAAK,EAAEW,SAAZ,EAAwB;AACvB,aAAO,IAAP;AACA;;AACD,WACC,4BAAC,wCAAD;AACC,MAAA,GAAG,EAAGD,KADP;AAEC,MAAA,IAAI,EACH,aACAE,kBAAkB,CAAET,IAAF,CADlB,GAEA,cAFA,GAGAS,kBAAkB,CAAEZ,KAAK,CAACG,IAAR,CANpB;AAQC,oBAAaH,KAAK,CAACa;AARpB,OAUGb,KAAK,CAACa,KAVT,CADD;AAcA,GAlBC,CADH,CADD;AAuBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from './navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_blocks","require","_data","_components","_navigationButton","getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","useSelect","select","getBlockStyles","blocksStore","coreBlockStyles","VariationsPanel","_element","createElement","__experimentalItemGroup","isBordered","isSeparated","map","index","isDefault","NavigationButtonAsItem","key","path","encodeURIComponent","label"],"sources":["@wordpress/edit-site/src/components/global-styles/variations-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from './navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style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AGH,KAAO;MACbI,IAAI,EACH,UAAU,GACVC,kBAAkB,CAAElB,IAAK,CAAC,GAC1B,cAAc,GACdkB,kBAAkB,CAAErB,KAAK,CAACG,IAAK,CAC/B;MACD,cAAaH,KAAK,CAACsB;IAAO,GAExBtB,KAAK,CAACsB,KACe,CAAC;EAE3B,CAAE,CACQ,CAAC;AAEd"}
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.GlobalStylesRenderer = GlobalStylesRenderer;
7
-
8
7
  var _element = require("@wordpress/element");
9
-
10
8
  var _data = require("@wordpress/data");
11
-
12
9
  var _blockEditor = require("@wordpress/block-editor");
13
-
14
10
  var _store = require("../../store");
15
-
16
11
  var _lockUnlock = require("../../lock-unlock");
17
-
18
12
  /**
19
13
  * WordPress dependencies
20
14
  */
@@ -22,10 +16,10 @@ var _lockUnlock = require("../../lock-unlock");
22
16
  /**
23
17
  * Internal dependencies
24
18
  */
19
+
25
20
  const {
26
21
  useGlobalStylesOutput
27
22
  } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
28
-
29
23
  function useGlobalStylesRenderer() {
30
24
  const [styles, settings] = useGlobalStylesOutput();
31
25
  const {
@@ -36,20 +30,18 @@ function useGlobalStylesRenderer() {
36
30
  } = (0, _data.useDispatch)(_store.store);
37
31
  (0, _element.useEffect)(() => {
38
32
  var _currentStoreSettings;
39
-
40
33
  if (!styles || !settings) {
41
34
  return;
42
35
  }
43
-
44
36
  const currentStoreSettings = getSettings();
45
37
  const nonGlobalStyles = Object.values((_currentStoreSettings = currentStoreSettings.styles) !== null && _currentStoreSettings !== void 0 ? _currentStoreSettings : []).filter(style => !style.isGlobalStyles);
46
- updateSettings({ ...currentStoreSettings,
38
+ updateSettings({
39
+ ...currentStoreSettings,
47
40
  styles: [...nonGlobalStyles, ...styles],
48
41
  __experimentalFeatures: settings
49
42
  });
50
43
  }, [styles, settings]);
51
44
  }
52
-
53
45
  function GlobalStylesRenderer() {
54
46
  useGlobalStylesRenderer();
55
47
  return null;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"names":["useGlobalStylesOutput","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","editSiteStore","updateSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AAKA;;AACA;;AAXA;AACA;AACA;;AAKA;AACA;AACA;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAA4B,wBAAQC,wBAAR,CAAlC;;AAEA,SAASC,uBAAT,GAAmC;AAClC,QAAM,CAAEC,MAAF,EAAUC,QAAV,IAAuBJ,qBAAqB,EAAlD;AACA,QAAM;AAAEK,IAAAA;AAAF,MAAkB,qBAAWC,YAAX,CAAxB;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAqB,uBAAaD,YAAb,CAA3B;AAEA,0BAAW,MAAM;AAAA;;AAChB,QAAK,CAAEH,MAAF,IAAY,CAAEC,QAAnB,EAA8B;AAC7B;AACA;;AAED,UAAMI,oBAAoB,GAAGH,WAAW,EAAxC;AACA,UAAMI,eAAe,GAAGC,MAAM,CAACC,MAAP,0BACvBH,oBAAoB,CAACL,MADE,yEACQ,EADR,EAEtBS,MAFsB,CAEZC,KAAF,IAAa,CAAEA,KAAK,CAACC,cAFP,CAAxB;AAGAP,IAAAA,cAAc,CAAE,EACf,GAAGC,oBADY;AAEfL,MAAAA,MAAM,EAAE,CAAE,GAAGM,eAAL,EAAsB,GAAGN,MAAzB,CAFO;AAGfY,MAAAA,sBAAsB,EAAEX;AAHT,KAAF,CAAd;AAKA,GAdD,EAcG,CAAED,MAAF,EAAUC,QAAV,CAdH;AAeA;;AAEM,SAASY,oBAAT,GAAgC;AACtCd,EAAAA,uBAAuB;AAEvB,SAAO,IAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"]}
1
+ {"version":3,"names":["_element","require","_data","_blockEditor","_store","_lockUnlock","useGlobalStylesOutput","unlock","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","useSelect","editSiteStore","updateSettings","useDispatch","useEffect","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIA,MAAM;EAAEK;AAAsB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAElE,SAASC,uBAAuBA,CAAA,EAAG;EAClC,MAAM,CAAEC,MAAM,EAAEC,QAAQ,CAAE,GAAGL,qBAAqB,CAAC,CAAC;EACpD,MAAM;IAAEM;EAAY,CAAC,GAAG,IAAAC,eAAS,EAAEC,YAAc,CAAC;EAClD,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,iBAAW,EAAEF,YAAc,CAAC;EAEvD,IAAAG,kBAAS,EAAE,MAAM;IAAA,IAAAC,qBAAA;IAChB,IAAK,CAAER,MAAM,IAAI,CAAEC,QAAQ,EAAG;MAC7B;IACD;IAEA,MAAMQ,oBAAoB,GAAGP,WAAW,CAAC,CAAC;IAC1C,MAAMQ,eAAe,GAAGC,MAAM,CAACC,MAAM,EAAAJ,qBAAA,GACpCC,oBAAoB,CAACT,MAAM,cAAAQ,qBAAA,cAAAA,qBAAA,GAAI,EAChC,CAAC,CAACK,MAAM,CAAIC,KAAK,IAAM,CAAEA,KAAK,CAACC,cAAe,CAAC;IAC/CV,cAAc,CAAE;MACf,GAAGI,oBAAoB;MACvBT,MAAM,EAAE,CAAE,GAAGU,eAAe,EAAE,GAAGV,MAAM,CAAE;MACzCgB,sBAAsB,EAAEf;IACzB,CAAE,CAAC;EACJ,CAAC,EAAE,CAAED,MAAM,EAAEC,QAAQ,CAAG,CAAC;AAC1B;AAEO,SAASgB,oBAAoBA,CAAA,EAAG;EACtClB,uBAAuB,CAAC,CAAC;EAEzB,OAAO,IAAI;AACZ"}
@@ -1,36 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = DocumentActions;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  var _i18n = require("@wordpress/i18n");
15
-
16
11
  var _data = require("@wordpress/data");
17
-
18
12
  var _components = require("@wordpress/components");
19
-
20
13
  var _blockEditor = require("@wordpress/block-editor");
21
-
22
14
  var _commands = require("@wordpress/commands");
23
-
24
15
  var _icons = require("@wordpress/icons");
25
-
26
16
  var _keycodes = require("@wordpress/keycodes");
27
-
28
17
  var _coreData = require("@wordpress/core-data");
29
-
30
18
  var _useEditedEntityRecord = _interopRequireDefault(require("../../use-edited-entity-record"));
31
-
32
19
  var _store = require("../../../store");
33
-
34
20
  /**
35
21
  * External dependencies
36
22
  */
@@ -42,11 +28,17 @@ var _store = require("../../../store");
42
28
  /**
43
29
  * Internal dependencies
44
30
  */
31
+
32
+ const typeLabels = {
33
+ wp_block: (0, _i18n.__)('Editing pattern:'),
34
+ wp_navigation: (0, _i18n.__)('Editing navigation menu:'),
35
+ wp_template: (0, _i18n.__)('Editing template:'),
36
+ wp_template_part: (0, _i18n.__)('Editing template part:')
37
+ };
45
38
  function DocumentActions() {
46
- const isPage = (0, _data.useSelect)(select => select(_store.store).isPage());
39
+ const isPage = (0, _data.useSelect)(select => select(_store.store).isPage(), []);
47
40
  return isPage ? (0, _element.createElement)(PageDocumentActions, null) : (0, _element.createElement)(TemplateDocumentActions, null);
48
41
  }
49
-
50
42
  function PageDocumentActions() {
51
43
  const {
52
44
  hasPageContentFocus,
@@ -81,20 +73,16 @@ function PageDocumentActions() {
81
73
  if (prevHasPageContentFocus.current && !hasPageContentFocus) {
82
74
  setHasEditedTemplate(true);
83
75
  }
84
-
85
76
  prevHasPageContentFocus.current = hasPageContentFocus;
86
77
  }, [hasPageContentFocus]);
87
-
88
78
  if (!hasResolved) {
89
79
  return null;
90
80
  }
91
-
92
81
  if (!isFound) {
93
82
  return (0, _element.createElement)("div", {
94
83
  className: "edit-site-document-actions"
95
84
  }, (0, _i18n.__)('Document not found'));
96
85
  }
97
-
98
86
  return hasPageContentFocus ? (0, _element.createElement)(BaseDocumentActions, {
99
87
  className: (0, _classnames.default)('is-page', {
100
88
  'is-animated': hasEditedTemplate
@@ -105,48 +93,41 @@ function PageDocumentActions() {
105
93
  onBack: () => setHasPageContentFocus(true)
106
94
  });
107
95
  }
108
-
109
96
  function TemplateDocumentActions({
110
97
  className,
111
98
  onBack
112
99
  }) {
100
+ var _typeLabels$record$ty;
113
101
  const {
114
102
  isLoaded,
115
103
  record,
116
104
  getTitle,
117
105
  icon
118
106
  } = (0, _useEditedEntityRecord.default)();
119
-
120
107
  if (!isLoaded) {
121
108
  return null;
122
109
  }
123
-
124
110
  if (!record) {
125
111
  return (0, _element.createElement)("div", {
126
112
  className: "edit-site-document-actions"
127
113
  }, (0, _i18n.__)('Document not found'));
128
114
  }
129
-
130
- const entityLabel = getEntityLabel(record.type);
131
115
  let typeIcon = icon;
132
-
133
116
  if (record.type === 'wp_navigation') {
134
117
  typeIcon = _icons.navigation;
135
118
  } else if (record.type === 'wp_block') {
136
119
  typeIcon = _icons.symbol;
137
120
  }
138
-
139
121
  return (0, _element.createElement)(BaseDocumentActions, {
140
- className: className,
122
+ className: (0, _classnames.default)(className, {
123
+ 'is-synced-entity': record.wp_pattern_sync_status !== 'unsynced'
124
+ }),
141
125
  icon: typeIcon,
142
126
  onBack: onBack
143
127
  }, (0, _element.createElement)(_components.VisuallyHidden, {
144
128
  as: "span"
145
- }, (0, _i18n.sprintf)(
146
- /* translators: %s: the entity being edited, like "template"*/
147
- (0, _i18n.__)('Editing %s: '), entityLabel)), getTitle());
129
+ }, (_typeLabels$record$ty = typeLabels[record.type]) !== null && _typeLabels$record$ty !== void 0 ? _typeLabels$record$ty : typeLabels.wp_template), getTitle());
148
130
  }
149
-
150
131
  function BaseDocumentActions({
151
132
  className,
152
133
  icon,
@@ -160,7 +141,7 @@ function BaseDocumentActions({
160
141
  className: (0, _classnames.default)('edit-site-document-actions', className)
161
142
  }, onBack && (0, _element.createElement)(_components.Button, {
162
143
  className: "edit-site-document-actions__back",
163
- icon: _icons.chevronLeftSmall,
144
+ icon: (0, _i18n.isRTL)() ? _icons.chevronRightSmall : _icons.chevronLeftSmall,
164
145
  onClick: event => {
165
146
  event.stopPropagation();
166
147
  onBack();
@@ -181,24 +162,4 @@ function BaseDocumentActions({
181
162
  className: "edit-site-document-actions__shortcut"
182
163
  }, _keycodes.displayShortcut.primary('k'))));
183
164
  }
184
-
185
- function getEntityLabel(entityType) {
186
- let label = '';
187
-
188
- switch (entityType) {
189
- case 'wp_navigation':
190
- label = 'navigation menu';
191
- break;
192
-
193
- case 'wp_template_part':
194
- label = 'template part';
195
- break;
196
-
197
- default:
198
- label = 'template';
199
- break;
200
- }
201
-
202
- return label;
203
- }
204
165
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-actions/index.js"],"names":["DocumentActions","isPage","select","editSiteStore","PageDocumentActions","hasPageContentFocus","hasResolved","isFound","title","_hasPageContentFocus","getEditedPostContext","getEditedEntityRecord","hasFinishedResolution","coreStore","context","queryArgs","postType","postId","page","setHasPageContentFocus","hasEditedTemplate","setHasEditedTemplate","prevHasPageContentFocus","current","pageIcon","TemplateDocumentActions","className","onBack","isLoaded","record","getTitle","icon","entityLabel","getEntityLabel","type","typeIcon","navigationIcon","symbol","BaseDocumentActions","children","open","openCommandCenter","commandsStore","chevronLeftSmallIcon","event","stopPropagation","displayShortcut","primary","entityType","label"],"mappings":";;;;;;;;;AAyBA;;AAtBA;;AAKA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AAMA;;AAEA;;AAKA;;AACA;;AAhCA;AACA;AACA;;AAGA;AACA;AACA;;AAqBA;AACA;AACA;AAIe,SAASA,eAAT,GAA2B;AACzC,QAAMC,MAAM,GAAG,qBAAaC,MAAF,IAAcA,MAAM,CAAEC,YAAF,CAAN,CAAwBF,MAAxB,EAAzB,CAAf;AACA,SAAOA,MAAM,GAAG,4BAAC,mBAAD,OAAH,GAA6B,4BAAC,uBAAD,OAA1C;AACA;;AAED,SAASG,mBAAT,GAA+B;AAC9B,QAAM;AAAEC,IAAAA,mBAAF;AAAuBC,IAAAA,WAAvB;AAAoCC,IAAAA,OAApC;AAA6CC,IAAAA;AAA7C,MAAuD,qBAC1DN,MAAF,IAAc;AACb,UAAM;AACLG,MAAAA,mBAAmB,EAAEI,oBADhB;AAELC,MAAAA;AAFK,QAGFR,MAAM,CAAEC,YAAF,CAHV;AAIA,UAAM;AAAEQ,MAAAA,qBAAF;AAAyBC,MAAAA;AAAzB,QACLV,MAAM,CAAEW,eAAF,CADP;AAEA,UAAMC,OAAO,GAAGJ,oBAAoB,EAApC;AACA,UAAMK,SAAS,GAAG,CAAE,UAAF,EAAcD,OAAO,CAACE,QAAtB,EAAgCF,OAAO,CAACG,MAAxC,CAAlB;AACA,UAAMC,IAAI,GAAGP,qBAAqB,CAAE,GAAGI,SAAL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AAN;AACAlB,MAAAA,MAAM;AACN;AANF,KAQG,cAAI,MAAJ,CARH,CAJF,EAeC,4BAAC,kBAAD;AACC,IAAA,SAAS,EAAC,qCADX;AAEC,IAAA,OAAO,EAAG,MAAMc,iBAAiB;AAFlC,KAIC,4BAAC,gCAAD;AACC,IAAA,SAAS,EAAC,mCADX;AAEC,IAAA,OAAO,EAAG,CAFX;AAGC,IAAA,OAAO,EAAC;AAHT,KAKC,4BAAC,sBAAD;AAAW,IAAA,IAAI,EAAGV;AAAlB,IALD,EAMC,4BAAC,8BAAD;AAAM,IAAA,IAAI,EAAC,MAAX;AAAkB,IAAA,EAAE,EAAC;AAArB,KACGQ,QADH,CAND,CAJD,EAcC;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGO,0BAAgBC,OAAhB,CAAyB,GAAzB,CADH,CAdD,CAfD,CADD;AAoCA;;AAED,SAASd,cAAT,CAAyBe,UAAzB,EAAsC;AACrC,MAAIC,KAAK,GAAG,EAAZ;;AACA,UAASD,UAAT;AACC,SAAK,eAAL;AACCC,MAAAA,KAAK,GAAG,iBAAR;AACA;;AACD,SAAK,kBAAL;AACCA,MAAAA,KAAK,GAAG,eAAR;AACA;;AACD;AACCA,MAAAA,KAAK,GAAG,UAAR;AACA;AATF;;AAYA,SAAOA,KAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { sprintf, __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\tVisuallyHidden,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { store as commandsStore } from '@wordpress/commands';\nimport {\n\tchevronLeftSmall as chevronLeftSmallIcon,\n\tpage as pageIcon,\n\tnavigation as navigationIcon,\n\tsymbol,\n} from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useState, useEffect, useRef } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../../use-edited-entity-record';\nimport { store as editSiteStore } from '../../../store';\n\nexport default function DocumentActions() {\n\tconst isPage = useSelect( ( select ) => select( editSiteStore ).isPage() );\n\treturn isPage ? <PageDocumentActions /> : <TemplateDocumentActions />;\n}\n\nfunction PageDocumentActions() {\n\tconst { hasPageContentFocus, hasResolved, isFound, title } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\thasPageContentFocus: _hasPageContentFocus,\n\t\t\t\tgetEditedPostContext,\n\t\t\t} = select( editSiteStore );\n\t\t\tconst { getEditedEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst context = getEditedPostContext();\n\t\t\tconst queryArgs = [ 'postType', context.postType, context.postId ];\n\t\t\tconst page = getEditedEntityRecord( ...queryArgs );\n\t\t\treturn {\n\t\t\t\thasPageContentFocus: _hasPageContentFocus(),\n\t\t\t\thasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\tqueryArgs\n\t\t\t\t),\n\t\t\t\tisFound: !! page,\n\t\t\t\ttitle: page?.title,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { setHasPageContentFocus } = useDispatch( editSiteStore );\n\n\tconst [ hasEditedTemplate, setHasEditedTemplate ] = useState( false );\n\tconst prevHasPageContentFocus = useRef( false );\n\tuseEffect( () => {\n\t\tif ( prevHasPageContentFocus.current && ! hasPageContentFocus ) {\n\t\t\tsetHasEditedTemplate( true );\n\t\t}\n\t\tprevHasPageContentFocus.current = hasPageContentFocus;\n\t}, [ hasPageContentFocus ] );\n\n\tif ( ! hasResolved ) {\n\t\treturn null;\n\t}\n\n\tif ( ! isFound ) {\n\t\treturn (\n\t\t\t<div className=\"edit-site-document-actions\">\n\t\t\t\t{ __( 'Document not found' ) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn hasPageContentFocus ? (\n\t\t<BaseDocumentActions\n\t\t\tclassName={ classnames( 'is-page', {\n\t\t\t\t'is-animated': hasEditedTemplate,\n\t\t\t} ) }\n\t\t\ticon={ pageIcon }\n\t\t>\n\t\t\t{ title }\n\t\t</BaseDocumentActions>\n\t) : (\n\t\t<TemplateDocumentActions\n\t\t\tclassName=\"is-animated\"\n\t\t\tonBack={ () => setHasPageContentFocus( true ) }\n\t\t/>\n\t);\n}\n\nfunction TemplateDocumentActions( { className, onBack } ) {\n\tconst { isLoaded, record, getTitle, icon } = useEditedEntityRecord();\n\n\tif ( ! isLoaded ) {\n\t\treturn null;\n\t}\n\n\tif ( ! record ) {\n\t\treturn (\n\t\t\t<div className=\"edit-site-document-actions\">\n\t\t\t\t{ __( 'Document not found' ) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst entityLabel = getEntityLabel( record.type );\n\n\tlet typeIcon = icon;\n\tif ( record.type === 'wp_navigation' ) {\n\t\ttypeIcon = navigationIcon;\n\t} else if ( record.type === 'wp_block' ) {\n\t\ttypeIcon = symbol;\n\t}\n\n\treturn (\n\t\t<BaseDocumentActions\n\t\t\tclassName={ className }\n\t\t\ticon={ typeIcon }\n\t\t\tonBack={ onBack }\n\t\t>\n\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t{ sprintf(\n\t\t\t\t\t/* translators: %s: the entity being edited, like \"template\"*/\n\t\t\t\t\t__( 'Editing %s: ' ),\n\t\t\t\t\tentityLabel\n\t\t\t\t) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ getTitle() }\n\t\t</BaseDocumentActions>\n\t);\n}\n\nfunction BaseDocumentActions( { className, icon, children, onBack } ) {\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-document-actions', className ) }\n\t\t>\n\t\t\t{ onBack && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"edit-site-document-actions__back\"\n\t\t\t\t\ticon={ chevronLeftSmallIcon }\n\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tonBack();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\t<Button\n\t\t\t\tclassName=\"edit-site-document-actions__command\"\n\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"edit-site-document-actions__title\"\n\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\tjustify=\"center\"\n\t\t\t\t>\n\t\t\t\t\t<BlockIcon icon={ icon } />\n\t\t\t\t\t<Text size=\"body\" as=\"h1\">\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</Text>\n\t\t\t\t</HStack>\n\t\t\t\t<span className=\"edit-site-document-actions__shortcut\">\n\t\t\t\t\t{ displayShortcut.primary( 'k' ) }\n\t\t\t\t</span>\n\t\t\t</Button>\n\t\t</div>\n\t);\n}\n\nfunction getEntityLabel( entityType ) {\n\tlet label = '';\n\tswitch ( entityType ) {\n\t\tcase 'wp_navigation':\n\t\t\tlabel = 'navigation menu';\n\t\t\tbreak;\n\t\tcase 'wp_template_part':\n\t\t\tlabel = 'template part';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tlabel = 'template';\n\t\t\tbreak;\n\t}\n\n\treturn label;\n}\n"]}
1
+ {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_i18n","_data","_components","_blockEditor","_commands","_icons","_keycodes","_coreData","_useEditedEntityRecord","_store","typeLabels","wp_block","__","wp_navigation","wp_template","wp_template_part","DocumentActions","isPage","useSelect","select","editSiteStore","createElement","PageDocumentActions","TemplateDocumentActions","hasPageContentFocus","hasResolved","isFound","title","_hasPageContentFocus","getEditedPostContext","getEditedEntityRecord","hasFinishedResolution","coreStore","context","queryArgs","postType","postId","page","setHasPageContentFocus","useDispatch","hasEditedTemplate","setHasEditedTemplate","useState","prevHasPageContentFocus","useRef","useEffect","current","className","BaseDocumentActions","classnames","icon","pageIcon","onBack","_typeLabels$record$ty","isLoaded","record","getTitle","useEditedEntityRecord","typeIcon","type","navigationIcon","symbol","wp_pattern_sync_status","VisuallyHidden","as","children","open","openCommandCenter","commandsStore","Button","isRTL","chevronRightSmall","chevronLeftSmall","onClick","event","stopPropagation","__experimentalHStack","spacing","justify","BlockIcon","__experimentalText","size","displayShortcut","primary"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-actions/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\tVisuallyHidden,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { store as commandsStore } from '@wordpress/commands';\nimport {\n\tchevronLeftSmall,\n\tchevronRightSmall,\n\tpage as pageIcon,\n\tnavigation as navigationIcon,\n\tsymbol,\n} from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useState, useEffect, useRef } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../../use-edited-entity-record';\nimport { store as editSiteStore } from '../../../store';\n\nconst typeLabels = {\n\twp_block: __( 'Editing pattern:' ),\n\twp_navigation: __( 'Editing navigation menu:' ),\n\twp_template: __( 'Editing template:' ),\n\twp_template_part: __( 'Editing template part:' ),\n};\n\nexport default function DocumentActions() {\n\tconst isPage = useSelect(\n\t\t( select ) => select( editSiteStore ).isPage(),\n\t\t[]\n\t);\n\treturn isPage ? <PageDocumentActions /> : <TemplateDocumentActions />;\n}\n\nfunction PageDocumentActions() {\n\tconst { hasPageContentFocus, hasResolved, isFound, title } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\thasPageContentFocus: _hasPageContentFocus,\n\t\t\t\tgetEditedPostContext,\n\t\t\t} = select( editSiteStore );\n\t\t\tconst { getEditedEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst context = getEditedPostContext();\n\t\t\tconst queryArgs = [ 'postType', context.postType, context.postId ];\n\t\t\tconst page = getEditedEntityRecord( ...queryArgs );\n\t\t\treturn {\n\t\t\t\thasPageContentFocus: _hasPageContentFocus(),\n\t\t\t\thasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\tqueryArgs\n\t\t\t\t),\n\t\t\t\tisFound: !! page,\n\t\t\t\ttitle: page?.title,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { setHasPageContentFocus } = useDispatch( editSiteStore );\n\n\tconst [ hasEditedTemplate, setHasEditedTemplate ] = useState( false );\n\tconst prevHasPageContentFocus = useRef( false );\n\tuseEffect( () => {\n\t\tif ( prevHasPageContentFocus.current && ! hasPageContentFocus ) {\n\t\t\tsetHasEditedTemplate( true );\n\t\t}\n\t\tprevHasPageContentFocus.current = hasPageContentFocus;\n\t}, [ hasPageContentFocus ] );\n\n\tif ( ! hasResolved ) {\n\t\treturn null;\n\t}\n\n\tif ( ! isFound ) {\n\t\treturn (\n\t\t\t<div className=\"edit-site-document-actions\">\n\t\t\t\t{ __( 'Document not found' ) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn hasPageContentFocus ? (\n\t\t<BaseDocumentActions\n\t\t\tclassName={ classnames( 'is-page', {\n\t\t\t\t'is-animated': hasEditedTemplate,\n\t\t\t} ) }\n\t\t\ticon={ pageIcon }\n\t\t>\n\t\t\t{ title }\n\t\t</BaseDocumentActions>\n\t) : (\n\t\t<TemplateDocumentActions\n\t\t\tclassName=\"is-animated\"\n\t\t\tonBack={ () => setHasPageContentFocus( true ) }\n\t\t/>\n\t);\n}\n\nfunction TemplateDocumentActions( { className, onBack } ) {\n\tconst { isLoaded, record, getTitle, icon } = useEditedEntityRecord();\n\n\tif ( ! isLoaded ) {\n\t\treturn null;\n\t}\n\n\tif ( ! record ) {\n\t\treturn (\n\t\t\t<div className=\"edit-site-document-actions\">\n\t\t\t\t{ __( 'Document not found' ) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tlet typeIcon = icon;\n\tif ( record.type === 'wp_navigation' ) {\n\t\ttypeIcon = navigationIcon;\n\t} else if ( record.type === 'wp_block' ) {\n\t\ttypeIcon = symbol;\n\t}\n\n\treturn (\n\t\t<BaseDocumentActions\n\t\t\tclassName={ classnames( className, {\n\t\t\t\t'is-synced-entity':\n\t\t\t\t\trecord.wp_pattern_sync_status !== 'unsynced',\n\t\t\t} ) }\n\t\t\ticon={ typeIcon }\n\t\t\tonBack={ onBack }\n\t\t>\n\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t{ typeLabels[ record.type ] ?? typeLabels.wp_template }\n\t\t\t</VisuallyHidden>\n\t\t\t{ getTitle() }\n\t\t</BaseDocumentActions>\n\t);\n}\n\nfunction BaseDocumentActions( { className, icon, children, onBack } ) {\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-document-actions', className ) }\n\t\t>\n\t\t\t{ onBack && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"edit-site-document-actions__back\"\n\t\t\t\t\ticon={ isRTL() ? chevronRightSmall : chevronLeftSmall }\n\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tonBack();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\t<Button\n\t\t\t\tclassName=\"edit-site-document-actions__command\"\n\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"edit-site-document-actions__title\"\n\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\tjustify=\"center\"\n\t\t\t\t>\n\t\t\t\t\t<BlockIcon icon={ icon } />\n\t\t\t\t\t<Text size=\"body\" as=\"h1\">\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</Text>\n\t\t\t\t</HStack>\n\t\t\t\t<span className=\"edit-site-document-actions__shortcut\">\n\t\t\t\t\t{ displayShortcut.primary( 'k' ) }\n\t\t\t\t</span>\n\t\t\t</Button>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AA0BA,IAAAA,QAAA,GAAAC,OAAA;AAvBA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAMA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAOA,IAAAS,SAAA,GAAAT,OAAA;AAEA,IAAAU,SAAA,GAAAV,OAAA;AAKA,IAAAW,sBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AAjCA;AACA;AACA;;AAGA;AACA;AACA;;AAsBA;AACA;AACA;;AAIA,MAAMa,UAAU,GAAG;EAClBC,QAAQ,EAAE,IAAAC,QAAE,EAAE,kBAAmB,CAAC;EAClCC,aAAa,EAAE,IAAAD,QAAE,EAAE,0BAA2B,CAAC;EAC/CE,WAAW,EAAE,IAAAF,QAAE,EAAE,mBAAoB,CAAC;EACtCG,gBAAgB,EAAE,IAAAH,QAAE,EAAE,wBAAyB;AAChD,CAAC;AAEc,SAASI,eAAeA,CAAA,EAAG;EACzC,MAAMC,MAAM,GAAG,IAAAC,eAAS,EACrBC,MAAM,IAAMA,MAAM,CAAEC,YAAc,CAAC,CAACH,MAAM,CAAC,CAAC,EAC9C,EACD,CAAC;EACD,OAAOA,MAAM,GAAG,IAAArB,QAA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GA,CAAA,KAAMN,iBAAiB,CAAC;EAAG,GAErC,IAAAvE,QAAA,CAAAyB,aAAA,EAACnB,WAAA,CAAA0E,oBAAM;IACN7B,SAAS,EAAC,mCAAmC;IAC7C8B,OAAO,EAAG,CAAG;IACbC,OAAO,EAAC;EAAQ,GAEhB,IAAAlF,QAAA,CAAAyB,aAAA,EAAClB,YAAA,CAAA4E,SAAS;IAAC7B,IAAI,EAAGA;EAAM,CAAE,CAAC,EAC3B,IAAAtD,QAAA,CAAAyB,aAAA,EAACnB,WAAA,CAAA8E,kBAAI;IAACC,IAAI,EAAC,MAAM;IAACjB,EAAE,EAAC;EAAI,GACtBC,QACG,CACC,CAAC,EACT,IAAArE,QAAA,CAAAyB,aAAA;IAAM0B,SAAS,EAAC;EAAsC,GACnDmC,yBAAe,CAACC,OAAO,CAAE,GAAI,CAC1B,CACC,CACJ,CAAC;AAER"}
@@ -1,52 +1,30 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = HeaderEditMode;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  var _compose = require("@wordpress/compose");
15
-
16
11
  var _coreData = require("@wordpress/core-data");
17
-
18
12
  var _blockEditor = require("@wordpress/block-editor");
19
-
20
13
  var _data = require("@wordpress/data");
21
-
22
14
  var _interface = require("@wordpress/interface");
23
-
24
15
  var _i18n = require("@wordpress/i18n");
25
-
26
16
  var _icons = require("@wordpress/icons");
27
-
28
17
  var _components = require("@wordpress/components");
29
-
30
18
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
31
-
32
19
  var _preferences = require("@wordpress/preferences");
33
-
34
20
  var _moreMenu = _interopRequireDefault(require("./more-menu"));
35
-
36
21
  var _saveButton = _interopRequireDefault(require("../save-button"));
37
-
38
22
  var _undo = _interopRequireDefault(require("./undo-redo/undo"));
39
-
40
23
  var _redo = _interopRequireDefault(require("./undo-redo/redo"));
41
-
42
24
  var _documentActions = _interopRequireDefault(require("./document-actions"));
43
-
44
25
  var _store = require("../../store");
45
-
46
26
  var _editorCanvasContainer = require("../editor-canvas-container");
47
-
48
27
  var _lockUnlock = require("../../lock-unlock");
49
-
50
28
  /**
51
29
  * External dependencies
52
30
  */
@@ -58,14 +36,13 @@ var _lockUnlock = require("../../lock-unlock");
58
36
  /**
59
37
  * Internal dependencies
60
38
  */
39
+
61
40
  const {
62
41
  useShouldContextualToolbarShow
63
42
  } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
64
-
65
43
  const preventDefault = event => {
66
44
  event.preventDefault();
67
45
  };
68
-
69
46
  function HeaderEditMode() {
70
47
  const inserterButton = (0, _element.useRef)();
71
48
  const {
@@ -98,7 +75,6 @@ function HeaderEditMode() {
98
75
  const postType = getEditedPostType();
99
76
  const {
100
77
  getUnstableBase // Site index.
101
-
102
78
  } = select(_coreData.store);
103
79
  const {
104
80
  get: getPreference
@@ -144,14 +120,14 @@ function HeaderEditMode() {
144
120
  shouldShowContextualToolbar,
145
121
  canFocusHiddenToolbar,
146
122
  fixedToolbarCanBeFocused
147
- } = useShouldContextualToolbarShow(); // If there's a block toolbar to be focused, disable the focus shortcut for the document toolbar.
123
+ } = useShouldContextualToolbarShow();
124
+ // If there's a block toolbar to be focused, disable the focus shortcut for the document toolbar.
148
125
  // There's a fixed block toolbar when the fixed toolbar option is enabled or when the browser width is less than the large viewport.
149
-
150
126
  const blockToolbarCanBeFocused = shouldShowContextualToolbar || canFocusHiddenToolbar || fixedToolbarCanBeFocused;
151
127
  const hasDefaultEditorCanvasView = !(0, _editorCanvasContainer.useHasEditorCanvasContainer)();
152
128
  const isFocusMode = templateType === 'wp_template_part' || templateType === 'wp_navigation';
153
- /* translators: button label text should, if possible, be under 16 characters. */
154
129
 
130
+ /* translators: button label text should, if possible, be under 16 characters. */
155
131
  const longLabel = (0, _i18n._x)('Toggle block inserter', 'Generic label for block inserter button');
156
132
  const shortLabel = !isInserterOpen ? (0, _i18n.__)('Add') : (0, _i18n.__)('Close');
157
133
  const isZoomedOutViewExperimentEnabled = window?.__experimentalEnableZoomedOutView && isVisualMode;
@@ -219,8 +195,7 @@ function HeaderEditMode() {
219
195
  disabled: !isVisualMode || isZoomedOutView,
220
196
  icon: _icons.listView,
221
197
  isPressed: isListViewOpen
222
- /* translators: button label text should, if possible, be under 16 characters. */
223
- ,
198
+ /* translators: button label text should, if possible, be under 16 characters. */,
224
199
  label: (0, _i18n.__)('List View'),
225
200
  onClick: toggleListView,
226
201
  shortcut: listViewShortcut,
@@ -231,12 +206,10 @@ function HeaderEditMode() {
231
206
  className: "edit-site-header-edit-mode__zoom-out-view-toggle",
232
207
  icon: _icons.chevronUpDown,
233
208
  isPressed: isZoomedOutView
234
- /* translators: button label text should, if possible, be under 16 characters. */
235
- ,
209
+ /* translators: button label text should, if possible, be under 16 characters. */,
236
210
  label: (0, _i18n.__)('Zoom-out View'),
237
211
  onClick: () => {
238
- setPreviewDeviceType('desktop');
239
-
212
+ setPreviewDeviceType('Desktop');
240
213
  __unstableSetEditorMode(isZoomedOutView ? 'edit' : 'zoom-out');
241
214
  }
242
215
  })))), !isDistractionFree && (0, _element.createElement)("div", {
@@ -264,8 +237,7 @@ function HeaderEditMode() {
264
237
  onClick: onClose
265
238
  }, (0, _i18n.__)('View site'), (0, _element.createElement)(_components.VisuallyHidden, {
266
239
  as: "span"
267
- },
268
- /* translators: accessibility text */
240
+ }, /* translators: accessibility text */
269
241
  (0, _i18n.__)('(opens in a new tab)')))))), (0, _element.createElement)(_saveButton.default, null), !isDistractionFree && (0, _element.createElement)(_interface.PinnedItems.Slot, {
270
242
  scope: "core/edit-site"
271
243
  }), (0, _element.createElement)(_moreMenu.default, {