@wordpress/edit-site 5.32.0 → 5.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (809) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-page/index.js.map +1 -1
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  5. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  6. package/build/components/add-new-template/index.js +282 -13
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/add-new-template/utils.js +22 -11
  9. package/build/components/add-new-template/utils.js.map +1 -1
  10. package/build/components/app/index.js.map +1 -1
  11. package/build/components/async/index.js +51 -0
  12. package/build/components/async/index.js.map +1 -0
  13. package/build/components/block-editor/block-inspector-button.js +10 -9
  14. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  15. package/build/components/block-editor/editor-canvas.js +15 -6
  16. package/build/components/block-editor/editor-canvas.js.map +1 -1
  17. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  18. package/build/components/block-editor/resizable-editor.js.map +1 -1
  19. package/build/components/block-editor/resize-handle.js.map +1 -1
  20. package/build/components/block-editor/site-editor-canvas.js +5 -1
  21. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  22. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  23. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  24. package/build/components/canvas-loader/index.js.map +1 -1
  25. package/build/components/code-editor/index.js.map +1 -1
  26. package/build/components/create-template-part-modal/index.js.map +1 -1
  27. package/build/components/editor/index.js +35 -8
  28. package/build/components/editor/index.js.map +1 -1
  29. package/build/components/editor-canvas-container/index.js.map +1 -1
  30. package/build/components/error-boundary/index.js.map +1 -1
  31. package/build/components/error-boundary/warning.js.map +1 -1
  32. package/build/components/global-styles/background-panel.js +13 -1
  33. package/build/components/global-styles/background-panel.js.map +1 -1
  34. package/build/components/global-styles/block-preview-panel.js +6 -1
  35. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  36. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  37. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  38. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  39. package/build/components/global-styles/font-families.js +1 -1
  40. package/build/components/global-styles/font-families.js.map +1 -1
  41. package/build/components/global-styles/font-family-item.js.map +1 -1
  42. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  43. package/build/components/global-styles/font-library-modal/context.js +60 -32
  44. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  45. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  46. package/build/components/global-styles/font-library-modal/font-collection.js +11 -4
  47. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  49. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/index.js +1 -1
  51. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/installed-fonts.js +10 -9
  53. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  55. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  57. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  59. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  61. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  63. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  65. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  66. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  67. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  68. package/build/components/global-styles/header.js.map +1 -1
  69. package/build/components/global-styles/highlighted-colors.js +1 -1
  70. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  71. package/build/components/global-styles/hooks.js +11 -3
  72. package/build/components/global-styles/hooks.js.map +1 -1
  73. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  74. package/build/components/global-styles/index.js.map +1 -1
  75. package/build/components/global-styles/navigation-button.js.map +1 -1
  76. package/build/components/global-styles/palette.js.map +1 -1
  77. package/build/components/global-styles/preview-colors.js.map +1 -1
  78. package/build/components/global-styles/preview-iframe.js.map +1 -1
  79. package/build/components/global-styles/preview-styles.js.map +1 -1
  80. package/build/components/global-styles/root-menu.js +2 -2
  81. package/build/components/global-styles/root-menu.js.map +1 -1
  82. package/build/components/global-styles/screen-background.js +1 -1
  83. package/build/components/global-styles/screen-background.js.map +1 -1
  84. package/build/components/global-styles/screen-block-list.js.map +1 -1
  85. package/build/components/global-styles/screen-block.js.map +1 -1
  86. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  87. package/build/components/global-styles/screen-colors.js.map +1 -1
  88. package/build/components/global-styles/screen-css.js.map +1 -1
  89. package/build/components/global-styles/screen-layout.js.map +1 -1
  90. package/build/components/global-styles/screen-revisions/index.js +1 -1
  91. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  92. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  93. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  94. package/build/components/global-styles/screen-root.js.map +1 -1
  95. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  96. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  97. package/build/components/global-styles/screen-typography.js.map +1 -1
  98. package/build/components/global-styles/style-variations-container.js.map +1 -1
  99. package/build/components/global-styles/subtitle.js.map +1 -1
  100. package/build/components/global-styles/typography-elements.js.map +1 -1
  101. package/build/components/global-styles/typography-example.js.map +1 -1
  102. package/build/components/global-styles/typography-panel.js.map +1 -1
  103. package/build/components/global-styles/typography-preview.js.map +1 -1
  104. package/build/components/global-styles/ui.js +1 -1
  105. package/build/components/global-styles/ui.js.map +1 -1
  106. package/build/components/global-styles/utils.js.map +1 -1
  107. package/build/components/global-styles/variations/variation.js.map +1 -1
  108. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  109. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  110. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  111. package/build/components/global-styles-renderer/index.js.map +1 -1
  112. package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
  113. package/build/components/header-edit-mode/index.js +4 -4
  114. package/build/components/header-edit-mode/index.js.map +1 -1
  115. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  116. package/build/components/header-edit-mode/more-menu/index.js +10 -12
  117. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  118. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  119. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  120. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  121. package/build/components/keyboard-shortcuts/edit-mode.js +0 -23
  122. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  123. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  124. package/build/components/keyboard-shortcuts/register.js +0 -18
  125. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  126. package/build/components/layout/animation.js +3 -2
  127. package/build/components/layout/animation.js.map +1 -1
  128. package/build/components/layout/hooks.js.map +1 -1
  129. package/build/components/layout/index.js +13 -48
  130. package/build/components/layout/index.js.map +1 -1
  131. package/build/components/layout/router.js +73 -7
  132. package/build/components/layout/router.js.map +1 -1
  133. package/build/components/media/index.js.map +1 -1
  134. package/build/components/page/header.js.map +1 -1
  135. package/build/components/page/index.js +5 -2
  136. package/build/components/page/index.js.map +1 -1
  137. package/build/components/page-pages/index.js +15 -17
  138. package/build/components/page-pages/index.js.map +1 -1
  139. package/build/components/page-patterns/dataviews-pattern-actions.js +5 -4
  140. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  141. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  142. package/build/components/page-patterns/header.js +2 -2
  143. package/build/components/page-patterns/header.js.map +1 -1
  144. package/build/components/page-patterns/index.js +124 -17
  145. package/build/components/page-patterns/index.js.map +1 -1
  146. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  147. package/build/components/page-patterns/search-items.js +2 -1
  148. package/build/components/page-patterns/search-items.js.map +1 -1
  149. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  150. package/build/components/page-patterns/use-patterns.js +5 -10
  151. package/build/components/page-patterns/use-patterns.js.map +1 -1
  152. package/build/components/page-patterns/utils.js.map +1 -1
  153. package/build/components/page-templates-template-parts/add-new-template-part.js +2 -1
  154. package/build/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  155. package/build/components/page-templates-template-parts/hooks.js.map +1 -1
  156. package/build/components/page-templates-template-parts/index.js +13 -25
  157. package/build/components/page-templates-template-parts/index.js.map +1 -1
  158. package/build/components/pagination/index.js.map +1 -1
  159. package/build/components/pattern-modal/duplicate.js +6 -3
  160. package/build/components/pattern-modal/duplicate.js.map +1 -1
  161. package/build/components/pattern-modal/index.js.map +1 -1
  162. package/build/components/pattern-modal/rename.js +6 -3
  163. package/build/components/pattern-modal/rename.js.map +1 -1
  164. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  165. package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
  166. package/build/components/rename-post-menu-item/index.js.map +1 -0
  167. package/build/components/resizable-frame/index.js +1 -5
  168. package/build/components/resizable-frame/index.js.map +1 -1
  169. package/build/components/revisions/index.js.map +1 -1
  170. package/build/components/routes/link.js.map +1 -1
  171. package/build/components/routes/use-title.js.map +1 -1
  172. package/build/components/save-button/index.js.map +1 -1
  173. package/build/components/save-hub/index.js.map +1 -1
  174. package/build/components/save-panel/index.js +3 -3
  175. package/build/components/save-panel/index.js.map +1 -1
  176. package/build/components/sidebar/index.js +41 -75
  177. package/build/components/sidebar/index.js.map +1 -1
  178. package/build/components/sidebar-button/index.js.map +1 -1
  179. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  180. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  181. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  182. package/build/components/sidebar-dataviews/default-views.js +1 -1
  183. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  184. package/build/components/sidebar-dataviews/index.js +1 -1
  185. package/build/components/sidebar-dataviews/index.js.map +1 -1
  186. package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
  187. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  188. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  189. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  190. package/build/components/sidebar-edit-mode/index.js +29 -54
  191. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  192. package/build/components/sidebar-edit-mode/page-panels/index.js +23 -2
  193. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  194. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  195. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  196. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +2 -2
  197. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  198. package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
  199. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  201. package/build/components/sidebar-edit-mode/template-panel/index.js +1 -1
  202. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  203. package/build/components/sidebar-navigation-item/index.js +31 -0
  204. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  205. package/build/components/sidebar-navigation-screen/index.js +36 -9
  206. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  207. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  208. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  209. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  210. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  211. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  212. package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -2
  213. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  214. package/build/components/sidebar-navigation-screen-main/index.js +6 -15
  215. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  216. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  217. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  218. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
  219. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  220. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  221. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  223. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  224. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  225. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  226. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  227. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  229. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  230. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  231. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  232. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  233. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-page/index.js +22 -12
  235. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  237. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-pattern/index.js +14 -5
  239. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  241. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  243. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  245. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  246. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  247. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-patterns/index.js +33 -27
  249. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  251. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  253. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  255. package/build/components/sidebar-navigation-screen-template/index.js +10 -7
  256. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  257. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  259. package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  260. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  261. package/build/components/site-hub/index.js +22 -21
  262. package/build/components/site-hub/index.js.map +1 -1
  263. package/build/components/site-icon/index.js.map +1 -1
  264. package/build/components/start-template-options/index.js.map +1 -1
  265. package/build/components/style-book/index.js.map +1 -1
  266. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -5
  267. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  268. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  269. package/build/components/table/index.js.map +1 -1
  270. package/build/components/template-actions/index.js +7 -8
  271. package/build/components/template-actions/index.js.map +1 -1
  272. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  273. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  274. package/build/components/template-part-converter/index.js.map +1 -1
  275. package/build/components/use-edited-entity-record/index.js.map +1 -1
  276. package/build/components/welcome-guide/editor.js.map +1 -1
  277. package/build/components/welcome-guide/image.js.map +1 -1
  278. package/build/components/welcome-guide/index.js.map +1 -1
  279. package/build/components/welcome-guide/page.js.map +1 -1
  280. package/build/components/welcome-guide/styles.js +6 -3
  281. package/build/components/welcome-guide/styles.js.map +1 -1
  282. package/build/components/welcome-guide/template.js.map +1 -1
  283. package/build/hooks/commands/use-common-commands.js.map +1 -1
  284. package/build/hooks/commands/use-edit-mode-commands.js +10 -28
  285. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  286. package/build/hooks/components.js.map +1 -1
  287. package/build/hooks/index.js.map +1 -1
  288. package/build/hooks/push-changes-to-global-styles/index.js +3 -40
  289. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  290. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  291. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  292. package/build/index.js +3 -8
  293. package/build/index.js.map +1 -1
  294. package/build/lock-unlock.js.map +1 -1
  295. package/build/store/actions.js +21 -96
  296. package/build/store/actions.js.map +1 -1
  297. package/build/store/constants.js.map +1 -1
  298. package/build/store/index.js +1 -1
  299. package/build/store/index.js.map +1 -1
  300. package/build/store/private-actions.js +1 -85
  301. package/build/store/private-actions.js.map +1 -1
  302. package/build/store/private-selectors.js.map +1 -1
  303. package/build/store/reducer.js.map +1 -1
  304. package/build/store/selectors.js.map +1 -1
  305. package/build/utils/clone-deep.js.map +1 -1
  306. package/build/utils/constants.js +2 -1
  307. package/build/utils/constants.js.map +1 -1
  308. package/build/utils/get-is-list-page.js.map +1 -1
  309. package/build/utils/is-previewing-theme.js.map +1 -1
  310. package/build/utils/is-template-removable.js.map +1 -1
  311. package/build/utils/is-template-revertable.js.map +1 -1
  312. package/build/utils/math.js.map +1 -1
  313. package/build/utils/set-nested-value.js +44 -0
  314. package/build/utils/set-nested-value.js.map +1 -0
  315. package/build/utils/template-part-create.js.map +1 -1
  316. package/build/utils/use-activate-theme.js.map +1 -1
  317. package/build/utils/use-actual-current-theme.js.map +1 -1
  318. package/build-module/components/add-new-page/index.js.map +1 -1
  319. package/build-module/components/add-new-pattern/index.js.map +1 -1
  320. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  321. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  322. package/build-module/components/add-new-template/index.js +283 -14
  323. package/build-module/components/add-new-template/index.js.map +1 -1
  324. package/build-module/components/add-new-template/utils.js +21 -11
  325. package/build-module/components/add-new-template/utils.js.map +1 -1
  326. package/build-module/components/app/index.js.map +1 -1
  327. package/build-module/components/async/index.js +44 -0
  328. package/build-module/components/async/index.js.map +1 -0
  329. package/build-module/components/block-editor/block-inspector-button.js +9 -8
  330. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  331. package/build-module/components/block-editor/editor-canvas.js +16 -7
  332. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  333. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  334. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  335. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  336. package/build-module/components/block-editor/site-editor-canvas.js +5 -1
  337. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  338. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  339. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  340. package/build-module/components/canvas-loader/index.js.map +1 -1
  341. package/build-module/components/code-editor/index.js.map +1 -1
  342. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  343. package/build-module/components/editor/index.js +35 -8
  344. package/build-module/components/editor/index.js.map +1 -1
  345. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  346. package/build-module/components/error-boundary/index.js.map +1 -1
  347. package/build-module/components/error-boundary/warning.js.map +1 -1
  348. package/build-module/components/global-styles/background-panel.js +14 -1
  349. package/build-module/components/global-styles/background-panel.js.map +1 -1
  350. package/build-module/components/global-styles/block-preview-panel.js +6 -1
  351. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  352. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  353. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  354. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  355. package/build-module/components/global-styles/font-families.js.map +1 -1
  356. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  357. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  358. package/build-module/components/global-styles/font-library-modal/context.js +59 -32
  359. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  360. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  361. package/build-module/components/global-styles/font-library-modal/font-collection.js +12 -5
  362. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  363. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  364. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  365. package/build-module/components/global-styles/font-library-modal/index.js +2 -2
  366. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  367. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +11 -10
  368. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  369. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  370. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  371. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  373. package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  375. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  376. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  377. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  379. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  380. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  381. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  382. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  383. package/build-module/components/global-styles/header.js.map +1 -1
  384. package/build-module/components/global-styles/highlighted-colors.js +1 -1
  385. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  386. package/build-module/components/global-styles/hooks.js +11 -3
  387. package/build-module/components/global-styles/hooks.js.map +1 -1
  388. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  389. package/build-module/components/global-styles/index.js.map +1 -1
  390. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  391. package/build-module/components/global-styles/palette.js.map +1 -1
  392. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  393. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  394. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  395. package/build-module/components/global-styles/root-menu.js +2 -2
  396. package/build-module/components/global-styles/root-menu.js.map +1 -1
  397. package/build-module/components/global-styles/screen-background.js +1 -1
  398. package/build-module/components/global-styles/screen-background.js.map +1 -1
  399. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  400. package/build-module/components/global-styles/screen-block.js.map +1 -1
  401. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  402. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  403. package/build-module/components/global-styles/screen-css.js.map +1 -1
  404. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  405. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  406. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  407. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  408. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  409. package/build-module/components/global-styles/screen-root.js.map +1 -1
  410. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  411. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  412. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  413. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  414. package/build-module/components/global-styles/subtitle.js.map +1 -1
  415. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  416. package/build-module/components/global-styles/typography-example.js.map +1 -1
  417. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  418. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  419. package/build-module/components/global-styles/ui.js.map +1 -1
  420. package/build-module/components/global-styles/utils.js.map +1 -1
  421. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  422. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  423. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  424. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  425. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  426. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
  427. package/build-module/components/header-edit-mode/index.js +3 -3
  428. package/build-module/components/header-edit-mode/index.js.map +1 -1
  429. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  430. package/build-module/components/header-edit-mode/more-menu/index.js +8 -8
  431. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  432. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  433. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  434. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  435. package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -23
  436. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  437. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  438. package/build-module/components/keyboard-shortcuts/register.js +0 -18
  439. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  440. package/build-module/components/layout/animation.js +4 -3
  441. package/build-module/components/layout/animation.js.map +1 -1
  442. package/build-module/components/layout/hooks.js.map +1 -1
  443. package/build-module/components/layout/index.js +13 -48
  444. package/build-module/components/layout/index.js.map +1 -1
  445. package/build-module/components/layout/router.js +73 -7
  446. package/build-module/components/layout/router.js.map +1 -1
  447. package/build-module/components/media/index.js.map +1 -1
  448. package/build-module/components/page/header.js.map +1 -1
  449. package/build-module/components/page/index.js +5 -2
  450. package/build-module/components/page/index.js.map +1 -1
  451. package/build-module/components/page-pages/index.js +14 -16
  452. package/build-module/components/page-pages/index.js.map +1 -1
  453. package/build-module/components/page-patterns/dataviews-pattern-actions.js +5 -4
  454. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  455. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  456. package/build-module/components/page-patterns/header.js +2 -2
  457. package/build-module/components/page-patterns/header.js.map +1 -1
  458. package/build-module/components/page-patterns/index.js +126 -19
  459. package/build-module/components/page-patterns/index.js.map +1 -1
  460. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  461. package/build-module/components/page-patterns/search-items.js +3 -2
  462. package/build-module/components/page-patterns/search-items.js.map +1 -1
  463. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  464. package/build-module/components/page-patterns/use-patterns.js +2 -6
  465. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  466. package/build-module/components/page-patterns/utils.js.map +1 -1
  467. package/build-module/components/page-templates-template-parts/add-new-template-part.js +3 -2
  468. package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
  469. package/build-module/components/page-templates-template-parts/hooks.js.map +1 -1
  470. package/build-module/components/page-templates-template-parts/index.js +13 -25
  471. package/build-module/components/page-templates-template-parts/index.js.map +1 -1
  472. package/build-module/components/pagination/index.js.map +1 -1
  473. package/build-module/components/pattern-modal/duplicate.js +4 -1
  474. package/build-module/components/pattern-modal/duplicate.js.map +1 -1
  475. package/build-module/components/pattern-modal/index.js.map +1 -1
  476. package/build-module/components/pattern-modal/rename.js +4 -1
  477. package/build-module/components/pattern-modal/rename.js.map +1 -1
  478. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  479. package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
  480. package/build-module/components/rename-post-menu-item/index.js.map +1 -0
  481. package/build-module/components/resizable-frame/index.js +1 -5
  482. package/build-module/components/resizable-frame/index.js.map +1 -1
  483. package/build-module/components/revisions/index.js.map +1 -1
  484. package/build-module/components/routes/link.js.map +1 -1
  485. package/build-module/components/routes/use-title.js.map +1 -1
  486. package/build-module/components/save-button/index.js.map +1 -1
  487. package/build-module/components/save-hub/index.js.map +1 -1
  488. package/build-module/components/save-panel/index.js +2 -2
  489. package/build-module/components/save-panel/index.js.map +1 -1
  490. package/build-module/components/sidebar/index.js +42 -75
  491. package/build-module/components/sidebar/index.js.map +1 -1
  492. package/build-module/components/sidebar-button/index.js.map +1 -1
  493. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  494. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  495. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  496. package/build-module/components/sidebar-dataviews/default-views.js +1 -1
  497. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  498. package/build-module/components/sidebar-dataviews/index.js +1 -1
  499. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  500. package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
  501. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  502. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  503. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  504. package/build-module/components/sidebar-edit-mode/index.js +28 -53
  505. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  506. package/build-module/components/sidebar-edit-mode/page-panels/index.js +23 -2
  507. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  508. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  509. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  510. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
  511. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  512. package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
  513. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  514. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  515. package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -1
  516. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  517. package/build-module/components/sidebar-navigation-item/index.js +31 -0
  518. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  519. package/build-module/components/sidebar-navigation-screen/index.js +37 -10
  520. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  521. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  522. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  523. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  524. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  525. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  526. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -3
  527. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  528. package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
  529. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  530. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  531. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  532. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
  533. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  534. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  535. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  537. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  538. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  539. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  540. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  541. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  543. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  544. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  545. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  546. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  547. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  548. package/build-module/components/sidebar-navigation-screen-page/index.js +24 -14
  549. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  550. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  551. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-pattern/index.js +14 -5
  553. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  554. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  555. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  556. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  557. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  559. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  561. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-patterns/index.js +34 -28
  563. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  565. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  567. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  568. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  569. package/build-module/components/sidebar-navigation-screen-template/index.js +12 -8
  570. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  571. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  572. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  573. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
  574. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  575. package/build-module/components/site-hub/index.js +22 -21
  576. package/build-module/components/site-hub/index.js.map +1 -1
  577. package/build-module/components/site-icon/index.js.map +1 -1
  578. package/build-module/components/start-template-options/index.js.map +1 -1
  579. package/build-module/components/style-book/index.js.map +1 -1
  580. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -5
  581. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  582. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  583. package/build-module/components/table/index.js.map +1 -1
  584. package/build-module/components/template-actions/index.js +7 -8
  585. package/build-module/components/template-actions/index.js.map +1 -1
  586. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  587. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  588. package/build-module/components/template-part-converter/index.js.map +1 -1
  589. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  590. package/build-module/components/welcome-guide/editor.js.map +1 -1
  591. package/build-module/components/welcome-guide/image.js.map +1 -1
  592. package/build-module/components/welcome-guide/index.js.map +1 -1
  593. package/build-module/components/welcome-guide/page.js.map +1 -1
  594. package/build-module/components/welcome-guide/styles.js +6 -3
  595. package/build-module/components/welcome-guide/styles.js.map +1 -1
  596. package/build-module/components/welcome-guide/template.js.map +1 -1
  597. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  598. package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
  599. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  600. package/build-module/hooks/components.js.map +1 -1
  601. package/build-module/hooks/index.js.map +1 -1
  602. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
  603. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  604. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -1
  605. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  606. package/build-module/index.js +4 -6
  607. package/build-module/index.js.map +1 -1
  608. package/build-module/lock-unlock.js.map +1 -1
  609. package/build-module/store/actions.js +16 -92
  610. package/build-module/store/actions.js.map +1 -1
  611. package/build-module/store/constants.js.map +1 -1
  612. package/build-module/store/index.js.map +1 -1
  613. package/build-module/store/private-actions.js +0 -83
  614. package/build-module/store/private-actions.js.map +1 -1
  615. package/build-module/store/private-selectors.js.map +1 -1
  616. package/build-module/store/reducer.js.map +1 -1
  617. package/build-module/store/selectors.js.map +1 -1
  618. package/build-module/utils/clone-deep.js.map +1 -1
  619. package/build-module/utils/constants.js +1 -0
  620. package/build-module/utils/constants.js.map +1 -1
  621. package/build-module/utils/get-is-list-page.js.map +1 -1
  622. package/build-module/utils/is-previewing-theme.js.map +1 -1
  623. package/build-module/utils/is-template-removable.js.map +1 -1
  624. package/build-module/utils/is-template-revertable.js.map +1 -1
  625. package/build-module/utils/math.js.map +1 -1
  626. package/build-module/utils/set-nested-value.js +38 -0
  627. package/build-module/utils/set-nested-value.js.map +1 -0
  628. package/build-module/utils/template-part-create.js.map +1 -1
  629. package/build-module/utils/use-activate-theme.js.map +1 -1
  630. package/build-module/utils/use-actual-current-theme.js.map +1 -1
  631. package/build-style/style-rtl.css +172 -585
  632. package/build-style/style.css +172 -585
  633. package/package.json +43 -44
  634. package/src/components/add-new-template/index.js +412 -12
  635. package/src/components/add-new-template/style.scss +0 -22
  636. package/src/components/add-new-template/utils.js +44 -24
  637. package/src/components/async/index.js +43 -0
  638. package/src/components/block-editor/block-inspector-button.js +9 -11
  639. package/src/components/block-editor/editor-canvas.js +45 -21
  640. package/src/components/block-editor/site-editor-canvas.js +6 -1
  641. package/src/components/editor/index.js +50 -13
  642. package/src/components/global-styles/background-panel.js +16 -0
  643. package/src/components/global-styles/block-preview-panel.js +6 -1
  644. package/src/components/global-styles/font-library-modal/context.js +76 -51
  645. package/src/components/global-styles/font-library-modal/font-collection.js +247 -223
  646. package/src/components/global-styles/font-library-modal/index.js +2 -2
  647. package/src/components/global-styles/font-library-modal/installed-fonts.js +156 -147
  648. package/src/components/global-styles/font-library-modal/style.scss +31 -13
  649. package/src/components/global-styles/highlighted-colors.js +1 -1
  650. package/src/components/global-styles/hooks.js +20 -3
  651. package/src/components/global-styles/root-menu.js +2 -2
  652. package/src/components/global-styles/screen-background.js +1 -1
  653. package/src/components/global-styles/screen-revisions/index.js +1 -1
  654. package/src/components/header-edit-mode/index.js +3 -5
  655. package/src/components/header-edit-mode/more-menu/index.js +6 -17
  656. package/src/components/header-edit-mode/style.scss +1 -1
  657. package/src/components/keyboard-shortcuts/edit-mode.js +0 -29
  658. package/src/components/keyboard-shortcuts/register.js +0 -20
  659. package/src/components/layout/animation.js +6 -3
  660. package/src/components/layout/index.js +12 -50
  661. package/src/components/layout/router.js +75 -12
  662. package/src/components/layout/style.scss +15 -37
  663. package/src/components/page/index.js +7 -2
  664. package/src/components/page-pages/index.js +33 -23
  665. package/src/components/page-pages/style.scss +29 -22
  666. package/src/components/page-patterns/dataviews-pattern-actions.js +5 -6
  667. package/src/components/page-patterns/header.js +4 -2
  668. package/src/components/page-patterns/index.js +168 -56
  669. package/src/components/page-patterns/search-items.js +3 -0
  670. package/src/components/page-patterns/style.scss +7 -6
  671. package/src/components/page-patterns/use-patterns.js +2 -6
  672. package/src/components/page-templates-template-parts/add-new-template-part.js +4 -2
  673. package/src/components/page-templates-template-parts/index.js +24 -39
  674. package/src/components/pattern-modal/duplicate.js +2 -1
  675. package/src/components/pattern-modal/rename.js +2 -1
  676. package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
  677. package/src/components/resizable-frame/index.js +2 -6
  678. package/src/components/save-panel/index.js +2 -2
  679. package/src/components/sidebar/index.js +52 -100
  680. package/src/components/sidebar/style.scss +41 -6
  681. package/src/components/sidebar-dataviews/default-views.js +1 -1
  682. package/src/components/sidebar-dataviews/index.js +1 -1
  683. package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
  684. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
  685. package/src/components/sidebar-edit-mode/index.js +39 -75
  686. package/src/components/sidebar-edit-mode/page-panels/index.js +25 -2
  687. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +20 -12
  688. package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -6
  689. package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
  690. package/src/components/sidebar-edit-mode/style.scss +1 -1
  691. package/src/components/sidebar-edit-mode/template-panel/index.js +1 -1
  692. package/src/components/sidebar-navigation-item/index.js +29 -0
  693. package/src/components/sidebar-navigation-screen/index.js +29 -12
  694. package/src/components/sidebar-navigation-screen/style.scss +1 -21
  695. package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -11
  696. package/src/components/sidebar-navigation-screen-main/index.js +11 -23
  697. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  698. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
  699. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  700. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
  701. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  702. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
  703. package/src/components/sidebar-navigation-screen-page/index.js +23 -13
  704. package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
  705. package/src/components/sidebar-navigation-screen-pattern/index.js +9 -6
  706. package/src/components/sidebar-navigation-screen-patterns/index.js +70 -60
  707. package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
  708. package/src/components/sidebar-navigation-screen-template/index.js +8 -12
  709. package/src/components/sidebar-navigation-screen-templates-browse/index.js +2 -7
  710. package/src/components/site-hub/index.js +80 -90
  711. package/src/components/site-hub/style.scss +14 -34
  712. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +50 -35
  713. package/src/components/template-actions/index.js +8 -11
  714. package/src/components/welcome-guide/style.scss +1 -1
  715. package/src/components/welcome-guide/styles.js +6 -5
  716. package/src/hooks/commands/use-edit-mode-commands.js +12 -33
  717. package/src/hooks/push-changes-to-global-styles/index.js +1 -40
  718. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
  719. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
  720. package/src/index.js +9 -10
  721. package/src/store/actions.js +25 -141
  722. package/src/store/private-actions.js +0 -133
  723. package/src/store/test/actions.js +7 -2
  724. package/src/style.scss +0 -2
  725. package/src/utils/constants.js +1 -0
  726. package/src/utils/set-nested-value.js +39 -0
  727. package/build/components/add-new-template/new-template.js +0 -298
  728. package/build/components/add-new-template/new-template.js.map +0 -1
  729. package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
  730. package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  731. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
  732. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  733. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
  734. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  735. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  736. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  737. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
  738. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  739. package/build/components/keyboard-shortcut-help-modal/index.js +0 -119
  740. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  741. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
  742. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  743. package/build/components/page-actions/index.js +0 -35
  744. package/build/components/page-actions/index.js.map +0 -1
  745. package/build/components/page-actions/trash-page-menu-item.js +0 -54
  746. package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
  747. package/build/components/page-templates-template-parts/actions.js +0 -207
  748. package/build/components/page-templates-template-parts/actions.js.map +0 -1
  749. package/build/components/preferences-modal/index.js +0 -38
  750. package/build/components/preferences-modal/index.js.map +0 -1
  751. package/build/components/sidebar-edit-mode/constants.js +0 -9
  752. package/build/components/sidebar-edit-mode/constants.js.map +0 -1
  753. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
  754. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  755. package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
  756. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  757. package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
  758. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  759. package/build/components/template-actions/rename-menu-item.js.map +0 -1
  760. package/build-module/components/add-new-template/new-template.js +0 -290
  761. package/build-module/components/add-new-template/new-template.js.map +0 -1
  762. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
  763. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  764. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  765. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  766. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
  767. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  768. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  769. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  770. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
  771. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  772. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -110
  773. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  774. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
  775. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  776. package/build-module/components/page-actions/index.js +0 -27
  777. package/build-module/components/page-actions/index.js.map +0 -1
  778. package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
  779. package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
  780. package/build-module/components/page-templates-template-parts/actions.js +0 -199
  781. package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
  782. package/build-module/components/preferences-modal/index.js +0 -30
  783. package/build-module/components/preferences-modal/index.js.map +0 -1
  784. package/build-module/components/sidebar-edit-mode/constants.js +0 -3
  785. package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
  786. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
  787. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  788. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
  789. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  790. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
  791. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  792. package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
  793. package/src/components/add-new-template/new-template.js +0 -429
  794. package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
  795. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  796. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
  797. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  798. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  799. package/src/components/keyboard-shortcut-help-modal/index.js +0 -151
  800. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
  801. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  802. package/src/components/page-actions/index.js +0 -30
  803. package/src/components/page-actions/trash-page-menu-item.js +0 -63
  804. package/src/components/page-templates-template-parts/actions.js +0 -277
  805. package/src/components/preferences-modal/index.js +0 -29
  806. package/src/components/sidebar-edit-mode/constants.js +0 -2
  807. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
  808. package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
  809. package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
@@ -10,18 +10,49 @@ import classnames from 'classnames';
10
10
  import { __experimentalItem as Item, __experimentalHStack as HStack, FlexBlock } from '@wordpress/components';
11
11
  import { isRTL } from '@wordpress/i18n';
12
12
  import { chevronRightSmall, chevronLeftSmall, Icon } from '@wordpress/icons';
13
+ import { privateApis as routerPrivateApis } from '@wordpress/router';
14
+ import { useContext } from '@wordpress/element';
15
+
16
+ /**
17
+ * Internal dependencies
18
+ */
19
+ import { unlock } from '../../lock-unlock';
20
+ import { SidebarNavigationContext } from '../sidebar';
21
+ const {
22
+ useHistory
23
+ } = unlock(routerPrivateApis);
13
24
  export default function SidebarNavigationItem({
14
25
  className,
15
26
  icon,
16
27
  withChevron = false,
17
28
  suffix,
29
+ path,
30
+ onClick,
18
31
  children,
19
32
  ...props
20
33
  }) {
34
+ const history = useHistory();
35
+ const navigate = useContext(SidebarNavigationContext);
36
+
37
+ // If there is no custom click handler, create one that navigates to `path`.
38
+ function handleClick(e) {
39
+ if (onClick) {
40
+ onClick(e);
41
+ navigate('forward');
42
+ } else if (path) {
43
+ e.preventDefault();
44
+ history.push({
45
+ path
46
+ });
47
+ navigate('forward', `[id="${path}"]`);
48
+ }
49
+ }
21
50
  return createElement(Item, {
22
51
  className: classnames('edit-site-sidebar-navigation-item', {
23
52
  'with-suffix': !withChevron && suffix
24
53
  }, className),
54
+ onClick: handleClick,
55
+ id: path,
25
56
  ...props
26
57
  }, createElement(HStack, {
27
58
  justify: "flex-start"
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","__experimentalItem","Item","__experimentalHStack","HStack","FlexBlock","isRTL","chevronRightSmall","chevronLeftSmall","Icon","SidebarNavigationItem","className","icon","withChevron","suffix","children","props","createElement","justify","style","fill","size"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-item/index.js"],"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 { isRTL } from '@wordpress/i18n';\nimport { chevronRightSmall, chevronLeftSmall, Icon } from '@wordpress/icons';\n\nexport default function SidebarNavigationItem( {\n\tclassName,\n\ticon,\n\twithChevron = false,\n\tsuffix,\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\t{ 'with-suffix': ! withChevron && suffix },\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={ isRTL() ? chevronLeftSmall : 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\t{ ! withChevron && suffix }\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,kBAAkB,IAAIC,IAAI,EAC1BC,oBAAoB,IAAIC,MAAM,EAC9BC,SAAS,QACH,uBAAuB;AAC9B,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,iBAAiB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,kBAAkB;AAE5E,eAAe,SAASC,qBAAqBA,CAAE;EAC9CC,SAAS;EACTC,IAAI;EACJC,WAAW,GAAG,KAAK;EACnBC,MAAM;EACNC,QAAQ;EACR,GAAGC;AACJ,CAAC,EAAG;EACH,OACCC,aAAA,CAACf,IAAI;IACJS,SAAS,EAAGX,UAAU,CACrB,mCAAmC,EACnC;MAAE,aAAa,EAAE,CAAEa,WAAW,IAAIC;IAAO,CAAC,EAC1CH,SACD,CAAG;IAAA,GACEK;EAAK,GAEVC,aAAA,CAACb,MAAM;IAACc,OAAO,EAAC;EAAY,GACzBN,IAAI,IACLK,aAAA,CAACR,IAAI;IACJU,KAAK,EAAG;MAAEC,IAAI,EAAE;IAAe,CAAG;IAClCR,IAAI,EAAGA,IAAM;IACbS,IAAI,EAAG;EAAI,CACX,CACD,EACDJ,aAAA,CAACZ,SAAS,QAAGU,QAAqB,CAAC,EACjCF,WAAW,IACZI,aAAA,CAACR,IAAI;IACJG,IAAI,EAAGN,KAAK,CAAC,CAAC,GAAGE,gBAAgB,GAAGD,iBAAmB;IACvDI,SAAS,EAAC,wDAAwD;IAClEU,IAAI,EAAG;EAAI,CACX,CACD,EACC,CAAER,WAAW,IAAIC,MACZ,CACH,CAAC;AAET"}
1
+ {"version":3,"names":["classnames","__experimentalItem","Item","__experimentalHStack","HStack","FlexBlock","isRTL","chevronRightSmall","chevronLeftSmall","Icon","privateApis","routerPrivateApis","useContext","unlock","SidebarNavigationContext","useHistory","SidebarNavigationItem","className","icon","withChevron","suffix","path","onClick","children","props","history","navigate","handleClick","e","preventDefault","push","createElement","id","justify","style","fill","size"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-item/index.js"],"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 { isRTL } from '@wordpress/i18n';\nimport { chevronRightSmall, chevronLeftSmall, Icon } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationItem( {\n\tclassName,\n\ticon,\n\twithChevron = false,\n\tsuffix,\n\tpath,\n\tonClick,\n\tchildren,\n\t...props\n} ) {\n\tconst history = useHistory();\n\tconst navigate = useContext( SidebarNavigationContext );\n\n\t// If there is no custom click handler, create one that navigates to `path`.\n\tfunction handleClick( e ) {\n\t\tif ( onClick ) {\n\t\t\tonClick( e );\n\t\t\tnavigate( 'forward' );\n\t\t} else if ( path ) {\n\t\t\te.preventDefault();\n\t\t\thistory.push( { path } );\n\t\t\tnavigate( 'forward', `[id=\"${ path }\"]` );\n\t\t}\n\t}\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\t{ 'with-suffix': ! withChevron && suffix },\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tonClick={ handleClick }\n\t\t\tid={ path }\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={ isRTL() ? chevronLeftSmall : 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\t{ ! withChevron && suffix }\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,kBAAkB,IAAIC,IAAI,EAC1BC,oBAAoB,IAAIC,MAAM,EAC9BC,SAAS,QACH,uBAAuB;AAC9B,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,iBAAiB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,kBAAkB;AAC5E,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,wBAAwB,QAAQ,YAAY;AAErD,MAAM;EAAEC;AAAW,CAAC,GAAGF,MAAM,CAAEF,iBAAkB,CAAC;AAElD,eAAe,SAASK,qBAAqBA,CAAE;EAC9CC,SAAS;EACTC,IAAI;EACJC,WAAW,GAAG,KAAK;EACnBC,MA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import classnames from 'classnames';
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
- import { __experimentalHStack as HStack, __experimentalHeading as Heading, __experimentalUseNavigator as useNavigator, __experimentalVStack as VStack } from '@wordpress/components';
10
+ import { __experimentalHStack as HStack, __experimentalHeading as Heading, __experimentalVStack as VStack } from '@wordpress/components';
11
11
  import { isRTL, __, sprintf } from '@wordpress/i18n';
12
12
  import { chevronRight, chevronLeft } from '@wordpress/icons';
13
13
  import { store as coreStore } from '@wordpress/core-data';
14
14
  import { useSelect } from '@wordpress/data';
15
15
  import { privateApis as routerPrivateApis } from '@wordpress/router';
16
+ import { useContext } from '@wordpress/element';
16
17
 
17
18
  /**
18
19
  * Internal dependencies
@@ -21,9 +22,38 @@ import { store as editSiteStore } from '../../store';
21
22
  import { unlock } from '../../lock-unlock';
22
23
  import SidebarButton from '../sidebar-button';
23
24
  import { isPreviewingTheme, currentlyPreviewingTheme } from '../../utils/is-previewing-theme';
25
+ import { SidebarNavigationContext } from '../sidebar';
24
26
  const {
27
+ useHistory,
25
28
  useLocation
26
29
  } = unlock(routerPrivateApis);
30
+ function getBackPath(params) {
31
+ // From a data view path we navigate back to root
32
+ if (params.path) {
33
+ return {};
34
+ }
35
+
36
+ // From edit screen for a post we navigate back to post-type specific data view
37
+ if (params.postType === 'page') {
38
+ return {
39
+ path: '/page',
40
+ postId: params.postId
41
+ };
42
+ } else if (params.postType === 'wp_template') {
43
+ return {
44
+ path: '/wp_template',
45
+ postId: params.postId
46
+ };
47
+ } else if (params.postType === 'wp_navigation') {
48
+ return {
49
+ path: '/navigation',
50
+ postId: params.postId
51
+ };
52
+ }
53
+
54
+ // Go back to root by default
55
+ return {};
56
+ }
27
57
  export default function SidebarNavigationScreen({
28
58
  isRoot,
29
59
  title,
@@ -52,7 +82,8 @@ export default function SidebarNavigationScreen({
52
82
  };
53
83
  }, []);
54
84
  const location = useLocation();
55
- const navigator = useNavigator();
85
+ const history = useHistory();
86
+ const navigate = useContext(SidebarNavigationContext);
56
87
  const icon = isRTL() ? chevronRight : chevronLeft;
57
88
  return createElement(Fragment, null, createElement(VStack, {
58
89
  className: classnames('edit-site-sidebar-navigation-screen__main', {
@@ -66,14 +97,10 @@ export default function SidebarNavigationScreen({
66
97
  className: "edit-site-sidebar-navigation-screen__title-icon"
67
98
  }, !isRoot && createElement(SidebarButton, {
68
99
  onClick: () => {
69
- const backPath = backPathProp !== null && backPathProp !== void 0 ? backPathProp : location.state?.backPath;
70
- if (backPath) {
71
- navigator.goTo(backPath, {
72
- isBack: true
73
- });
74
- } else {
75
- navigator.goToParent();
76
- }
100
+ var _ref;
101
+ const backPath = (_ref = backPathProp !== null && backPathProp !== void 0 ? backPathProp : location.state?.backPath) !== null && _ref !== void 0 ? _ref : getBackPath(location.params);
102
+ history.push(backPath);
103
+ navigate('back');
77
104
  },
78
105
  icon: icon,
79
106
  label: __('Back'),
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","__experimentalHStack","HStack","__experimentalHeading","Heading","__experimentalUseNavigator","useNavigator","__experimentalVStack","VStack","isRTL","__","sprintf","chevronRight","chevronLeft","store","coreStore","useSelect","privateApis","routerPrivateApis","editSiteStore","unlock","SidebarButton","isPreviewingTheme","currentlyPreviewingTheme","useLocation","SidebarNavigationScreen","isRoot","title","actions","meta","content","footer","description","backPath","backPathProp","dashboardLink","dashboardLinkText","previewingThemeName","select","getSettings","currentlyPreviewingThemeId","__experimentalDashboardLink","__experimentalDashboardLinkText","getTheme","name","rendered","undefined","location","navigator","icon","createElement","Fragment","className","spacing","justify","alignment","onClick","state","goTo","isBack","goToParent","label","showTooltip","href","color","level","size"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalVStack as VStack,\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';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport SidebarButton from '../sidebar-button';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreen( {\n\tisRoot,\n\ttitle,\n\tactions,\n\tmeta,\n\tcontent,\n\tfooter,\n\tdescription,\n\tbackPath: backPathProp,\n} ) {\n\tconst { dashboardLink, dashboardLinkText, previewingThemeName } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst currentlyPreviewingThemeId = currentlyPreviewingTheme();\n\t\t\treturn {\n\t\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t\t\tdashboardLinkText:\n\t\t\t\t\tgetSettings().__experimentalDashboardLinkText,\n\t\t\t\t// Do not call `getTheme` with null, it will cause a request to\n\t\t\t\t// the server.\n\t\t\t\tpreviewingThemeName: currentlyPreviewingThemeId\n\t\t\t\t\t? select( coreStore ).getTheme( currentlyPreviewingThemeId )\n\t\t\t\t\t\t\t?.name?.rendered\n\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst location = useLocation();\n\tconst navigator = useNavigator();\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\n\treturn (\n\t\t<>\n\t\t\t<VStack\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-sidebar-navigation-screen__main',\n\t\t\t\t\t{\n\t\t\t\t\t\t'has-footer': !! footer,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\tspacing={ 0 }\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\talignment=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title-icon\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst backPath =\n\t\t\t\t\t\t\t\t\tbackPathProp ?? location.state?.backPath;\n\t\t\t\t\t\t\t\tif ( backPath ) {\n\t\t\t\t\t\t\t\t\tnavigator.goTo( backPath, {\n\t\t\t\t\t\t\t\t\t\tisBack: true,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnavigator.goToParent();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tdashboardLinkText || __( 'Go to the Dashboard' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={ dashboardLink || 'index.php' }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<Heading\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title\"\n\t\t\t\t\t\tcolor={ '#e0e0e0' /* $gray-200 */ }\n\t\t\t\t\t\tlevel={ 1 }\n\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isPreviewingTheme()\n\t\t\t\t\t\t\t? title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t'Previewing %1$s: %2$s',\n\t\t\t\t\t\t\t\t\tpreviewingThemeName,\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{ actions && (\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__actions\">\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ meta && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__meta\">\n\t\t\t\t\t\t\t{ meta }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__content\">\n\t\t\t\t\t{ description && (\n\t\t\t\t\t\t<p className=\"edit-site-sidebar-navigation-screen__description\">\n\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ content }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t\t{ footer && (\n\t\t\t\t<footer className=\"edit-site-sidebar-navigation-screen__footer\">\n\t\t\t\t\t{ footer }\n\t\t\t\t</footer>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,oBAAoB,IAAIC,MAAM,EAC9BC,qBAAqB,IAAIC,OAAO,EAChCC,0BAA0B,IAAIC,YAAY,EAC1CC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,KAAK,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACpD,SAASC,YAAY,EAAEC,WAAW,QAAQ,kBAAkB;AAC5D,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;A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E,SAAS,EAAC;EAA2C,GACvDvB,IACE,CACJ,CACF,EAEDqB,aAAA;IAAKE,SAAS,EAAC;EAA8C,GAC1DpB,WAAW,IACZkB,aAAA;IAAGE,SAAS,EAAC;EAAkD,GAC5DpB,WACA,CACH,EACCF,OACE,CACE,CAAC,EACPC,MAAM,IACPmB,aAAA;IAAQE,SAAS,EAAC;EAA6C,GAC5DrB,MACK,CAER,CAAC;AAEL"}
1
+ {"version":3,"names":["classnames","__experimentalHStack","HStack","__experimentalHeading","Heading","__experimentalVStack","VStack","isRTL","__","sprintf","chevronRight","chevronLeft","store","coreStore","useSelect","privateApis","routerPrivateApis","useContext","editSiteStore","unlock","SidebarButton","isPreviewingTheme","currentlyPreviewingTheme","SidebarNavigationContext","useHistory","useLocation","getBackPath","params","path","postType","postId","SidebarNavigationScreen","isRoot","title","actions","meta","content","footer","description","backPath","backPathProp","dashboardLink","dashboardLinkText","previewingThemeName","select","getSettings","currentlyPreviewingThemeId","__experimentalDashboardLink","__experimentalDashboardLinkText","getTheme","name","rendered","undefined","location","history","navigate","icon","createElement","Fragment","className","spacing","justify","alignment","onClick","_ref","state","push","label","showTooltip","href","color","level","size"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalVStack as VStack,\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';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport SidebarButton from '../sidebar-button';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\nimport { SidebarNavigationContext } from '../sidebar';\n\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nfunction getBackPath( params ) {\n\t// From a data view path we navigate back to root\n\tif ( params.path ) {\n\t\treturn {};\n\t}\n\n\t// From edit screen for a post we navigate back to post-type specific data view\n\tif ( params.postType === 'page' ) {\n\t\treturn { path: '/page', postId: params.postId };\n\t} else if ( params.postType === 'wp_template' ) {\n\t\treturn { path: '/wp_template', postId: params.postId };\n\t} else if ( params.postType === 'wp_navigation' ) {\n\t\treturn { path: '/navigation', postId: params.postId };\n\t}\n\n\t// Go back to root by default\n\treturn {};\n}\n\nexport default function SidebarNavigationScreen( {\n\tisRoot,\n\ttitle,\n\tactions,\n\tmeta,\n\tcontent,\n\tfooter,\n\tdescription,\n\tbackPath: backPathProp,\n} ) {\n\tconst { dashboardLink, dashboardLinkText, previewingThemeName } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst currentlyPreviewingThemeId = currentlyPreviewingTheme();\n\t\t\treturn {\n\t\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t\t\tdashboardLinkText:\n\t\t\t\t\tgetSettings().__experimentalDashboardLinkText,\n\t\t\t\t// Do not call `getTheme` with null, it will cause a request to\n\t\t\t\t// the server.\n\t\t\t\tpreviewingThemeName: currentlyPreviewingThemeId\n\t\t\t\t\t? select( coreStore ).getTheme( currentlyPreviewingThemeId )\n\t\t\t\t\t\t\t?.name?.rendered\n\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst location = useLocation();\n\tconst history = useHistory();\n\tconst navigate = useContext( SidebarNavigationContext );\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\treturn (\n\t\t<>\n\t\t\t<VStack\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-sidebar-navigation-screen__main',\n\t\t\t\t\t{\n\t\t\t\t\t\t'has-footer': !! footer,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\tspacing={ 0 }\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\talignment=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title-icon\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst backPath =\n\t\t\t\t\t\t\t\t\tbackPathProp ??\n\t\t\t\t\t\t\t\t\tlocation.state?.backPath ??\n\t\t\t\t\t\t\t\t\tgetBackPath( location.params );\n\t\t\t\t\t\t\t\thistory.push( backPath );\n\t\t\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tdashboardLinkText || __( 'Go to the Dashboard' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={ dashboardLink || 'index.php' }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<Heading\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title\"\n\t\t\t\t\t\tcolor={ '#e0e0e0' /* $gray-200 */ }\n\t\t\t\t\t\tlevel={ 1 }\n\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isPreviewingTheme()\n\t\t\t\t\t\t\t? title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t'Previewing %1$s: %2$s',\n\t\t\t\t\t\t\t\t\tpreviewingThemeName,\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{ actions && (\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__actions\">\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ meta && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__meta\">\n\t\t\t\t\t\t\t{ meta }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__content\">\n\t\t\t\t\t{ description && (\n\t\t\t\t\t\t<p className=\"edit-site-sidebar-navigation-screen__description\">\n\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ content }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t\t{ footer && (\n\t\t\t\t<footer className=\"edit-site-sidebar-navigation-screen__footer\">\n\t\t\t\t\t{ footer }\n\t\t\t\t</footer>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,oBAAoB,IAAIC,MAAM,EAC9BC,qBAAqB,IAAIC,OAAO,EAChCC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,KAAK,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACpD,SAASC,YAAY,EAAEC,WAAW,QAAQ,kBAAkB;AAC5D,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,UAAU,QAAQ,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AAQ,CAAE,MAAO,CAAC;IACnB,CAAG;IACHC,IAAI,EAAGA,IAAM;IACbW,KAAK,EAAG3D,EAAE,CAAE,MAAO,CAAG;IACtB4D,WAAW,EAAG;EAAO,CACrB,CACD,EACCpC,MAAM,IACPyB,aAAA,CAACrC,aAAa;IACboC,IAAI,EAAGA,IAAM;IACbW,KAAK,EACJzB,iBAAiB,IAAIlC,EAAE,CAAE,qBAAsB,CAC/C;IACD6D,IAAI,EAAG5B,aAAa,IAAI;EAAa,CACrC,CACD,EACDgB,aAAA,CAACrD,OAAO;IACPuD,SAAS,EAAC,4CAA4C;IACtDW,KAAK,EAAG,SAAS,CAAC,eAAiB;IACnCC,KAAK,EAAG,CAAG;IACXC,IAAI,EAAG;EAAI,GAET,CAAEnD,iBAAiB,CAAC,CAAC,GACpBY,KAAK,GACLxB,OAAO,CACP,uBAAuB,EACvBkC,mBAAmB,EACnBV,KACA,CACK,CAAC,EACRC,OAAO,IACRuB,aAAA;IAAKE,SAAS,EAAC;EAA8C,GAC1DzB,OACE,CAEC,CAAC,EACPC,IAAI,IACLsB,aAAA,CAAAC,QAAA,QACCD,aAAA;IAAKE,SAAS,EAAC;EAA2C,GACvDxB,IACE,CACJ,CACF,EAEDsB,aAAA;IAAKE,SAAS,EAAC;EAA8C,GAC1DrB,WAAW,IACZmB,aAAA;IAAGE,SAAS,EAAC;EAAkD,GAC5DrB,WACA,CACH,EACCF,OACE,CACE,CAAC,EACPC,MAAM,IACPoB,aAAA;IAAQE,SAAS,EAAC;EAA6C,GAC5DtB,MACK,CAER,CAAC;AAEL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","sprintf","humanTimeDiff","createInterpolateElement","addQueryArgs","Icon","__experimentalItemGroup","ItemGroup","backup","SidebarNavigationScreenDetailsPanelRow","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelValue","SidebarNavigationItem","SidebarNavigationScreenDetailsFooter","record","otherProps","_record$_links$predec","_record$_links$versio","hrefProps","lastRevisionId","_links","id","revisionsCount","count","href","revision","as","createElement","className","justify","modified","time","dateTime","icon"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-footer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport {\n\tIcon,\n\t__experimentalItemGroup as ItemGroup,\n} from '@wordpress/components';\nimport { backup } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nexport default function SidebarNavigationScreenDetailsFooter( {\n\trecord,\n\t...otherProps\n} ) {\n\t/*\n\t * There might be other items in the future,\n\t * but for now it's just modified date.\n\t * Later we might render a list of items and isolate\n\t * the following logic.\n\t */\n\tconst hrefProps = {};\n\tconst lastRevisionId =\n\t\trecord?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ?? null;\n\tconst revisionsCount =\n\t\trecord?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t// Enable the revisions link if there is a last revision and there are more than one revisions.\n\tif ( lastRevisionId && revisionsCount > 1 ) {\n\t\threfProps.href = addQueryArgs( 'revision.php', {\n\t\t\trevision: record?._links[ 'predecessor-version' ][ 0 ].id,\n\t\t} );\n\t\threfProps.as = 'a';\n\t}\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-details-footer\">\n\t\t\t<SidebarNavigationItem\n\t\t\t\taria-label={ __( 'Revisions' ) }\n\t\t\t\t{ ...hrefProps }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow justify=\"space-between\">\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was last modified. */\n\t\t\t\t\t\t\t\t__( '<time>%s</time>' ),\n\t\t\t\t\t\t\t\thumanTimeDiff( record.modified )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttime: <time dateTime={ record.modified } />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-details-footer__icon\"\n\t\t\t\t\t\ticon={ backup }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationItem>\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SACCC,IAAI,EACJC,uBAAuB,IAAIC,SAAS,QAC9B,uBAAuB;AAC9B,SAASC,MAAM,QAAQ,kBAAkB;;AAEzC;AACA;AACA;AACA,SACCC,sCAAsC,EACtCC,wCAAwC,EACxCC,wCAAwC,QAClC,4CAA4C;AACnD,OAAOC,qBAAqB,MAAM,4BAA4B;AAE9D,eAAe,SAASC,oCAAoCA,CAAE;EAC7DC,MAAM;EACN,GAAGC;AACJ,CAAC,EAAG;EAAA,IAAAC,qBAAA,EAAAC,qBAAA;EACH;AACD;AACA;AACA;AACA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,CACf,CACsC,CAClB,CACb,CAAC;AAEd"}
1
+ {"version":3,"names":["__","sprintf","humanTimeDiff","createInterpolateElement","addQueryArgs","Icon","__experimentalItemGroup","ItemGroup","backup","SidebarNavigationScreenDetailsPanelRow","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelValue","SidebarNavigationItem","SidebarNavigationScreenDetailsFooter","record","otherProps","_record$_links$predec","_record$_links$versio","hrefProps","lastRevisionId","_links","id","revisionsCount","count","href","revision","as","createElement","className","justify","modified","time","dateTime","icon"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-footer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport {\n\tIcon,\n\t__experimentalItemGroup as ItemGroup,\n} from '@wordpress/components';\nimport { backup } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nexport default function SidebarNavigationScreenDetailsFooter( {\n\trecord,\n\t...otherProps\n} ) {\n\t/*\n\t * There might be other items in the future,\n\t * but for now it's just modified date.\n\t * Later we might render a list of items and isolate\n\t * the following logic.\n\t */\n\tconst hrefProps = {};\n\tconst lastRevisionId =\n\t\trecord?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ?? null;\n\tconst revisionsCount =\n\t\trecord?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t// Enable the revisions link if there is a last revision and there are more than one revisions.\n\tif ( lastRevisionId && revisionsCount > 1 ) {\n\t\threfProps.href = addQueryArgs( 'revision.php', {\n\t\t\trevision: record?._links[ 'predecessor-version' ][ 0 ].id,\n\t\t} );\n\t\threfProps.as = 'a';\n\t}\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-details-footer\">\n\t\t\t<SidebarNavigationItem\n\t\t\t\taria-label={ __( 'Revisions' ) }\n\t\t\t\t{ ...hrefProps }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow justify=\"space-between\">\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was last modified. */\n\t\t\t\t\t\t\t\t__( '<time>%s</time>' ),\n\t\t\t\t\t\t\t\thumanTimeDiff( record.modified )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttime: <time dateTime={ record.modified } />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-details-footer__icon\"\n\t\t\t\t\t\ticon={ backup }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationItem>\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SACCC,IAAI,EACJC,uBAAuB,IAAIC,SAAS,QAC9B,uBAAuB;AAC9B,SAASC,MAAM,QAA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ACAD,EAAE,CAAE,iBAAkB,CAAC,EACvBE,aAAa,CAAEY,MAAM,CAACgB,QAAS,CAChC,CAAC,EACD;IACCC,IAAI,EAAEJ,aAAA;MAAMK,QAAQ,EAAGlB,MAAM,CAACgB;IAAU,CAAE;EAC3C,CACD,CACyC,CAAC,EAC3CH,aAAA,CAACtB,IAAI;IACJuB,SAAS,EAAC,0DAA0D;IACpEK,IAAI,EAAGzB;EAAQ,CACf,CACsC,CAClB,CACb,CAAC;AAEd","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalVStack","VStack","__experimentalHeading","Heading","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelRow","SidebarNavigationScreenDetailsPanelValue","SidebarNavigationScreenDetailsPanel","title","children","spacing","createElement","className","level"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenDetailsPanelLabel from './sidebar-navigation-screen-details-panel-label';\nimport SidebarNavigationScreenDetailsPanelRow from './sidebar-navigation-screen-details-panel-row';\nimport SidebarNavigationScreenDetailsPanelValue from './sidebar-navigation-screen-details-panel-value';\n\nfunction SidebarNavigationScreenDetailsPanel( { title, children, spacing } ) {\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel\"\n\t\t\tspacing={ spacing }\n\t\t>\n\t\t\t{ title && (\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t) }\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n};\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,qBAAqB,IAAIC,OAAO,QAC1B,uBAAuB;;AAE9B;AACA;AACA;AACA,OAAOC,wCAAwC,MAAM,iDAAiD;AACtG,OAAOC,sCAAsC,MAAM,+CAA+C;AAClG,OAAOC,wCAAwC,MAAM,iDAAiD;AAEtG,SAASC,mCAAmCA,CAAE;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAQ,CAAC,EAAG;EAC5E,OACCC,aAAA,CAACV,MAAM;IACNW,SAAS,EAAC,mDAAmD;IAC7DF,OAAO,EAAGA;EAAS,GAEjBF,KAAK,IACNG,aAAA,CAACR,OAAO;IACPS,SAAS,EAAC,4DAA4D;IACtEC,KAAK,EAAG;EAAG,GAETL,KACM,CACT,EACCC,QACK,CAAC;AAEX;AAEA,SACCF,mCAAmC,EACnCF,sCAAsC,EACtCD,wCAAwC,EACxCE,wCAAwC"}
1
+ {"version":3,"names":["__experimentalVStack","VStack","__experimentalHeading","Heading","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelRow","SidebarNavigationScreenDetailsPanelValue","SidebarNavigationScreenDetailsPanel","title","children","spacing","createElement","className","level"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenDetailsPanelLabel from './sidebar-navigation-screen-details-panel-label';\nimport SidebarNavigationScreenDetailsPanelRow from './sidebar-navigation-screen-details-panel-row';\nimport SidebarNavigationScreenDetailsPanelValue from './sidebar-navigation-screen-details-panel-value';\n\nfunction SidebarNavigationScreenDetailsPanel( { title, children, spacing } ) {\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel\"\n\t\t\tspacing={ spacing }\n\t\t>\n\t\t\t{ title && (\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t) }\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n};\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,qBAAqB,IAAIC,OAAO,QAC1B,uBAAuB;;AAE9B;AACA;AACA;AACA,OAAOC,wCAAwC,MAAM,iDAAiD;AACtG,OAAOC,sCAAsC,MAAM,+CAA+C;AAClG,OAAOC,wCAAwC,MAAM,iDAAiD;AAEtG,SAASC,mCAAmCA,CAAE;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAQ,CAAC,EAAG;EAC5E,OACCC,aAAA,CAACV,MAAM;IACNW,SAAS,EAAC,mDAAmD;IAC7DF,OAAO,EAAGA;EAAS,GAEjBF,KAAK,IACNG,aAAA,CAACR,OAAO;IACPS,SAAS,EAAC,4DAA4D;IACtEC,KAAK,EAAG;EAAG,GAETL,KACM,CACT,EACCC,QACK,CAAC;AAEX;AAEA,SACCF,mCAAmC,EACnCF,sCAAsC,EACtCD,wCAAwC,EACxCE,wCAAwC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalText","Text","SidebarNavigationScreenDetailsPanelLabel","children","createElement","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelLabel( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__label\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;AAElE,eAAe,SAASC,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,OACCC,aAAA,CAACH,IAAI;IAACI,SAAS,EAAC;EAA0D,GACvEF,QACG,CAAC;AAET"}
1
+ {"version":3,"names":["__experimentalText","Text","SidebarNavigationScreenDetailsPanelLabel","children","createElement","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelLabel( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__label\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;AAElE,eAAe,SAASC,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,OACCC,aAAA,CAACH,IAAI;IAACI,SAAS,EAAC;EAA0D,GACvEF,QACG,CAAC;AAET","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","__experimentalHStack","HStack","SidebarNavigationScreenDetailsPanelRow","label","children","className","extraProps","createElement","key","spacing","alignment"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelRow( {\n\tlabel,\n\tchildren,\n\tclassName,\n\t...extraProps\n} ) {\n\treturn (\n\t\t<HStack\n\t\t\tkey={ label }\n\t\t\tspacing={ 5 }\n\t\t\talignment=\"left\"\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-details-screen-panel__row',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...extraProps }\n\t\t>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AAEtE,eAAe,SAASC,sCAAsCA,CAAE;EAC/DC,KAAK;EACLC,QAAQ;EACRC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH,OACCC,aAAA,CAACN,MAAM;IACNO,GAAG,EAAGL,KAAO;IACbM,OAAO,EAAG,CAAG;IACbC,SAAS,EAAC,MAAM;IAChBL,SAAS,EAAGN,UAAU,CACrB,wDAAwD,EACxDM,SACD,CAAG;IAAA,GACEC;EAAU,GAEbF,QACK,CAAC;AAEX"}
1
+ {"version":3,"names":["classnames","__experimentalHStack","HStack","SidebarNavigationScreenDetailsPanelRow","label","children","className","extraProps","createElement","key","spacing","alignment"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelRow( {\n\tlabel,\n\tchildren,\n\tclassName,\n\t...extraProps\n} ) {\n\treturn (\n\t\t<HStack\n\t\t\tkey={ label }\n\t\t\tspacing={ 5 }\n\t\t\talignment=\"left\"\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-details-screen-panel__row',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...extraProps }\n\t\t>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AAEtE,eAAe,SAASC,sCAAsCA,CAAE;EAC/DC,KAAK;EACLC,QAAQ;EACRC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH,OACCC,aAAA,CAACN,MAAM;IACNO,GAAG,EAAGL,KAAO;IACbM,OAAO,EAAG,CAAG;IACbC,SAAS,EAAC,MAAM;IAChBL,SAAS,EAAGN,UAAU,CACrB,wDAAwD,EACxDM,SACD,CAAG;IAAA,GACEC;EAAU,GAEbF,QACK,CAAC;AAEX","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalText","Text","SidebarNavigationScreenDetailsPanelValue","children","createElement","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelValue( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__value\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;AAElE,eAAe,SAASC,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,OACCC,aAAA,CAACH,IAAI;IAACI,SAAS,EAAC;EAA0D,GACvEF,QACG,CAAC;AAET"}
1
+ {"version":3,"names":["__experimentalText","Text","SidebarNavigationScreenDetailsPanelValue","children","createElement","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelValue( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__value\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,kBAAkB,IAAIC,IAAI,QAAQ,uBAAuB;AAElE,eAAe,SAASC,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,OACCC,aAAA,CAACH,IAAI;IAACI,SAAS,EAAC;EAA0D,GACvEF,QACG,CAAC;AAET","ignoreList":[]}
@@ -6,7 +6,7 @@ import { __ } from '@wordpress/i18n';
6
6
  import { edit, seen } from '@wordpress/icons';
7
7
  import { useSelect, useDispatch } from '@wordpress/data';
8
8
  import { store as coreStore } from '@wordpress/core-data';
9
- import { __experimentalNavigatorButton as NavigatorButton, __experimentalVStack as VStack } from '@wordpress/components';
9
+ import { __experimentalVStack as VStack } from '@wordpress/components';
10
10
  import { useViewportMatch } from '@wordpress/compose';
11
11
  import { BlockEditorProvider } from '@wordpress/block-editor';
12
12
  import { useCallback } from '@wordpress/element';
@@ -38,9 +38,8 @@ export function SidebarNavigationItemGlobalStyles(props) {
38
38
  } = unlock(useDispatch(editSiteStore));
39
39
  const hasGlobalStyleVariations = useSelect(select => !!select(coreStore).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, []);
40
40
  if (hasGlobalStyleVariations) {
41
- return createElement(NavigatorButton, {
41
+ return createElement(SidebarNavigationItem, {
42
42
  ...props,
43
- as: SidebarNavigationItem,
44
43
  path: "/wp_global_styles"
45
44
  });
46
45
  }
@@ -1 +1 @@
1
- {"version":3,"names":["__","edit","seen","useSelect","useDispatch","store","coreStore","__experimentalNavigatorButton","NavigatorButton","__experimentalVStack","VStack","useViewportMatch","BlockEditorProvider","useCallback","editorStore","preferencesStore","SidebarNavigationScreen","StyleVariationsContainer","unlock","editSiteStore","SidebarButton","SidebarNavigationItem","StyleBook","useGlobalStylesRevisions","SidebarNavigationScreenDetailsFooter","ColorVariations","TypographyVariations","useColorVariations","useTypographyVariations","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","setCanvasMode","hasGlobalStyleVariations","select","__experimentalGetCurrentThemeGlobalStylesVariations","length","createElement","as","path","onClick","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","colorVariations","typographyVariations","gap","settings","onChange","onInput","spacing","className","title","SidebarNavigationScreenGlobalStyles","revisions","isLoading","isLoadingRevisions","setIsListViewOpened","isMobileViewport","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","_globalStyles$_links$","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","set","setPreference","openGlobalStyles","Promise","all","openStyleBook","openRevisions","hasRevisions","modifiedDateTime","modified","shouldShowGlobalStylesFooter","Fragment","description","content","footer","record","actions","icon","label","isPressed","enableResizing","isSelected","onSelect","showCloseButton","showTabs"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { useCallback } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport ColorVariations from '../global-styles/variations/variations-color';\nimport TypographyVariations from '../global-styles/variations/variations-typography';\nimport {\n\tuseColorVariations,\n\tuseTypographyVariations,\n} from '../global-styles/hooks';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<NavigatorButton\n\t\t\t\t{ ...props }\n\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\tpath=\"/wp_global_styles\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst colorVariations = useColorVariations();\n\tconst typographyVariations = useTypographyVariations();\n\tconst gap = 3;\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<VStack\n\t\t\t\tspacing={ 10 }\n\t\t\t\tclassName=\"edit-site-global-styles-variation-container\"\n\t\t\t>\n\t\t\t\t<StyleVariationsContainer gap={ gap } />\n\t\t\t\t{ colorVariations?.length && (\n\t\t\t\t\t<ColorVariations title={ __( 'Colors' ) } gap={ gap } />\n\t\t\t\t) }\n\t\t\t\t{ typographyVariations?.length && (\n\t\t\t\t\t<TypographyVariations\n\t\t\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\t\t\tgap={ gap }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</BlockEditorProvider>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\treturn Promise.all( [\n\t\t\tsetPreference( 'core', 'distractionFree', false ),\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, setPreference ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }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BAAgB;EAEzD,OACC5C,aAAA,CAAA+C,QAAA,QACC/C,aAAA,CAACtB,uBAAuB;IACvBqC,KAAK,EAAGrD,EAAE,CAAE,QAAS,CAAG;IACxBsF,WAAW,EAAGtF,EAAE,CACf,4DACD,CAAG;IACHuF,OAAO,EAAGjD,aAAA,CAACI,0CAA0C,MAAE,CAAG;IAC1D8C,MAAM,EACLJ,4BAA4B,IAC3B9C,aAAA,CAACd,oCAAoC;MACpCiE,MAAM,EAAGlC,SAAS,GAAI,CAAC,CAAI;MAC3Bd,OAAO,EAAGuC;IAAe,CACzB,CAEF;IACDU,OAAO,EACNpD,aAAA,CAAA+C,QAAA,QACG,CAAE1B,gBAAgB,IACnBrB,aAAA,CAAClB,aAAa;MACbuE,IAAI,EAAGzF,IAAM;MACb0F,KAAK,EAAG5F,EAAE,CAAE,YAAa,CAAG;MAC5ByC,OAAO,EAAGA,CAAA,KACTmB,4BAA4B,CAC3B,CAAEE,iBAAiB,GAChB,YAAY,GACZS,SACJ,CACA;MACDsB,SAAS,EAAG/B;IAAmB,CAC/B,CACD,EACDxB,aAAA,CAAClB,aAAa;MACbuE,IAAI,EAAG1F,IAAM;MACb2F,KAAK,EAAG5F,EAAE,CAAE,aAAc,CAAG;MAC7ByC,OAAO,EAAG,MAAAA,CAAA,KAAY,MAAMmC,gBAAgB,CAAC;IAAG,CAChD,CACA;EACF,CACD,CAAC,EACAd,iBAAiB,IAAI,CAAEH,gBAAgB,IAAIE,UAAU,IACtDvB,aAAA,CAAChB,SAAS;IACTwE,cAAc,EAAG,KAAO;IACxBC,UAAU,EAAGA,CAAA,KAAM,KAAO;IAC1BtD,OAAO,EAAGsC,aAAe;IACzBiB,QAAQ,EAAGjB,aAAe;IAC1BkB,eAAe,EAAG,KAAO;IACzBC,QAAQ,EAAG;EAAO,CAClB,CAED,CAAC;AAEL"}
1
+ {"version":3,"names":["__","edit","seen","useSelect","useDispatch","store","coreStore","__experimentalVStack","VStack","useViewportMatch","BlockEditorProvider","useCallback","editorStore","preferencesStore","SidebarNavigationScreen","StyleVariationsContainer","unlock","editSiteStore","SidebarButton","SidebarNavigationItem","StyleBook","useGlobalStylesRevisions","SidebarNavigationScreenDetailsFooter","ColorVariations","TypographyVariations","useColorVariations","useTypographyVariations","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","setCanvasMode","hasGlobalStyleVariations","select","__experimentalGetCurrentThemeGlobalStylesVariations","length","createElement","path","onClick","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","colorVariations","typographyVariations","gap","settings","onChange","onInput","spacing","className","title","SidebarNavigationScreenGlobalStyles","revisions","isLoading","isLoadingRevisions","setIsListViewOpened","isMobileViewport","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","_globalStyles$_links$","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","set","setPreference","openGlobalStyles","Promise","all","openStyleBook","openRevisions","hasRevisions","modifiedDateTime","modified","shouldShowGlobalStylesFooter","Fragment","description","content","footer","record","actions","icon","label","isPressed","enableResizing","isSelected","onSelect","showCloseButton","showTabs"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { useCallback } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport ColorVariations from '../global-styles/variations/variations-color';\nimport TypographyVariations from '../global-styles/variations/variations-typography';\nimport {\n\tuseColorVariations,\n\tuseTypographyVariations,\n} from '../global-styles/hooks';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn <SidebarNavigationItem { ...props } path=\"/wp_global_styles\" />;\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst colorVariations = useColorVariations();\n\tconst typographyVariations = useTypographyVariations();\n\tconst gap = 3;\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<VStack\n\t\t\t\tspacing={ 10 }\n\t\t\t\tclassName=\"edit-site-global-styles-variation-container\"\n\t\t\t>\n\t\t\t\t<StyleVariationsContainer gap={ gap } />\n\t\t\t\t{ colorVariations?.length && (\n\t\t\t\t\t<ColorVariations title={ __( 'Colors' ) } gap={ gap } />\n\t\t\t\t) }\n\t\t\t\t{ typographyVariations?.length && (\n\t\t\t\t\t<TypographyVariations\n\t\t\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\t\t\tgap={ gap }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</BlockEditorProvider>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\treturn Promise.all( [\n\t\t\tsetPreference( 'core', 'distractionFree', false ),\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, setPreference ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ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mF,WAAW,EAAGnF,EAAE,CACf,4DACD,CAAG;IACHoF,OAAO,EAAGhD,aAAA,CAACG,0CAA0C,MAAE,CAAG;IAC1D8C,MAAM,EACLJ,4BAA4B,IAC3B7C,aAAA,CAACd,oCAAoC;MACpCgE,MAAM,EAAGlC,SAAS,GAAI,CAAC,CAAI;MAC3Bd,OAAO,EAAGuC;IAAe,CACzB,CAEF;IACDU,OAAO,EACNnD,aAAA,CAAA8C,QAAA,QACG,CAAE1B,gBAAgB,IACnBpB,aAAA,CAAClB,aAAa;MACbsE,IAAI,EAAGtF,IAAM;MACbuF,KAAK,EAAGzF,EAAE,CAAE,YAAa,CAAG;MAC5BsC,OAAO,EAAGA,CAAA,KACTmB,4BAA4B,CAC3B,CAAEE,iBAAiB,GAChB,YAAY,GACZS,SACJ,CACA;MACDsB,SAAS,EAAG/B;IAAmB,CAC/B,CACD,EACDvB,aAAA,CAAClB,aAAa;MACbsE,IAAI,EAAGvF,IAAM;MACbwF,KAAK,EAAGzF,EAAE,CAAE,aAAc,CAAG;MAC7BsC,OAAO,EAAG,MAAAA,CAAA,KAAY,MAAMmC,gBAAgB,CAAC;IAAG,CAChD,CACA;EACF,CACD,CAAC,EACAd,iBAAiB,IAAI,CAAEH,gBAAgB,IAAIE,UAAU,IACtDtB,aAAA,CAAChB,SAAS;IACTuE,cAAc,EAAG,KAAO;IACxBC,UAAU,EAAGA,CAAA,KAAM,KAAO;IAC1BtD,OAAO,EAAGsC,aAAe;IACzBiB,QAAQ,EAAGjB,aAAe;IAC1BkB,eAAe,EAAG,KAAO;IACzBC,QAAQ,EAAG;EAAO,CAClB,CAED,CAAC;AAEL","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement, Fragment } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
5
- import { __experimentalItemGroup as ItemGroup, __experimentalNavigatorButton as NavigatorButton, __experimentalUseNavigator as useNavigator } from '@wordpress/components';
5
+ import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';
6
6
  import { __ } from '@wordpress/i18n';
7
7
  import { layout, symbol, navigation, styles, page } from '@wordpress/icons';
8
8
  import { useDispatch } from '@wordpress/data';
@@ -17,43 +17,34 @@ import { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-
17
17
  import { unlock } from '../../lock-unlock';
18
18
  import { store as editSiteStore } from '../../store';
19
19
  export default function SidebarNavigationScreenMain() {
20
- const {
21
- location
22
- } = useNavigator();
23
20
  const {
24
21
  setEditorCanvasContainerView
25
22
  } = unlock(useDispatch(editSiteStore));
26
23
 
27
24
  // Clear the editor canvas container view when accessing the main navigation screen.
28
25
  useEffect(() => {
29
- if (location?.path === '/') {
30
- setEditorCanvasContainerView(undefined);
31
- }
32
- }, [setEditorCanvasContainerView, location?.path]);
26
+ setEditorCanvasContainerView(undefined);
27
+ }, [setEditorCanvasContainerView]);
33
28
  return createElement(SidebarNavigationScreen, {
34
29
  isRoot: true,
35
30
  title: __('Design'),
36
31
  description: __('Customize the appearance of your website using the block editor.'),
37
- content: createElement(Fragment, null, createElement(ItemGroup, null, createElement(NavigatorButton, {
38
- as: SidebarNavigationItem,
32
+ content: createElement(Fragment, null, createElement(ItemGroup, null, createElement(SidebarNavigationItem, {
39
33
  path: "/navigation",
40
34
  withChevron: true,
41
35
  icon: navigation
42
36
  }, __('Navigation')), createElement(SidebarNavigationItemGlobalStyles, {
43
37
  withChevron: true,
44
38
  icon: styles
45
- }, __('Styles')), createElement(NavigatorButton, {
46
- as: SidebarNavigationItem,
39
+ }, __('Styles')), createElement(SidebarNavigationItem, {
47
40
  path: "/page",
48
41
  withChevron: true,
49
42
  icon: page
50
- }, __('Pages')), createElement(NavigatorButton, {
51
- as: SidebarNavigationItem,
43
+ }, __('Pages')), createElement(SidebarNavigationItem, {
52
44
  path: "/wp_template",
53
45
  withChevron: true,
54
46
  icon: layout
55
- }, __('Templates')), createElement(NavigatorButton, {
56
- as: SidebarNavigationItem,
47
+ }, __('Templates')), createElement(SidebarNavigationItem, {
57
48
  path: "/patterns",
58
49
  withChevron: true,
59
50
  icon: symbol
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalItemGroup","ItemGroup","__experimentalNavigatorButton","NavigatorButton","__experimentalUseNavigator","useNavigator","__","layout","symbol","navigation","styles","page","useDispatch","useEffect","SidebarNavigationScreen","SidebarNavigationItem","SidebarNavigationItemGlobalStyles","unlock","store","editSiteStore","SidebarNavigationScreenMain","location","setEditorCanvasContainerView","path","undefined","createElement","isRoot","title","description","content","Fragment","as","withChevron","icon"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-main/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalUseNavigator as useNavigator,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { layout, symbol, navigation, styles, page } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\n\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nexport default function SidebarNavigationScreenMain() {\n\tconst { location } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\t// Clear the editor canvas container view when accessing the main navigation screen.\n\tuseEffect( () => {\n\t\tif ( location?.path === '/' ) {\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t}\n\t}, [ setEditorCanvasContainerView, location?.path ] );\n\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<>\n\t\t\t\t\t<ItemGroup>\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\t<SidebarNavigationItemGlobalStyles\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</SidebarNavigationItemGlobalStyles>\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=\"/page\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ page }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Pages' ) }\n\t\t\t\t\t\t</NavigatorButton>\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_template\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Templates' ) }\n\t\t\t\t\t\t</NavigatorButton>\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=\"/patterns\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Patterns' ) }\n\t\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,uB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AC,EAClBmB,aAAA,CAACT,iCAAiC;MACjCgB,WAAW;MACXC,IAAI,EAAGvB;IAAQ,GAEbJ,EAAE,CAAE,QAAS,CACmB,CAAC,EACpCmB,aAAA,CAACtB,eAAe;MACf4B,EAAE,EAAGhB,qBAAuB;MAC5BQ,IAAI,EAAC,OAAO;MACZS,WAAW;MACXC,IAAI,EAAGtB;IAAM,GAEXL,EAAE,CAAE,OAAQ,CACE,CAAC,EAClBmB,aAAA,CAACtB,eAAe;MACf4B,EAAE,EAAGhB,qBAAuB;MAC5BQ,IAAI,EAAC,cAAc;MACnBS,WAAW;MACXC,IAAI,EAAG1B;IAAQ,GAEbD,EAAE,CAAE,WAAY,CACF,CAAC,EAClBmB,aAAA,CAACtB,eAAe;MACf4B,EAAE,EAAGhB,qBAAuB;MAC5BQ,IAAI,EAAC,WAAW;MAChBS,WAAW;MACXC,IAAI,EAAGzB;IAAQ,GAEbF,EAAE,CAAE,UAAW,CACD,CACP,CACV;EACF,CACD,CAAC;AAEJ"}
1
+ {"version":3,"names":["__experimentalItemGroup","ItemGroup","__","layout","symbol","navigation","styles","page","useDispatch","useEffect","SidebarNavigationScreen","SidebarNavigationItem","SidebarNavigationItemGlobalStyles","unlock","store","editSiteStore","SidebarNavigationScreenMain","setEditorCanvasContainerView","undefined","createElement","isRoot","title","description","content","Fragment","path","withChevron","icon"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-main/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { layout, symbol, navigation, styles, page } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nexport default function SidebarNavigationScreenMain() {\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\t// Clear the editor canvas container view when accessing the main navigation screen.\n\tuseEffect( () => {\n\t\tsetEditorCanvasContainerView( undefined );\n\t}, [ setEditorCanvasContainerView ] );\n\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<>\n\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t<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</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItemGlobalStyles\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</SidebarNavigationItemGlobalStyles>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tpath=\"/page\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ page }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Pages' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tpath=\"/wp_template\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Templates' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\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tB;IAAY,GAEjBH,EAAE,CAAE,YAAa,CACG,CAAC,EACxBiB,aAAA,CAACP,iCAAiC;MACjCc,WAAW;MACXC,IAAI,EAAGrB;IAAQ,GAEbJ,EAAE,CAAE,QAAS,CACmB,CAAC,EACpCiB,aAAA,CAACR,qBAAqB;MACrBc,IAAI,EAAC,OAAO;MACZC,WAAW;MACXC,IAAI,EAAGpB;IAAM,GAEXL,EAAE,CAAE,OAAQ,CACQ,CAAC,EACxBiB,aAAA,CAACR,qBAAqB;MACrBc,IAAI,EAAC,cAAc;MACnBC,WAAW;MACXC,IAAI,EAAGxB;IAAQ,GAEbD,EAAE,CAAE,WAAY,CACI,CAAC,EACxBiB,aAAA,CAACR,qBAAqB;MACrBc,IAAI,EAAC,WAAW;MAChBC,WAAW;MACXC,IAAI,EAAGvB;IAAQ,GAEbF,EAAE,CAAE,UAAW,CACK,CACb,CACV;EACF,CACD,CAAC;AAEJ","ignoreList":[]}
@@ -18,6 +18,6 @@ export default function DeleteConfirmDialog({
18
18
  },
19
19
  onCancel: onClose,
20
20
  confirmButtonText: __('Delete')
21
- }, __('Are you sure you want to delete this Navigation menu?'));
21
+ }, __('Are you sure you want to delete this Navigation Menu?'));
22
22
  }
23
23
  //# sourceMappingURL=delete-confirm-dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalConfirmDialog","ConfirmDialog","__","DeleteConfirmDialog","onClose","onConfirm","createElement","isOpen","onCancel","confirmButtonText"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function DeleteConfirmDialog( { onClose, onConfirm } ) {\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen\n\t\t\tonConfirm={ () => {\n\t\t\t\tonConfirm();\n\n\t\t\t\t// Immediate close avoids ability to hit delete multiple times.\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t\tonCancel={ onClose }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t>\n\t\t\t{ __( 'Are you sure you want to delete this Navigation menu?' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,2BAA2B,IAAIC,aAAa,QAAQ,uBAAuB;AACpF,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,eAAe,SAASC,mBAAmBA,CAAE;EAAEC,OAAO;EAAEC;AAAU,CAAC,EAAG;EACrE,OACCC,aAAA,CAACL,aAAa;IACbM,MAAM;IACNF,SAAS,EAAGA,CAAA,KAAM;MACjBA,SAAS,CAAC,CAAC;;MAEX;MACAD,OAAO,CAAC,CAAC;IACV,CAAG;IACHI,QAAQ,EAAGJ,OAAS;IACpBK,iBAAiB,EAAGP,EAAE,CAAE,QAAS;EAAG,GAElCA,EAAE,CAAE,uDAAwD,CAChD,CAAC;AAElB"}
1
+ {"version":3,"names":["__experimentalConfirmDialog","ConfirmDialog","__","DeleteConfirmDialog","onClose","onConfirm","createElement","isOpen","onCancel","confirmButtonText"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function DeleteConfirmDialog( { onClose, onConfirm } ) {\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen\n\t\t\tonConfirm={ () => {\n\t\t\t\tonConfirm();\n\n\t\t\t\t// Immediate close avoids ability to hit delete multiple times.\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t\tonCancel={ onClose }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t>\n\t\t\t{ __( 'Are you sure you want to delete this Navigation Menu?' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,2BAA2B,IAAIC,aAAa,QAAQ,uBAAuB;AACpF,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,eAAe,SAASC,mBAAmBA,CAAE;EAAEC,OAAO;EAAEC;AAAU,CAAC,EAAG;EACrE,OACCC,aAAA,CAACL,aAAa;IACbM,MAAM;IACNF,SAAS,EAAGA,CAAA,KAAM;MACjBA,SAAS,CAAC,CAAC;;MAEX;MACAD,OAAO,CAAC,CAAC;IACV,CAAG;IACHI,QAAQ,EAAGJ,OAAS;IACpBK,iBAAiB,EAAGP,EAAE,CAAE,QAAS;EAAG,GAElCA,EAAE,CAAE,uDAAwD,CAChD,CAAC;AAElB","ignoreList":[]}
@@ -3,10 +3,11 @@ import { createElement } from "react";
3
3
  * WordPress dependencies
4
4
  */
5
5
  import { useEntityRecord, store as coreStore } from '@wordpress/core-data';
6
- import { __experimentalUseNavigator as useNavigator, Spinner } from '@wordpress/components';
6
+ import { Spinner } from '@wordpress/components';
7
7
  import { __ } from '@wordpress/i18n';
8
8
  import { useSelect } from '@wordpress/data';
9
9
  import { decodeEntities } from '@wordpress/html-entities';
10
+ import { privateApis as routerPrivateApis } from '@wordpress/router';
10
11
 
11
12
  /**
12
13
  * Internal dependencies
@@ -16,13 +17,17 @@ import ScreenNavigationMoreMenu from './more-menu';
16
17
  import SingleNavigationMenu from './single-navigation-menu';
17
18
  import useNavigationMenuHandlers from './use-navigation-menu-handlers';
18
19
  import buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';
20
+ import { unlock } from '../../lock-unlock';
21
+ const {
22
+ useLocation
23
+ } = unlock(routerPrivateApis);
19
24
  export const postType = `wp_navigation`;
20
25
  export default function SidebarNavigationScreenNavigationMenu() {
21
26
  const {
22
27
  params: {
23
28
  postId
24
29
  }
25
- } = useNavigator();
30
+ } = useLocation();
26
31
  const {
27
32
  record: navigationMenu,
28
33
  isResolving
@@ -52,7 +57,7 @@ export default function SidebarNavigationScreenNavigationMenu() {
52
57
  const _handleDuplicate = () => handleDuplicate(navigationMenu);
53
58
  if (isLoading) {
54
59
  return createElement(SidebarNavigationScreenWrapper, {
55
- description: __('Navigation menus are a curated collection of blocks that allow visitors to get around your site.')
60
+ description: __('Navigation Menus are a curated collection of blocks that allow visitors to get around your site.')
56
61
  }, createElement(Spinner, {
57
62
  className: "edit-site-sidebar-navigation-screen-navigation-menus__loading"
58
63
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["useEntityRecord","store","coreStore","__experimentalUseNavigator","useNavigator","Spinner","__","useSelect","decodeEntities","SidebarNavigationScreenWrapper","ScreenNavigationMoreMenu","SingleNavigationMenu","useNavigationMenuHandlers","buildNavigationLabel","postType","SidebarNavigationScreenNavigationMenu","params","postId","record","navigationMenu","isResolving","isSaving","isDeleting","select","isSavingEntityRecord","isDeletingEntityRecord","isLoading","menuTitle","title","rendered","slug","handleSave","handleDelete","handleDuplicate","_handleDelete","_handleSave","edits","_handleDuplicate","createElement","description","className","content","raw","actions","onDelete","onSave","onDuplicate","id","status"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\tSpinner,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu() {\n\tconst {\n\t\tparams: { postId },\n\t} = useNavigator();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\thandleDelete={ _handleDelete }\n\t\t\thandleSave={ _handleSave }\n\t\t\thandleDuplicate={ _handleDuplicate }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AAC1E,SACCC,0BAA0B,IAAIC,YAAY,EAC1CC,OAAO,QACD,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA,SAASC,8BAA8B,QAAQ,+CAA+C;AAC9F,OAAOC,wBAAwB,MAAM,aAAa;AAClD,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,yBAAyB,MAAM,gCAAgC;AACtE,OAAOC,oBAAoB,MAAM,sEAAsE;AAEvG,OAAO,MAAMC,QAAQ,GAAI,eAAc;AAEvC,eAAe,SAASC,qCAAqCA,CAAA,EAAG;EAC/D,MAAM;IACLC,MAAM,EAAE;MAAEC;IAAO;EAClB,CAAC,GAAGb,YAAY,CAAC,CAAC;EAElB,MAAM;IAAEc,MAAM,EAAEC,cAAc;IAAEC;EAAY,CAAC,GAAGpB,eAAe,CAC9D,UAAU,EACVc,QAAQ,EACRG,MACD,CAAC;EAED,MAAM;IAAEI,QAAQ;IAAEC;EAAW,CAAC,GAAGf,SAAS,CACvC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AwB;QACxBiB,SAAS,EAAGnB,cAAc,CAAEmB,SAAU,CAAG;QACzCiB,QAAQ,EAAGV,aAAe;QAC1BW,MAAM,EAAGV,WAAa;QACtBW,WAAW,EAAGT;MAAkB,CAChC,CACD;MACDT,KAAK,EAAGf,oBAAoB,CAC3BM,cAAc,EAAES,KAAK,EACrBT,cAAc,EAAE4B,EAAE,EAClB5B,cAAc,EAAE6B,MACjB,CAAG;MACHT,WAAW,EAAGjC,EAAE,CAAE,gCAAiC;IAAG,CACtD,CAAC;EAEJ;EAEA,OACCgC,aAAA,CAAC3B,oBAAoB;IACpBQ,cAAc,EAAGA,cAAgB;IACjCa,YAAY,EAAGE,aAAe;IAC9BH,UAAU,EAAGI,WAAa;IAC1BF,eAAe,EAAGI;EAAkB,CACpC,CAAC;AAEJ"}
1
+ {"version":3,"names":["useEntityRecord","store","coreStore","Spinner","__","useSelect","decodeEntities","privateApis","routerPrivateApis","SidebarNavigationScreenWrapper","ScreenNavigationMoreMenu","SingleNavigationMenu","useNavigationMenuHandlers","buildNavigationLabel","unlock","useLocation","postType","SidebarNavigationScreenNavigationMenu","params","postId","record","navigationMenu","isResolving","isSaving","isDeleting","select","isSavingEntityRecord","isDeletingEntityRecord","isLoading","menuTitle","title","rendered","slug","handleSave","handleDelete","handleDuplicate","_handleDelete","_handleSave","edits","_handleDuplicate","createElement","description","className","content","raw","actions","onDelete","onSave","onDuplicate","id","status"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { Spinner } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu() {\n\tconst {\n\t\tparams: { postId },\n\t} = useLocation();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\thandleDelete={ _handleDelete }\n\t\t\thandleSave={ _handleSave }\n\t\t\thandleDuplicate={ _handleDuplicate }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AAC1E,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA,SAASC,8BAA8B,QAAQ,+CAA+C;AAC9F,OAAOC,wBAAwB,MAAM,aAAa;AAClD,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,yBAAyB,MAAM,gCAAgC;AACtE,OAAOC,oBAAoB,MAAM,sEAAsE;AACvG,SAASC,MA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CAAC/B,8BAA8B;MAC9BgC,WAAW,EAAGrC,EAAE,CACf,kGACD;IAAG,GAEHoC,aAAA,CAACrC,OAAO;MAACuC,SAAS,EAAC;IAA+D,CAAE,CACrD,CAAC;EAEnC;EAEA,IAAK,CAAEd,SAAS,IAAI,CAAEP,cAAc,EAAG;IACtC,OACCmB,aAAA,CAAC/B,8BAA8B;MAC9BgC,WAAW,EAAGrC,EAAE,CAAE,0BAA2B;IAAG,CAChD,CAAC;EAEJ;EAEA,IAAK,CAAEiB,cAAc,EAAEsB,OAAO,EAAEC,GAAG,EAAG;IACrC,OACCJ,aAAA,CAAC/B,8BAA8B;MAC9BoC,OAAO,EACNL,aAAA,CAAC9B,wBAAwB;QACxBmB,SAAS,EAAGvB,cAAc,CAAEuB,SAAU,CAAG;QACzCiB,QAAQ,EAAGV,aAAe;QAC1BW,MAAM,EAAGV,WAAa;QACtBW,WAAW,EAAGT;MAAkB,CAChC,CACD;MACDT,KAAK,EAAGjB,oBAAoB,CAC3BQ,cAAc,EAAES,KAAK,EACrBT,cAAc,EAAE4B,EAAE,EAClB5B,cAAc,EAAE6B,MACjB,CAAG;MACHT,WAAW,EAAGrC,EAAE,CAAE,gCAAiC;IAAG,CACtD,CAAC;EAEJ;EAEA,OACCoC,aAAA,CAAC7B,oBAAoB;IACpBU,cAAc,EAAGA,cAAgB;IACjCa,YAAY,EAAGE,aAAe;IAC9BH,UAAU,EAAGI,WAAa;IAC1BF,eAAe,EAAGI;EAAkB,CACpC,CAAC;AAEJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["DropdownMenu","MenuItem","MenuGroup","moreVertical","__","useState","RenameModal","DeleteConfirmDialog","POPOVER_PROPS","position","ScreenNavigationMoreMenu","props","onDelete","onSave","onDuplicate","menuTitle","renameModalOpen","setRenameModalOpen","deleteConfirmDialogOpen","setDeleteConfirmDialogOpen","closeModals","openRenameModal","openDeleteConfirmDialog","createElement","Fragment","className","label","icon","popoverProps","onClose","onClick","isDestructive","onConfirm"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RenameModal from './rename-modal';\nimport DeleteConfirmDialog from './delete-confirm-dialog';\n\nconst POPOVER_PROPS = {\n\tposition: 'bottom right',\n};\n\nexport default function ScreenNavigationMoreMenu( props ) {\n\tconst { onDelete, onSave, onDuplicate, menuTitle } = props;\n\n\tconst [ renameModalOpen, setRenameModalOpen ] = useState( false );\n\tconst [ deleteConfirmDialogOpen, setDeleteConfirmDialogOpen ] =\n\t\tuseState( false );\n\n\tconst closeModals = () => {\n\t\tsetRenameModalOpen( false );\n\t\tsetDeleteConfirmDialogOpen( false );\n\t};\n\tconst openRenameModal = () => setRenameModalOpen( true );\n\tconst openDeleteConfirmDialog = () => setDeleteConfirmDialogOpen( true );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tclassName=\"sidebar-navigation__more-menu\"\n\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenRenameModal();\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Rename' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonDuplicate();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Duplicate' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenDeleteConfirmDialog();\n\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t{ deleteConfirmDialogOpen && (\n\t\t\t\t<DeleteConfirmDialog\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tonConfirm={ onDelete }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ renameModalOpen && (\n\t\t\t\t<RenameModal\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tmenuTitle={ menuTitle }\n\t\t\t\t\tonSave={ onSave }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,uBAAuB;AACzE,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,mBAAmB,MAAM,yBAAyB;AAEzD,MAAMC,aAAa,GAAG;EACrBC,QAAQ,EAAE;AACX,CAAC;AAED,eAAe,SAASC,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,CAAC,CAAC;IACV;EAAG,GAEDzB,EAAE,CAAE,QAAS,CACN,CACA,CACP,CAEO,CAAC,EACbc,uBAAuB,IACxBK,aAAA,CAAChB,mBAAmB;IACnBsB,OAAO,EAAGT,WAAa;IACvBY,SAAS,EAAGpB;EAAU,CACtB,CACD,EACCI,eAAe,IAChBO,aAAA,CAACjB,WAAW;IACXuB,OAAO,EAAGT,WAAa;IACvBL,SAAS,EAAGA,SAAW;IACvBF,MAAM,EAAGA;EAAQ,CACjB,CAED,CAAC;AAEL"}
1
+ {"version":3,"names":["DropdownMenu","MenuItem","MenuGroup","moreVertical","__","useState","RenameModal","DeleteConfirmDialog","POPOVER_PROPS","position","ScreenNavigationMoreMenu","props","onDelete","onSave","onDuplicate","menuTitle","renameModalOpen","setRenameModalOpen","deleteConfirmDialogOpen","setDeleteConfirmDialogOpen","closeModals","openRenameModal","openDeleteConfirmDialog","createElement","Fragment","className","label","icon","popoverProps","onClose","onClick","isDestructive","onConfirm"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RenameModal from './rename-modal';\nimport DeleteConfirmDialog from './delete-confirm-dialog';\n\nconst POPOVER_PROPS = {\n\tposition: 'bottom right',\n};\n\nexport default function ScreenNavigationMoreMenu( props ) {\n\tconst { onDelete, onSave, onDuplicate, menuTitle } = props;\n\n\tconst [ renameModalOpen, setRenameModalOpen ] = useState( false );\n\tconst [ deleteConfirmDialogOpen, setDeleteConfirmDialogOpen ] =\n\t\tuseState( false );\n\n\tconst closeModals = () => {\n\t\tsetRenameModalOpen( false );\n\t\tsetDeleteConfirmDialogOpen( false );\n\t};\n\tconst openRenameModal = () => setRenameModalOpen( true );\n\tconst openDeleteConfirmDialog = () => setDeleteConfirmDialogOpen( true );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tclassName=\"sidebar-navigation__more-menu\"\n\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenRenameModal();\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Rename' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonDuplicate();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Duplicate' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenDeleteConfirmDialog();\n\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t{ deleteConfirmDialogOpen && (\n\t\t\t\t<DeleteConfirmDialog\n\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