@wordpress/edit-site 5.10.0 → 5.12.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 (678) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-page/index.js +105 -0
  3. package/build/components/add-new-page/index.js.map +1 -0
  4. package/build/components/add-new-template/{add-custom-generic-template-modal.js → add-custom-generic-template-modal-content.js} +9 -25
  5. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -0
  6. package/build/components/add-new-template/{add-custom-template-modal.js → add-custom-template-modal-content.js} +28 -41
  7. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -0
  8. package/build/components/add-new-template/index.js +4 -5
  9. package/build/components/add-new-template/index.js.map +1 -1
  10. package/build/components/add-new-template/new-template-part.js +9 -12
  11. package/build/components/add-new-template/new-template-part.js.map +1 -1
  12. package/build/components/add-new-template/new-template.js +106 -80
  13. package/build/components/add-new-template/new-template.js.map +1 -1
  14. package/build/components/add-new-template/utils.js +71 -120
  15. package/build/components/add-new-template/utils.js.map +1 -1
  16. package/build/components/block-editor/back-button.js +1 -3
  17. package/build/components/block-editor/back-button.js.map +1 -1
  18. package/build/components/block-editor/block-inspector-button.js +3 -4
  19. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  20. package/build/components/block-editor/editor-canvas.js +6 -7
  21. package/build/components/block-editor/editor-canvas.js.map +1 -1
  22. package/build/components/block-editor/index.js +14 -13
  23. package/build/components/block-editor/index.js.map +1 -1
  24. package/build/components/block-editor/inserter-media-categories.js +25 -42
  25. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  26. package/build/components/block-editor/resizable-editor.js +6 -7
  27. package/build/components/block-editor/resizable-editor.js.map +1 -1
  28. package/build/components/block-editor/resize-handle.js +5 -7
  29. package/build/components/block-editor/resize-handle.js.map +1 -1
  30. package/build/components/code-editor/code-editor-text-area.js +5 -6
  31. package/build/components/code-editor/code-editor-text-area.js.map +1 -1
  32. package/build/components/create-template-part-modal/index.js +30 -35
  33. package/build/components/create-template-part-modal/index.js.map +1 -1
  34. package/build/components/editor/index.js +37 -53
  35. package/build/components/editor/index.js.map +1 -1
  36. package/build/components/editor-canvas-container/index.js +15 -9
  37. package/build/components/editor-canvas-container/index.js.map +1 -1
  38. package/build/components/error-boundary/warning.js +8 -10
  39. package/build/components/error-boundary/warning.js.map +1 -1
  40. package/build/components/global-styles/block-preview-panel.js +7 -10
  41. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  42. package/build/components/global-styles/color-indicator-wrapper.js +4 -5
  43. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  44. package/build/components/global-styles/color-palette-panel.js +3 -4
  45. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  46. package/build/components/global-styles/dimensions-panel.js +1 -3
  47. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  48. package/build/components/global-styles/global-styles-provider.js +8 -10
  49. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  50. package/build/components/global-styles/gradients-palette-panel.js +3 -4
  51. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  52. package/build/components/global-styles/header.js +4 -5
  53. package/build/components/global-styles/header.js.map +1 -1
  54. package/build/components/global-styles/icon-with-current-color.js +4 -5
  55. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  56. package/build/components/global-styles/navigation-button.js +5 -6
  57. package/build/components/global-styles/navigation-button.js.map +1 -1
  58. package/build/components/global-styles/palette.js +10 -14
  59. package/build/components/global-styles/palette.js.map +1 -1
  60. package/build/components/global-styles/preview.js +41 -51
  61. package/build/components/global-styles/preview.js.map +1 -1
  62. package/build/components/global-styles/screen-block-list.js +4 -7
  63. package/build/components/global-styles/screen-block-list.js.map +1 -1
  64. package/build/components/global-styles/screen-block.js +88 -12
  65. package/build/components/global-styles/screen-block.js.map +1 -1
  66. package/build/components/global-styles/screen-color-palette.js +3 -4
  67. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  68. package/build/components/global-styles/screen-revisions/index.js +10 -17
  69. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  70. package/build/components/global-styles/screen-revisions/revisions-buttons.js +26 -33
  71. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  72. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +20 -35
  73. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  74. package/build/components/global-styles/screen-root.js +5 -5
  75. package/build/components/global-styles/screen-root.js.map +1 -1
  76. package/build/components/global-styles/screen-typography-element.js +3 -4
  77. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  78. package/build/components/global-styles/screen-typography.js +5 -6
  79. package/build/components/global-styles/screen-typography.js.map +1 -1
  80. package/build/components/global-styles/style-variations-container.js +11 -16
  81. package/build/components/global-styles/style-variations-container.js.map +1 -1
  82. package/build/components/global-styles/subtitle.js +4 -5
  83. package/build/components/global-styles/subtitle.js.map +1 -1
  84. package/build/components/global-styles/typography-panel.js +4 -5
  85. package/build/components/global-styles/typography-panel.js.map +1 -1
  86. package/build/components/global-styles/typography-preview.js +5 -6
  87. package/build/components/global-styles/typography-preview.js.map +1 -1
  88. package/build/components/global-styles/ui.js +49 -30
  89. package/build/components/global-styles/ui.js.map +1 -1
  90. package/build/components/global-styles/variations-panel.js +5 -6
  91. package/build/components/global-styles/variations-panel.js.map +1 -1
  92. package/build/components/header-edit-mode/document-actions/index.js +99 -95
  93. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  94. package/build/components/header-edit-mode/index.js +16 -7
  95. package/build/components/header-edit-mode/index.js.map +1 -1
  96. package/build/components/header-edit-mode/more-menu/index.js +49 -53
  97. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  98. package/build/components/header-edit-mode/tools-more-menu-group/index.js +5 -14
  99. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  100. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
  101. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  102. package/build/components/keyboard-shortcut-help-modal/index.js +41 -51
  103. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  104. package/build/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
  105. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  106. package/build/components/layout/hooks.js +54 -0
  107. package/build/components/layout/hooks.js.map +1 -0
  108. package/build/components/layout/index.js +33 -94
  109. package/build/components/layout/index.js.map +1 -1
  110. package/build/components/list/added-by.js +13 -23
  111. package/build/components/list/added-by.js.map +1 -1
  112. package/build/components/list/header.js +4 -7
  113. package/build/components/list/header.js.map +1 -1
  114. package/build/components/list/index.js +2 -4
  115. package/build/components/list/index.js.map +1 -1
  116. package/build/components/list/table.js +35 -40
  117. package/build/components/list/table.js.map +1 -1
  118. package/build/components/page-actions/delete-page-menu-item.js +70 -0
  119. package/build/components/page-actions/delete-page-menu-item.js.map +1 -0
  120. package/build/components/page-actions/index.js +43 -0
  121. package/build/components/page-actions/index.js.map +1 -0
  122. package/build/components/page-content-lock/constants.js +9 -0
  123. package/build/components/page-content-lock/constants.js.map +1 -0
  124. package/build/components/page-content-lock/index.js +29 -0
  125. package/build/components/page-content-lock/index.js.map +1 -0
  126. package/build/components/page-content-lock/use-disable-non-content-blocks.js +49 -0
  127. package/build/components/page-content-lock/use-disable-non-content-blocks.js.map +1 -0
  128. package/build/components/page-content-lock/use-page-content-lock-notifications.js +112 -0
  129. package/build/components/page-content-lock/use-page-content-lock-notifications.js.map +1 -0
  130. package/build/components/preferences-modal/index.js +4 -5
  131. package/build/components/preferences-modal/index.js.map +1 -1
  132. package/build/components/resizable-frame/index.js +250 -0
  133. package/build/components/resizable-frame/index.js.map +1 -0
  134. package/build/components/revisions/index.js +13 -15
  135. package/build/components/revisions/index.js.map +1 -1
  136. package/build/components/routes/link.js +8 -12
  137. package/build/components/routes/link.js.map +1 -1
  138. package/build/components/routes/use-title.js +1 -5
  139. package/build/components/routes/use-title.js.map +1 -1
  140. package/build/components/save-button/index.js +13 -7
  141. package/build/components/save-button/index.js.map +1 -1
  142. package/build/components/save-hub/index.js +97 -5
  143. package/build/components/save-hub/index.js.map +1 -1
  144. package/build/components/save-panel/index.js +63 -17
  145. package/build/components/save-panel/index.js.map +1 -1
  146. package/build/components/secondary-sidebar/list-view-sidebar.js +12 -6
  147. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  148. package/build/components/sidebar/index.js +11 -9
  149. package/build/components/sidebar/index.js.map +1 -1
  150. package/build/components/sidebar-edit-mode/default-sidebar.js +11 -12
  151. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  152. package/build/components/sidebar-edit-mode/index.js +13 -10
  153. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  154. package/build/components/sidebar-edit-mode/page-panels/content-blocks-list.js +79 -0
  155. package/build/components/sidebar-edit-mode/page-panels/content-blocks-list.js.map +1 -0
  156. package/build/components/sidebar-edit-mode/page-panels/index.js +86 -0
  157. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -0
  158. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +4 -5
  159. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  160. package/build/components/sidebar-edit-mode/settings-header/index.js +39 -21
  161. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  162. package/build/components/sidebar-edit-mode/sidebar-card/index.js +46 -0
  163. package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -0
  164. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +3 -4
  165. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  166. package/build/components/sidebar-edit-mode/{template-card → template-panel}/index.js +22 -18
  167. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -0
  168. package/build/components/sidebar-edit-mode/{template-revisions/index.js → template-panel/last-revision.js} +7 -8
  169. package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -0
  170. package/build/components/sidebar-edit-mode/{template-card → template-panel}/template-actions.js +12 -16
  171. package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -0
  172. package/build/components/sidebar-edit-mode/{template-card → template-panel}/template-areas.js +15 -19
  173. package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -0
  174. package/build/components/sidebar-navigation-item/index.js +7 -8
  175. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  176. package/build/components/sidebar-navigation-screen/index.js +21 -14
  177. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  178. package/build/components/sidebar-navigation-screen-global-styles/index.js +166 -12
  179. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  180. package/build/components/sidebar-navigation-screen-main/index.js +24 -33
  181. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  182. package/build/components/sidebar-navigation-screen-navigation-item/index.js +3 -5
  183. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  184. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +159 -0
  185. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -0
  186. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +17 -0
  187. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -0
  188. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +51 -107
  189. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  190. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +84 -0
  191. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -0
  192. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +16 -74
  193. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  194. package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +52 -0
  195. package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +1 -0
  196. package/build/components/sidebar-navigation-screen-page/index.js +81 -10
  197. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  198. package/build/components/sidebar-navigation-screen-page/page-details.js +148 -0
  199. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -0
  200. package/build/components/sidebar-navigation-screen-page/status-label.js +110 -0
  201. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -0
  202. package/build/components/sidebar-navigation-screen-pages/index.js +128 -17
  203. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  204. package/build/components/sidebar-navigation-screen-template/index.js +22 -16
  205. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  206. package/build/components/sidebar-navigation-screen-template-part/index.js +105 -0
  207. package/build/components/sidebar-navigation-screen-template-part/index.js.map +1 -0
  208. package/build/components/sidebar-navigation-screen-templates/index.js +44 -24
  209. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  210. package/build/components/sidebar-navigation-subtitle/index.js +3 -4
  211. package/build/components/sidebar-navigation-subtitle/index.js.map +1 -1
  212. package/build/components/site-hub/index.js +20 -15
  213. package/build/components/site-hub/index.js.map +1 -1
  214. package/build/components/site-icon/index.js +4 -5
  215. package/build/components/site-icon/index.js.map +1 -1
  216. package/build/components/start-template-options/index.js +15 -21
  217. package/build/components/start-template-options/index.js.map +1 -1
  218. package/build/components/style-book/index.js +107 -37
  219. package/build/components/style-book/index.js.map +1 -1
  220. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -2
  221. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  222. package/build/components/sync-state-with-url/use-sync-path-with-url.js +9 -10
  223. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  224. package/build/components/{list/actions → template-actions}/index.js +39 -33
  225. package/build/components/template-actions/index.js.map +1 -0
  226. package/build/components/{list/actions → template-actions}/rename-menu-item.js +4 -5
  227. package/build/components/template-actions/rename-menu-item.js.map +1 -0
  228. package/build/components/template-part-converter/convert-to-regular.js +4 -5
  229. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  230. package/build/components/template-part-converter/convert-to-template-part.js +8 -10
  231. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  232. package/build/components/template-part-converter/index.js +12 -18
  233. package/build/components/template-part-converter/index.js.map +1 -1
  234. package/build/components/use-edited-entity-record/index.js +8 -4
  235. package/build/components/use-edited-entity-record/index.js.map +1 -1
  236. package/build/components/welcome-guide/image.js +4 -5
  237. package/build/components/welcome-guide/image.js.map +1 -1
  238. package/build/hooks/commands/use-edit-mode-commands.js +103 -0
  239. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -0
  240. package/build/hooks/push-changes-to-global-styles/index.js +11 -8
  241. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  242. package/build/hooks/template-part-edit.js +5 -6
  243. package/build/hooks/template-part-edit.js.map +1 -1
  244. package/build/index.js +3 -6
  245. package/build/index.js.map +1 -1
  246. package/build/store/actions.js +131 -125
  247. package/build/store/actions.js.map +1 -1
  248. package/build/store/private-actions.js +7 -10
  249. package/build/store/private-actions.js.map +1 -1
  250. package/build/store/reducer.js +32 -33
  251. package/build/store/reducer.js.map +1 -1
  252. package/build/store/selectors.js +35 -11
  253. package/build/store/selectors.js.map +1 -1
  254. package/build/store/utils.js +1 -3
  255. package/build/store/utils.js.map +1 -1
  256. package/build/utils/get-is-list-page.js +3 -4
  257. package/build/utils/get-is-list-page.js.map +1 -1
  258. package/build/utils/is-previewing-theme.js +1 -3
  259. package/build/utils/is-previewing-theme.js.map +1 -1
  260. package/build/utils/is-template-revertable.js +1 -1
  261. package/build/utils/is-template-revertable.js.map +1 -1
  262. package/build-module/components/add-new-page/index.js +93 -0
  263. package/build-module/components/add-new-page/index.js.map +1 -0
  264. package/build-module/components/add-new-template/{add-custom-generic-template-modal.js → add-custom-generic-template-modal-content.js} +10 -23
  265. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -0
  266. package/build-module/components/add-new-template/{add-custom-template-modal.js → add-custom-template-modal-content.js} +30 -42
  267. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -0
  268. package/build-module/components/add-new-template/index.js +4 -5
  269. package/build-module/components/add-new-template/index.js.map +1 -1
  270. package/build-module/components/add-new-template/new-template-part.js +9 -12
  271. package/build-module/components/add-new-template/new-template-part.js.map +1 -1
  272. package/build-module/components/add-new-template/new-template.js +105 -82
  273. package/build-module/components/add-new-template/new-template.js.map +1 -1
  274. package/build-module/components/add-new-template/utils.js +71 -120
  275. package/build-module/components/add-new-template/utils.js.map +1 -1
  276. package/build-module/components/block-editor/back-button.js +1 -3
  277. package/build-module/components/block-editor/back-button.js.map +1 -1
  278. package/build-module/components/block-editor/block-inspector-button.js +3 -4
  279. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  280. package/build-module/components/block-editor/editor-canvas.js +6 -7
  281. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  282. package/build-module/components/block-editor/index.js +13 -13
  283. package/build-module/components/block-editor/index.js.map +1 -1
  284. package/build-module/components/block-editor/inserter-media-categories.js +25 -42
  285. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  286. package/build-module/components/block-editor/resizable-editor.js +6 -7
  287. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  288. package/build-module/components/block-editor/resize-handle.js +5 -7
  289. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  290. package/build-module/components/code-editor/code-editor-text-area.js +5 -6
  291. package/build-module/components/code-editor/code-editor-text-area.js.map +1 -1
  292. package/build-module/components/create-template-part-modal/index.js +31 -36
  293. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  294. package/build-module/components/editor/index.js +38 -56
  295. package/build-module/components/editor/index.js.map +1 -1
  296. package/build-module/components/editor-canvas-container/index.js +12 -9
  297. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  298. package/build-module/components/error-boundary/warning.js +8 -10
  299. package/build-module/components/error-boundary/warning.js.map +1 -1
  300. package/build-module/components/global-styles/block-preview-panel.js +7 -10
  301. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  302. package/build-module/components/global-styles/color-indicator-wrapper.js +4 -5
  303. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  304. package/build-module/components/global-styles/color-palette-panel.js +3 -4
  305. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  306. package/build-module/components/global-styles/dimensions-panel.js +1 -3
  307. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  308. package/build-module/components/global-styles/global-styles-provider.js +8 -10
  309. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  310. package/build-module/components/global-styles/gradients-palette-panel.js +3 -4
  311. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  312. package/build-module/components/global-styles/header.js +4 -5
  313. package/build-module/components/global-styles/header.js.map +1 -1
  314. package/build-module/components/global-styles/icon-with-current-color.js +4 -5
  315. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  316. package/build-module/components/global-styles/navigation-button.js +5 -6
  317. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  318. package/build-module/components/global-styles/palette.js +10 -14
  319. package/build-module/components/global-styles/palette.js.map +1 -1
  320. package/build-module/components/global-styles/preview.js +41 -51
  321. package/build-module/components/global-styles/preview.js.map +1 -1
  322. package/build-module/components/global-styles/screen-block-list.js +4 -7
  323. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  324. package/build-module/components/global-styles/screen-block.js +90 -13
  325. package/build-module/components/global-styles/screen-block.js.map +1 -1
  326. package/build-module/components/global-styles/screen-color-palette.js +3 -4
  327. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  328. package/build-module/components/global-styles/screen-revisions/index.js +10 -17
  329. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  330. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +26 -34
  331. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  332. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +20 -34
  333. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  334. package/build-module/components/global-styles/screen-root.js +5 -5
  335. package/build-module/components/global-styles/screen-root.js.map +1 -1
  336. package/build-module/components/global-styles/screen-typography-element.js +3 -4
  337. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  338. package/build-module/components/global-styles/screen-typography.js +5 -6
  339. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  340. package/build-module/components/global-styles/style-variations-container.js +12 -17
  341. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  342. package/build-module/components/global-styles/subtitle.js +4 -5
  343. package/build-module/components/global-styles/subtitle.js.map +1 -1
  344. package/build-module/components/global-styles/typography-panel.js +4 -5
  345. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  346. package/build-module/components/global-styles/typography-preview.js +5 -6
  347. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  348. package/build-module/components/global-styles/ui.js +50 -31
  349. package/build-module/components/global-styles/ui.js.map +1 -1
  350. package/build-module/components/global-styles/variations-panel.js +5 -6
  351. package/build-module/components/global-styles/variations-panel.js.map +1 -1
  352. package/build-module/components/header-edit-mode/document-actions/index.js +99 -97
  353. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  354. package/build-module/components/header-edit-mode/index.js +16 -8
  355. package/build-module/components/header-edit-mode/index.js.map +1 -1
  356. package/build-module/components/header-edit-mode/more-menu/index.js +49 -53
  357. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  358. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +5 -13
  359. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  360. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
  361. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  362. package/build-module/components/keyboard-shortcut-help-modal/index.js +39 -49
  363. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  364. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
  365. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  366. package/build-module/components/layout/hooks.js +41 -0
  367. package/build-module/components/layout/hooks.js.map +1 -0
  368. package/build-module/components/layout/index.js +34 -97
  369. package/build-module/components/layout/index.js.map +1 -1
  370. package/build-module/components/list/added-by.js +13 -23
  371. package/build-module/components/list/added-by.js.map +1 -1
  372. package/build-module/components/list/header.js +4 -7
  373. package/build-module/components/list/header.js.map +1 -1
  374. package/build-module/components/list/index.js +2 -4
  375. package/build-module/components/list/index.js.map +1 -1
  376. package/build-module/components/list/table.js +34 -39
  377. package/build-module/components/list/table.js.map +1 -1
  378. package/build-module/components/page-actions/delete-page-menu-item.js +58 -0
  379. package/build-module/components/page-actions/delete-page-menu-item.js.map +1 -0
  380. package/build-module/components/page-actions/index.js +30 -0
  381. package/build-module/components/page-actions/index.js.map +1 -0
  382. package/build-module/components/page-content-lock/constants.js +2 -0
  383. package/build-module/components/page-content-lock/constants.js.map +1 -0
  384. package/build-module/components/page-content-lock/index.js +14 -0
  385. package/build-module/components/page-content-lock/index.js.map +1 -0
  386. package/build-module/components/page-content-lock/use-disable-non-content-blocks.js +36 -0
  387. package/build-module/components/page-content-lock/use-disable-non-content-blocks.js.map +1 -0
  388. package/build-module/components/page-content-lock/use-page-content-lock-notifications.js +98 -0
  389. package/build-module/components/page-content-lock/use-page-content-lock-notifications.js.map +1 -0
  390. package/build-module/components/preferences-modal/index.js +4 -5
  391. package/build-module/components/preferences-modal/index.js.map +1 -1
  392. package/build-module/components/resizable-frame/index.js +236 -0
  393. package/build-module/components/resizable-frame/index.js.map +1 -0
  394. package/build-module/components/revisions/index.js +13 -14
  395. package/build-module/components/revisions/index.js.map +1 -1
  396. package/build-module/components/routes/link.js +8 -12
  397. package/build-module/components/routes/link.js.map +1 -1
  398. package/build-module/components/routes/use-title.js +1 -5
  399. package/build-module/components/routes/use-title.js.map +1 -1
  400. package/build-module/components/save-button/index.js +13 -7
  401. package/build-module/components/save-button/index.js.map +1 -1
  402. package/build-module/components/save-hub/index.js +95 -8
  403. package/build-module/components/save-hub/index.js.map +1 -1
  404. package/build-module/components/save-panel/index.js +62 -19
  405. package/build-module/components/save-panel/index.js.map +1 -1
  406. package/build-module/components/secondary-sidebar/list-view-sidebar.js +12 -6
  407. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  408. package/build-module/components/sidebar/index.js +9 -8
  409. package/build-module/components/sidebar/index.js.map +1 -1
  410. package/build-module/components/sidebar-edit-mode/default-sidebar.js +11 -12
  411. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  412. package/build-module/components/sidebar-edit-mode/index.js +14 -11
  413. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  414. package/build-module/components/sidebar-edit-mode/page-panels/content-blocks-list.js +67 -0
  415. package/build-module/components/sidebar-edit-mode/page-panels/content-blocks-list.js.map +1 -0
  416. package/build-module/components/sidebar-edit-mode/page-panels/index.js +67 -0
  417. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -0
  418. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +4 -5
  419. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  420. package/build-module/components/sidebar-edit-mode/settings-header/index.js +36 -22
  421. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  422. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +35 -0
  423. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -0
  424. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +3 -4
  425. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  426. package/build-module/components/sidebar-edit-mode/{template-card → template-panel}/index.js +20 -19
  427. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -0
  428. package/build-module/components/sidebar-edit-mode/{template-revisions/index.js → template-panel/last-revision.js} +7 -8
  429. package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -0
  430. package/build-module/components/sidebar-edit-mode/{template-card → template-panel}/template-actions.js +12 -16
  431. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -0
  432. package/build-module/components/sidebar-edit-mode/{template-card → template-panel}/template-areas.js +15 -19
  433. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -0
  434. package/build-module/components/sidebar-navigation-item/index.js +7 -8
  435. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  436. package/build-module/components/sidebar-navigation-screen/index.js +22 -15
  437. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  438. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +161 -15
  439. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  440. package/build-module/components/sidebar-navigation-screen-main/index.js +21 -32
  441. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  442. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +3 -5
  443. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  444. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +138 -0
  445. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -0
  446. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +10 -0
  447. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -0
  448. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +49 -106
  449. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  450. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +68 -0
  451. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -0
  452. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +14 -74
  453. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  454. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +39 -0
  455. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +1 -0
  456. package/build-module/components/sidebar-navigation-screen-page/index.js +79 -14
  457. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  458. package/build-module/components/sidebar-navigation-screen-page/page-details.js +131 -0
  459. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -0
  460. package/build-module/components/sidebar-navigation-screen-page/status-label.js +97 -0
  461. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -0
  462. package/build-module/components/sidebar-navigation-screen-pages/index.js +125 -19
  463. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  464. package/build-module/components/sidebar-navigation-screen-template/index.js +22 -17
  465. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  466. package/build-module/components/sidebar-navigation-screen-template-part/index.js +86 -0
  467. package/build-module/components/sidebar-navigation-screen-template-part/index.js.map +1 -0
  468. package/build-module/components/sidebar-navigation-screen-templates/index.js +43 -24
  469. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  470. package/build-module/components/sidebar-navigation-subtitle/index.js +3 -4
  471. package/build-module/components/sidebar-navigation-subtitle/index.js.map +1 -1
  472. package/build-module/components/site-hub/index.js +21 -16
  473. package/build-module/components/site-hub/index.js.map +1 -1
  474. package/build-module/components/site-icon/index.js +4 -5
  475. package/build-module/components/site-icon/index.js.map +1 -1
  476. package/build-module/components/start-template-options/index.js +15 -21
  477. package/build-module/components/start-template-options/index.js.map +1 -1
  478. package/build-module/components/style-book/index.js +107 -38
  479. package/build-module/components/style-book/index.js.map +1 -1
  480. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -2
  481. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  482. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +9 -10
  483. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  484. package/build-module/components/template-actions/index.js +92 -0
  485. package/build-module/components/template-actions/index.js.map +1 -0
  486. package/build-module/components/{list/actions → template-actions}/rename-menu-item.js +4 -5
  487. package/build-module/components/template-actions/rename-menu-item.js.map +1 -0
  488. package/build-module/components/template-part-converter/convert-to-regular.js +4 -5
  489. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  490. package/build-module/components/template-part-converter/convert-to-template-part.js +8 -10
  491. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  492. package/build-module/components/template-part-converter/index.js +12 -18
  493. package/build-module/components/template-part-converter/index.js.map +1 -1
  494. package/build-module/components/use-edited-entity-record/index.js +8 -4
  495. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  496. package/build-module/components/welcome-guide/image.js +4 -5
  497. package/build-module/components/welcome-guide/image.js.map +1 -1
  498. package/build-module/hooks/commands/use-edit-mode-commands.js +84 -0
  499. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -0
  500. package/build-module/hooks/push-changes-to-global-styles/index.js +11 -8
  501. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  502. package/build-module/hooks/template-part-edit.js +5 -6
  503. package/build-module/hooks/template-part-edit.js.map +1 -1
  504. package/build-module/index.js +3 -6
  505. package/build-module/index.js.map +1 -1
  506. package/build-module/store/actions.js +127 -126
  507. package/build-module/store/actions.js.map +1 -1
  508. package/build-module/store/private-actions.js +7 -10
  509. package/build-module/store/private-actions.js.map +1 -1
  510. package/build-module/store/reducer.js +30 -33
  511. package/build-module/store/reducer.js.map +1 -1
  512. package/build-module/store/selectors.js +31 -11
  513. package/build-module/store/selectors.js.map +1 -1
  514. package/build-module/store/utils.js +1 -3
  515. package/build-module/store/utils.js.map +1 -1
  516. package/build-module/utils/get-is-list-page.js +3 -4
  517. package/build-module/utils/get-is-list-page.js.map +1 -1
  518. package/build-module/utils/is-previewing-theme.js +1 -3
  519. package/build-module/utils/is-previewing-theme.js.map +1 -1
  520. package/build-module/utils/is-template-revertable.js +1 -1
  521. package/build-module/utils/is-template-revertable.js.map +1 -1
  522. package/build-style/style-rtl.css +477 -232
  523. package/build-style/style.css +478 -232
  524. package/package.json +40 -37
  525. package/src/components/add-new-page/index.js +105 -0
  526. package/src/components/add-new-template/add-custom-generic-template-modal-content.js +82 -0
  527. package/src/components/add-new-template/{add-custom-template-modal.js → add-custom-template-modal-content.js} +13 -26
  528. package/src/components/add-new-template/new-template.js +141 -154
  529. package/src/components/add-new-template/style.scss +79 -66
  530. package/src/components/block-editor/index.js +27 -17
  531. package/src/components/create-template-part-modal/index.js +19 -25
  532. package/src/components/editor/index.js +30 -53
  533. package/src/components/editor/style.scss +11 -1
  534. package/src/components/editor-canvas-container/index.js +28 -19
  535. package/src/components/global-styles/screen-block.js +74 -3
  536. package/src/components/global-styles/screen-revisions/index.js +3 -11
  537. package/src/components/global-styles/screen-revisions/revisions-buttons.js +33 -25
  538. package/src/components/global-styles/screen-revisions/style.scss +3 -2
  539. package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +16 -3
  540. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +22 -24
  541. package/src/components/global-styles/screen-root.js +5 -3
  542. package/src/components/global-styles/style-variations-container.js +13 -18
  543. package/src/components/global-styles/style.scss +3 -0
  544. package/src/components/global-styles/ui.js +39 -9
  545. package/src/components/header-edit-mode/document-actions/index.js +112 -121
  546. package/src/components/header-edit-mode/document-actions/style.scss +78 -54
  547. package/src/components/header-edit-mode/index.js +18 -0
  548. package/src/components/header-edit-mode/style.scss +1 -0
  549. package/src/components/header-edit-mode/tools-more-menu-group/index.js +1 -6
  550. package/src/components/layout/hooks.js +46 -0
  551. package/src/components/layout/index.js +47 -122
  552. package/src/components/layout/style.scss +8 -2
  553. package/src/components/list/style.scss +1 -0
  554. package/src/components/list/table.js +6 -2
  555. package/src/components/page-actions/delete-page-menu-item.js +71 -0
  556. package/src/components/page-actions/index.js +36 -0
  557. package/src/components/page-content-lock/constants.js +5 -0
  558. package/src/components/page-content-lock/index.js +14 -0
  559. package/src/components/page-content-lock/use-disable-non-content-blocks.js +44 -0
  560. package/src/components/page-content-lock/use-page-content-lock-notifications.js +128 -0
  561. package/src/components/resizable-frame/index.js +263 -0
  562. package/src/components/resizable-frame/style.scss +71 -0
  563. package/src/components/revisions/index.js +7 -7
  564. package/src/components/save-button/index.js +6 -0
  565. package/src/components/save-hub/index.js +143 -38
  566. package/src/components/save-hub/style.scss +6 -0
  567. package/src/components/save-panel/index.js +62 -15
  568. package/src/components/secondary-sidebar/list-view-sidebar.js +10 -2
  569. package/src/components/sidebar/index.js +10 -8
  570. package/src/components/sidebar/style.scss +3 -4
  571. package/src/components/sidebar-edit-mode/index.js +16 -14
  572. package/src/components/sidebar-edit-mode/page-panels/content-blocks-list.js +77 -0
  573. package/src/components/sidebar-edit-mode/page-panels/index.js +89 -0
  574. package/src/components/sidebar-edit-mode/page-panels/style.scss +10 -0
  575. package/src/components/sidebar-edit-mode/settings-header/index.js +51 -28
  576. package/src/components/sidebar-edit-mode/sidebar-card/index.js +34 -0
  577. package/src/components/sidebar-edit-mode/sidebar-card/style.scss +34 -0
  578. package/src/components/sidebar-edit-mode/{template-card → template-panel}/index.js +22 -19
  579. package/src/components/sidebar-edit-mode/{template-revisions/index.js → template-panel/last-revision.js} +1 -2
  580. package/src/components/sidebar-edit-mode/{template-card → template-panel}/style.scss +2 -32
  581. package/src/components/sidebar-navigation-item/style.scss +9 -0
  582. package/src/components/sidebar-navigation-screen/index.js +74 -50
  583. package/src/components/sidebar-navigation-screen/style.scss +46 -6
  584. package/src/components/sidebar-navigation-screen-global-styles/index.js +212 -21
  585. package/src/components/sidebar-navigation-screen-global-styles/style.scss +15 -0
  586. package/src/components/sidebar-navigation-screen-main/index.js +35 -52
  587. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +157 -0
  588. package/src/components/sidebar-navigation-screen-navigation-menus/constants.js +9 -0
  589. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +63 -117
  590. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +83 -0
  591. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -72
  592. package/src/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +47 -0
  593. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +7 -21
  594. package/src/components/sidebar-navigation-screen-page/index.js +137 -24
  595. package/src/components/sidebar-navigation-screen-page/page-details.js +163 -0
  596. package/src/components/sidebar-navigation-screen-page/status-label.js +101 -0
  597. package/src/components/sidebar-navigation-screen-page/style.scss +80 -0
  598. package/src/components/sidebar-navigation-screen-pages/index.js +180 -44
  599. package/src/components/sidebar-navigation-screen-template/index.js +25 -22
  600. package/src/components/sidebar-navigation-screen-template-part/index.js +103 -0
  601. package/src/components/sidebar-navigation-screen-templates/index.js +52 -13
  602. package/src/components/sidebar-navigation-subtitle/style.scss +2 -2
  603. package/src/components/site-hub/index.js +29 -15
  604. package/src/components/site-hub/style.scss +26 -0
  605. package/src/components/start-template-options/style.scss +20 -21
  606. package/src/components/style-book/index.js +132 -43
  607. package/src/components/style-book/style.scss +19 -0
  608. package/src/components/{list/actions → template-actions}/index.js +31 -11
  609. package/src/components/use-edited-entity-record/index.js +12 -3
  610. package/src/hooks/commands/use-edit-mode-commands.js +79 -0
  611. package/src/hooks/push-changes-to-global-styles/index.js +13 -7
  612. package/src/store/actions.js +24 -6
  613. package/src/store/reducer.js +20 -0
  614. package/src/store/selectors.js +24 -0
  615. package/src/store/test/actions.js +31 -0
  616. package/src/store/test/reducer.js +44 -0
  617. package/src/store/test/selectors.js +57 -0
  618. package/src/store/test/utils.js +15 -5
  619. package/src/style.scss +6 -3
  620. package/src/utils/is-previewing-theme.js +1 -4
  621. package/build/components/add-new-template/add-custom-generic-template-modal.js.map +0 -1
  622. package/build/components/add-new-template/add-custom-template-modal.js.map +0 -1
  623. package/build/components/global-styles/border-panel.js +0 -135
  624. package/build/components/global-styles/border-panel.js.map +0 -1
  625. package/build/components/list/actions/index.js.map +0 -1
  626. package/build/components/list/actions/rename-menu-item.js.map +0 -1
  627. package/build/components/navigate-to-link/index.js +0 -51
  628. package/build/components/navigate-to-link/index.js.map +0 -1
  629. package/build/components/sidebar-edit-mode/template-card/index.js.map +0 -1
  630. package/build/components/sidebar-edit-mode/template-card/template-actions.js.map +0 -1
  631. package/build/components/sidebar-edit-mode/template-card/template-areas.js.map +0 -1
  632. package/build/components/sidebar-edit-mode/template-revisions/index.js.map +0 -1
  633. package/build/components/sidebar-navigation-screen-navigation-menus/loader.js +0 -19
  634. package/build/components/sidebar-navigation-screen-navigation-menus/loader.js.map +0 -1
  635. package/build/components/template-details/edit-template-title.js +0 -42
  636. package/build/components/template-details/edit-template-title.js.map +0 -1
  637. package/build/components/template-details/index.js +0 -103
  638. package/build/components/template-details/index.js.map +0 -1
  639. package/build/components/template-details/template-areas.js +0 -166
  640. package/build/components/template-details/template-areas.js.map +0 -1
  641. package/build/components/template-details/template-part-area-selector.js +0 -48
  642. package/build/components/template-details/template-part-area-selector.js.map +0 -1
  643. package/build-module/components/add-new-template/add-custom-generic-template-modal.js.map +0 -1
  644. package/build-module/components/add-new-template/add-custom-template-modal.js.map +0 -1
  645. package/build-module/components/global-styles/border-panel.js +0 -125
  646. package/build-module/components/global-styles/border-panel.js.map +0 -1
  647. package/build-module/components/list/actions/index.js +0 -86
  648. package/build-module/components/list/actions/index.js.map +0 -1
  649. package/build-module/components/list/actions/rename-menu-item.js.map +0 -1
  650. package/build-module/components/navigate-to-link/index.js +0 -39
  651. package/build-module/components/navigate-to-link/index.js.map +0 -1
  652. package/build-module/components/sidebar-edit-mode/template-card/index.js.map +0 -1
  653. package/build-module/components/sidebar-edit-mode/template-card/template-actions.js.map +0 -1
  654. package/build-module/components/sidebar-edit-mode/template-card/template-areas.js.map +0 -1
  655. package/build-module/components/sidebar-edit-mode/template-revisions/index.js.map +0 -1
  656. package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js +0 -11
  657. package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js.map +0 -1
  658. package/build-module/components/template-details/edit-template-title.js +0 -33
  659. package/build-module/components/template-details/edit-template-title.js.map +0 -1
  660. package/build-module/components/template-details/index.js +0 -83
  661. package/build-module/components/template-details/index.js.map +0 -1
  662. package/build-module/components/template-details/template-areas.js +0 -145
  663. package/build-module/components/template-details/template-areas.js.map +0 -1
  664. package/build-module/components/template-details/template-part-area-selector.js +0 -36
  665. package/build-module/components/template-details/template-part-area-selector.js.map +0 -1
  666. package/src/components/add-new-template/add-custom-generic-template-modal.js +0 -101
  667. package/src/components/global-styles/border-panel.js +0 -114
  668. package/src/components/navigate-to-link/index.js +0 -46
  669. package/src/components/sidebar-navigation-screen-navigation-menus/loader.js +0 -9
  670. package/src/components/sidebar-navigation-screen-pages/style.scss +0 -4
  671. package/src/components/template-details/edit-template-title.js +0 -41
  672. package/src/components/template-details/index.js +0 -113
  673. package/src/components/template-details/style.scss +0 -72
  674. package/src/components/template-details/template-areas.js +0 -167
  675. package/src/components/template-details/template-part-area-selector.js +0 -39
  676. /package/src/components/sidebar-edit-mode/{template-card → template-panel}/template-actions.js +0 -0
  677. /package/src/components/sidebar-edit-mode/{template-card → template-panel}/template-areas.js +0 -0
  678. /package/src/components/{list/actions → template-actions}/rename-menu-item.js +0 -0
@@ -15,13 +15,13 @@ import { PostTypeSupportCheck } from '@wordpress/editor';
15
15
  import useEditedEntityRecord from '../../use-edited-entity-record';
16
16
 
17
17
  const useRevisionData = () => {
18
- var _currentTemplate$_lin, _currentTemplate$_lin2, _currentTemplate$_lin3, _currentTemplate$_lin4, _currentTemplate$_lin5, _currentTemplate$_lin6, _currentTemplate$_lin7, _currentTemplate$_lin8;
18
+ var _currentTemplate$_lin, _currentTemplate$_lin2;
19
19
 
20
20
  const {
21
21
  record: currentTemplate
22
22
  } = useEditedEntityRecord();
23
- const lastRevisionId = (_currentTemplate$_lin = currentTemplate === null || currentTemplate === void 0 ? void 0 : (_currentTemplate$_lin2 = currentTemplate._links) === null || _currentTemplate$_lin2 === void 0 ? void 0 : (_currentTemplate$_lin3 = _currentTemplate$_lin2['predecessor-version']) === null || _currentTemplate$_lin3 === void 0 ? void 0 : (_currentTemplate$_lin4 = _currentTemplate$_lin3[0]) === null || _currentTemplate$_lin4 === void 0 ? void 0 : _currentTemplate$_lin4.id) !== null && _currentTemplate$_lin !== void 0 ? _currentTemplate$_lin : null;
24
- const revisionsCount = ((_currentTemplate$_lin5 = currentTemplate === null || currentTemplate === void 0 ? void 0 : (_currentTemplate$_lin6 = currentTemplate._links) === null || _currentTemplate$_lin6 === void 0 ? void 0 : (_currentTemplate$_lin7 = _currentTemplate$_lin6['version-history']) === null || _currentTemplate$_lin7 === void 0 ? void 0 : (_currentTemplate$_lin8 = _currentTemplate$_lin7[0]) === null || _currentTemplate$_lin8 === void 0 ? void 0 : _currentTemplate$_lin8.count) !== null && _currentTemplate$_lin5 !== void 0 ? _currentTemplate$_lin5 : 0) + 1;
23
+ const lastRevisionId = (_currentTemplate$_lin = currentTemplate?._links?.['predecessor-version']?.[0]?.id) !== null && _currentTemplate$_lin !== void 0 ? _currentTemplate$_lin : null;
24
+ const revisionsCount = (_currentTemplate$_lin2 = currentTemplate?._links?.['version-history']?.[0]?.count) !== null && _currentTemplate$_lin2 !== void 0 ? _currentTemplate$_lin2 : 0;
25
25
  return {
26
26
  currentTemplate,
27
27
  lastRevisionId,
@@ -29,10 +29,9 @@ const useRevisionData = () => {
29
29
  };
30
30
  };
31
31
 
32
- function PostLastRevisionCheck(_ref) {
33
- let {
34
- children
35
- } = _ref;
32
+ function PostLastRevisionCheck({
33
+ children
34
+ }) {
36
35
  const {
37
36
  lastRevisionId,
38
37
  revisionsCount
@@ -67,4 +66,4 @@ const PostLastRevision = () => {
67
66
  export default function LastRevision() {
68
67
  return createElement(PostLastRevisionCheck, null, createElement(PostLastRevision, null));
69
68
  }
70
- //# sourceMappingURL=index.js.map
69
+ //# sourceMappingURL=last-revision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/template-panel/last-revision.js"],"names":["Button","sprintf","_n","backup","addQueryArgs","PostTypeSupportCheck","useEditedEntityRecord","useRevisionData","record","currentTemplate","lastRevisionId","_links","id","revisionsCount","count","PostLastRevisionCheck","children","PostLastRevision","revision","gutenberg","LastRevision"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,MAAT,QAAuB,uBAAvB;AACA,SAASC,OAAT,EAAkBC,EAAlB,QAA4B,iBAA5B;AACA,SAASC,MAAT,QAAuB,kBAAvB;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,oBAAT,QAAqC,mBAArC;AAEA;AACA;AACA;;AACA,OAAOC,qBAAP,MAAkC,gCAAlC;;AAEA,MAAMC,eAAe,GAAG,MAAM;AAAA;;AAC7B,QAAM;AAAEC,IAAAA,MAAM,EAAEC;AAAV,MAA8BH,qBAAqB,EAAzD;AAEA,QAAMI,cAAc,4BACnBD,eAAe,EAAEE,MAAjB,GAA2B,qBAA3B,IAAsD,CAAtD,GAA2DC,EADxC,yEAC8C,IADlE;AAGA,QAAMC,cAAc,6BACnBJ,eAAe,EAAEE,MAAjB,GAA2B,iBAA3B,IAAkD,CAAlD,GAAuDG,KADpC,2EAC6C,CADjE;AAGA,SAAO;AACNL,IAAAA,eADM;AAENC,IAAAA,cAFM;AAGNG,IAAAA;AAHM,GAAP;AAKA,CAdD;;AAgBA,SAASE,qBAAT,CAAgC;AAAEC,EAAAA;AAAF,CAAhC,EAA+C;AAC9C,QAAM;AAAEN,IAAAA,cAAF;AAAkBG,IAAAA;AAAlB,MAAqCN,eAAe,EAA1D;;AAEA,MAAK,CAAEG,cAAF,IAAoBG,cAAc,GAAG,CAA1C,EAA8C;AAC7C,WAAO,IAAP;AACA;;AAED,SACC,cAAC,oBAAD;AAAsB,IAAA,WAAW,EAAC;AAAlC,KACGG,QADH,CADD;AAKA;;AAED,MAAMC,gBAAgB,GAAG,MAAM;AAC9B,QAAM;AAAEP,IAAAA,cAAF;AAAkBG,IAAAA;AAAlB,MAAqCN,eAAe,EAA1D;AAEA,SACC,cAAC,qBAAD,QACC,cAAC,MAAD;AACC,IAAA,IAAI,EAAGH,YAAY,CAAE,cAAF,EAAkB;AACpCc,MAAAA,QAAQ,EAAER,cAD0B;AAEpCS,MAAAA,SAAS,EAAE;AAFyB,KAAlB,CADpB;AAKC,IAAA,SAAS,EAAC,yCALX;AAMC,IAAA,IAAI,EAAGhB;AANR,KAQGF,OAAO;AACR;AACAC,EAAAA,EAAE,CAAE,aAAF,EAAiB,cAAjB,EAAiCW,cAAjC,CAFM,EAGRA,cAHQ,CARV,CADD,CADD;AAkBA,CArBD;;AAuBA,eAAe,SAASO,YAAT,GAAwB;AACtC,SACC,cAAC,qBAAD,QACC,cAAC,gBAAD,OADD,CADD;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { sprintf, _n } from '@wordpress/i18n';\nimport { backup } from '@wordpress/icons';\nimport { addQueryArgs } from '@wordpress/url';\nimport { PostTypeSupportCheck } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../../use-edited-entity-record';\n\nconst useRevisionData = () => {\n\tconst { record: currentTemplate } = useEditedEntityRecord();\n\n\tconst lastRevisionId =\n\t\tcurrentTemplate?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ?? null;\n\n\tconst revisionsCount =\n\t\tcurrentTemplate?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\n\treturn {\n\t\tcurrentTemplate,\n\t\tlastRevisionId,\n\t\trevisionsCount,\n\t};\n};\n\nfunction PostLastRevisionCheck( { children } ) {\n\tconst { lastRevisionId, revisionsCount } = useRevisionData();\n\n\tif ( ! lastRevisionId || revisionsCount < 2 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"revisions\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nconst PostLastRevision = () => {\n\tconst { lastRevisionId, revisionsCount } = useRevisionData();\n\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<Button\n\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t\tgutenberg: true,\n\t\t\t\t} ) }\n\t\t\t\tclassName=\"edit-site-template-last-revision__title\"\n\t\t\t\ticon={ backup }\n\t\t\t>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t/* translators: %d: number of revisions */\n\t\t\t\t\t_n( '%d Revision', '%d Revisions', revisionsCount ),\n\t\t\t\t\trevisionsCount\n\t\t\t\t) }\n\t\t\t</Button>\n\t\t</PostLastRevisionCheck>\n\t);\n};\n\nexport default function LastRevision() {\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PostLastRevision />\n\t\t</PostLastRevisionCheck>\n\t);\n}\n"]}
@@ -13,10 +13,9 @@ import { moreVertical } from '@wordpress/icons';
13
13
 
14
14
  import { store as editSiteStore } from '../../../store';
15
15
  import isTemplateRevertable from '../../../utils/is-template-revertable';
16
- export default function Actions(_ref) {
17
- let {
18
- template
19
- } = _ref;
16
+ export default function Actions({
17
+ template
18
+ }) {
20
19
  const {
21
20
  revertTemplate
22
21
  } = useDispatch(editSiteStore);
@@ -33,17 +32,14 @@ export default function Actions(_ref) {
33
32
  toggleProps: {
34
33
  isSmall: true
35
34
  }
36
- }, _ref2 => {
37
- let {
38
- onClose
39
- } = _ref2;
40
- return createElement(MenuGroup, null, createElement(MenuItem, {
41
- info: __('Use the template as supplied by the theme.'),
42
- onClick: () => {
43
- revertTemplate(template);
44
- onClose();
45
- }
46
- }, __('Clear customizations')));
47
- });
35
+ }, ({
36
+ onClose
37
+ }) => createElement(MenuGroup, null, createElement(MenuItem, {
38
+ info: __('Use the template as supplied by the theme.'),
39
+ onClick: () => {
40
+ revertTemplate(template);
41
+ onClose();
42
+ }
43
+ }, __('Clear customizations'))));
48
44
  }
49
45
  //# sourceMappingURL=template-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/template-panel/template-actions.js"],"names":["useDispatch","__","DropdownMenu","MenuGroup","MenuItem","moreVertical","store","editSiteStore","isTemplateRevertable","Actions","template","revertTemplate","isRevertable","isSmall","onClose"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,WAAT,QAA4B,iBAA5B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,YAAT,EAAuBC,SAAvB,EAAkCC,QAAlC,QAAkD,uBAAlD;AACA,SAASC,YAAT,QAA6B,kBAA7B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,gBAAvC;AACA,OAAOC,oBAAP,MAAiC,uCAAjC;AAEA,eAAe,SAASC,OAAT,CAAkB;AAAEC,EAAAA;AAAF,CAAlB,EAAiC;AAC/C,QAAM;AAAEC,IAAAA;AAAF,MAAqBX,WAAW,CAAEO,aAAF,CAAtC;AACA,QAAMK,YAAY,GAAGJ,oBAAoB,CAAEE,QAAF,CAAzC;;AACA,MAAK,CAAEE,YAAP,EAAsB;AACrB,WAAO,IAAP;AACA;;AACD,SACC,cAAC,YAAD;AACC,IAAA,IAAI,EAAGP,YADR;AAEC,IAAA,KAAK,EAAGJ,EAAE,CAAE,SAAF,CAFX;AAGC,IAAA,SAAS,EAAC,kCAHX;AAIC,IAAA,WAAW,EAAG;AAAEY,MAAAA,OAAO,EAAE;AAAX;AAJf,KAMG,CAAE;AAAEC,IAAAA;AAAF,GAAF,KACD,cAAC,SAAD,QACC,cAAC,QAAD;AACC,IAAA,IAAI,EAAGb,EAAE,CACR,4CADQ,CADV;AAIC,IAAA,OAAO,EAAG,MAAM;AACfU,MAAAA,cAAc,CAAED,QAAF,CAAd;AACAI,MAAAA,OAAO;AACP;AAPF,KASGb,EAAE,CAAE,sBAAF,CATL,CADD,CAPF,CADD;AAwBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\nimport isTemplateRevertable from '../../../utils/is-template-revertable';\n\nexport default function Actions( { template } ) {\n\tconst { revertTemplate } = useDispatch( editSiteStore );\n\tconst isRevertable = isTemplateRevertable( template );\n\tif ( ! isRevertable ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Actions' ) }\n\t\t\tclassName=\"edit-site-template-card__actions\"\n\t\t\ttoggleProps={ { isSmall: true } }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<MenuGroup>\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t'Use the template as supplied by the theme.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\trevertTemplate( template );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Clear customizations' ) }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t</MenuGroup>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"]}
@@ -14,11 +14,10 @@ import { __ } from '@wordpress/i18n';
14
14
 
15
15
  import { store as editSiteStore } from '../../../store';
16
16
 
17
- function TemplateAreaItem(_ref) {
18
- let {
19
- area,
20
- clientId
21
- } = _ref;
17
+ function TemplateAreaItem({
18
+ area,
19
+ clientId
20
+ }) {
22
21
  const {
23
22
  selectBlock,
24
23
  toggleBlockHighlight
@@ -35,7 +34,7 @@ function TemplateAreaItem(_ref) {
35
34
 
36
35
  return createElement(Button, {
37
36
  className: "edit-site-template-card__template-areas-item",
38
- icon: templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.icon,
37
+ icon: templatePartArea?.icon,
39
38
  onMouseOver: highlightBlock,
40
39
  onMouseLeave: cancelHighlightBlock,
41
40
  onFocus: highlightBlock,
@@ -43,7 +42,7 @@ function TemplateAreaItem(_ref) {
43
42
  onClick: () => {
44
43
  selectBlock(clientId);
45
44
  }
46
- }, templatePartArea === null || templatePartArea === void 0 ? void 0 : templatePartArea.label);
45
+ }, templatePartArea?.label);
47
46
  }
48
47
 
49
48
  export default function TemplateAreas() {
@@ -60,17 +59,14 @@ export default function TemplateAreas() {
60
59
  className: "edit-site-template-card__template-areas-title"
61
60
  }, __('Areas')), createElement("ul", {
62
61
  className: "edit-site-template-card__template-areas-list"
63
- }, templateParts.map(_ref2 => {
64
- let {
65
- templatePart,
66
- block
67
- } = _ref2;
68
- return createElement("li", {
69
- key: templatePart.slug
70
- }, createElement(TemplateAreaItem, {
71
- area: templatePart.area,
72
- clientId: block.clientId
73
- }));
74
- })));
62
+ }, templateParts.map(({
63
+ templatePart,
64
+ block
65
+ }) => createElement("li", {
66
+ key: templatePart.slug
67
+ }, createElement(TemplateAreaItem, {
68
+ area: templatePart.area,
69
+ clientId: block.clientId
70
+ })))));
75
71
  }
76
72
  //# sourceMappingURL=template-areas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/template-panel/template-areas.js"],"names":["useSelect","useDispatch","Button","__experimentalHeading","Heading","store","editorStore","blockEditorStore","__","editSiteStore","TemplateAreaItem","area","clientId","selectBlock","toggleBlockHighlight","templatePartArea","select","defaultAreas","__experimentalGetDefaultTemplatePartAreas","find","defaultArea","highlightBlock","cancelHighlightBlock","icon","label","TemplateAreas","templateParts","getCurrentTemplateTemplateParts","length","map","templatePart","block","slug"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SACCC,MADD,EAECC,qBAAqB,IAAIC,OAF1B,QAGO,uBAHP;AAIA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,mBAArC;AACA,SA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KA,MAAK,CAAED,aAAa,CAACE,MAArB,EAA8B;AAC7B,WAAO,IAAP;AACA;;AAED,SACC;AAAS,IAAA,SAAS,EAAC;AAAnB,KACC,cAAC,OAAD;AACC,IAAA,KAAK,EAAG,CADT;AAEC,IAAA,SAAS,EAAC;AAFX,KAIGpB,EAAE,CAAE,OAAF,CAJL,CADD,EAQC;AAAI,IAAA,SAAS,EAAC;AAAd,KACGkB,aAAa,CAACG,GAAd,CAAmB,CAAE;AAAEC,IAAAA,YAAF;AAAgBC,IAAAA;AAAhB,GAAF,KACpB;AAAI,IAAA,GAAG,EAAGD,YAAY,CAACE;AAAvB,KACC,cAAC,gBAAD;AACC,IAAA,IAAI,EAAGF,YAAY,CAACnB,IADrB;AAEC,IAAA,QAAQ,EAAGoB,KAAK,CAACnB;AAFlB,IADD,CADC,CADH,CARD,CADD;AAqBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\n\nfunction TemplateAreaItem( { area, clientId } ) {\n\tconst { selectBlock, toggleBlockHighlight } =\n\t\tuseDispatch( blockEditorStore );\n\tconst templatePartArea = useSelect(\n\t\t( select ) => {\n\t\t\tconst defaultAreas =\n\t\t\t\tselect(\n\t\t\t\t\teditorStore\n\t\t\t\t).__experimentalGetDefaultTemplatePartAreas();\n\n\t\t\treturn defaultAreas.find(\n\t\t\t\t( defaultArea ) => defaultArea.area === area\n\t\t\t);\n\t\t},\n\t\t[ area ]\n\t);\n\n\tconst highlightBlock = () => toggleBlockHighlight( clientId, true );\n\tconst cancelHighlightBlock = () => toggleBlockHighlight( clientId, false );\n\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"edit-site-template-card__template-areas-item\"\n\t\t\ticon={ templatePartArea?.icon }\n\t\t\tonMouseOver={ highlightBlock }\n\t\t\tonMouseLeave={ cancelHighlightBlock }\n\t\t\tonFocus={ highlightBlock }\n\t\t\tonBlur={ cancelHighlightBlock }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( clientId );\n\t\t\t} }\n\t\t>\n\t\t\t{ templatePartArea?.label }\n\t\t</Button>\n\t);\n}\n\nexport default function TemplateAreas() {\n\tconst templateParts = useSelect(\n\t\t( select ) => select( editSiteStore ).getCurrentTemplateTemplateParts(),\n\t\t[]\n\t);\n\n\tif ( ! templateParts.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<section className=\"edit-site-template-card__template-areas\">\n\t\t\t<Heading\n\t\t\t\tlevel={ 3 }\n\t\t\t\tclassName=\"edit-site-template-card__template-areas-title\"\n\t\t\t>\n\t\t\t\t{ __( 'Areas' ) }\n\t\t\t</Heading>\n\n\t\t\t<ul className=\"edit-site-template-card__template-areas-list\">\n\t\t\t\t{ templateParts.map( ( { templatePart, block } ) => (\n\t\t\t\t\t<li key={ templatePart.slug }>\n\t\t\t\t\t\t<TemplateAreaItem\n\t\t\t\t\t\t\tarea={ templatePart.area }\n\t\t\t\t\t\t\tclientId={ block.clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</section>\n\t);\n}\n"]}
@@ -11,14 +11,13 @@ import classnames from 'classnames';
11
11
 
12
12
  import { __experimentalItem as Item, __experimentalHStack as HStack, FlexBlock } from '@wordpress/components';
13
13
  import { chevronRightSmall, Icon } from '@wordpress/icons';
14
- export default function SidebarNavigationItem(_ref) {
15
- let {
16
- className,
17
- icon,
18
- withChevron = false,
19
- children,
20
- ...props
21
- } = _ref;
14
+ export default function SidebarNavigationItem({
15
+ className,
16
+ icon,
17
+ withChevron = false,
18
+ children,
19
+ ...props
20
+ }) {
22
21
  return createElement(Item, _extends({
23
22
  className: classnames('edit-site-sidebar-navigation-item', className)
24
23
  }, props), createElement(HStack, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-item/index.js"],"names":["classnames","__experimentalItem","Item","__experimentalHStack","HStack","FlexBlock","chevronRightSmall","Icon","SidebarNavigationItem","className","icon","withChevron","children","props","fill"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,kBAAkB,IAAIC,IADvB,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,SAHD,QAIO,uBAJP;AAKA,SAASC,iBAAT,EAA4BC,IAA5B,QAAwC,kBAAxC;AAEA,eAAe,SAASC,qBAAT,OAMX;AAAA,MAN2C;AAC9CC,IAAAA,SAD8C;AAE9CC,IAAAA,IAF8C;AAG9CC,IAAAA,WAAW,GAAG,KAHgC;AAI9CC,IAAAA,QAJ8C;AAK9C,OAAGC;AAL2C,GAM3C;AACH,SACC,cAAC,IAAD;AACC,IAAA,SAAS,EAAGb,UAAU,CACrB,mCADqB,EAErBS,SAFqB;AADvB,KAKMI,KALN,GAOC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACGH,IAAI,IACL,cAAC,IAAD;AACC,IAAA,KAAK,EAAG;AAAEI,MAAAA,IAAI,EAAE;AAAR,KADT;AAEC,IAAA,IAAI,EAAGJ,IAFR;AAGC,IAAA,IAAI,EAAG;AAHR,IAFF,EAQC,cAAC,SAAD,QAAaE,QAAb,CARD,EASGD,WAAW,IACZ,cAAC,IAAD;AACC,IAAA,IAAI,EAAGL,iBADR;AAEC,IAAA,SAAS,EAAC,wDAFX;AAGC,IAAA,IAAI,EAAG;AAHR,IAVF,CAPD,CADD;AA2BA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItem as Item,\n\t__experimentalHStack as HStack,\n\tFlexBlock,\n} from '@wordpress/components';\nimport { chevronRightSmall, Icon } from '@wordpress/icons';\n\nexport default function SidebarNavigationItem( {\n\tclassName,\n\ticon,\n\twithChevron = false,\n\tchildren,\n\t...props\n} ) {\n\treturn (\n\t\t<Item\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-item',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t{ icon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tstyle={ { fill: 'currentcolor' } }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<FlexBlock>{ children }</FlexBlock>\n\t\t\t\t{ withChevron && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronRightSmall }\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-item__drilldown-indicator\"\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-item/index.js"],"names":["classnames","__experimentalItem","Item","__experimentalHStack","HStack","FlexBlock","chevronRightSmall","Icon","SidebarNavigationItem","className","icon","withChevron","children","props","fill"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,kBAAkB,IAAIC,IADvB,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,SAHD,QAIO,uBAJP;AAKA,SAASC,iBAAT,EAA4BC,IAA5B,QAAwC,kBAAxC;AAEA,eAAe,SAASC,qBAAT,CAAgC;AAC9CC,EAAAA,SAD8C;AAE9CC,EAAAA,IAF8C;AAG9CC,EAAAA,WAAW,GAAG,KAHgC;AAI9CC,EAAAA,QAJ8C;AAK9C,KAAGC;AAL2C,CAAhC,EAMX;AACH,SACC,cAAC,IAAD;AACC,IAAA,SAAS,EAAGb,UAAU,CACrB,mCADqB,EAErBS,SAFqB;AADvB,KAKMI,KALN,GAOC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACGH,IAAI,IACL,cAAC,IAAD;AACC,IAAA,KAAK,EAAG;AAAEI,MAAAA,IAAI,EAAE;AAAR,KADT;AAEC,IAAA,IAAI,EAAGJ,IAFR;AAGC,IAAA,IAAI,EAAG;AAHR,IAFF,EAQC,cAAC,SAAD,QAAaE,QAAb,CARD,EASGD,WAAW,IACZ,cAAC,IAAD;AACC,IAAA,IAAI,EAAGL,iBADR;AAEC,IAAA,SAAS,EAAC,wDAFX;AAGC,IAAA,IAAI,EAAG;AAHR,IAVF,CAPD,CADD;AA2BA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItem as Item,\n\t__experimentalHStack as HStack,\n\tFlexBlock,\n} from '@wordpress/components';\nimport { chevronRightSmall, Icon } from '@wordpress/icons';\n\nexport default function SidebarNavigationItem( {\n\tclassName,\n\ticon,\n\twithChevron = false,\n\tchildren,\n\t...props\n} ) {\n\treturn (\n\t\t<Item\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-item',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t{ icon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tstyle={ { fill: 'currentcolor' } }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<FlexBlock>{ children }</FlexBlock>\n\t\t\t\t{ withChevron && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronRightSmall }\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-item__drilldown-indicator\"\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement, Fragment } from "@wordpress/element";
2
2
 
3
3
  /**
4
4
  * WordPress dependencies
@@ -16,16 +16,15 @@ import { store as editSiteStore } from '../../store';
16
16
  import { unlock } from '../../private-apis';
17
17
  import SidebarButton from '../sidebar-button';
18
18
  import { isPreviewingTheme, currentlyPreviewingTheme } from '../../utils/is-previewing-theme';
19
- export default function SidebarNavigationScreen(_ref) {
20
- var _theme$name;
21
-
22
- let {
23
- isRoot,
24
- title,
25
- actions,
26
- content,
27
- description
28
- } = _ref;
19
+ export default function SidebarNavigationScreen({
20
+ isRoot,
21
+ title,
22
+ actions,
23
+ meta,
24
+ content,
25
+ footer,
26
+ description
27
+ }) {
29
28
  const {
30
29
  dashboardLink
31
30
  } = useSelect(select => {
@@ -40,8 +39,10 @@ export default function SidebarNavigationScreen(_ref) {
40
39
  getTheme
41
40
  } = useSelect(coreStore);
42
41
  const theme = getTheme(currentlyPreviewingTheme());
43
- return createElement(VStack, {
44
- spacing: 2
42
+ return createElement(Fragment, null, createElement(VStack, {
43
+ className: "edit-site-sidebar-navigation-screen__main",
44
+ spacing: 0,
45
+ justify: "flex-start"
45
46
  }, createElement(HStack, {
46
47
  spacing: 4,
47
48
  alignment: "flex-start",
@@ -59,10 +60,16 @@ export default function SidebarNavigationScreen(_ref) {
59
60
  color: 'white',
60
61
  level: 2,
61
62
  size: 20
62
- }, !isPreviewingTheme() ? title : sprintf('Previewing %1$s: %2$s', theme === null || theme === void 0 ? void 0 : (_theme$name = theme.name) === null || _theme$name === void 0 ? void 0 : _theme$name.rendered, title)), actions), createElement("nav", {
63
+ }, !isPreviewingTheme() ? title : sprintf('Previewing %1$s: %2$s', theme?.name?.rendered, title)), actions && createElement("div", {
64
+ className: "edit-site-sidebar-navigation-screen__actions"
65
+ }, actions)), meta && createElement(Fragment, null, createElement("div", {
66
+ className: "edit-site-sidebar-navigation-screen__meta"
67
+ }, meta)), createElement("div", {
63
68
  className: "edit-site-sidebar-navigation-screen__content"
64
69
  }, description && createElement("p", {
65
70
  className: "edit-site-sidebar-navigation-screen__description"
66
- }, description), content));
71
+ }, description), content)), footer && createElement("footer", {
72
+ className: "edit-site-sidebar-navigation-screen__footer"
73
+ }, footer));
67
74
  }
68
75
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen/index.js"],"names":["__experimentalHStack","HStack","__experimentalVStack","VStack","__experimentalNavigatorToParentButton","NavigatorToParentButton","__experimentalHeading","Heading","isRTL","__","sprintf","chevronRight","chevronLeft","store","coreStore","useSelect","editSiteStore","unlock","SidebarButton","isPreviewingTheme","currentlyPreviewingTheme","SidebarNavigationScreen","isRoot","title","actions","content","description","dashboardLink","select","getSettings","__experimentalDashboardLink","getTheme","theme","name","rendered"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MADzB,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,qCAAqC,IAAIC,uBAH1C,EAICC,qBAAqB,IAAIC,OAJ1B,QAKO,uBALP;AAMA,SAASC,KAAT,EAAgBC,EAAhB,EAAoBC,OAApB,QAAmC,iBAAnC;AACA,SAASC,YAAT,EAAuBC,WAAvB,QAA0C,kBAA1C;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AAEA;AACA;AACA;;AACA,SAASF,KAAK,IAAIG,aAAlB,QAAuC,aAAvC;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,SACCC,iBADD,EAECC,wBAFD,QAGO,iCAHP;AAKA,eAAe,SAASC,uBAAT,OAMX;AAAA;;AAAA,MAN6C;AAChDC,IAAAA,MADgD;AAEhDC,IAAAA,KAFgD;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B,GACCI,KADD,GAECb,OAAO,CACP,uBADO,EAEPsB,KAFO,aAEPA,KAFO,sCAEPA,KAAK,CAAEC,IAFA,gDAEP,YAAaC,QAFN,EAGPX,KAHO,CARX,CA1BD,EAwCGC,OAxCH,CADD,EA4CC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGE,WAAW,IACZ;AAAG,IAAA,SAAS,EAAC;AAAb,KACGA,WADH,CAFF,EAMGD,OANH,CA5CD,CADD;AAuDA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { isRTL, __, sprintf } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../private-apis';\nimport SidebarButton from '../sidebar-button';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\n\nexport default function SidebarNavigationScreen( {\n\tisRoot,\n\ttitle,\n\tactions,\n\tcontent,\n\tdescription,\n} ) {\n\tconst { dashboardLink } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\treturn {\n\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t};\n\t}, [] );\n\tconst { getTheme } = useSelect( coreStore );\n\tconst theme = getTheme( currentlyPreviewingTheme() );\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<HStack\n\t\t\t\tspacing={ 4 }\n\t\t\t\talignment=\"flex-start\"\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title-icon\"\n\t\t\t>\n\t\t\t\t{ ! isRoot ? (\n\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\tas={ SidebarButton }\n\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t? __( 'Go back to the Dashboard' )\n\t\t\t\t\t\t\t\t: __( 'Go back to the theme showcase' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t? dashboardLink || 'index.php'\n\t\t\t\t\t\t\t\t: 'themes.php'\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title\"\n\t\t\t\t\tcolor={ 'white' }\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\tsize={ 20 }\n\t\t\t\t>\n\t\t\t\t\t{ ! isPreviewingTheme()\n\t\t\t\t\t\t? title\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t'Previewing %1$s: %2$s',\n\t\t\t\t\t\t\t\ttheme?.name?.rendered,\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t ) }\n\t\t\t\t</Heading>\n\t\t\t\t{ actions }\n\t\t\t</HStack>\n\n\t\t\t<nav className=\"edit-site-sidebar-navigation-screen__content\">\n\t\t\t\t{ description && (\n\t\t\t\t\t<p className=\"edit-site-sidebar-navigation-screen__description\">\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t\t{ content }\n\t\t\t</nav>\n\t\t</VStack>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen/index.js"],"names":["__experimentalHStack","HStack","__experimentalVStack","VStack","__experimentalNavigatorToParentButton","NavigatorToParentButton","__experimentalHeading","Heading","isRTL","__","sprintf","chevronRight","chevronLeft","store","coreStore","useSelect","editSiteStore","unlock","SidebarButton","isPreviewingTheme","currentlyPreviewingTheme","SidebarNavigationScreen","isRoot","title","actions","meta","content","footer","description","dashboardLink","select","getSettings","__experimentalDashboardLink","getTheme","theme","name","rendered"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MADzB,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,qCAAqC,IAAIC,uBAH1C,EAICC,qBAAqB,IAAIC,OAJ1B,QAKO,uBALP;AAMA,SAASC,KAAT,EAAgBC,EAAhB,EAAoBC,OAApB,QAAmC,iBAAnC;AACA,SAASC,YAAT,EAAuBC,WAAvB,QAA0C,kBAA1C;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AAEA;AACA;AACA;;AACA,SAASF,KAAK,IAAIG,aAAlB,QAAuC,aAAvC;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,SACCC,iBADD,EAECC,wBAFD,QAGO,iCAHP;AAKA,eAAe,SAASC,uBAAT,CAAkC;AAChDC,EAAAA,MADgD;AAEhDC,EAAAA,KAFgD;AAGhDC,EAAAA,OAHgD;AAIhDC,EAAAA,IAJgD;AAKhDC,EAAAA,OALgD;AAMhDC,EAAAA,MANgD;AAOhDC,EAAAA;AAPgD,CAAlC,EAQX;AACH,QAAM;AAAEC,IAAAA;AAAF,MAAoBd,SAAS,CAAIe,MAAF,IAAc;AAClD,UAAM;AAAEC,MAAAA;AAAF,QAAkBd,MAAM,CAAEa,MAAM,CAAEd,aAAF,CAAR,CAA9B;AACA,WAAO;AACNa,MAAAA,aAAa,EAAEE,WAAW,GAAGC;AADvB,KAAP;AAGA,GALkC,EAKhC,EALgC,CAAnC;AAMA,QAAM;AAAEC,IAAAA;AAAF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G,WAAW,IACZ;AAAG,IAAA,SAAS,EAAC;AAAb,KACGA,WADH,CAFF,EAMGF,OANH,CA3DD,CADD,EAqEGC,MAAM,IACP;AAAQ,IAAA,SAAS,EAAC;AAAlB,KACGA,MADH,CAtEF,CADD;AA6EA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { isRTL, __, sprintf } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../private-apis';\nimport SidebarButton from '../sidebar-button';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\n\nexport default function SidebarNavigationScreen( {\n\tisRoot,\n\ttitle,\n\tactions,\n\tmeta,\n\tcontent,\n\tfooter,\n\tdescription,\n} ) {\n\tconst { dashboardLink } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\treturn {\n\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t};\n\t}, [] );\n\tconst { getTheme } = useSelect( coreStore );\n\tconst theme = getTheme( currentlyPreviewingTheme() );\n\n\treturn (\n\t\t<>\n\t\t\t<VStack\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__main\"\n\t\t\t\tspacing={ 0 }\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\talignment=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title-icon\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isRoot ? (\n\t\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\t\tas={ SidebarButton }\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t\t? __( 'Go back to the Dashboard' )\n\t\t\t\t\t\t\t\t\t: __( 'Go back to the theme showcase' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t\t? dashboardLink || 'index.php'\n\t\t\t\t\t\t\t\t\t: 'themes.php'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<Heading\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title\"\n\t\t\t\t\t\tcolor={ 'white' }\n\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isPreviewingTheme()\n\t\t\t\t\t\t\t? title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t'Previewing %1$s: %2$s',\n\t\t\t\t\t\t\t\t\ttheme?.name?.rendered,\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{ actions && (\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__actions\">\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ meta && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__meta\">\n\t\t\t\t\t\t\t{ meta }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__content\">\n\t\t\t\t\t{ description && (\n\t\t\t\t\t\t<p className=\"edit-site-sidebar-navigation-screen__description\">\n\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ content }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t\t{ footer && (\n\t\t\t\t<footer className=\"edit-site-sidebar-navigation-screen__footer\">\n\t\t\t\t\t{ footer }\n\t\t\t\t</footer>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"]}
@@ -1,11 +1,18 @@
1
- import { createElement } from "@wordpress/element";
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import { createElement, Fragment } from "@wordpress/element";
2
3
 
3
4
  /**
4
5
  * WordPress dependencies
5
6
  */
6
7
  import { __ } from '@wordpress/i18n';
7
- import { edit } from '@wordpress/icons';
8
- import { useDispatch } from '@wordpress/data';
8
+ import { backup, edit, seen } from '@wordpress/icons';
9
+ import { useSelect, useDispatch } from '@wordpress/data';
10
+ import { store as coreStore } from '@wordpress/core-data';
11
+ import { Icon, __experimentalNavigatorButton as NavigatorButton, __experimentalVStack as HStack, __experimentalVStack as VStack } from '@wordpress/components';
12
+ import { useViewportMatch } from '@wordpress/compose';
13
+ import { BlockEditorProvider } from '@wordpress/block-editor';
14
+ import { humanTimeDiff } from '@wordpress/date';
15
+ import { useCallback } from '@wordpress/element';
9
16
  /**
10
17
  * Internal dependencies
11
18
  */
@@ -15,27 +22,166 @@ import StyleVariationsContainer from '../global-styles/style-variations-containe
15
22
  import { unlock } from '../../private-apis';
16
23
  import { store as editSiteStore } from '../../store';
17
24
  import SidebarButton from '../sidebar-button';
18
- export default function SidebarNavigationScreenGlobalStyles() {
25
+ import SidebarNavigationItem from '../sidebar-navigation-item';
26
+ import StyleBook from '../style-book';
27
+ import useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';
28
+
29
+ const noop = () => {};
30
+
31
+ export function SidebarNavigationItemGlobalStyles(props) {
19
32
  const {
20
33
  openGeneralSidebar
21
34
  } = useDispatch(editSiteStore);
22
35
  const {
23
36
  setCanvasMode
24
37
  } = unlock(useDispatch(editSiteStore));
25
- return createElement(SidebarNavigationScreen, {
38
+ const hasGlobalStyleVariations = useSelect(select => !!select(coreStore).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, []);
39
+
40
+ if (hasGlobalStyleVariations) {
41
+ return createElement(NavigatorButton, _extends({}, props, {
42
+ as: SidebarNavigationItem,
43
+ path: "/wp_global_styles"
44
+ }));
45
+ }
46
+
47
+ return createElement(SidebarNavigationItem, _extends({}, props, {
48
+ onClick: () => {
49
+ // switch to edit mode.
50
+ setCanvasMode('edit'); // open global styles sidebar.
51
+
52
+ openGeneralSidebar('edit-site/global-styles');
53
+ }
54
+ }));
55
+ }
56
+
57
+ function SidebarNavigationScreenGlobalStylesContent() {
58
+ const {
59
+ storedSettings
60
+ } = useSelect(select => {
61
+ const {
62
+ getSettings
63
+ } = unlock(select(editSiteStore));
64
+ return {
65
+ storedSettings: getSettings(false)
66
+ };
67
+ }, []); // Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are
68
+ // loaded. This is necessary because the Iframe component waits until
69
+ // the block editor store's `__internalIsInitialized` is true before
70
+ // rendering the iframe. Without this, the iframe previews will not render
71
+ // in mobile viewport sizes, where the editor canvas is hidden.
72
+
73
+ return createElement(BlockEditorProvider, {
74
+ settings: storedSettings,
75
+ onChange: noop,
76
+ onInput: noop
77
+ }, createElement(StyleVariationsContainer, null));
78
+ }
79
+
80
+ function SidebarNavigationScreenGlobalStylesFooter({
81
+ onClickRevisions
82
+ }) {
83
+ const {
84
+ revisions,
85
+ isLoading
86
+ } = useGlobalStylesRevisions();
87
+ const {
88
+ revisionsCount
89
+ } = useSelect(select => {
90
+ var _globalStyles$_links$;
91
+
92
+ const {
93
+ getEntityRecord,
94
+ __experimentalGetCurrentGlobalStylesId
95
+ } = select(coreStore);
96
+
97
+ const globalStylesId = __experimentalGetCurrentGlobalStylesId();
98
+
99
+ const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
100
+ return {
101
+ revisionsCount: (_globalStyles$_links$ = globalStyles?._links?.['version-history']?.[0]?.count) !== null && _globalStyles$_links$ !== void 0 ? _globalStyles$_links$ : 0
102
+ };
103
+ }, []);
104
+ const hasRevisions = revisionsCount >= 2;
105
+ const modified = revisions?.[0]?.modified;
106
+
107
+ if (!hasRevisions || isLoading || !modified) {
108
+ return null;
109
+ }
110
+
111
+ return createElement(VStack, {
112
+ className: "edit-site-sidebar-navigation-screen-global-styles__footer"
113
+ }, createElement(SidebarNavigationItem, {
114
+ className: "edit-site-sidebar-navigation-screen-global-styles__revisions",
115
+ label: __('Revisions'),
116
+ onClick: onClickRevisions
117
+ }, createElement(HStack, {
118
+ as: "span",
119
+ alignment: "center",
120
+ spacing: 5,
121
+ direction: "row",
122
+ justify: "space-between"
123
+ }, createElement("span", {
124
+ className: "edit-site-sidebar-navigation-screen-global-styles__revisions__label"
125
+ }, __('Last modified')), createElement("span", null, createElement("time", {
126
+ dateTime: modified
127
+ }, humanTimeDiff(modified))), createElement(Icon, {
128
+ icon: backup,
129
+ style: {
130
+ fill: 'currentcolor'
131
+ }
132
+ }))));
133
+ }
134
+
135
+ export default function SidebarNavigationScreenGlobalStyles() {
136
+ const {
137
+ openGeneralSidebar
138
+ } = useDispatch(editSiteStore);
139
+ const isMobileViewport = useViewportMatch('medium', '<');
140
+ const {
141
+ setCanvasMode,
142
+ setEditorCanvasContainerView
143
+ } = unlock(useDispatch(editSiteStore));
144
+ const isStyleBookOpened = useSelect(select => 'style-book' === unlock(select(editSiteStore)).getEditorCanvasContainerView(), []);
145
+ const openGlobalStyles = useCallback(async () => Promise.all([setCanvasMode('edit'), openGeneralSidebar('edit-site/global-styles')]), [setCanvasMode, openGeneralSidebar]);
146
+ const openStyleBook = useCallback(async () => {
147
+ await openGlobalStyles(); // Open the Style Book once the canvas mode is set to edit,
148
+ // and the global styles sidebar is open. This ensures that
149
+ // the Style Book is not prematurely closed.
150
+
151
+ setEditorCanvasContainerView('style-book');
152
+ }, [openGlobalStyles, setEditorCanvasContainerView]);
153
+ const openRevisions = useCallback(async () => {
154
+ await openGlobalStyles(); // Open the global styles revisions once the canvas mode is set to edit,
155
+ // and the global styles sidebar is open. The global styles UI is responsible
156
+ // for redirecting to the revisions screen once the editor canvas container
157
+ // has been set to 'global-styles-revisions'.
158
+
159
+ setEditorCanvasContainerView('global-styles-revisions');
160
+ }, [openGlobalStyles, setEditorCanvasContainerView]);
161
+ return createElement(Fragment, null, createElement(SidebarNavigationScreen, {
26
162
  title: __('Styles'),
27
163
  description: __('Choose a different style combination for the theme styles.'),
28
- content: createElement(StyleVariationsContainer, null),
29
- actions: createElement(SidebarButton, {
164
+ content: createElement(SidebarNavigationScreenGlobalStylesContent, null),
165
+ footer: createElement(SidebarNavigationScreenGlobalStylesFooter, {
166
+ onClickRevisions: openRevisions
167
+ }),
168
+ actions: createElement(Fragment, null, !isMobileViewport && createElement(SidebarButton, {
169
+ icon: seen,
170
+ label: __('Style Book'),
171
+ onClick: () => setEditorCanvasContainerView(!isStyleBookOpened ? 'style-book' : undefined),
172
+ isPressed: isStyleBookOpened
173
+ }), createElement(SidebarButton, {
30
174
  icon: edit,
31
175
  label: __('Edit styles'),
32
- onClick: () => {
33
- // switch to edit mode.
34
- setCanvasMode('edit'); // open global styles sidebar.
35
-
36
- openGeneralSidebar('edit-site/global-styles');
37
- }
38
- })
39
- });
176
+ onClick: async () => await openGlobalStyles()
177
+ }))
178
+ }), isStyleBookOpened && !isMobileViewport && createElement(StyleBook, {
179
+ enableResizing: false,
180
+ isSelected: () => false,
181
+ onClick: openStyleBook,
182
+ onSelect: openStyleBook,
183
+ showCloseButton: false,
184
+ showTabs: false
185
+ }));
40
186
  }
41
187
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"names":["__","edit","useDispatch","SidebarNavigationScreen","StyleVariationsContainer","unlock","store","editSiteStore","SidebarButton","SidebarNavigationScreenGlobalStyles","openGeneralSidebar","setCanvasMode"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,IAAT,QAAqB,kBAArB;AACA,SAASC,WAAT,QAA4B,iBAA5B;AAEA;AACA;AACA;;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AACA,OAAOC,wBAAP,MAAqC,6CAArC;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,aAAvC;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AAEA,eAAe,SAASC,mCAAT,GAA+C;AAC7D,QAAM;AAAEC,IAAAA;AAAF,MAAyBR,WAAW,CAAEK,aAAF,CAA1C;AACA,QAAM;AAAEI,IAAAA;AAAF,MAAoBN,MAAM,CAAEH,WAAW,CAAEK,aAAF,CAAb,CAAhC;AACA,SACC,cAAC,uBAAD;AACC,IAAA,KAAK,EAAGP,EAAE,CAAE,QAAF,CADX;AAEC,IAAA,WAAW,EAAGA,EAAE,CACf,4DADe,CAFjB;AAKC,IAAA,OAAO,EAAG,cAAC,wBAAD,OALX;AAMC,IAAA,OAAO,EACN,cAAC,aAAD;AACC,MAAA,IAAI,EAAGC,IADR;AAEC,MAAA,KAAK,EAAGD,EAAE,CAAE,aAAF,CAFX;AAGC,MAAA,OAAO,EAAG,MAAM;AACf;AACAW,QAAAA,aAAa,CAAE,MAAF,CAAb,CAFe,CAGf;;AACAD,QAAAA,kBAAkB,CAAE,yBAAF,CAAlB;AACA;AARF;AAPF,IADD;AAqBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../private-apis';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ __( 'Styles' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t) }\n\t\t\tcontent={ <StyleVariationsContainer /> }\n\t\t\tactions={\n\t\t\t\t<SidebarButton\n\t\t\t\t\ticon={ edit }\n\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t// switch to edit mode.\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t\t// open global styles sidebar.\n\t\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"names":["__","backup","edit","seen","useSelect","useDispatch","store","coreStore","Icon","__experimentalNavigatorButton","NavigatorButton","__experimentalVStack","HStack","VStack","useViewportMatch","BlockEditorProvider","humanTimeDiff","useCallback","SidebarNavigationScreen","StyleVariationsContainer","unlock","editSiteStore","SidebarButton","SidebarNavigationItem","StyleBook","useGlobalStylesRevisions","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","setCanvasMode","hasGlobalStyleVariations","select","__experimentalGetCurrentThemeGlobalStylesVariations","length","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","SidebarNavigationScreenGlobalStylesFooter","onClickRevisions","revisions","isLoading","revisionsCount","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","hasRevisions","modified","fill","SidebarNavigationScreenGlobalStyles","isMobileViewport","setEditorCanvasContainerView","isStyleBookOpened","getEditorCanvasContainerView","openGlobalStyles","Promise","all","openStyleBook","openRevisions"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,MAAT,EAAiBC,IAAjB,EAAuBC,IAAvB,QAAmC,kBAAnC;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SACCC,IADD,EAECC,6BAA6B,IAAIC,eAFlC,EAGCC,oBAAoB,IAAIC,MAHzB,EAICD,oBAAoB,IAAIE,MAJzB,QAKO,uBALP;AAMA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,mBAAT,QAAoC,yBAApC;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,WAAT,QAA4B,oBAA5B;AAEA;AACA;AACA;;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AACA,OAAOC,wBAAP,MAAqC,6CAArC;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,SAASd,KAAK,IAAIe,aAAlB,QAAuC,aAAvC;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,wBAAP,MAAqC,+DAArC;;AAEA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,OAAO,SAASC,iCAAT,CAA4CC,KAA5C,EAAoD;AAC1D,QAAM;AAAEC,IAAAA;AAAF,MAAyBxB,WAAW,CAAEgB,aAAF,CAA1C;AACA,QAAM;AAAES,IAAAA;AAAF,MAAoBV,MAAM,CAAEf,WAAW,CAAEgB,aAAF,CAAb,CAAhC;AACA,QAAMU,wBAAwB,GAAG3B,SAAS,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O,EACN,8BACG,CAAER,gBAAF,IACD,cAAC,aAAD;AACC,MAAA,IAAI,EAAGnD,IADR;AAEC,MAAA,KAAK,EAAGH,EAAE,CAAE,YAAF,CAFX;AAGC,MAAA,OAAO,EAAG,MACTuD,4BAA4B,CAC3B,CAAEC,iBAAF,GACG,YADH,GAEGT,SAHwB,CAJ9B;AAUC,MAAA,SAAS,EAAGS;AAVb,MAFF,EAeC,cAAC,aAAD;AACC,MAAA,IAAI,EAAGtD,IADR;AAEC,MAAA,KAAK,EAAGF,EAAE,CAAE,aAAF,CAFX;AAGC,MAAA,OAAO,EAAG,YAAY,MAAM0D,gBAAgB;AAH7C,MAfD;AAZF,IADD,EAoCGF,iBAAiB,IAAI,CAAEF,gBAAvB,IACD,cAAC,SAAD;AACC,IAAA,cAAc,EAAG,KADlB;AAEC,IAAA,UAAU,EAAG,MAAM,KAFpB;AAGC,IAAA,OAAO,EAAGO,aAHX;AAIC,IAAA,QAAQ,EAAGA,aAJZ;AAKC,IAAA,eAAe,EAAG,KALnB;AAMC,IAAA,QAAQ,EAAG;AANZ,IArCF,CADD;AAiDA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { backup, edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../private-apis';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<NavigatorButton\n\t\t\t\t{ ...props }\n\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\tpath=\"/wp_global_styles\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings( false ),\n\t\t};\n\t}, [] );\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<StyleVariationsContainer />\n\t\t</BlockEditorProvider>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesFooter( { onClickRevisions } ) {\n\tconst { revisions, isLoading } = useGlobalStylesRevisions();\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\n\tconst hasRevisions = revisionsCount >= 2;\n\tconst modified = revisions?.[ 0 ]?.modified;\n\n\tif ( ! hasRevisions || isLoading || ! modified ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack className=\"edit-site-sidebar-navigation-screen-global-styles__footer\">\n\t\t\t<SidebarNavigationItem\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-global-styles__revisions\"\n\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\tonClick={ onClickRevisions }\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tas=\"span\"\n\t\t\t\t\talignment=\"center\"\n\t\t\t\t\tspacing={ 5 }\n\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-global-styles__revisions__label\">\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<time dateTime={ modified }>\n\t\t\t\t\t\t\t{ humanTimeDiff( modified ) }\n\t\t\t\t\t\t</time>\n\t\t\t\t\t</span>\n\t\t\t\t\t<Icon icon={ backup } style={ { fill: 'currentcolor' } } />\n\t\t\t\t</HStack>\n\t\t\t</SidebarNavigationItem>\n\t\t</VStack>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tconst isStyleBookOpened = useSelect(\n\t\t( select ) =>\n\t\t\t'style-book' ===\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\tconst openGlobalStyles = useCallback(\n\t\tasync () =>\n\t\t\tPromise.all( [\n\t\t\t\tsetCanvasMode( 'edit' ),\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t\t] ),\n\t\t[ setCanvasMode, openGeneralSidebar ]\n\t);\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\t<SidebarNavigationScreenGlobalStylesFooter\n\t\t\t\t\t\tonClickRevisions={ openRevisions }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\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\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isStyleBookOpened && ! isMobileViewport && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"]}
@@ -6,51 +6,40 @@ import { createElement } from "@wordpress/element";
6
6
  import { __experimentalItemGroup as ItemGroup, __experimentalNavigatorButton as NavigatorButton } from '@wordpress/components';
7
7
  import { __ } from '@wordpress/i18n';
8
8
  import { layout, symbol, navigation, styles, page } from '@wordpress/icons';
9
- import { useSelect } from '@wordpress/data';
10
- import { store as coreStore } from '@wordpress/core-data';
9
+ import { useDispatch, useSelect } from '@wordpress/data';
10
+ import { useEffect } from '@wordpress/element';
11
11
  /**
12
12
  * Internal dependencies
13
13
  */
14
14
 
15
15
  import SidebarNavigationScreen from '../sidebar-navigation-screen';
16
16
  import SidebarNavigationItem from '../sidebar-navigation-item';
17
+ import { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';
18
+ import { unlock } from '../../private-apis';
19
+ import { store as editSiteStore } from '../../store';
20
+ import SidebarNavigationScreenNavigationMenuButton from '../sidebar-navigation-screen-navigation-menus/navigator-button';
17
21
  export default function SidebarNavigationScreenMain() {
22
+ const editorCanvasContainerView = useSelect(select => {
23
+ return unlock(select(editSiteStore)).getEditorCanvasContainerView();
24
+ }, []);
18
25
  const {
19
- hasNavigationMenus,
20
- hasGlobalStyleVariations
21
- } = useSelect(select => {
22
- var _experimentalGetCurr;
23
-
24
- const {
25
- getEntityRecords,
26
- __experimentalGetCurrentThemeGlobalStylesVariations
27
- } = select(coreStore); // The query needs to be the same as in the "SidebarNavigationScreenNavigationMenus" component,
28
- // to avoid double network calls.
26
+ setEditorCanvasContainerView
27
+ } = unlock(useDispatch(editSiteStore)); // Clear the editor canvas container view when accessing the main navigation screen.
29
28
 
30
- const navigationMenus = getEntityRecords('postType', 'wp_navigation', {
31
- per_page: 1,
32
- status: 'publish',
33
- order: 'desc',
34
- orderby: 'date'
35
- });
36
- return {
37
- hasNavigationMenus: !!(navigationMenus !== null && navigationMenus !== void 0 && navigationMenus.length),
38
- hasGlobalStyleVariations: !!((_experimentalGetCurr = __experimentalGetCurrentThemeGlobalStylesVariations()) !== null && _experimentalGetCurr !== void 0 && _experimentalGetCurr.length)
39
- };
40
- }, []);
41
- const showNavigationScreen = process.env.IS_GUTENBERG_PLUGIN ? hasNavigationMenus : false;
29
+ useEffect(() => {
30
+ if (editorCanvasContainerView) {
31
+ setEditorCanvasContainerView(undefined);
32
+ }
33
+ }, [editorCanvasContainerView, setEditorCanvasContainerView]);
42
34
  return createElement(SidebarNavigationScreen, {
43
35
  isRoot: true,
44
36
  title: __('Design'),
45
37
  description: __('Customize the appearance of your website using the block editor.'),
46
- content: createElement(ItemGroup, null, showNavigationScreen && createElement(NavigatorButton, {
47
- as: SidebarNavigationItem,
48
- path: "/navigation",
38
+ content: createElement(ItemGroup, null, createElement(SidebarNavigationScreenNavigationMenuButton, {
49
39
  withChevron: true,
50
- icon: navigation
51
- }, __('Navigation')), hasGlobalStyleVariations && createElement(NavigatorButton, {
52
- as: SidebarNavigationItem,
53
- path: "/wp_global_styles",
40
+ icon: navigation,
41
+ as: SidebarNavigationItem
42
+ }, __('Navigation')), createElement(SidebarNavigationItemGlobalStyles, {
54
43
  withChevron: true,
55
44
  icon: styles
56
45
  }, __('Styles')), createElement(NavigatorButton, {
@@ -68,7 +57,7 @@ export default function SidebarNavigationScreenMain() {
68
57
  path: "/wp_template_part",
69
58
  withChevron: true,
70
59
  icon: symbol
71
- }, __('Template Parts')))
60
+ }, __('Library')))
72
61
  });
73
62
  }
74
63
  //# sourceMappingURL=index.js.map