@wordpress/edit-site 5.9.0 → 5.10.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 (426) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-template/add-custom-template-modal.js +21 -6
  3. package/build/components/add-new-template/add-custom-template-modal.js.map +1 -1
  4. package/build/components/add-new-template/new-template-part.js +8 -2
  5. package/build/components/add-new-template/new-template-part.js.map +1 -1
  6. package/build/components/add-new-template/new-template.js +6 -3
  7. package/build/components/add-new-template/new-template.js.map +1 -1
  8. package/build/components/app/index.js +8 -2
  9. package/build/components/app/index.js.map +1 -1
  10. package/build/components/block-editor/back-button.js +10 -3
  11. package/build/components/block-editor/back-button.js.map +1 -1
  12. package/build/components/block-editor/editor-canvas.js +39 -6
  13. package/build/components/block-editor/editor-canvas.js.map +1 -1
  14. package/build/components/editor/index.js +43 -9
  15. package/build/components/editor/index.js.map +1 -1
  16. package/build/components/editor-canvas-container/index.js +18 -4
  17. package/build/components/editor-canvas-container/index.js.map +1 -1
  18. package/build/components/global-styles/block-preview-panel.js +1 -1
  19. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  20. package/build/components/global-styles/border-panel.js +3 -1
  21. package/build/components/global-styles/border-panel.js.map +1 -1
  22. package/build/components/global-styles/color-palette-panel.js +14 -3
  23. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  24. package/build/components/global-styles/dimensions-panel.js +17 -18
  25. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  26. package/build/components/global-styles/gradients-palette-panel.js +14 -3
  27. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  28. package/build/components/global-styles/root-menu.js +61 -0
  29. package/build/components/global-styles/root-menu.js.map +1 -0
  30. package/build/components/global-styles/screen-block-list.js +3 -1
  31. package/build/components/global-styles/screen-block-list.js.map +1 -1
  32. package/build/components/global-styles/screen-block.js +158 -7
  33. package/build/components/global-styles/screen-block.js.map +1 -1
  34. package/build/components/global-styles/screen-colors.js +9 -26
  35. package/build/components/global-styles/screen-colors.js.map +1 -1
  36. package/build/components/global-styles/screen-css.js +20 -15
  37. package/build/components/global-styles/screen-css.js.map +1 -1
  38. package/build/components/global-styles/screen-layout.js +4 -17
  39. package/build/components/global-styles/screen-layout.js.map +1 -1
  40. package/build/components/global-styles/screen-revisions/index.js +148 -0
  41. package/build/components/global-styles/screen-revisions/index.js.map +1 -0
  42. package/build/components/global-styles/screen-revisions/revisions-buttons.js +132 -0
  43. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -0
  44. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +130 -0
  45. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -0
  46. package/build/components/global-styles/screen-root.js +2 -2
  47. package/build/components/global-styles/screen-root.js.map +1 -1
  48. package/build/components/global-styles/screen-typography-element.js +0 -3
  49. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  50. package/build/components/global-styles/screen-typography.js +11 -39
  51. package/build/components/global-styles/screen-typography.js.map +1 -1
  52. package/build/components/global-styles/style-variations-container.js +3 -8
  53. package/build/components/global-styles/style-variations-container.js.map +1 -1
  54. package/build/components/global-styles/typography-panel.js +7 -11
  55. package/build/components/global-styles/typography-panel.js.map +1 -1
  56. package/build/components/global-styles/ui.js +61 -108
  57. package/build/components/global-styles/ui.js.map +1 -1
  58. package/build/components/global-styles/variations-panel.js +4 -28
  59. package/build/components/global-styles/variations-panel.js.map +1 -1
  60. package/build/components/header-edit-mode/index.js +1 -1
  61. package/build/components/header-edit-mode/index.js.map +1 -1
  62. package/build/components/keyboard-shortcuts/register.js +1 -1
  63. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  64. package/build/components/layout/index.js +13 -7
  65. package/build/components/layout/index.js.map +1 -1
  66. package/build/components/list/index.js +9 -3
  67. package/build/components/list/index.js.map +1 -1
  68. package/build/components/list/table.js +1 -1
  69. package/build/components/list/table.js.map +1 -1
  70. package/build/components/plugin-template-setting-panel/index.js +44 -0
  71. package/build/components/plugin-template-setting-panel/index.js.map +1 -0
  72. package/build/components/revisions/index.js +95 -0
  73. package/build/components/revisions/index.js.map +1 -0
  74. package/build/components/routes/link.js +17 -2
  75. package/build/components/routes/link.js.map +1 -1
  76. package/build/components/routes/use-title.js +8 -2
  77. package/build/components/routes/use-title.js.map +1 -1
  78. package/build/components/save-button/index.js +31 -6
  79. package/build/components/save-button/index.js.map +1 -1
  80. package/build/components/save-hub/index.js +14 -31
  81. package/build/components/save-hub/index.js.map +1 -1
  82. package/build/components/save-panel/index.js +20 -7
  83. package/build/components/save-panel/index.js.map +1 -1
  84. package/build/components/secondary-sidebar/list-view-sidebar.js +2 -7
  85. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  86. package/build/components/sidebar/index.js +16 -2
  87. package/build/components/sidebar/index.js.map +1 -1
  88. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +9 -3
  89. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  90. package/build/components/sidebar-edit-mode/index.js +9 -2
  91. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  92. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +40 -0
  93. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -0
  94. package/build/components/sidebar-edit-mode/template-card/index.js +1 -8
  95. package/build/components/sidebar-edit-mode/template-card/index.js.map +1 -1
  96. package/build/components/sidebar-edit-mode/{template-card/last-revision.js → template-revisions/index.js} +1 -1
  97. package/build/components/sidebar-edit-mode/template-revisions/index.js.map +1 -0
  98. package/build/components/sidebar-navigation-item/index.js +5 -7
  99. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  100. package/build/components/sidebar-navigation-screen/index.js +14 -4
  101. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  102. package/build/components/sidebar-navigation-screen-main/index.js +24 -7
  103. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  104. package/build/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  105. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  106. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +17 -5
  107. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  108. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +3 -3
  109. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  110. package/build/components/sidebar-navigation-screen-page/index.js +67 -0
  111. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -0
  112. package/build/components/sidebar-navigation-screen-pages/index.js +74 -0
  113. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -0
  114. package/build/components/sidebar-navigation-screen-templates/index.js +5 -3
  115. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  116. package/build/components/sidebar-navigation-subtitle/index.js +18 -0
  117. package/build/components/sidebar-navigation-subtitle/index.js.map +1 -0
  118. package/build/components/site-hub/index.js +36 -6
  119. package/build/components/site-hub/index.js.map +1 -1
  120. package/build/components/start-template-options/index.js +12 -16
  121. package/build/components/start-template-options/index.js.map +1 -1
  122. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -2
  123. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  124. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +9 -4
  125. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  126. package/build/components/sync-state-with-url/use-sync-path-with-url.js +17 -3
  127. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  128. package/build/components/template-details/template-areas.js +9 -3
  129. package/build/components/template-details/template-areas.js.map +1 -1
  130. package/build/hooks/template-part-edit.js +8 -2
  131. package/build/hooks/template-part-edit.js.map +1 -1
  132. package/build/index.js +8 -0
  133. package/build/index.js.map +1 -1
  134. package/build/utils/is-previewing-theme.js +27 -0
  135. package/build/utils/is-previewing-theme.js.map +1 -0
  136. package/build/utils/use-activate-theme.js +46 -0
  137. package/build/utils/use-activate-theme.js.map +1 -0
  138. package/build-module/components/add-new-template/add-custom-template-modal.js +21 -6
  139. package/build-module/components/add-new-template/add-custom-template-modal.js.map +1 -1
  140. package/build-module/components/add-new-template/new-template-part.js +5 -1
  141. package/build-module/components/add-new-template/new-template-part.js.map +1 -1
  142. package/build-module/components/add-new-template/new-template.js +4 -1
  143. package/build-module/components/add-new-template/new-template.js.map +1 -1
  144. package/build-module/components/app/index.js +6 -2
  145. package/build-module/components/app/index.js.map +1 -1
  146. package/build-module/components/block-editor/back-button.js +6 -1
  147. package/build-module/components/block-editor/back-button.js.map +1 -1
  148. package/build-module/components/block-editor/editor-canvas.js +37 -6
  149. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  150. package/build-module/components/editor/index.js +45 -11
  151. package/build-module/components/editor/index.js.map +1 -1
  152. package/build-module/components/editor-canvas-container/index.js +21 -6
  153. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  154. package/build-module/components/global-styles/block-preview-panel.js +1 -1
  155. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  156. package/build-module/components/global-styles/border-panel.js +3 -1
  157. package/build-module/components/global-styles/border-panel.js.map +1 -1
  158. package/build-module/components/global-styles/color-palette-panel.js +13 -3
  159. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  160. package/build-module/components/global-styles/dimensions-panel.js +17 -18
  161. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  162. package/build-module/components/global-styles/gradients-palette-panel.js +13 -3
  163. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  164. package/build-module/components/global-styles/root-menu.js +47 -0
  165. package/build-module/components/global-styles/root-menu.js.map +1 -0
  166. package/build-module/components/global-styles/screen-block-list.js +4 -2
  167. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  168. package/build-module/components/global-styles/screen-block.js +151 -7
  169. package/build-module/components/global-styles/screen-block.js.map +1 -1
  170. package/build-module/components/global-styles/screen-colors.js +9 -25
  171. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  172. package/build-module/components/global-styles/screen-css.js +20 -15
  173. package/build-module/components/global-styles/screen-css.js.map +1 -1
  174. package/build-module/components/global-styles/screen-layout.js +4 -16
  175. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  176. package/build-module/components/global-styles/screen-revisions/index.js +128 -0
  177. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -0
  178. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +121 -0
  179. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -0
  180. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +116 -0
  181. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -0
  182. package/build-module/components/global-styles/screen-root.js +2 -2
  183. package/build-module/components/global-styles/screen-root.js.map +1 -1
  184. package/build-module/components/global-styles/screen-typography-element.js +0 -3
  185. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  186. package/build-module/components/global-styles/screen-typography.js +11 -37
  187. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  188. package/build-module/components/global-styles/style-variations-container.js +3 -7
  189. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  190. package/build-module/components/global-styles/typography-panel.js +7 -11
  191. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  192. package/build-module/components/global-styles/ui.js +61 -105
  193. package/build-module/components/global-styles/ui.js.map +1 -1
  194. package/build-module/components/global-styles/variations-panel.js +3 -22
  195. package/build-module/components/global-styles/variations-panel.js.map +1 -1
  196. package/build-module/components/header-edit-mode/index.js +2 -2
  197. package/build-module/components/header-edit-mode/index.js.map +1 -1
  198. package/build-module/components/keyboard-shortcuts/register.js +1 -1
  199. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  200. package/build-module/components/layout/index.js +9 -3
  201. package/build-module/components/layout/index.js.map +1 -1
  202. package/build-module/components/list/index.js +5 -1
  203. package/build-module/components/list/index.js.map +1 -1
  204. package/build-module/components/list/table.js +1 -1
  205. package/build-module/components/list/table.js.map +1 -1
  206. package/build-module/components/plugin-template-setting-panel/index.js +35 -0
  207. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -0
  208. package/build-module/components/revisions/index.js +77 -0
  209. package/build-module/components/revisions/index.js.map +1 -0
  210. package/build-module/components/routes/link.js +13 -1
  211. package/build-module/components/routes/link.js.map +1 -1
  212. package/build-module/components/routes/use-title.js +5 -1
  213. package/build-module/components/routes/use-title.js.map +1 -1
  214. package/build-module/components/save-button/index.js +28 -6
  215. package/build-module/components/save-button/index.js.map +1 -1
  216. package/build-module/components/save-hub/index.js +13 -32
  217. package/build-module/components/save-hub/index.js.map +1 -1
  218. package/build-module/components/save-panel/index.js +19 -7
  219. package/build-module/components/save-panel/index.js.map +1 -1
  220. package/build-module/components/secondary-sidebar/list-view-sidebar.js +3 -8
  221. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  222. package/build-module/components/sidebar/index.js +11 -1
  223. package/build-module/components/sidebar/index.js.map +1 -1
  224. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +9 -3
  225. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  226. package/build-module/components/sidebar-edit-mode/index.js +10 -5
  227. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  228. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +29 -0
  229. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -0
  230. package/build-module/components/sidebar-edit-mode/template-card/index.js +2 -7
  231. package/build-module/components/sidebar-edit-mode/template-card/index.js.map +1 -1
  232. package/build-module/components/sidebar-edit-mode/{template-card/last-revision.js → template-revisions/index.js} +1 -1
  233. package/build-module/components/sidebar-edit-mode/template-revisions/index.js.map +1 -0
  234. package/build-module/components/sidebar-navigation-item/index.js +6 -8
  235. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  236. package/build-module/components/sidebar-navigation-screen/index.js +13 -5
  237. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  238. package/build-module/components/sidebar-navigation-screen-main/index.js +25 -8
  239. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  240. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  241. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  242. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +13 -3
  243. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  244. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +3 -3
  245. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  246. package/build-module/components/sidebar-navigation-screen-page/index.js +48 -0
  247. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -0
  248. package/build-module/components/sidebar-navigation-screen-pages/index.js +57 -0
  249. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -0
  250. package/build-module/components/sidebar-navigation-screen-templates/index.js +5 -3
  251. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  252. package/build-module/components/sidebar-navigation-subtitle/index.js +10 -0
  253. package/build-module/components/sidebar-navigation-subtitle/index.js.map +1 -0
  254. package/build-module/components/site-hub/index.js +34 -6
  255. package/build-module/components/site-hub/index.js.map +1 -1
  256. package/build-module/components/start-template-options/index.js +13 -17
  257. package/build-module/components/start-template-options/index.js.map +1 -1
  258. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -1
  259. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  260. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +5 -1
  261. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  262. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +13 -1
  263. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  264. package/build-module/components/template-details/template-areas.js +5 -1
  265. package/build-module/components/template-details/template-areas.js.map +1 -1
  266. package/build-module/hooks/template-part-edit.js +5 -1
  267. package/build-module/hooks/template-part-edit.js.map +1 -1
  268. package/build-module/index.js +1 -0
  269. package/build-module/index.js.map +1 -1
  270. package/build-module/utils/is-previewing-theme.js +17 -0
  271. package/build-module/utils/is-previewing-theme.js.map +1 -0
  272. package/build-module/utils/use-activate-theme.js +36 -0
  273. package/build-module/utils/use-activate-theme.js.map +1 -0
  274. package/build-style/style-rtl.css +199 -78
  275. package/build-style/style.css +199 -78
  276. package/package.json +36 -34
  277. package/src/components/add-new-template/add-custom-template-modal.js +31 -8
  278. package/src/components/add-new-template/new-template-part.js +4 -1
  279. package/src/components/add-new-template/new-template.js +3 -1
  280. package/src/components/add-new-template/style.scss +52 -48
  281. package/src/components/app/index.js +6 -3
  282. package/src/components/block-editor/back-button.js +4 -1
  283. package/src/components/block-editor/editor-canvas.js +36 -8
  284. package/src/components/block-editor/style.scss +15 -8
  285. package/src/components/editor/index.js +48 -7
  286. package/src/components/editor-canvas-container/index.js +30 -17
  287. package/src/components/global-styles/block-preview-panel.js +1 -1
  288. package/src/components/global-styles/border-panel.js +3 -1
  289. package/src/components/global-styles/color-palette-panel.js +9 -0
  290. package/src/components/global-styles/dimensions-panel.js +15 -15
  291. package/src/components/global-styles/gradients-palette-panel.js +8 -0
  292. package/src/components/global-styles/root-menu.js +66 -0
  293. package/src/components/global-styles/screen-block-list.js +2 -2
  294. package/src/components/global-styles/screen-block.js +184 -7
  295. package/src/components/global-styles/screen-colors.js +9 -16
  296. package/src/components/global-styles/screen-css.js +21 -21
  297. package/src/components/global-styles/screen-layout.js +5 -9
  298. package/src/components/global-styles/screen-revisions/index.js +177 -0
  299. package/src/components/global-styles/screen-revisions/revisions-buttons.js +131 -0
  300. package/src/components/global-styles/screen-revisions/style.scss +99 -0
  301. package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +125 -0
  302. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +103 -0
  303. package/src/components/global-styles/screen-root.js +2 -2
  304. package/src/components/global-styles/screen-typography-element.js +1 -3
  305. package/src/components/global-styles/screen-typography.js +44 -79
  306. package/src/components/global-styles/style-variations-container.js +4 -10
  307. package/src/components/global-styles/style.scss +1 -23
  308. package/src/components/global-styles/typography-panel.js +12 -13
  309. package/src/components/global-styles/ui.js +72 -101
  310. package/src/components/global-styles/variations-panel.js +3 -26
  311. package/src/components/header-edit-mode/index.js +5 -2
  312. package/src/components/keyboard-shortcuts/register.js +1 -1
  313. package/src/components/layout/index.js +7 -3
  314. package/src/components/layout/style.scss +2 -4
  315. package/src/components/list/index.js +4 -1
  316. package/src/components/list/style.scss +4 -0
  317. package/src/components/list/table.js +3 -1
  318. package/src/components/plugin-template-setting-panel/index.js +33 -0
  319. package/src/components/revisions/index.js +104 -0
  320. package/src/components/routes/link.js +16 -1
  321. package/src/components/routes/use-title.js +4 -1
  322. package/src/components/save-button/index.js +27 -6
  323. package/src/components/save-hub/index.js +17 -35
  324. package/src/components/save-panel/index.js +15 -3
  325. package/src/components/secondary-sidebar/list-view-sidebar.js +2 -6
  326. package/src/components/sidebar/index.js +12 -1
  327. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +9 -7
  328. package/src/components/sidebar-edit-mode/index.js +17 -6
  329. package/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js +26 -0
  330. package/src/components/sidebar-edit-mode/style.scss +10 -0
  331. package/src/components/sidebar-edit-mode/template-card/index.js +1 -9
  332. package/src/components/sidebar-navigation-item/index.js +13 -14
  333. package/src/components/sidebar-navigation-item/style.scss +8 -1
  334. package/src/components/sidebar-navigation-screen/index.js +26 -5
  335. package/src/components/sidebar-navigation-screen-main/index.js +43 -22
  336. package/src/components/sidebar-navigation-screen-navigation-item/index.js +3 -9
  337. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +13 -1
  338. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +3 -3
  339. package/src/components/sidebar-navigation-screen-page/index.js +59 -0
  340. package/src/components/sidebar-navigation-screen-pages/index.js +82 -0
  341. package/src/components/sidebar-navigation-screen-pages/style.scss +4 -0
  342. package/src/components/sidebar-navigation-screen-templates/index.js +5 -1
  343. package/src/components/sidebar-navigation-subtitle/index.js +5 -0
  344. package/src/components/sidebar-navigation-subtitle/style.scss +7 -0
  345. package/src/components/site-hub/index.js +89 -58
  346. package/src/components/site-hub/style.scss +8 -0
  347. package/src/components/start-template-options/index.js +19 -27
  348. package/src/components/start-template-options/style.scss +29 -21
  349. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +4 -1
  350. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +3 -1
  351. package/src/components/sync-state-with-url/use-sync-path-with-url.js +14 -1
  352. package/src/components/template-details/template-areas.js +4 -1
  353. package/src/hooks/template-part-edit.js +4 -1
  354. package/src/index.js +1 -0
  355. package/src/store/test/actions.js +6 -14
  356. package/src/style.scss +4 -1
  357. package/src/utils/is-previewing-theme.js +18 -0
  358. package/src/utils/use-activate-theme.js +38 -0
  359. package/build/components/global-styles/context-menu.js +0 -126
  360. package/build/components/global-styles/context-menu.js.map +0 -1
  361. package/build/components/global-styles/custom-css.js +0 -113
  362. package/build/components/global-styles/custom-css.js.map +0 -1
  363. package/build/components/global-styles/effects-panel.js +0 -53
  364. package/build/components/global-styles/effects-panel.js.map +0 -1
  365. package/build/components/global-styles/filters-panel.js +0 -50
  366. package/build/components/global-styles/filters-panel.js.map +0 -1
  367. package/build/components/global-styles/screen-border.js +0 -61
  368. package/build/components/global-styles/screen-border.js.map +0 -1
  369. package/build/components/global-styles/screen-effects.js +0 -61
  370. package/build/components/global-styles/screen-effects.js.map +0 -1
  371. package/build/components/global-styles/screen-filters.js +0 -46
  372. package/build/components/global-styles/screen-filters.js.map +0 -1
  373. package/build/components/global-styles/screen-variations.js +0 -71
  374. package/build/components/global-styles/screen-variations.js.map +0 -1
  375. package/build/components/routes/index.js +0 -60
  376. package/build/components/routes/index.js.map +0 -1
  377. package/build/components/sidebar-edit-mode/template-card/last-revision.js.map +0 -1
  378. package/build/hooks/commands/index.js +0 -19
  379. package/build/hooks/commands/index.js.map +0 -1
  380. package/build/hooks/commands/use-navigation-commands.js +0 -126
  381. package/build/hooks/commands/use-navigation-commands.js.map +0 -1
  382. package/build/hooks/commands/use-wp-admin-commands.js +0 -97
  383. package/build/hooks/commands/use-wp-admin-commands.js.map +0 -1
  384. package/build/utils/history.js +0 -41
  385. package/build/utils/history.js.map +0 -1
  386. package/build-module/components/global-styles/context-menu.js +0 -107
  387. package/build-module/components/global-styles/context-menu.js.map +0 -1
  388. package/build-module/components/global-styles/custom-css.js +0 -98
  389. package/build-module/components/global-styles/custom-css.js.map +0 -1
  390. package/build-module/components/global-styles/effects-panel.js +0 -43
  391. package/build-module/components/global-styles/effects-panel.js.map +0 -1
  392. package/build-module/components/global-styles/filters-panel.js +0 -40
  393. package/build-module/components/global-styles/filters-panel.js.map +0 -1
  394. package/build-module/components/global-styles/screen-border.js +0 -44
  395. package/build-module/components/global-styles/screen-border.js.map +0 -1
  396. package/build-module/components/global-styles/screen-effects.js +0 -44
  397. package/build-module/components/global-styles/screen-effects.js.map +0 -1
  398. package/build-module/components/global-styles/screen-filters.js +0 -33
  399. package/build-module/components/global-styles/screen-filters.js.map +0 -1
  400. package/build-module/components/global-styles/screen-variations.js +0 -54
  401. package/build-module/components/global-styles/screen-variations.js.map +0 -1
  402. package/build-module/components/routes/index.js +0 -47
  403. package/build-module/components/routes/index.js.map +0 -1
  404. package/build-module/components/sidebar-edit-mode/template-card/last-revision.js.map +0 -1
  405. package/build-module/hooks/commands/index.js +0 -10
  406. package/build-module/hooks/commands/index.js.map +0 -1
  407. package/build-module/hooks/commands/use-navigation-commands.js +0 -109
  408. package/build-module/hooks/commands/use-navigation-commands.js.map +0 -1
  409. package/build-module/hooks/commands/use-wp-admin-commands.js +0 -81
  410. package/build-module/hooks/commands/use-wp-admin-commands.js.map +0 -1
  411. package/build-module/utils/history.js +0 -31
  412. package/build-module/utils/history.js.map +0 -1
  413. package/src/components/global-styles/context-menu.js +0 -175
  414. package/src/components/global-styles/custom-css.js +0 -131
  415. package/src/components/global-styles/effects-panel.js +0 -40
  416. package/src/components/global-styles/filters-panel.js +0 -39
  417. package/src/components/global-styles/screen-border.js +0 -35
  418. package/src/components/global-styles/screen-effects.js +0 -35
  419. package/src/components/global-styles/screen-filters.js +0 -27
  420. package/src/components/global-styles/screen-variations.js +0 -46
  421. package/src/components/routes/index.js +0 -53
  422. package/src/hooks/commands/index.js +0 -10
  423. package/src/hooks/commands/use-navigation-commands.js +0 -112
  424. package/src/hooks/commands/use-wp-admin-commands.js +0 -79
  425. package/src/utils/history.js +0 -39
  426. /package/src/components/sidebar-edit-mode/{template-card/last-revision.js → template-revisions/index.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/secondary-sidebar/list-view-sidebar.js"],"names":["ListViewSidebar","setIsListViewOpened","editSiteStore","focusOnMountRef","headerFocusReturnRef","contentFocusReturnRef","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","instanceId","labelId","PrivateListView","blockEditorPrivateApis","closeSmall"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AApBA;AACA;AACA;;AAcA;AACA;AACA;AAIe,SAASA,eAAT,GAA2B;AACzC,QAAM;AAAEC,IAAAA;AAAF,MAA0B,uBAAaC,YAAb,CAAhC;AAEA,QAAMC,eAAe,GAAG,8BAAiB,cAAjB,CAAxB;AACA,QAAMC,oBAAoB,GAAG,8BAA7B;AACA,QAAMC,qBAAqB,GAAG,8BAA9B;;AACA,WAASC,aAAT,CAAwBC,KAAxB,EAAgC;AAC/B,QAAKA,KAAK,CAACC,OAAN,KAAkBC,gBAAlB,IAA4B,CAAEF,KAAK,CAACG,gBAAzC,EAA4D;AAC3DT,MAAAA,mBAAmB,CAAE,KAAF,CAAnB;AACA;AACD;;AAED,QAAMU,UAAU,GAAG,4BAAeX,eAAf,CAAnB;AACA,QAAMY,OAAO,GAAI,2CAA2CD,UAAY,EAAxE;AACA,QAAM;AAAEE,IAAAA;AAAF,MAAsB,yBAAQC,wBAAR,CAA5B;AACA,SACC;AACA;AACC,yBAAkBF,OADnB;AAEC,MAAA,SAAS,EAAC,mCAFX;AAGC,MAAA,SAAS,EAAGN;AAHb,OAKC;AACC,MAAA,SAAS,EAAC,0CADX;AAEC,MAAA,GAAG,EAAGF;AAFP,OAIC;AAAQ,MAAA,EAAE,EAAGQ;AAAb,OAAyB,cAAI,WAAJ,CAAzB,CAJD,EAKC,4BAAC,kBAAD;AACC,MAAA,IAAI,EAAGG,iBADR;AAEC,MAAA,KAAK,EAAG,cAAI,yBAAJ,CAFT;AAGC,MAAA,OAAO,EAAG,MAAMd,mBAAmB,CAAE,KAAF;AAHpC,MALD,CALD,EAgBC;AACC,MAAA,SAAS,EAAC,2CADX;AAEC,MAAA,GAAG,EAAG,2BAAc,CACnBI,qBADmB,EAEnBF,eAFmB,CAAd;AAFP,OAOC,4BAAC,eAAD,OAPD,CAhBD;AAFD;AA6BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport {\n\tuseFocusOnMount,\n\tuseFocusReturn,\n\tuseInstanceId,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../private-apis';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst headerFocusReturnRef = useFocusReturn();\n\tconst contentFocusReturnRef = useFocusReturn();\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}\n\n\tconst instanceId = useInstanceId( ListViewSidebar );\n\tconst labelId = `edit-site-editor__list-view-panel-label-${ instanceId }`;\n\tconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\taria-labelledby={ labelId }\n\t\t\tclassName=\"edit-site-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-editor__list-view-panel-header\"\n\t\t\t\tref={ headerFocusReturnRef }\n\t\t\t>\n\t\t\t\t<strong id={ labelId }>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close List View Sidebar' ) }\n\t\t\t\t\tonClick={ () => setIsListViewOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\tcontentFocusReturnRef,\n\t\t\t\t\tfocusOnMountRef,\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t<PrivateListView />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/secondary-sidebar/list-view-sidebar.js"],"names":["ListViewSidebar","setIsListViewOpened","editSiteStore","focusOnMountRef","headerFocusReturnRef","contentFocusReturnRef","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","PrivateListView","blockEditorPrivateApis","closeSmall"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAnBA;AACA;AACA;;AAaA;AACA;AACA;AAIe,SAASA,eAAT,GAA2B;AACzC,QAAM;AAAEC,IAAAA;AAAF,MAA0B,uBAAaC,YAAb,CAAhC;AAEA,QAAMC,eAAe,GAAG,8BAAiB,cAAjB,CAAxB;AACA,QAAMC,oBAAoB,GAAG,8BAA7B;AACA,QAAMC,qBAAqB,GAAG,8BAA9B;;AACA,WAASC,aAAT,CAAwBC,KAAxB,EAAgC;AAC/B,QAAKA,KAAK,CAACC,OAAN,KAAkBC,gBAAlB,IAA4B,CAAEF,KAAK,CAACG,gBAAzC,EAA4D;AAC3DT,MAAAA,mBAAmB,CAAE,KAAF,CAAnB;AACA;AACD;;AAED,QAAM;AAAEU,IAAAA;AAAF,MAAsB,yBAAQC,wBAAR,CAA5B;AACA,SACC;AACA;AACC,MAAA,SAAS,EAAC,mCADX;AAEC,MAAA,SAAS,EAAGN;AAFb,OAIC;AACC,MAAA,SAAS,EAAC,0CADX;AAEC,MAAA,GAAG,EAAGF;AAFP,OAIC,4CAAU,cAAI,WAAJ,CAAV,CAJD,EAKC,4BAAC,kBAAD;AACC,MAAA,IAAI,EAAGS,iBADR;AAEC,MAAA,KAAK,EAAG,cAAI,OAAJ,CAFT;AAGC,MAAA,OAAO,EAAG,MAAMZ,mBAAmB,CAAE,KAAF;AAHpC,MALD,CAJD,EAeC;AACC,MAAA,SAAS,EAAC,2CADX;AAEC,MAAA,GAAG,EAAG,2BAAc,CACnBI,qBADmB,EAEnBF,eAFmB,CAAd;AAFP,OAOC,4BAAC,eAAD,OAPD,CAfD;AAFD;AA4BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport {\n\tuseFocusOnMount,\n\tuseFocusReturn,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../private-apis';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst headerFocusReturnRef = useFocusReturn();\n\tconst contentFocusReturnRef = useFocusReturn();\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}\n\n\tconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"edit-site-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-editor__list-view-panel-header\"\n\t\t\t\tref={ headerFocusReturnRef }\n\t\t\t>\n\t\t\t\t<strong>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\tonClick={ () => setIsListViewOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\tcontentFocusReturnRef,\n\t\t\t\t\tfocusOnMountRef,\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t<PrivateListView />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
@@ -11,6 +11,8 @@ var _element = require("@wordpress/element");
11
11
 
12
12
  var _components = require("@wordpress/components");
13
13
 
14
+ var _router = require("@wordpress/router");
15
+
14
16
  var _sidebarNavigationScreenMain = _interopRequireDefault(require("../sidebar-navigation-screen-main"));
15
17
 
16
18
  var _sidebarNavigationScreenTemplates = _interopRequireDefault(require("../sidebar-navigation-screen-templates"));
@@ -29,7 +31,11 @@ var _saveHub = _interopRequireDefault(require("../save-hub"));
29
31
 
30
32
  var _sidebarNavigationScreenNavigationItem = _interopRequireDefault(require("../sidebar-navigation-screen-navigation-item"));
31
33
 
32
- var _routes = require("../routes");
34
+ var _privateApis = require("../../private-apis");
35
+
36
+ var _sidebarNavigationScreenPages = _interopRequireDefault(require("../sidebar-navigation-screen-pages"));
37
+
38
+ var _sidebarNavigationScreenPage = _interopRequireDefault(require("../sidebar-navigation-screen-page"));
33
39
 
34
40
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
41
 
@@ -42,6 +48,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
42
48
  /**
43
49
  * Internal dependencies
44
50
  */
51
+ const {
52
+ useLocation
53
+ } = (0, _privateApis.unlock)(_router.privateApis);
54
+
45
55
  function SidebarScreens() {
46
56
  (0, _useSyncPathWithUrl.default)();
47
57
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.__experimentalNavigatorScreen, {
@@ -53,6 +63,10 @@ function SidebarScreens() {
53
63
  }, (0, _element.createElement)(_sidebarNavigationScreenGlobalStyles.default, null)), (0, _element.createElement)(_components.__experimentalNavigatorScreen, {
54
64
  path: "/navigation/:postType/:postId"
55
65
  }, (0, _element.createElement)(_sidebarNavigationScreenNavigationItem.default, null)), (0, _element.createElement)(_components.__experimentalNavigatorScreen, {
66
+ path: "/page"
67
+ }, (0, _element.createElement)(_sidebarNavigationScreenPages.default, null)), (0, _element.createElement)(_components.__experimentalNavigatorScreen, {
68
+ path: "/page/:postId"
69
+ }, (0, _element.createElement)(_sidebarNavigationScreenPage.default, null)), (0, _element.createElement)(_components.__experimentalNavigatorScreen, {
56
70
  path: "/:postType(wp_template|wp_template_part)"
57
71
  }, (0, _element.createElement)(_sidebarNavigationScreenTemplates.default, null)), (0, _element.createElement)(_components.__experimentalNavigatorScreen, {
58
72
  path: "/:postType(wp_template|wp_template_part)/all"
@@ -64,7 +78,7 @@ function SidebarScreens() {
64
78
  function Sidebar() {
65
79
  const {
66
80
  params: urlParams
67
- } = (0, _routes.useLocation)();
81
+ } = useLocation();
68
82
  const initialPath = (0, _element.useRef)((0, _useSyncPathWithUrl.getPathFromURL)(urlParams));
69
83
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.__experimentalNavigatorProvider, {
70
84
  className: "edit-site-sidebar__content",
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar/index.js"],"names":["SidebarScreens","Sidebar","params","urlParams","initialPath","current"],"mappings":";;;;;;;;;AAGA;;AACA;;AAQA;;AACA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAvBA;AACA;AACA;;AAOA;AACA;AACA;AAcA,SAASA,cAAT,GAA0B;AACzB;AAEA,SACC,qDACC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,oCAAD,OADD,CADD,EAIC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,+CAAD,OADD,CAJD,EAOC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,4CAAD,OADD,CAPD,EAUC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,8CAAD,OADD,CAVD,EAaC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,yCAAD,OADD,CAbD,EAgBC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,+CAAD,OADD,CAhBD,EAmBC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,wCAAD,OADD,CAnBD,CADD;AAyBA;;AAED,SAASC,OAAT,GAAmB;AAClB,QAAM;AAAEC,IAAAA,MAAM,EAAEC;AAAV,MAAwB,0BAA9B;AACA,QAAMC,WAAW,GAAG,qBAAQ,wCAAgBD,SAAhB,CAAR,CAApB;AAEA,SACC,qDACC,4BAAC,2CAAD;AACC,IAAA,SAAS,EAAC,4BADX;AAEC,IAAA,WAAW,EAAGC,WAAW,CAACC;AAF3B,KAIC,4BAAC,cAAD,OAJD,CADD,EAOC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,4BAAC,gBAAD,OADD,CAPD,CADD;AAaA;;eAEc,mBAAMJ,OAAN,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { memo, useRef } from '@wordpress/element';\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport SidebarNavigationScreenTemplates from '../sidebar-navigation-screen-templates';\nimport SidebarNavigationScreenTemplate from '../sidebar-navigation-screen-template';\nimport useSyncPathWithURL, {\n\tgetPathFromURL,\n} from '../sync-state-with-url/use-sync-path-with-url';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SaveHub from '../save-hub';\nimport SidebarNavigationScreenNavigationItem from '../sidebar-navigation-screen-navigation-item';\nimport { useLocation } from '../routes';\n\nfunction SidebarScreens() {\n\tuseSyncPathWithURL();\n\n\treturn (\n\t\t<>\n\t\t\t<NavigatorScreen path=\"/\">\n\t\t\t\t<SidebarNavigationScreenMain />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/navigation\">\n\t\t\t\t<SidebarNavigationScreenNavigationMenus />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/wp_global_styles\">\n\t\t\t\t<SidebarNavigationScreenGlobalStyles />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/navigation/:postType/:postId\">\n\t\t\t\t<SidebarNavigationScreenNavigationItem />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template|wp_template_part)\">\n\t\t\t\t<SidebarNavigationScreenTemplates />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template|wp_template_part)/all\">\n\t\t\t\t<SidebarNavigationScreenTemplatesBrowse />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template|wp_template_part)/:postId\">\n\t\t\t\t<SidebarNavigationScreenTemplate />\n\t\t\t</NavigatorScreen>\n\t\t</>\n\t);\n}\n\nfunction Sidebar() {\n\tconst { params: urlParams } = useLocation();\n\tconst initialPath = useRef( getPathFromURL( urlParams ) );\n\n\treturn (\n\t\t<>\n\t\t\t<NavigatorProvider\n\t\t\t\tclassName=\"edit-site-sidebar__content\"\n\t\t\t\tinitialPath={ initialPath.current }\n\t\t\t>\n\t\t\t\t<SidebarScreens />\n\t\t\t</NavigatorProvider>\n\t\t\t<div className=\"edit-site-sidebar__footer\">\n\t\t\t\t<SaveHub />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default memo( Sidebar );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar/index.js"],"names":["useLocation","routerPrivateApis","SidebarScreens","Sidebar","params","urlParams","initialPath","current"],"mappings":";;;;;;;;;AAGA;;AACA;;AAIA;;AAKA;;AACA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AA1BA;AACA;AACA;;AAQA;AACA;AACA;AAgBA,MAAM;AAAEA,EAAAA;AAAF,IAAkB,yBAAQC,mBAAR,CAAxB;;AAEA,SAASC,cAAT,GAA0B;AACzB;AAEA,SACC,qDACC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,oCAAD,OADD,CADD,EAIC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,+CAAD,OADD,CAJD,EAOC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,4CAAD,OADD,CAPD,EAUC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,8CAAD,OADD,CAVD,EAaC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,qCAAD,OADD,CAbD,EAgBC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,oCAAD,OADD,CAhBD,EAmBC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,yCAAD,OADD,CAnBD,EAsBC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,+CAAD,OADD,CAtBD,EAyBC,4BAAC,yCAAD;AAAiB,IAAA,IAAI,EAAC;AAAtB,KACC,4BAAC,wCAAD,OADD,CAzBD,CADD;AA+BA;;AAED,SAASC,OAAT,GAAmB;AAClB,QAAM;AAAEC,IAAAA,MAAM,EAAEC;AAAV,MAAwBL,WAAW,EAAzC;AACA,QAAMM,WAAW,GAAG,qBAAQ,wCAAgBD,SAAhB,CAAR,CAApB;AAEA,SACC,qDACC,4BAAC,2CAAD;AACC,IAAA,SAAS,EAAC,4BADX;AAEC,IAAA,WAAW,EAAGC,WAAW,CAACC;AAF3B,KAIC,4BAAC,cAAD,OAJD,CADD,EAOC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,4BAAC,gBAAD,OADD,CAPD,CADD;AAaA;;eAEc,mBAAMJ,OAAN,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { memo, useRef } from '@wordpress/element';\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n} from '@wordpress/components';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport SidebarNavigationScreenTemplates from '../sidebar-navigation-screen-templates';\nimport SidebarNavigationScreenTemplate from '../sidebar-navigation-screen-template';\nimport useSyncPathWithURL, {\n\tgetPathFromURL,\n} from '../sync-state-with-url/use-sync-path-with-url';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SaveHub from '../save-hub';\nimport SidebarNavigationScreenNavigationItem from '../sidebar-navigation-screen-navigation-item';\nimport { unlock } from '../../private-apis';\nimport SidebarNavigationScreenPages from '../sidebar-navigation-screen-pages';\nimport SidebarNavigationScreenPage from '../sidebar-navigation-screen-page';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction SidebarScreens() {\n\tuseSyncPathWithURL();\n\n\treturn (\n\t\t<>\n\t\t\t<NavigatorScreen path=\"/\">\n\t\t\t\t<SidebarNavigationScreenMain />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/navigation\">\n\t\t\t\t<SidebarNavigationScreenNavigationMenus />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/wp_global_styles\">\n\t\t\t\t<SidebarNavigationScreenGlobalStyles />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/navigation/:postType/:postId\">\n\t\t\t\t<SidebarNavigationScreenNavigationItem />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/page\">\n\t\t\t\t<SidebarNavigationScreenPages />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/page/:postId\">\n\t\t\t\t<SidebarNavigationScreenPage />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template|wp_template_part)\">\n\t\t\t\t<SidebarNavigationScreenTemplates />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template|wp_template_part)/all\">\n\t\t\t\t<SidebarNavigationScreenTemplatesBrowse />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template|wp_template_part)/:postId\">\n\t\t\t\t<SidebarNavigationScreenTemplate />\n\t\t\t</NavigatorScreen>\n\t\t</>\n\t);\n}\n\nfunction Sidebar() {\n\tconst { params: urlParams } = useLocation();\n\tconst initialPath = useRef( getPathFromURL( urlParams ) );\n\n\treturn (\n\t\t<>\n\t\t\t<NavigatorProvider\n\t\t\t\tclassName=\"edit-site-sidebar__content\"\n\t\t\t\tinitialPath={ initialPath.current }\n\t\t\t>\n\t\t\t\t<SidebarScreens />\n\t\t\t</NavigatorProvider>\n\t\t\t<div className=\"edit-site-sidebar__footer\">\n\t\t\t\t<SaveHub />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default memo( Sidebar );\n"]}
@@ -44,12 +44,18 @@ function GlobalStylesSidebar() {
44
44
  const {
45
45
  getActiveComplementaryArea
46
46
  } = select(_interface.store);
47
+ const {
48
+ getEditorCanvasContainerView,
49
+ getCanvasMode
50
+ } = (0, _privateApis.unlock)(select(_store.store));
47
51
 
48
52
  const _isVisualEditorMode = 'visual' === select(_store.store).getEditorMode();
49
53
 
54
+ const _isEditCanvasMode = 'edit' === getCanvasMode();
55
+
50
56
  return {
51
- isStyleBookOpened: 'style-book' === (0, _privateApis.unlock)(select(_store.store)).getEditorCanvasContainerView(),
52
- shouldClearCanvasContainerView: 'edit-site/global-styles' !== getActiveComplementaryArea('core/edit-site') || !_isVisualEditorMode
57
+ isStyleBookOpened: 'style-book' === getEditorCanvasContainerView(),
58
+ shouldClearCanvasContainerView: 'edit-site/global-styles' !== getActiveComplementaryArea('core/edit-site') || !_isVisualEditorMode || !_isEditCanvasMode
53
59
  };
54
60
  }, []);
55
61
  const {
@@ -65,7 +71,7 @@ function GlobalStylesSidebar() {
65
71
  identifier: "edit-site/global-styles",
66
72
  title: (0, _i18n.__)('Styles'),
67
73
  icon: _icons.styles,
68
- closeLabel: (0, _i18n.__)('Close Styles sidebar'),
74
+ closeLabel: (0, _i18n.__)('Close Styles'),
69
75
  panelClassName: "edit-site-global-styles-sidebar__panel",
70
76
  header: (0, _element.createElement)(_components.Flex, {
71
77
  className: "edit-site-global-styles-sidebar__header"
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/global-styles-sidebar.js"],"names":["GlobalStylesSidebar","shouldClearCanvasContainerView","isStyleBookOpened","select","getActiveComplementaryArea","interfaceStore","_isVisualEditorMode","editSiteStore","getEditorMode","getEditorCanvasContainerView","setEditorCanvasContainerView","undefined","styles","minWidth","seen"],"mappings":";;;;;;;;;AAOA;;AAJA;;AACA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAjBA;AACA;AACA;;AAQA;AACA;AACA;AAOe,SAASA,mBAAT,GAA+B;AAC7C,QAAM;AAAEC,IAAAA,8BAAF;AAAkCC,IAAAA;AAAlC,MAAwD,qBAC3DC,MAAF,IAAc;AACb,UAAM;AAAEC,MAAAA;AAAF,QAAiCD,MAAM,CAAEE,gBAAF,CAA7C;;AACA,UAAMC,mBAAmB,GACxB,aAAaH,MAAM,CAAEI,YAAF,CAAN,CAAwBC,aAAxB,EADd;;AAGA,WAAO;AACNN,MAAAA,iBAAiB,EAChB,iBACA,yBACCC,MAAM,CAAEI,YAAF,CADP,EAEEE,4BAFF,EAHK;AAMNR,MAAAA,8BAA8B,EAC7B,8BACCG,0BAA0B,CAAE,gBAAF,CAD3B,IAEA,CAAEE;AATG,KAAP;AAWA,GAjB4D,EAkB7D,EAlB6D,CAA9D;AAqBA,QAAM;AAAEI,IAAAA;AAAF,MAAmC,yBACxC,uBAAaH,YAAb,CADwC,CAAzC;AAGA,0BAAW,MAAM;AAChB,QAAKN,8BAAL,EAAsC;AACrCS,MAAAA,4BAA4B,CAAEC,SAAF,CAA5B;AACA;AACD,GAJD,EAIG,CAAEV,8BAAF,CAJH;AAMA,SACC,4BAAC,uBAAD;AACC,IAAA,SAAS,EAAC,iCADX;AAEC,IAAA,UAAU,EAAC,yBAFZ;AAGC,IAAA,KAAK,EAAG,cAAI,QAAJ,CAHT;AAIC,IAAA,IAAI,EAAGW,aAJR;AAKC,IAAA,UAAU,EAAG,cAAI,sBAAJ,CALd;AAMC,IAAA,cAAc,EAAC,wCANhB;AAOC,IAAA,MAAM,EACL,4BAAC,gBAAD;AAAM,MAAA,SAAS,EAAC;AAAhB,OACC,4BAAC,qBAAD;AAAW,MAAA,KAAK,EAAG;AAAEC,QAAAA,QAAQ,EAAE;AAAZ;AAAnB,OACC,4CAAU,cAAI,QAAJ,CAAV,CADD,CADD,EAIC,4BAAC,oBAAD,QACC,4BAAC,kBAAD;AACC,MAAA,IAAI,EAAGC,WADR;AAEC,MAAA,KAAK,EAAG,cAAI,YAAJ,CAFT;AAGC,MAAA,SAAS,EAAGZ,iBAHb;AAIC,MAAA,QAAQ,EAAGD,8BAJZ;AAKC,MAAA,OAAO,EAAG,MACTS,4BAA4B,CAC3BR,iBAAiB,GAAGS,SAAH,GAAe,YADL;AAN9B,MADD,CAJD,EAiBC,4BAAC,oBAAD,QACC,4BAAC,wBAAD,OADD,CAjBD;AARF,KA+BC,4BAAC,4BAAD,OA/BD,CADD;AAmCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { FlexItem, FlexBlock, Flex, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { styles, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport DefaultSidebar from './default-sidebar';\nimport { GlobalStylesUI } from '../global-styles';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesMenuSlot } from '../global-styles/ui';\nimport { unlock } from '../../private-apis';\n\nexport default function GlobalStylesSidebar() {\n\tconst { shouldClearCanvasContainerView, isStyleBookOpened } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\t\tconst _isVisualEditorMode =\n\t\t\t\t'visual' === select( editSiteStore ).getEditorMode();\n\n\t\t\treturn {\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' ===\n\t\t\t\t\tunlock(\n\t\t\t\t\t\tselect( editSiteStore )\n\t\t\t\t\t).getEditorCanvasContainerView(),\n\t\t\t\tshouldClearCanvasContainerView:\n\t\t\t\t\t'edit-site/global-styles' !==\n\t\t\t\t\t\tgetActiveComplementaryArea( 'core/edit-site' ) ||\n\t\t\t\t\t! _isVisualEditorMode,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tuseEffect( () => {\n\t\tif ( shouldClearCanvasContainerView ) {\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t}\n\t}, [ shouldClearCanvasContainerView ] );\n\n\treturn (\n\t\t<DefaultSidebar\n\t\t\tclassName=\"edit-site-global-styles-sidebar\"\n\t\t\tidentifier=\"edit-site/global-styles\"\n\t\t\ttitle={ __( 'Styles' ) }\n\t\t\ticon={ styles }\n\t\t\tcloseLabel={ __( 'Close Styles sidebar' ) }\n\t\t\tpanelClassName=\"edit-site-global-styles-sidebar__panel\"\n\t\t\theader={\n\t\t\t\t<Flex className=\"edit-site-global-styles-sidebar__header\">\n\t\t\t\t\t<FlexBlock style={ { minWidth: 'min-content' } }>\n\t\t\t\t\t\t<strong>{ __( 'Styles' ) }</strong>\n\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\tdisabled={ shouldClearCanvasContainerView }\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\tisStyleBookOpened ? undefined : 'style-book'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<GlobalStylesMenuSlot />\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t}\n\t\t>\n\t\t\t<GlobalStylesUI />\n\t\t</DefaultSidebar>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/global-styles-sidebar.js"],"names":["GlobalStylesSidebar","shouldClearCanvasContainerView","isStyleBookOpened","select","getActiveComplementaryArea","interfaceStore","getEditorCanvasContainerView","getCanvasMode","editSiteStore","_isVisualEditorMode","getEditorMode","_isEditCanvasMode","setEditorCanvasContainerView","undefined","styles","minWidth","seen"],"mappings":";;;;;;;;;AAOA;;AAJA;;AACA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAjBA;AACA;AACA;;AAQA;AACA;AACA;AAOe,SAASA,mBAAT,GAA+B;AAC7C,QAAM;AAAEC,IAAAA,8BAAF;AAAkCC,IAAAA;AAAlC,MAAwD,qBAC3DC,MAAF,IAAc;AACb,UAAM;AAAEC,MAAAA;AAAF,QAAiCD,MAAM,CAAEE,gBAAF,CAA7C;AACA,UAAM;AAAEC,MAAAA,4BAAF;AAAgCC,MAAAA;AAAhC,QAAkD,yBACvDJ,MAAM,CAAEK,YAAF,CADiD,CAAxD;;AAGA,UAAMC,mBAAmB,GACxB,aAAaN,MAAM,CAAEK,YAAF,CAAN,CAAwBE,aAAxB,EADd;;AAEA,UAAMC,iBAAiB,GAAG,WAAWJ,aAAa,EAAlD;;AAEA,WAAO;AACNL,MAAAA,iBAAiB,EAChB,iBAAiBI,4BAA4B,EAFxC;AAGNL,MAAAA,8BAA8B,EAC7B,8BACCG,0BAA0B,CAAE,gBAAF,CAD3B,IAEA,CAAEK,mBAFF,IAGA,CAAEE;AAPG,KAAP;AASA,GAnB4D,EAoB7D,EApB6D,CAA9D;AAsBA,QAAM;AAAEC,IAAAA;AAAF,MAAmC,yBACxC,uBAAaJ,YAAb,CADwC,CAAzC;AAIA,0BAAW,MAAM;AAChB,QAAKP,8BAAL,EAAsC;AACrCW,MAAAA,4BAA4B,CAAEC,SAAF,CAA5B;AACA;AACD,GAJD,EAIG,CAAEZ,8BAAF,CAJH;AAMA,SACC,4BAAC,uBAAD;AACC,IAAA,SAAS,EAAC,iCADX;AAEC,IAAA,UAAU,EAAC,yBAFZ;AAGC,IAAA,KAAK,EAAG,cAAI,QAAJ,CAHT;AAIC,IAAA,IAAI,EAAGa,aAJR;AAKC,IAAA,UAAU,EAAG,cAAI,cAAJ,CALd;AAMC,IAAA,cAAc,EAAC,wCANhB;AAOC,IAAA,MAAM,EACL,4BAAC,gBAAD;AAAM,MAAA,SAAS,EAAC;AAAhB,OACC,4BAAC,qBAAD;AAAW,MAAA,KAAK,EAAG;AAAEC,QAAAA,QAAQ,EAAE;AAAZ;AAAnB,OACC,4CAAU,cAAI,QAAJ,CAAV,CADD,CADD,EAIC,4BAAC,oBAAD,QACC,4BAAC,kBAAD;AACC,MAAA,IAAI,EAAGC,WADR;AAEC,MAAA,KAAK,EAAG,cAAI,YAAJ,CAFT;AAGC,MAAA,SAAS,EAAGd,iBAHb;AAIC,MAAA,QAAQ,EAAGD,8BAJZ;AAKC,MAAA,OAAO,EAAG,MACTW,4BAA4B,CAC3BV,iBAAiB,GAAGW,SAAH,GAAe,YADL;AAN9B,MADD,CAJD,EAiBC,4BAAC,oBAAD,QACC,4BAAC,wBAAD,OADD,CAjBD;AARF,KA+BC,4BAAC,4BAAD,OA/BD,CADD;AAmCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { FlexItem, FlexBlock, Flex, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { styles, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport DefaultSidebar from './default-sidebar';\nimport { GlobalStylesUI } from '../global-styles';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesMenuSlot } from '../global-styles/ui';\nimport { unlock } from '../../private-apis';\n\nexport default function GlobalStylesSidebar() {\n\tconst { shouldClearCanvasContainerView, isStyleBookOpened } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\t\tconst { getEditorCanvasContainerView, getCanvasMode } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst _isVisualEditorMode =\n\t\t\t\t'visual' === select( editSiteStore ).getEditorMode();\n\t\t\tconst _isEditCanvasMode = 'edit' === getCanvasMode();\n\n\t\t\treturn {\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\tshouldClearCanvasContainerView:\n\t\t\t\t\t'edit-site/global-styles' !==\n\t\t\t\t\t\tgetActiveComplementaryArea( 'core/edit-site' ) ||\n\t\t\t\t\t! _isVisualEditorMode ||\n\t\t\t\t\t! _isEditCanvasMode,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tuseEffect( () => {\n\t\tif ( shouldClearCanvasContainerView ) {\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t}\n\t}, [ shouldClearCanvasContainerView ] );\n\n\treturn (\n\t\t<DefaultSidebar\n\t\t\tclassName=\"edit-site-global-styles-sidebar\"\n\t\t\tidentifier=\"edit-site/global-styles\"\n\t\t\ttitle={ __( 'Styles' ) }\n\t\t\ticon={ styles }\n\t\t\tcloseLabel={ __( 'Close Styles' ) }\n\t\t\tpanelClassName=\"edit-site-global-styles-sidebar__panel\"\n\t\t\theader={\n\t\t\t\t<Flex className=\"edit-site-global-styles-sidebar__header\">\n\t\t\t\t\t<FlexBlock style={ { minWidth: 'min-content' } }>\n\t\t\t\t\t\t<strong>{ __( 'Styles' ) }</strong>\n\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\tdisabled={ shouldClearCanvasContainerView }\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\tisStyleBookOpened ? undefined : 'style-book'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<GlobalStylesMenuSlot />\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t}\n\t\t>\n\t\t\t<GlobalStylesUI />\n\t\t</DefaultSidebar>\n\t);\n}\n"]}
@@ -30,8 +30,12 @@ var _constants = require("../../store/constants");
30
30
 
31
31
  var _settingsHeader = _interopRequireDefault(require("./settings-header"));
32
32
 
33
+ var _templateRevisions = _interopRequireDefault(require("./template-revisions"));
34
+
33
35
  var _templateCard = _interopRequireDefault(require("./template-card"));
34
36
 
37
+ var _pluginTemplateSettingPanel = _interopRequireDefault(require("../plugin-template-setting-panel"));
38
+
35
39
  var _constants2 = require("./constants");
36
40
 
37
41
  var _store = require("../../store");
@@ -91,12 +95,15 @@ function SidebarComplementaryAreaFills() {
91
95
  identifier: sidebarName,
92
96
  title: (0, _i18n.__)('Settings'),
93
97
  icon: (0, _i18n.isRTL)() ? _icons.drawerLeft : _icons.drawerRight,
94
- closeLabel: (0, _i18n.__)('Close settings'),
98
+ closeLabel: (0, _i18n.__)('Close Settings'),
95
99
  header: (0, _element.createElement)(_settingsHeader.default, {
96
100
  sidebarName: sidebarName
97
101
  }),
98
102
  headerClassName: "edit-site-sidebar-edit-mode__panel-tabs"
99
- }, sidebarName === _constants2.SIDEBAR_TEMPLATE && (0, _element.createElement)(_components.PanelBody, null, (0, _element.createElement)(_templateCard.default, null)), sidebarName === _constants2.SIDEBAR_BLOCK && (0, _element.createElement)(InspectorSlot, {
103
+ }, sidebarName === _constants2.SIDEBAR_TEMPLATE && (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.PanelBody, null, (0, _element.createElement)(_templateCard.default, null), (0, _element.createElement)(_components.PanelRow, {
104
+ header: (0, _i18n.__)('Editing history'),
105
+ className: "edit-site-template-revisions"
106
+ }, (0, _element.createElement)(_templateRevisions.default, null))), (0, _element.createElement)(_pluginTemplateSettingPanel.default.Slot, null)), sidebarName === _constants2.SIDEBAR_BLOCK && (0, _element.createElement)(InspectorSlot, {
100
107
  bubblesVirtually: true
101
108
  })), supportsGlobalStyles && (0, _element.createElement)(_globalStylesSidebar.default, null));
102
109
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/index.js"],"names":["Slot","InspectorSlot","Fill","InspectorFill","SidebarInspectorFill","SidebarComplementaryAreaFills","sidebar","isEditorSidebarOpened","hasBlockSelection","supportsGlobalStyles","select","_sidebar","interfaceStore","getActiveComplementaryArea","STORE_NAME","_isEditorSidebarOpened","SIDEBAR_BLOCK","SIDEBAR_TEMPLATE","includes","settings","editSiteStore","getSettings","blockEditorStore","getBlockSelectionStart","supportsTemplatePartsMode","enableComplementaryArea","sidebarName","drawerLeft","drawerRight"],"mappings":";;;;;;;;;;AAMA;;AAHA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AApBA;AACA;AACA;;AASA;AACA;AACA;AASA,MAAM;AAAEA,EAAAA,IAAI,EAAEC,aAAR;AAAuBC,EAAAA,IAAI,EAAEC;AAA7B,IAA+C,gCACpD,0BADoD,CAArD;AAGO,MAAMC,oBAAoB,GAAGD,aAA7B;;;AAEA,SAASE,6BAAT,GAAyC;AAC/C,QAAM;AACLC,IAAAA,OADK;AAELC,IAAAA,qBAFK;AAGLC,IAAAA,iBAHK;AAILC,IAAAA;AAJK,MAKF,qBAAaC,MAAF,IAAc;AAC5B,UAAMC,QAAQ,GACbD,MAAM,CAAEE,gBAAF,CAAN,CAAyBC,0BAAzB,CAAqDC,qBAArD,CADD;;AAEA,UAAMC,sBAAsB,GAAG,CAC9BC,yBAD8B,EAE9BC,4BAF8B,EAG7BC,QAH6B,CAGnBP,QAHmB,CAA/B;;AAIA,UAAMQ,QAAQ,GAAGT,MAAM,CAAEU,YAAF,CAAN,CAAwBC,WAAxB,EAAjB;AACA,WAAO;AACNf,MAAAA,OAAO,EAAEK,QADH;AAENJ,MAAAA,qBAAqB,EAAEQ,sBAFjB;AAGNP,MAAAA,iBAAiB,EAChB,CAAC,CAAEE,MAAM,CAAEY,kBAAF,CAAN,CAA2BC,sBAA3B,EAJE;AAKNd,MAAAA,oBAAoB,EAAE,EAAEU,QAAF,aAAEA,QAAF,eAAEA,QAAQ,CAAEK,yBAAZ;AALhB,KAAP;AAOA,GAfG,EAeD,EAfC,CALJ;AAqBA,QAAM;AAAEC,IAAAA;AAAF,MAA8B,uBAAab,gBAAb,CAApC;AAEA,0BAAW,MAAM;AAChB,QAAK,CAAEL,qBAAP,EAA+B;;AAC/B,QAAKC,iBAAL,EAAyB;AACxBiB,MAAAA,uBAAuB,CAAEX,qBAAF,EAAcE,yBAAd,CAAvB;AACA,KAFD,MAEO;AACNS,MAAAA,uBAAuB,CAAEX,qBAAF,EAAcG,4BAAd,CAAvB;AACA;AACD,GAPD,EAOG,CAAET,iBAAF,EAAqBD,qBAArB,CAPH;AASA,MAAImB,WAAW,GAAGpB,OAAlB;;AACA,MAAK,CAAEC,qBAAP,EAA+B;AAC9BmB,IAAAA,WAAW,GAAGlB,iBAAiB,GAAGQ,yBAAH,GAAmBC,4BAAlD;AACA;;AAED,SACC,qDACC,4BAAC,uBAAD;AACC,IAAA,UAAU,EAAGS,WADd;AAEC,IAAA,KAAK,EAAG,cAAI,UAAJ,CAFT;AAGC,IAAA,IAAI,EAAG,qBAAUC,iBAAV,GAAuBC,kBAH/B;AAIC,IAAA,UAAU,EAAG,cAAI,gBAAJ,CAJd;AAKC,IAAA,MAAM,EAAG,4BAAC,uBAAD;AAAgB,MAAA,WAAW,EAAGF;AAA9B,MALV;AAMC,IAAA,eAAe,EAAC;AANjB,KAQGA,WAAW,KAAKT,4BAAhB,IACD,4BAAC,qBAAD,QACC,4BAAC,qBAAD,OADD,CATF,EAaGS,WAAW,KAAKV,yBAAhB,IACD,4BAAC,aAAD;AAAe,IAAA,gBAAgB;AAA/B,IAdF,CADD,EAkBGP,oBAAoB,IAAI,4BAAC,4BAAD,OAlB3B,CADD;AAsBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { useEffect, Fragment } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DefaultSidebar from './default-sidebar';\nimport GlobalStylesSidebar from './global-styles-sidebar';\nimport { STORE_NAME } from '../../store/constants';\nimport SettingsHeader from './settings-header';\nimport TemplateCard from './template-card';\nimport { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from './constants';\nimport { store as editSiteStore } from '../../store';\n\nconst { Slot: InspectorSlot, Fill: InspectorFill } = createSlotFill(\n\t'EditSiteSidebarInspector'\n);\nexport const SidebarInspectorFill = InspectorFill;\n\nexport function SidebarComplementaryAreaFills() {\n\tconst {\n\t\tsidebar,\n\t\tisEditorSidebarOpened,\n\t\thasBlockSelection,\n\t\tsupportsGlobalStyles,\n\t} = useSelect( ( select ) => {\n\t\tconst _sidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( STORE_NAME );\n\t\tconst _isEditorSidebarOpened = [\n\t\t\tSIDEBAR_BLOCK,\n\t\t\tSIDEBAR_TEMPLATE,\n\t\t].includes( _sidebar );\n\t\tconst settings = select( editSiteStore ).getSettings();\n\t\treturn {\n\t\t\tsidebar: _sidebar,\n\t\t\tisEditorSidebarOpened: _isEditorSidebarOpened,\n\t\t\thasBlockSelection:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tsupportsGlobalStyles: ! settings?.supportsTemplatePartsMode,\n\t\t};\n\t}, [] );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\tif ( ! isEditorSidebarOpened ) return;\n\t\tif ( hasBlockSelection ) {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );\n\t\t} else {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_TEMPLATE );\n\t\t}\n\t}, [ hasBlockSelection, isEditorSidebarOpened ] );\n\n\tlet sidebarName = sidebar;\n\tif ( ! isEditorSidebarOpened ) {\n\t\tsidebarName = hasBlockSelection ? SIDEBAR_BLOCK : SIDEBAR_TEMPLATE;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<DefaultSidebar\n\t\t\t\tidentifier={ sidebarName }\n\t\t\t\ttitle={ __( 'Settings' ) }\n\t\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\t\tcloseLabel={ __( 'Close settings' ) }\n\t\t\t\theader={ <SettingsHeader sidebarName={ sidebarName } /> }\n\t\t\t\theaderClassName=\"edit-site-sidebar-edit-mode__panel-tabs\"\n\t\t\t>\n\t\t\t\t{ sidebarName === SIDEBAR_TEMPLATE && (\n\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t<TemplateCard />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t\t{ sidebarName === SIDEBAR_BLOCK && (\n\t\t\t\t\t<InspectorSlot bubblesVirtually />\n\t\t\t\t) }\n\t\t\t</DefaultSidebar>\n\t\t\t{ supportsGlobalStyles && <GlobalStylesSidebar /> }\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/index.js"],"names":["Slot","InspectorSlot","Fill","InspectorFill","SidebarInspectorFill","SidebarComplementaryAreaFills","sidebar","isEditorSidebarOpened","hasBlockSelection","supportsGlobalStyles","select","_sidebar","interfaceStore","getActiveComplementaryArea","STORE_NAME","_isEditorSidebarOpened","SIDEBAR_BLOCK","SIDEBAR_TEMPLATE","includes","settings","editSiteStore","getSettings","blockEditorStore","getBlockSelectionStart","supportsTemplatePartsMode","enableComplementaryArea","sidebarName","drawerLeft","drawerRight"],"mappings":";;;;;;;;;;AAMA;;AAHA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAtBA;AACA;AACA;;AASA;AACA;AACA;AAWA,MAAM;AAAEA,EAAAA,IAAI,EAAEC,aAAR;AAAuBC,EAAAA,IAAI,EAAEC;AAA7B,IAA+C,gCACpD,0BADoD,CAArD;AAGO,MAAMC,oBAAoB,GAAGD,aAA7B;;;AAEA,SAASE,6BAAT,GAAyC;AAC/C,QAAM;AACLC,IAAAA,OADK;AAELC,IAAAA,qBAFK;AAGLC,IAAAA,iBAHK;AAILC,IAAAA;AAJK,MAKF,qBAAaC,MAAF,IAAc;AAC5B,UAAMC,QAAQ,GACbD,MAAM,CAAEE,gBAAF,CAAN,CAAyBC,0BAAzB,CAAqDC,qBAArD,CADD;;AAEA,UAAMC,sBAAsB,GAAG,CAC9BC,yBAD8B,EAE9BC,4BAF8B,EAG7BC,QAH6B,CAGnBP,QAHmB,CAA/B;;AAIA,UAAMQ,QAAQ,GAAGT,MAAM,CAAEU,YAAF,CAAN,CAAwBC,WAAxB,EAAjB;AACA,WAAO;AACNf,MAAAA,OAAO,EAAEK,QADH;AAENJ,MAAAA,qBAAqB,EAAEQ,sBAFjB;AAGNP,MAAAA,iBAAiB,EAChB,CAAC,CAAEE,MAAM,CAAEY,kBAAF,CAAN,CAA2BC,sBAA3B,EAJE;AAKNd,MAAAA,oBAAoB,EAAE,EAAEU,QAAF,aAAEA,QAAF,eAAEA,QAAQ,CAAEK,yBAAZ;AALhB,KAAP;AAOA,GAfG,EAeD,EAfC,CALJ;AAqBA,QAAM;AAAEC,IAAAA;AAAF,MAA8B,uBAAab,gBAAb,CAApC;AAEA,0BAAW,MAAM;AAChB,QAAK,CAAEL,qBAAP,EAA+B;;AAC/B,QAAKC,iBAAL,EAAyB;AACxBiB,MAAAA,uBAAuB,CAAEX,qBAAF,EAAcE,yBAAd,CAAvB;AACA,KAFD,MAEO;AACNS,MAAAA,uBAAuB,CAAEX,qBAAF,EAAcG,4BAAd,CAAvB;AACA;AACD,GAPD,EAOG,CAAET,iBAAF,EAAqBD,qBAArB,CAPH;AASA,MAAImB,WAAW,GAAGpB,OAAlB;;AACA,MAAK,CAAEC,qBAAP,EAA+B;AAC9BmB,IAAAA,WAAW,GAAGlB,iBAAiB,GAAGQ,yBAAH,GAAmBC,4BAAlD;AACA;;AAED,SACC,qDACC,4BAAC,uBAAD;AACC,IAAA,UAAU,EAAGS,WADd;AAEC,IAAA,KAAK,EAAG,cAAI,UAAJ,CAFT;AAGC,IAAA,IAAI,EAAG,qBAAUC,iBAAV,GAAuBC,kBAH/B;AAIC,IAAA,UAAU,EAAG,cAAI,gBAAJ,CAJd;AAKC,IAAA,MAAM,EAAG,4BAAC,uBAAD;AAAgB,MAAA,WAAW,EAAGF;AAA9B,MALV;AAMC,IAAA,eAAe,EAAC;AANjB,KAQGA,WAAW,KAAKT,4BAAhB,IACD,qDACC,4BAAC,qBAAD,QACC,4BAAC,qBAAD,OADD,EAEC,4BAAC,oBAAD;AACC,IAAA,MAAM,EAAG,cAAI,iBAAJ,CADV;AAEC,IAAA,SAAS,EAAC;AAFX,KAIC,4BAAC,0BAAD,OAJD,CAFD,CADD,EAUC,4BAAC,mCAAD,CAA4B,IAA5B,OAVD,CATF,EAsBGS,WAAW,KAAKV,yBAAhB,IACD,4BAAC,aAAD;AAAe,IAAA,gBAAgB;AAA/B,IAvBF,CADD,EA2BGP,oBAAoB,IAAI,4BAAC,4BAAD,OA3B3B,CADD;AA+BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody, PanelRow } from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DefaultSidebar from './default-sidebar';\nimport GlobalStylesSidebar from './global-styles-sidebar';\nimport { STORE_NAME } from '../../store/constants';\nimport SettingsHeader from './settings-header';\nimport LastRevision from './template-revisions';\nimport TemplateCard from './template-card';\nimport PluginTemplateSettingPanel from '../plugin-template-setting-panel';\nimport { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from './constants';\nimport { store as editSiteStore } from '../../store';\n\nconst { Slot: InspectorSlot, Fill: InspectorFill } = createSlotFill(\n\t'EditSiteSidebarInspector'\n);\nexport const SidebarInspectorFill = InspectorFill;\n\nexport function SidebarComplementaryAreaFills() {\n\tconst {\n\t\tsidebar,\n\t\tisEditorSidebarOpened,\n\t\thasBlockSelection,\n\t\tsupportsGlobalStyles,\n\t} = useSelect( ( select ) => {\n\t\tconst _sidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( STORE_NAME );\n\t\tconst _isEditorSidebarOpened = [\n\t\t\tSIDEBAR_BLOCK,\n\t\t\tSIDEBAR_TEMPLATE,\n\t\t].includes( _sidebar );\n\t\tconst settings = select( editSiteStore ).getSettings();\n\t\treturn {\n\t\t\tsidebar: _sidebar,\n\t\t\tisEditorSidebarOpened: _isEditorSidebarOpened,\n\t\t\thasBlockSelection:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tsupportsGlobalStyles: ! settings?.supportsTemplatePartsMode,\n\t\t};\n\t}, [] );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\tif ( ! isEditorSidebarOpened ) return;\n\t\tif ( hasBlockSelection ) {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );\n\t\t} else {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_TEMPLATE );\n\t\t}\n\t}, [ hasBlockSelection, isEditorSidebarOpened ] );\n\n\tlet sidebarName = sidebar;\n\tif ( ! isEditorSidebarOpened ) {\n\t\tsidebarName = hasBlockSelection ? SIDEBAR_BLOCK : SIDEBAR_TEMPLATE;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<DefaultSidebar\n\t\t\t\tidentifier={ sidebarName }\n\t\t\t\ttitle={ __( 'Settings' ) }\n\t\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t\theader={ <SettingsHeader sidebarName={ sidebarName } /> }\n\t\t\t\theaderClassName=\"edit-site-sidebar-edit-mode__panel-tabs\"\n\t\t\t>\n\t\t\t\t{ sidebarName === SIDEBAR_TEMPLATE && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t\t<TemplateCard />\n\t\t\t\t\t\t\t<PanelRow\n\t\t\t\t\t\t\t\theader={ __( 'Editing history' ) }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-template-revisions\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<LastRevision />\n\t\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t<PluginTemplateSettingPanel.Slot />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t{ sidebarName === SIDEBAR_BLOCK && (\n\t\t\t\t\t<InspectorSlot bubblesVirtually />\n\t\t\t\t) }\n\t\t\t</DefaultSidebar>\n\t\t\t{ supportsGlobalStyles && <GlobalStylesSidebar /> }\n\t\t</>\n\t);\n}\n"]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SidebarFixedBottomSlot = void 0;
7
+ exports.default = SidebarFixedBottom;
8
+
9
+ var _element = require("@wordpress/element");
10
+
11
+ var _components = require("@wordpress/components");
12
+
13
+ var _privateApis = require("../../private-apis");
14
+
15
+ /**
16
+ * WordPress dependencies
17
+ */
18
+
19
+ /**
20
+ * Internal dependencies
21
+ */
22
+ const {
23
+ createPrivateSlotFill
24
+ } = (0, _privateApis.unlock)(_components.privateApis);
25
+ const SIDEBAR_FIXED_BOTTOM_SLOT_FILL_NAME = 'SidebarFixedBottom';
26
+ const {
27
+ Slot: SidebarFixedBottomSlot,
28
+ Fill: SidebarFixedBottomFill
29
+ } = createPrivateSlotFill(SIDEBAR_FIXED_BOTTOM_SLOT_FILL_NAME);
30
+ exports.SidebarFixedBottomSlot = SidebarFixedBottomSlot;
31
+
32
+ function SidebarFixedBottom(_ref) {
33
+ let {
34
+ children
35
+ } = _ref;
36
+ return (0, _element.createElement)(SidebarFixedBottomFill, null, (0, _element.createElement)("div", {
37
+ className: "edit-site-sidebar-fixed-bottom-slot"
38
+ }, children));
39
+ }
40
+ //# sourceMappingURL=sidebar-fixed-bottom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js"],"names":["createPrivateSlotFill","componentsPrivateApis","SIDEBAR_FIXED_BOTTOM_SLOT_FILL_NAME","Slot","SidebarFixedBottomSlot","Fill","SidebarFixedBottomFill","SidebarFixedBottom","children"],"mappings":";;;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAM;AAAEA,EAAAA;AAAF,IAA4B,yBAAQC,uBAAR,CAAlC;AACA,MAAMC,mCAAmC,GAAG,oBAA5C;AACA,MAAM;AAAEC,EAAAA,IAAI,EAAEC,sBAAR;AAAgCC,EAAAA,IAAI,EAAEC;AAAtC,IACLN,qBAAqB,CAAEE,mCAAF,CADtB;;;AAGe,SAASK,kBAAT,OAA4C;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AAC1D,SACC,4BAAC,sBAAD,QACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGA,QADH,CADD,CADD;AAOA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../private-apis';\n\nconst { createPrivateSlotFill } = unlock( componentsPrivateApis );\nconst SIDEBAR_FIXED_BOTTOM_SLOT_FILL_NAME = 'SidebarFixedBottom';\nconst { Slot: SidebarFixedBottomSlot, Fill: SidebarFixedBottomFill } =\n\tcreatePrivateSlotFill( SIDEBAR_FIXED_BOTTOM_SLOT_FILL_NAME );\n\nexport default function SidebarFixedBottom( { children } ) {\n\treturn (\n\t\t<SidebarFixedBottomFill>\n\t\t\t<div className=\"edit-site-sidebar-fixed-bottom-slot\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</SidebarFixedBottomFill>\n\t);\n}\n\nexport { SidebarFixedBottomSlot };\n"]}
@@ -9,8 +9,6 @@ exports.default = TemplateCard;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _i18n = require("@wordpress/i18n");
13
-
14
12
  var _data = require("@wordpress/data");
15
13
 
16
14
  var _components = require("@wordpress/components");
@@ -27,8 +25,6 @@ var _templateActions = _interopRequireDefault(require("./template-actions"));
27
25
 
28
26
  var _templateAreas = _interopRequireDefault(require("./template-areas"));
29
27
 
30
- var _lastRevision = _interopRequireDefault(require("./last-revision"));
31
-
32
28
  /**
33
29
  * WordPress dependencies
34
30
  */
@@ -84,9 +80,6 @@ function TemplateCard() {
84
80
  template: template
85
81
  })), (0, _element.createElement)("div", {
86
82
  className: "edit-site-template-card__description"
87
- }, (0, _htmlEntities.decodeEntities)(description)), (0, _element.createElement)(_templateAreas.default, null))), (0, _element.createElement)(_components.PanelRow, {
88
- header: (0, _i18n.__)('Editing history'),
89
- className: "edit-site-template-revisions"
90
- }, (0, _element.createElement)(_lastRevision.default, null)));
83
+ }, (0, _htmlEntities.decodeEntities)(description)), (0, _element.createElement)(_templateAreas.default, null))));
91
84
  }
92
85
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/template-card/index.js"],"names":["TemplateCard","info","title","description","icon","template","select","getEditedPostType","getEditedPostId","editSiteStore","getEditedEntityRecord","coreStore","__experimentalGetTemplateInfo","getTemplateInfo","editorStore","postType","postId","record"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AAhBA;AACA;AACA;;AAQA;AACA;AACA;AAMe,SAASA,YAAT,GAAwB;AACtC,QAAM;AACLC,IAAAA,IAAI,EAAE;AAAEC,MAAAA,KAAF;AAASC,MAAAA,WAAT;AAAsBC,MAAAA;AAAtB,KADD;AAELC,IAAAA;AAFK,MAGF,qBAAaC,MAAF,IAAc;AAC5B,UAAM;AAAEC,MAAAA,iBAAF;AAAqBC,MAAAA;AAArB,QAAyCF,MAAM,CAAEG,YAAF,CAArD;AACA,UAAM;AAAEC,MAAAA;AAAF,QAA4BJ,MAAM,CAAEK,eAAF,CAAxC;AACA,UAAM;AAAEC,MAAAA,6BAA6B,EAAEC;AAAjC,QACLP,MAAM,CAAEQ,aAAF,CADP;AAGA,UAAMC,QAAQ,GAAGR,iBAAiB,EAAlC;AACA,UAAMS,MAAM,GAAGR,eAAe,EAA9B;AACA,UAAMS,MAAM,GAAGP,qBAAqB,CAAE,UAAF,EAAcK,QAAd,EAAwBC,MAAxB,CAApC;AAEA,UAAMf,IAAI,GAAGgB,MAAM,GAAGJ,eAAe,CAAEI,MAAF,CAAlB,GAA+B,EAAlD;AAEA,WAAO;AAAEhB,MAAAA,IAAF;AAAQI,MAAAA,QAAQ,EAAEY;AAAlB,KAAP;AACA,GAbG,EAaD,EAbC,CAHJ;;AAkBA,MAAK,CAAEf,KAAF,IAAW,CAAEC,WAAlB,EAAgC;AAC/B,WAAO,IAAP;AACA;;AAED,SACC,qDACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,4BAAC,gBAAD;AAAM,IAAA,SAAS,EAAC,+BAAhB;AAAgD,IAAA,IAAI,EAAGC;AAAvD,IADD,EAEC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAI,IAAA,SAAS,EAAC;AAAd,KACG,kCAAgBF,KAAhB,CADH,CADD,EAIC,4BAAC,wBAAD;AAAiB,IAAA,QAAQ,EAAGG;AAA5B,IAJD,CADD,EAOC;AAAK,IAAA,SAAS,EAAC;AAAf,KACG,kCAAgBF,WAAhB,CADH,CAPD,EAUC,4BAAC,sBAAD,OAVD,CAFD,CADD,EAgBC,4BAAC,oBAAD;AACC,IAAA,MAAM,EAAG,cAAI,iBAAJ,CADV;AAEC,IAAA,SAAS,EAAC;AAFX,KAIC,4BAAC,qBAAD,OAJD,CAhBD,CADD;AAyBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelRow, Icon } from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\nimport TemplateActions from './template-actions';\nimport TemplateAreas from './template-areas';\nimport LastRevision from './last-revision';\n\nexport default function TemplateCard() {\n\tconst {\n\t\tinfo: { title, description, icon },\n\t\ttemplate,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = select( editSiteStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst { __experimentalGetTemplateInfo: getTemplateInfo } =\n\t\t\tselect( editorStore );\n\n\t\tconst postType = getEditedPostType();\n\t\tconst postId = getEditedPostId();\n\t\tconst record = getEditedEntityRecord( 'postType', postType, postId );\n\n\t\tconst info = record ? getTemplateInfo( record ) : {};\n\n\t\treturn { info, template: record };\n\t}, [] );\n\n\tif ( ! title && ! description ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-site-template-card\">\n\t\t\t\t<Icon className=\"edit-site-template-card__icon\" icon={ icon } />\n\t\t\t\t<div className=\"edit-site-template-card__content\">\n\t\t\t\t\t<div className=\"edit-site-template-card__header\">\n\t\t\t\t\t\t<h2 className=\"edit-site-template-card__title\">\n\t\t\t\t\t\t\t{ decodeEntities( title ) }\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<TemplateActions template={ template } />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"edit-site-template-card__description\">\n\t\t\t\t\t\t{ decodeEntities( description ) }\n\t\t\t\t\t</div>\n\t\t\t\t\t<TemplateAreas />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<PanelRow\n\t\t\t\theader={ __( 'Editing history' ) }\n\t\t\t\tclassName=\"edit-site-template-revisions\"\n\t\t\t>\n\t\t\t\t<LastRevision />\n\t\t\t</PanelRow>\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/template-card/index.js"],"names":["TemplateCard","info","title","description","icon","template","select","getEditedPostType","getEditedPostId","editSiteStore","getEditedEntityRecord","coreStore","__experimentalGetTemplateInfo","getTemplateInfo","editorStore","postType","postId","record"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAdA;AACA;AACA;;AAOA;AACA;AACA;AAKe,SAASA,YAAT,GAAwB;AACtC,QAAM;AACLC,IAAAA,IAAI,EAAE;AAAEC,MAAAA,KAAF;AAASC,MAAAA,WAAT;AAAsBC,MAAAA;AAAtB,KADD;AAELC,IAAAA;AAFK,MAGF,qBAAaC,MAAF,IAAc;AAC5B,UAAM;AAAEC,MAAAA,iBAAF;AAAqBC,MAAAA;AAArB,QAAyCF,MAAM,CAAEG,YAAF,CAArD;AACA,UAAM;AAAEC,MAAAA;AAAF,QAA4BJ,MAAM,CAAEK,eAAF,CAAxC;AACA,UAAM;AAAEC,MAAAA,6BAA6B,EAAEC;AAAjC,QACLP,MAAM,CAAEQ,aAAF,CADP;AAGA,UAAMC,QAAQ,GAAGR,iBAAiB,EAAlC;AACA,UAAMS,MAAM,GAAGR,eAAe,EAA9B;AACA,UAAMS,MAAM,GAAGP,qBAAqB,CAAE,UAAF,EAAcK,QAAd,EAAwBC,MAAxB,CAApC;AAEA,UAAMf,IAAI,GAAGgB,MAAM,GAAGJ,eAAe,CAAEI,MAAF,CAAlB,GAA+B,EAAlD;AAEA,WAAO;AAAEhB,MAAAA,IAAF;AAAQI,MAAAA,QAAQ,EAAEY;AAAlB,KAAP;AACA,GAbG,EAaD,EAbC,CAHJ;;AAkBA,MAAK,CAAEf,KAAF,IAAW,CAAEC,WAAlB,EAAgC;AAC/B,WAAO,IAAP;AACA;;AAED,SACC,qDACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,4BAAC,gBAAD;AAAM,IAAA,SAAS,EAAC,+BAAhB;AAAgD,IAAA,IAAI,EAAGC;AAAvD,IADD,EAEC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAI,IAAA,SAAS,EAAC;AAAd,KACG,kCAAgBF,KAAhB,CADH,CADD,EAIC,4BAAC,wBAAD;AAAiB,IAAA,QAAQ,EAAGG;AAA5B,IAJD,CADD,EAOC;AAAK,IAAA,SAAS,EAAC;AAAf,KACG,kCAAgBF,WAAhB,CADH,CAPD,EAUC,4BAAC,sBAAD,OAVD,CAFD,CADD,CADD;AAmBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Icon } from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\nimport TemplateActions from './template-actions';\nimport TemplateAreas from './template-areas';\n\nexport default function TemplateCard() {\n\tconst {\n\t\tinfo: { title, description, icon },\n\t\ttemplate,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = select( editSiteStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst { __experimentalGetTemplateInfo: getTemplateInfo } =\n\t\t\tselect( editorStore );\n\n\t\tconst postType = getEditedPostType();\n\t\tconst postId = getEditedPostId();\n\t\tconst record = getEditedEntityRecord( 'postType', postType, postId );\n\n\t\tconst info = record ? getTemplateInfo( record ) : {};\n\n\t\treturn { info, template: record };\n\t}, [] );\n\n\tif ( ! title && ! description ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-site-template-card\">\n\t\t\t\t<Icon className=\"edit-site-template-card__icon\" icon={ icon } />\n\t\t\t\t<div className=\"edit-site-template-card__content\">\n\t\t\t\t\t<div className=\"edit-site-template-card__header\">\n\t\t\t\t\t\t<h2 className=\"edit-site-template-card__title\">\n\t\t\t\t\t\t\t{ decodeEntities( title ) }\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<TemplateActions template={ template } />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"edit-site-template-card__description\">\n\t\t\t\t\t\t{ decodeEntities( description ) }\n\t\t\t\t\t</div>\n\t\t\t\t\t<TemplateAreas />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
@@ -81,4 +81,4 @@ const PostLastRevision = () => {
81
81
  function LastRevision() {
82
82
  return (0, _element.createElement)(PostLastRevisionCheck, null, (0, _element.createElement)(PostLastRevision, null));
83
83
  }
84
- //# sourceMappingURL=last-revision.js.map
84
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-edit-mode/template-revisions/index.js"],"names":["useRevisionData","record","currentTemplate","lastRevisionId","_links","id","revisionsCount","count","PostLastRevisionCheck","children","PostLastRevision","revision","gutenberg","backup","LastRevision"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AAZA;AACA;AACA;;AAOA;AACA;AACA;AAGA,MAAMA,eAAe,GAAG,MAAM;AAAA;;AAC7B,QAAM;AAAEC,IAAAA,MAAM,EAAEC;AAAV,MAA8B,qCAApC;AAEA,QAAMC,cAAc,4BACnBD,eADmB,aACnBA,eADmB,iDACnBA,eAAe,CAAEE,MADE,qFACnB,uBAA2B,qBAA3B,CADmB,qFACnB,uBAAsD,CAAtD,CADmB,2DACnB,uBAA2DC,EADxC,yEAC8C,IADlE;AAGA,QAAMC,cAAc,GACnB,2BAAEJ,eAAF,aAAEA,eAAF,iDAAEA,eAAe,CAAEE,MAAnB,qFAAE,uBAA2B,iBAA3B,CAAF,qFAAE,uBAAkD,CAAlD,CAAF,2DAAE,uBAAuDG,KAAzD,2EAAkE,CAAlE,IACA,CAFD;AAIA,SAAO;AACNL,IAAAA,eADM;AAENC,IAAAA,cAFM;AAGNG,IAAAA;AAHM,GAAP;AAKA,CAfD;;AAiBA,SAASE,qBAAT,OAA+C;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;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,4BAAC,4BAAD;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,4BAAC,qBAAD,QACC,4BAAC,kBAAD;AACC,IAAA,IAAI,EAAG,uBAAc,cAAd,EAA8B;AACpCW,MAAAA,QAAQ,EAAER,cAD0B;AAEpCS,MAAAA,SAAS,EAAE;AAFyB,KAA9B,CADR;AAKC,IAAA,SAAS,EAAC,yCALX;AAMC,IAAA,IAAI,EAAGC;AANR,KAQG;AACD;AACA,gBAAI,aAAJ,EAAmB,cAAnB,EAAmCP,cAAnC,CAFC,EAGDA,cAHC,CARH,CADD,CADD;AAkBA,CArBD;;AAuBe,SAASQ,YAAT,GAAwB;AACtC,SACC,4BAAC,qBAAD,QACC,4BAAC,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\t( currentTemplate?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0 ) +\n\t\t1;\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"]}
@@ -34,20 +34,18 @@ function SidebarNavigationItem(_ref) {
34
34
  } = _ref;
35
35
  return (0, _element.createElement)(_components.__experimentalItem, (0, _extends2.default)({
36
36
  className: (0, _classnames.default)('edit-site-sidebar-navigation-item', className)
37
- }, props), icon && (0, _element.createElement)(_components.__experimentalHStack, {
37
+ }, props), (0, _element.createElement)(_components.__experimentalHStack, {
38
38
  justify: "flex-start"
39
- }, (0, _element.createElement)(_icons.Icon, {
39
+ }, icon && (0, _element.createElement)(_icons.Icon, {
40
40
  style: {
41
41
  fill: 'currentcolor'
42
42
  },
43
43
  icon: icon,
44
44
  size: 24
45
45
  }), (0, _element.createElement)(_components.FlexBlock, null, children), withChevron && (0, _element.createElement)(_icons.Icon, {
46
- style: {
47
- fill: 'currentcolor'
48
- },
49
- icon: _icons.chevronRight,
46
+ icon: _icons.chevronRightSmall,
47
+ className: "edit-site-sidebar-navigation-item__drilldown-indicator",
50
48
  size: 24
51
- })), !icon && children);
49
+ })));
52
50
  }
53
51
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-item/index.js"],"names":["SidebarNavigationItem","className","icon","withChevron","children","props","fill","chevronRight"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;AAQe,SAASA,qBAAT,OAMX;AAAA,MAN2C;AAC9CC,IAAAA,SAD8C;AAE9CC,IAAAA,IAF8C;AAG9CC,IAAAA,WAAW,GAAG,KAHgC;AAI9CC,IAAAA,QAJ8C;AAK9C,OAAGC;AAL2C,GAM3C;AACH,SACC,4BAAC,8BAAD;AACC,IAAA,SAAS,EAAG,yBACX,mCADW,EAEXJ,SAFW;AADb,KAKMI,KALN,GAOGH,IAAI,IACL,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACC,4BAAC,WAAD;AACC,IAAA,KAAK,EAAG;AAAEI,MAAAA,IAAI,EAAE;AAAR,KADT;AAEC,IAAA,IAAI,EAAGJ,IAFR;AAGC,IAAA,IAAI,EAAG;AAHR,IADD,EAMC,4BAAC,qBAAD,QAAaE,QAAb,CAND,EAOGD,WAAW,IACZ,4BAAC,WAAD;AACC,IAAA,KAAK,EAAG;AAAEG,MAAAA,IAAI,EAAE;AAAR,KADT;AAEC,IAAA,IAAI,EAAGC,mBAFR;AAGC,IAAA,IAAI,EAAG;AAHR,IARF,CARF,EAwBG,CAAEL,IAAF,IAAUE,QAxBb,CADD;AA4BA","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 { chevronRight, 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{ icon && (\n\t\t\t\t<HStack justify=\"flex-start\">\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\t<FlexBlock>{ children }</FlexBlock>\n\t\t\t\t\t{ withChevron && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tstyle={ { fill: 'currentcolor' } }\n\t\t\t\t\t\t\ticon={ chevronRight }\n\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ ! icon && children }\n\t\t</Item>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-item/index.js"],"names":["SidebarNavigationItem","className","icon","withChevron","children","props","fill","chevronRightSmall"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;AAQe,SAASA,qBAAT,OAMX;AAAA,MAN2C;AAC9CC,IAAAA,SAD8C;AAE9CC,IAAAA,IAF8C;AAG9CC,IAAAA,WAAW,GAAG,KAHgC;AAI9CC,IAAAA,QAJ8C;AAK9C,OAAGC;AAL2C,GAM3C;AACH,SACC,4BAAC,8BAAD;AACC,IAAA,SAAS,EAAG,yBACX,mCADW,EAEXJ,SAFW;AADb,KAKMI,KALN,GAOC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAC;AAAhB,KACGH,IAAI,IACL,4BAAC,WAAD;AACC,IAAA,KAAK,EAAG;AAAEI,MAAAA,IAAI,EAAE;AAAR,KADT;AAEC,IAAA,IAAI,EAAGJ,IAFR;AAGC,IAAA,IAAI,EAAG;AAHR,IAFF,EAQC,4BAAC,qBAAD,QAAaE,QAAb,CARD,EASGD,WAAW,IACZ,4BAAC,WAAD;AACC,IAAA,IAAI,EAAGI,wBADR;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"]}
@@ -15,6 +15,8 @@ var _i18n = require("@wordpress/i18n");
15
15
 
16
16
  var _icons = require("@wordpress/icons");
17
17
 
18
+ var _coreData = require("@wordpress/core-data");
19
+
18
20
  var _data = require("@wordpress/data");
19
21
 
20
22
  var _store = require("../../store");
@@ -23,6 +25,8 @@ var _privateApis = require("../../private-apis");
23
25
 
24
26
  var _sidebarButton = _interopRequireDefault(require("../sidebar-button"));
25
27
 
28
+ var _isPreviewingTheme = require("../../utils/is-previewing-theme");
29
+
26
30
  /**
27
31
  * WordPress dependencies
28
32
  */
@@ -31,6 +35,8 @@ var _sidebarButton = _interopRequireDefault(require("../sidebar-button"));
31
35
  * Internal dependencies
32
36
  */
33
37
  function SidebarNavigationScreen(_ref) {
38
+ var _theme$name;
39
+
34
40
  let {
35
41
  isRoot,
36
42
  title,
@@ -48,6 +54,10 @@ function SidebarNavigationScreen(_ref) {
48
54
  dashboardLink: getSettings().__experimentalDashboardLink
49
55
  };
50
56
  }, []);
57
+ const {
58
+ getTheme
59
+ } = (0, _data.useSelect)(_coreData.store);
60
+ const theme = getTheme((0, _isPreviewingTheme.currentlyPreviewingTheme)());
51
61
  return (0, _element.createElement)(_components.__experimentalVStack, {
52
62
  spacing: 2
53
63
  }, (0, _element.createElement)(_components.__experimentalHStack, {
@@ -57,17 +67,17 @@ function SidebarNavigationScreen(_ref) {
57
67
  }, !isRoot ? (0, _element.createElement)(_components.__experimentalNavigatorToParentButton, {
58
68
  as: _sidebarButton.default,
59
69
  icon: (0, _i18n.isRTL)() ? _icons.chevronRight : _icons.chevronLeft,
60
- "aria-label": (0, _i18n.__)('Back')
70
+ label: (0, _i18n.__)('Back')
61
71
  }) : (0, _element.createElement)(_sidebarButton.default, {
62
72
  icon: (0, _i18n.isRTL)() ? _icons.chevronRight : _icons.chevronLeft,
63
- label: (0, _i18n.__)('Go back to the Dashboard'),
64
- href: dashboardLink || 'index.php'
73
+ label: !(0, _isPreviewingTheme.isPreviewingTheme)() ? (0, _i18n.__)('Go back to the Dashboard') : (0, _i18n.__)('Go back to the theme showcase'),
74
+ href: !(0, _isPreviewingTheme.isPreviewingTheme)() ? dashboardLink || 'index.php' : 'themes.php'
65
75
  }), (0, _element.createElement)(_components.__experimentalHeading, {
66
76
  className: "edit-site-sidebar-navigation-screen__title",
67
77
  color: 'white',
68
78
  level: 2,
69
79
  size: 20
70
- }, title), actions), (0, _element.createElement)("nav", {
80
+ }, !(0, _isPreviewingTheme.isPreviewingTheme)() ? title : (0, _i18n.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), (0, _element.createElement)("nav", {
71
81
  className: "edit-site-sidebar-navigation-screen__content"
72
82
  }, description && (0, _element.createElement)("p", {
73
83
  className: "edit-site-sidebar-navigation-screen__description"
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen/index.js"],"names":["SidebarNavigationScreen","isRoot","title","actions","content","description","dashboardLink","select","getSettings","editSiteStore","__experimentalDashboardLink","SidebarButton","chevronRight","chevronLeft"],"mappings":";;;;;;;;;;;AAGA;;AAMA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AAlBA;AACA;AACA;;AAWA;AACA;AACA;AAKe,SAASA,uBAAT,OAMX;AAAA,MAN6C;AAChDC,IAAAA,MADgD;AAEhDC,IAAAA,KAFgD;AAGhDC,IAAAA,OAHgD;AAIhDC,IAAAA,OAJgD;AAKhDC,IAAAA;AALgD,GAM7C;AACH,QAAM;AAAEC,IAAAA;AAAF,MAAoB,qBAAaC,MAAF,IAAc;AAClD,UAAM;AAAEC,MAAAA;AAAF,QAAkB,yBAAQD,MAAM,CAAEE,YAAF,CAAd,CAAxB;AACA,WAAO;AACNH,MAAAA,aAAa,EAAEE,WAAW,GAAGE;AADvB,KAAP;AAGA,GALyB,EAKvB,EALuB,CAA1B;AAOA,SACC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACC,4BAAC,gCAAD;AACC,IAAA,OAAO,EAAG,CADX;AAEC,IAAA,SAAS,EAAC,YAFX;AAGC,IAAA,SAAS,EAAC;AAHX,KAKG,CAAET,MAAF,GACD,4BAAC,iDAAD;AACC,IAAA,EAAE,EAAGU,sBADN;AAEC,IAAA,IAAI,EAAG,qBAAUC,mBAAV,GAAyBC,kBAFjC;AAGC,kBAAa,cAAI,MAAJ;AAHd,IADC,GAOD,4BAAC,sBAAD;AACC,IAAA,IAAI,EAAG,qBAAUD,mBAAV,GAAyBC,kBADjC;AAEC,IAAA,KAAK,EAAG,cAAI,0BAAJ,CAFT;AAGC,IAAA,IAAI,EAAGP,aAAa,IAAI;AAHzB,IAZF,EAkBC,4BAAC,iCAAD;AACC,IAAA,SAAS,EAAC,4CADX;AAEC,IAAA,KAAK,EAAG,OAFT;AAGC,IAAA,KAAK,EAAG,CAHT;AAIC,IAAA,IAAI,EAAG;AAJR,KAMGJ,KANH,CAlBD,EA0BGC,OA1BH,CADD,EA8BC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGE,WAAW,IACZ;AAAG,IAAA,SAAS,EAAC;AAAb,KACGA,WADH,CAFF,EAMGD,OANH,CA9BD,CADD;AAyCA","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, __ } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\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';\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\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\taria-label={ __( '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={ __( 'Go back to the Dashboard' ) }\n\t\t\t\t\t\thref={ dashboardLink || 'index.php' }\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{ title }\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":["SidebarNavigationScreen","isRoot","title","actions","content","description","dashboardLink","select","getSettings","editSiteStore","__experimentalDashboardLink","getTheme","coreStore","theme","SidebarButton","chevronRight","chevronLeft","name","rendered"],"mappings":";;;;;;;;;;;AAGA;;AAMA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AApBA;AACA;AACA;;AAYA;AACA;AACA;AASe,SAASA,uBAAT,OAMX;AAAA;;AAAA,MAN6C;AAChDC,IAAAA,MADgD;AAEhDC,IAAAA,KAFgD;AAGhDC,IAAAA,OAHgD;AAIhDC,IAAAA,OAJgD;AAKhDC,IAAAA;AALgD,GAM7C;AACH,QAAM;AAAEC,IAAAA;AAAF,MAAoB,qBAAaC,MAAF,IAAc;AAClD,UAAM;AAAEC,MAAAA;AAAF,QAAkB,yBAAQD,MAAM,CAAEE,YAAF,CAAd,CAAxB;AACA,WAAO;AACNH,MAAAA,aAAa,EAAEE,WAAW,GAAGE;AADvB,KAAP;AAGA,GALyB,EAKvB,EALuB,CAA1B;AAMA,QAAM;AAAEC,IAAAA;AAAF,MAAe,qBAAWC,eAAX,CAArB;AACA,QAAMC,KAAK,GAAGF,QAAQ,CAAE,kDAAF,CAAtB;AAEA,SACC,4BAAC,gCAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACC,4BAAC,gCAAD;AACC,IAAA,OAAO,EAAG,CADX;AAEC,IAAA,SAAS,EAAC,YAFX;AAGC,IAAA,SAAS,EAAC;AAHX,KAKG,CAAEV,MAAF,GACD,4BAAC,iDAAD;AACC,IAAA,EAAE,EAAGa,sBADN;AAEC,IAAA,IAAI,EAAG,qBAAUC,mBAAV,GAAyBC,kBAFjC;AAGC,IAAA,KAAK,EAAG,cAAI,MAAJ;AAHT,IADC,GAOD,4BAAC,sBAAD;AACC,IAAA,IAAI,EAAG,qBAAUD,mBAAV,GAAyBC,kBADjC;AAEC,IAAA,KAAK,EACJ,CAAE,2CAAF,GACG,cAAI,0BAAJ,CADH,GAEG,cAAI,+BAAJ,CALL;AAOC,IAAA,IAAI,EACH,CAAE,2CAAF,GACGV,aAAa,IAAI,WADpB,GAEG;AAVL,IAZF,EA0BC,4BAAC,iCAAD;AACC,IAAA,SAAS,EAAC,4CADX;AAEC,IAAA,KAAK,EAAG,OAFT;AAGC,IAAA,KAAK,EAAG,CAHT;AAIC,IAAA,IAAI,EAAG;AAJR,KAMG,CAAE,2CAAF,GACCJ,KADD,GAEC,mBACA,uBADA,EAEAW,KAFA,aAEAA,KAFA,sCAEAA,KAAK,CAAEI,IAFP,gDAEA,YAAaC,QAFb,EAGAhB,KAHA,CARJ,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"]}
@@ -31,17 +31,29 @@ var _sidebarNavigationItem = _interopRequireDefault(require("../sidebar-navigati
31
31
  * Internal dependencies
32
32
  */
33
33
  function SidebarNavigationScreenMain() {
34
- const hasNavigationMenus = (0, _data.useSelect)(select => {
35
- // The query needs to be the same as in the "SidebarNavigationScreenNavigationMenus" component,
34
+ const {
35
+ hasNavigationMenus,
36
+ hasGlobalStyleVariations
37
+ } = (0, _data.useSelect)(select => {
38
+ var _experimentalGetCurr;
39
+
40
+ const {
41
+ getEntityRecords,
42
+ __experimentalGetCurrentThemeGlobalStylesVariations
43
+ } = select(_coreData.store); // The query needs to be the same as in the "SidebarNavigationScreenNavigationMenus" component,
36
44
  // to avoid double network calls.
37
- const navigationMenus = select(_coreData.store).getEntityRecords('postType', 'wp_navigation', {
45
+
46
+ const navigationMenus = getEntityRecords('postType', 'wp_navigation', {
38
47
  per_page: 1,
39
48
  status: 'publish',
40
49
  order: 'desc',
41
50
  orderby: 'date'
42
51
  });
43
- return (navigationMenus === null || navigationMenus === void 0 ? void 0 : navigationMenus.length) > 0;
44
- });
52
+ return {
53
+ hasNavigationMenus: !!(navigationMenus !== null && navigationMenus !== void 0 && navigationMenus.length),
54
+ hasGlobalStyleVariations: !!((_experimentalGetCurr = __experimentalGetCurrentThemeGlobalStylesVariations()) !== null && _experimentalGetCurr !== void 0 && _experimentalGetCurr.length)
55
+ };
56
+ }, []);
45
57
  const showNavigationScreen = process.env.IS_GUTENBERG_PLUGIN ? hasNavigationMenus : false;
46
58
  return (0, _element.createElement)(_sidebarNavigationScreen.default, {
47
59
  isRoot: true,
@@ -52,12 +64,17 @@ function SidebarNavigationScreenMain() {
52
64
  path: "/navigation",
53
65
  withChevron: true,
54
66
  icon: _icons.navigation
55
- }, (0, _i18n.__)('Navigation')), (0, _element.createElement)(_components.__experimentalNavigatorButton, {
67
+ }, (0, _i18n.__)('Navigation')), hasGlobalStyleVariations && (0, _element.createElement)(_components.__experimentalNavigatorButton, {
56
68
  as: _sidebarNavigationItem.default,
57
69
  path: "/wp_global_styles",
58
70
  withChevron: true,
59
71
  icon: _icons.styles
60
72
  }, (0, _i18n.__)('Styles')), (0, _element.createElement)(_components.__experimentalNavigatorButton, {
73
+ as: _sidebarNavigationItem.default,
74
+ path: "/page",
75
+ withChevron: true,
76
+ icon: _icons.page
77
+ }, (0, _i18n.__)('Pages')), (0, _element.createElement)(_components.__experimentalNavigatorButton, {
61
78
  as: _sidebarNavigationItem.default,
62
79
  path: "/wp_template",
63
80
  withChevron: true,
@@ -66,7 +83,7 @@ function SidebarNavigationScreenMain() {
66
83
  as: _sidebarNavigationItem.default,
67
84
  path: "/wp_template_part",
68
85
  withChevron: true,
69
- icon: _icons.symbolFilled
86
+ icon: _icons.symbol
70
87
  }, (0, _i18n.__)('Template Parts')))
71
88
  });
72
89
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-main/index.js"],"names":["SidebarNavigationScreenMain","hasNavigationMenus","select","navigationMenus","coreStore","getEntityRecords","per_page","status","order","orderby","length","showNavigationScreen","process","env","IS_GUTENBERG_PLUGIN","SidebarNavigationItem","navigation","styles","layout","symbolFilled"],"mappings":";;;;;;;;;;;AAGA;;AAIA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAhBA;AACA;AACA;;AAUA;AACA;AACA;AAIe,SAASA,2BAAT,GAAuC;AACrD,QAAMC,kBAAkB,GAAG,qBAAaC,MAAF,IAAc;AACnD;AACA;AACA,UAAMC,eAAe,GAAGD,MAAM,CAAEE,eAAF,CAAN,CAAoBC,gBAApB,CACvB,UADuB,EAEvB,eAFuB,EAGvB;AACCC,MAAAA,QAAQ,EAAE,CADX;AAECC,MAAAA,MAAM,EAAE,SAFT;AAGCC,MAAAA,KAAK,EAAE,MAHR;AAICC,MAAAA,OAAO,EAAE;AAJV,KAHuB,CAAxB;AAWA,WAAO,CAAAN,eAAe,SAAf,IAAAA,eAAe,WAAf,YAAAA,eAAe,CAAEO,MAAjB,IAA0B,CAAjC;AACA,GAf0B,CAA3B;AAiBA,QAAMC,oBAAoB,GAAGC,OAAO,CAACC,GAAR,CAAYC,mBAAZ,GAC1Bb,kBAD0B,GAE1B,KAFH;AAGA,SACC,4BAAC,gCAAD;AACC,IAAA,MAAM,MADP;AAEC,IAAA,KAAK,EAAG,cAAI,QAAJ,CAFT;AAGC,IAAA,WAAW,EAAG,cACb,kEADa,CAHf;AAMC,IAAA,OAAO,EACN,4BAAC,mCAAD,QACGU,oBAAoB,IACrB,4BAAC,yCAAD;AACC,MAAA,EAAE,EAAGI,8BADN;AAEC,MAAA,IAAI,EAAC,aAFN;AAGC,MAAA,WAAW,MAHZ;AAIC,MAAA,IAAI,EAAGC;AAJR,OAMG,cAAI,YAAJ,CANH,CAFF,EAWC,4BAAC,yCAAD;AACC,MAAA,EAAE,EAAGD,8BADN;AAEC,MAAA,IAAI,EAAC,mBAFN;AAGC,MAAA,WAAW,MAHZ;AAIC,MAAA,IAAI,EAAGE;AAJR,OAMG,cAAI,QAAJ,CANH,CAXD,EAmBC,4BAAC,yCAAD;AACC,MAAA,EAAE,EAAGF,8BADN;AAEC,MAAA,IAAI,EAAC,cAFN;AAGC,MAAA,WAAW,MAHZ;AAIC,MAAA,IAAI,EAAGG;AAJR,OAMG,cAAI,WAAJ,CANH,CAnBD,EA2BC,4BAAC,yCAAD;AACC,MAAA,EAAE,EAAGH,8BADN;AAEC,MAAA,IAAI,EAAC,mBAFN;AAGC,MAAA,WAAW,MAHZ;AAIC,MAAA,IAAI,EAAGI;AAJR,OAMG,cAAI,gBAAJ,CANH,CA3BD;AAPF,IADD;AA+CA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalNavigatorButton as NavigatorButton,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { layout, symbolFilled, navigation, styles } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nexport default function SidebarNavigationScreenMain() {\n\tconst hasNavigationMenus = useSelect( ( select ) => {\n\t\t// The query needs to be the same as in the \"SidebarNavigationScreenNavigationMenus\" component,\n\t\t// to avoid double network calls.\n\t\tconst navigationMenus = select( coreStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\t'wp_navigation',\n\t\t\t{\n\t\t\t\tper_page: 1,\n\t\t\t\tstatus: 'publish',\n\t\t\t\torder: 'desc',\n\t\t\t\torderby: 'date',\n\t\t\t}\n\t\t);\n\n\t\treturn navigationMenus?.length > 0;\n\t} );\n\n\tconst showNavigationScreen = process.env.IS_GUTENBERG_PLUGIN\n\t\t? hasNavigationMenus\n\t\t: false;\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t\t) }\n\t\t\tcontent={\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t{ showNavigationScreen && (\n\t\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\t\tpath=\"/navigation\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Navigation' ) }\n\t\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t) }\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/wp_global_styles\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ styles }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/wp_template\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Templates' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/wp_template_part\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ symbolFilled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Template Parts' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t</ItemGroup>\n\t\t\t}\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-main/index.js"],"names":["SidebarNavigationScreenMain","hasNavigationMenus","hasGlobalStyleVariations","select","getEntityRecords","__experimentalGetCurrentThemeGlobalStylesVariations","coreStore","navigationMenus","per_page","status","order","orderby","length","showNavigationScreen","process","env","IS_GUTENBERG_PLUGIN","SidebarNavigationItem","navigation","styles","page","layout","symbol"],"mappings":";;;;;;;;;;;AAGA;;AAIA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAhBA;AACA;AACA;;AAUA;AACA;AACA;AAIe,SAASA,2BAAT,GAAuC;AACrD,QAAM;AAAEC,IAAAA,kBAAF;AAAsBC,IAAAA;AAAtB,MAAmD,qBACtDC,MAAF,IAAc;AAAA;;AACb,UAAM;AACLC,MAAAA,gBADK;AAELC,MAAAA;AAFK,QAGFF,MAAM,CAAEG,eAAF,CAHV,CADa,CAKb;AACA;;AACA,UAAMC,eAAe,GAAGH,gBAAgB,CACvC,UADuC,EAEvC,eAFuC,EAGvC;AACCI,MAAAA,QAAQ,EAAE,CADX;AAECC,MAAAA,MAAM,EAAE,SAFT;AAGCC,MAAAA,KAAK,EAAE,MAHR;AAICC,MAAAA,OAAO,EAAE;AAJV,KAHuC,CAAxC;AAUA,WAAO;AACNV,MAAAA,kBAAkB,EAAE,CAAC,EAAEM,eAAF,aAAEA,eAAF,eAAEA,eAAe,CAAEK,MAAnB,CADf;AAENV,MAAAA,wBAAwB,EACvB,CAAC,0BAAEG,mDAAmD,EAArD,iDAAE,qBACAO,MADF;AAHI,KAAP;AAMA,GAxBuD,EAyBxD,EAzBwD,CAAzD;AA2BA,QAAMC,oBAAoB,GAAGC,OAAO,CAACC,GAAR,CAAYC,mBAAZ,GAC1Bf,kBAD0B,GAE1B,KAFH;AAGA,SACC,4BAAC,gCAAD;AACC,IAAA,MAAM,MADP;AAEC,IAAA,KAAK,EAAG,cAAI,QAAJ,CAFT;AAGC,IAAA,WAAW,EAAG,cACb,kEADa,CAHf;AAMC,IAAA,OAAO,EACN,4BAAC,mCAAD,QACGY,oBAAoB,IACrB,4BAAC,yCAAD;AACC,MAAA,EAAE,EAAGI,8BADN;AAEC,MAAA,IAAI,EAAC,aAFN;AAGC,MAAA,WAAW,MAHZ;AAIC,MAAA,IAAI,EAAGC;AAJR,OAMG,cAAI,YAAJ,CANH,CAFF,EAWGhB,wBAAwB,IACzB,4BAAC,yCAAD;AACC,MAAA,EAAE,EAAGe,8BADN;AAEC,MAAA,IAAI,EAAC,mBAFN;AAGC,MAAA,WAAW,MAHZ;AAIC,MAAA,IAAI,EAAGE;AAJR,OAMG,cAAI,QAAJ,CANH,CAZF,EAsBC,4BAAC,yCAAD;AACC,MAAA,EAAE,EAAGF,8BADN;AAEC,MAAA,IAAI,EAAC,OAFN;AAGC,MAAA,WAAW,MAHZ;AAIC,MAAA,IAAI,EAAGG;AAJR,OAMG,cAAI,OAAJ,CANH,CAtBD,EA8BC,4BAAC,yCAAD;AACC,MAAA,EAAE,EAAGH,8BADN;AAEC,MAAA,IAAI,EAAC,cAFN;AAGC,MAAA,WAAW,MAHZ;AAIC,MAAA,IAAI,EAAGI;AAJR,OAMG,cAAI,WAAJ,CANH,CA9BD,EAsCC,4BAAC,yCAAD;AACC,MAAA,EAAE,EAAGJ,8BADN;AAEC,MAAA,IAAI,EAAC,mBAFN;AAGC,MAAA,WAAW,MAHZ;AAIC,MAAA,IAAI,EAAGK;AAJR,OAMG,cAAI,gBAAJ,CANH,CAtCD;AAPF,IADD;AA0DA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalNavigatorButton as NavigatorButton,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { layout, symbol, navigation, styles, page } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nexport default function SidebarNavigationScreenMain() {\n\tconst { hasNavigationMenus, hasGlobalStyleVariations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecords,\n\t\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t\t} = select( coreStore );\n\t\t\t// The query needs to be the same as in the \"SidebarNavigationScreenNavigationMenus\" component,\n\t\t\t// to avoid double network calls.\n\t\t\tconst navigationMenus = getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_navigation',\n\t\t\t\t{\n\t\t\t\t\tper_page: 1,\n\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\torder: 'desc',\n\t\t\t\t\torderby: 'date',\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn {\n\t\t\t\thasNavigationMenus: !! navigationMenus?.length,\n\t\t\t\thasGlobalStyleVariations:\n\t\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t\t?.length,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst showNavigationScreen = process.env.IS_GUTENBERG_PLUGIN\n\t\t? hasNavigationMenus\n\t\t: false;\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t\t) }\n\t\t\tcontent={\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t{ showNavigationScreen && (\n\t\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\t\tpath=\"/navigation\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Navigation' ) }\n\t\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t) }\n\t\t\t\t\t{ hasGlobalStyleVariations && (\n\t\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\t\tpath=\"/wp_global_styles\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ styles }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/page\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ page }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Pages' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/wp_template\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Templates' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/wp_template_part\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Template Parts' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t</ItemGroup>\n\t\t\t}\n\t\t/>\n\t);\n}\n"]}
@@ -58,7 +58,7 @@ function SidebarNavigationScreenNavigationItem() {
58
58
  label: (0, _i18n.__)('Edit'),
59
59
  icon: _icons.pencil
60
60
  }),
61
- description: postType === 'page' ? (0, _i18n.__)('Pages are static and are not listed by date. Pages do not use tags or categories.') : (0, _i18n.__)('Posts are entries listed in reverse chronological order on the site homepage or on the posts page.'),
61
+ description: (0, _i18n.__)('Posts are entries listed in reverse chronological order on the site homepage or on the posts page.'),
62
62
  content: (0, _element.createElement)(_element.Fragment, null, record !== null && record !== void 0 && record.link ? (0, _element.createElement)(_components.ExternalLink, {
63
63
  className: "edit-site-sidebar-navigation-screen__page-link",
64
64
  href: record.link
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-item/index.js"],"names":["SidebarNavigationScreenNavigationItem","setCanvasMode","editSiteStore","params","postType","postId","record","title","rendered","pencil","link","description"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;;AAWA;AACA;AACA;AAMe,SAASA,qCAAT,GAAiD;AAAA;;AAC/D,QAAM;AAAEC,IAAAA;AAAF,MAAoB,yBAAQ,uBAAaC,YAAb,CAAR,CAA1B;AACA,QAAM;AACLC,IAAAA,MAAM,EAAE;AAAEC,MAAAA,QAAF;AAAYC,MAAAA;AAAZ;AADH,MAEF,6CAFJ;AAGA,QAAM;AAAEC,IAAAA;AAAF,MAAa,+BAAiB,UAAjB,EAA6BF,QAA7B,EAAuCC,MAAvC,CAAnB;AAEA,SACC,4BAAC,gCAAD;AACC,IAAA,KAAK,EAAGC,MAAM,GAAG,kCAAgBA,MAAhB,aAAgBA,MAAhB,wCAAgBA,MAAM,CAAEC,KAAxB,kDAAgB,cAAeC,QAA/B,CAAH,GAA+C,IAD9D;AAEC,IAAA,OAAO,EACN,4BAAC,sBAAD;AACC,MAAA,OAAO,EAAG,MAAMP,aAAa,CAAE,MAAF,CAD9B;AAEC,MAAA,KAAK,EAAG,cAAI,MAAJ,CAFT;AAGC,MAAA,IAAI,EAAGQ;AAHR,MAHF;AASC,IAAA,WAAW,EACVL,QAAQ,KAAK,MAAb,GACG,cACA,mFADA,CADH,GAIG,cACA,oGADA,CAdL;AAkBC,IAAA,OAAO,EACN,qDACGE,MAAM,SAAN,IAAAA,MAAM,WAAN,IAAAA,MAAM,CAAEI,IAAR,GACD,4BAAC,wBAAD;AACC,MAAA,SAAS,EAAC,gDADX;AAEC,MAAA,IAAI,EAAGJ,MAAM,CAACI;AAFf,OAIGJ,MAAM,CAACI,IAJV,CADC,GAOE,IARL,EASGJ,MAAM,GACL,kCAAgBA,MAAhB,aAAgBA,MAAhB,8CAAgBA,MAAM,CAAEK,WAAxB,wDAAgB,oBAAqBH,QAArC,CADK,GAEL,IAXJ;AAnBF,IADD;AAoCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\tExternalLink,\n} from '@wordpress/components';\nimport { useEntityRecord } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { pencil } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../private-apis';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\n\nexport default function SidebarNavigationScreenNavigationItem() {\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst {\n\t\tparams: { postType, postId },\n\t} = useNavigator();\n\tconst { record } = useEntityRecord( 'postType', postType, postId );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ record ? decodeEntities( record?.title?.rendered ) : null }\n\t\t\tactions={\n\t\t\t\t<SidebarButton\n\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\ticon={ pencil }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tdescription={\n\t\t\t\tpostType === 'page'\n\t\t\t\t\t? __(\n\t\t\t\t\t\t\t'Pages are static and are not listed by date. Pages do not use tags or categories.'\n\t\t\t\t\t )\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'Posts are entries listed in reverse chronological order on the site homepage or on the posts page.'\n\t\t\t\t\t )\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ record?.link ? (\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__page-link\"\n\t\t\t\t\t\t\thref={ record.link }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ record.link }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t) : null }\n\t\t\t\t\t{ record\n\t\t\t\t\t\t? decodeEntities( record?.description?.rendered )\n\t\t\t\t\t\t: null }\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-navigation-item/index.js"],"names":["SidebarNavigationScreenNavigationItem","setCanvasMode","editSiteStore","params","postType","postId","record","title","rendered","pencil","link","description"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;;AAWA;AACA;AACA;AAMe,SAASA,qCAAT,GAAiD;AAAA;;AAC/D,QAAM;AAAEC,IAAAA;AAAF,MAAoB,yBAAQ,uBAAaC,YAAb,CAAR,CAA1B;AACA,QAAM;AACLC,IAAAA,MAAM,EAAE;AAAEC,MAAAA,QAAF;AAAYC,MAAAA;AAAZ;AADH,MAEF,6CAFJ;AAGA,QAAM;AAAEC,IAAAA;AAAF,MAAa,+BAAiB,UAAjB,EAA6BF,QAA7B,EAAuCC,MAAvC,CAAnB;AAEA,SACC,4BAAC,gCAAD;AACC,IAAA,KAAK,EAAGC,MAAM,GAAG,kCAAgBA,MAAhB,aAAgBA,MAAhB,wCAAgBA,MAAM,CAAEC,KAAxB,kDAAgB,cAAeC,QAA/B,CAAH,GAA+C,IAD9D;AAEC,IAAA,OAAO,EACN,4BAAC,sBAAD;AACC,MAAA,OAAO,EAAG,MAAMP,aAAa,CAAE,MAAF,CAD9B;AAEC,MAAA,KAAK,EAAG,cAAI,MAAJ,CAFT;AAGC,MAAA,IAAI,EAAGQ;AAHR,MAHF;AASC,IAAA,WAAW,EAAG,cACb,oGADa,CATf;AAYC,IAAA,OAAO,EACN,qDACGH,MAAM,SAAN,IAAAA,MAAM,WAAN,IAAAA,MAAM,CAAEI,IAAR,GACD,4BAAC,wBAAD;AACC,MAAA,SAAS,EAAC,gDADX;AAEC,MAAA,IAAI,EAAGJ,MAAM,CAACI;AAFf,OAIGJ,MAAM,CAACI,IAJV,CADC,GAOE,IARL,EASGJ,MAAM,GACL,kCAAgBA,MAAhB,aAAgBA,MAAhB,8CAAgBA,MAAM,CAAEK,WAAxB,wDAAgB,oBAAqBH,QAArC,CADK,GAEL,IAXJ;AAbF,IADD;AA8BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\tExternalLink,\n} from '@wordpress/components';\nimport { useEntityRecord } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { pencil } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../private-apis';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\n\nexport default function SidebarNavigationScreenNavigationItem() {\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst {\n\t\tparams: { postType, postId },\n\t} = useNavigator();\n\tconst { record } = useEntityRecord( 'postType', postType, postId );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ record ? decodeEntities( record?.title?.rendered ) : null }\n\t\t\tactions={\n\t\t\t\t<SidebarButton\n\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\ticon={ pencil }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tdescription={ __(\n\t\t\t\t'Posts are entries listed in reverse chronological order on the site homepage or on the posts page.'\n\t\t\t) }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ record?.link ? (\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__page-link\"\n\t\t\t\t\t\t\thref={ record.link }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ record.link }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t) : null }\n\t\t\t\t\t{ record\n\t\t\t\t\t\t? decodeEntities( record?.description?.rendered )\n\t\t\t\t\t\t: null }\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n"]}