@wordpress/edit-site 5.35.0 → 6.0.1

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 (905) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/components/add-new-page/index.js +33 -27
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +95 -78
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +35 -30
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +119 -95
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +87 -71
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/utils.js +36 -17
  13. package/build/components/add-new-template/utils.js.map +1 -1
  14. package/build/components/app/index.js +10 -4
  15. package/build/components/app/index.js.map +1 -1
  16. package/build/components/block-editor/block-inspector-button.js +5 -4
  17. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  18. package/build/components/block-editor/inserter-media-categories.js +1 -1
  19. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  20. package/build/components/block-editor/use-editor-iframe-props.js +88 -0
  21. package/build/components/block-editor/use-editor-iframe-props.js.map +1 -0
  22. package/build/components/canvas-loader/index.js +13 -12
  23. package/build/components/canvas-loader/index.js.map +1 -1
  24. package/build/components/dataviews-actions/index.js +7 -4
  25. package/build/components/dataviews-actions/index.js.map +1 -1
  26. package/build/components/editor/index.js +86 -182
  27. package/build/components/editor/index.js.map +1 -1
  28. package/build/components/editor/use-editor-title.js +39 -0
  29. package/build/components/editor/use-editor-title.js.map +1 -0
  30. package/build/components/editor-canvas-container/index.js +27 -29
  31. package/build/components/editor-canvas-container/index.js.map +1 -1
  32. package/build/components/error-boundary/index.js +2 -2
  33. package/build/components/error-boundary/index.js.map +1 -1
  34. package/build/components/error-boundary/warning.js +13 -11
  35. package/build/components/error-boundary/warning.js.map +1 -1
  36. package/build/components/global-styles/background-panel.js +6 -5
  37. package/build/components/global-styles/background-panel.js.map +1 -1
  38. package/build/components/global-styles/block-preview-panel.js +19 -17
  39. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  40. package/build/components/global-styles/color-indicator-wrapper.js +2 -2
  41. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  42. package/build/components/global-styles/color-palette-panel.js +30 -29
  43. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  44. package/build/components/global-styles/dimensions-panel.js +2 -2
  45. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  46. package/build/components/global-styles/font-families.js +55 -39
  47. package/build/components/global-styles/font-families.js.map +1 -1
  48. package/build/components/global-styles/font-family-item.js +17 -13
  49. package/build/components/global-styles/font-family-item.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/collection-font-variant.js +25 -22
  51. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/context.js +7 -30
  53. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/font-card.js +24 -16
  55. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/font-collection.js +195 -152
  57. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/font-demo.js +14 -12
  59. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +29 -20
  61. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/index.js +41 -36
  63. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/installed-fonts.js +153 -109
  65. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/library-font-details.js +16 -14
  67. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  68. package/build/components/global-styles/font-library-modal/library-font-variant.js +25 -22
  69. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  70. package/build/components/global-styles/font-library-modal/upload-fonts.js +40 -34
  71. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  72. package/build/components/global-styles/font-library-modal/utils/index.js +3 -3
  73. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  74. package/build/components/global-styles/gradients-palette-panel.js +41 -37
  75. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  76. package/build/components/global-styles/header.js +37 -28
  77. package/build/components/global-styles/header.js.map +1 -1
  78. package/build/components/global-styles/highlighted-colors.js +3 -4
  79. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  80. package/build/components/global-styles/hooks.js +11 -23
  81. package/build/components/global-styles/hooks.js.map +1 -1
  82. package/build/components/global-styles/icon-with-current-color.js +2 -2
  83. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  84. package/build/components/global-styles/navigation-button.js +15 -11
  85. package/build/components/global-styles/navigation-button.js.map +1 -1
  86. package/build/components/global-styles/palette.js +39 -32
  87. package/build/components/global-styles/palette.js.map +1 -1
  88. package/build/components/global-styles/preset-colors.js +3 -4
  89. package/build/components/global-styles/preset-colors.js.map +1 -1
  90. package/build/components/global-styles/preview-colors.js +22 -20
  91. package/build/components/global-styles/preview-colors.js.map +1 -1
  92. package/build/components/global-styles/preview-iframe.js +34 -29
  93. package/build/components/global-styles/preview-iframe.js.map +1 -1
  94. package/build/components/global-styles/preview-styles.js +95 -90
  95. package/build/components/global-styles/preview-styles.js.map +1 -1
  96. package/build/components/global-styles/root-menu.js +28 -21
  97. package/build/components/global-styles/root-menu.js.map +1 -1
  98. package/build/components/global-styles/screen-background.js +6 -4
  99. package/build/components/global-styles/screen-background.js.map +1 -1
  100. package/build/components/global-styles/screen-block-list.js +33 -27
  101. package/build/components/global-styles/screen-block-list.js.map +1 -1
  102. package/build/components/global-styles/screen-block.js +62 -53
  103. package/build/components/global-styles/screen-block.js.map +1 -1
  104. package/build/components/global-styles/screen-color-palette.js +29 -19
  105. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  106. package/build/components/global-styles/screen-colors.js +18 -14
  107. package/build/components/global-styles/screen-colors.js.map +1 -1
  108. package/build/components/global-styles/screen-css.js +20 -14
  109. package/build/components/global-styles/screen-css.js.map +1 -1
  110. package/build/components/global-styles/screen-layout.js +9 -4
  111. package/build/components/global-styles/screen-layout.js.map +1 -1
  112. package/build/components/global-styles/screen-revisions/index.js +52 -42
  113. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  114. package/build/components/global-styles/screen-revisions/revisions-buttons.js +81 -70
  115. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  116. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  117. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  118. package/build/components/global-styles/screen-root.js +76 -42
  119. package/build/components/global-styles/screen-root.js.map +1 -1
  120. package/build/components/global-styles/screen-shadows.js +22 -0
  121. package/build/components/global-styles/screen-shadows.js.map +1 -0
  122. package/build/components/global-styles/screen-style-variations.js +14 -9
  123. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  124. package/build/components/global-styles/screen-typography-element.js +50 -45
  125. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  126. package/build/components/global-styles/screen-typography.js +15 -11
  127. package/build/components/global-styles/screen-typography.js.map +1 -1
  128. package/build/components/global-styles/shadow-utils.js +230 -0
  129. package/build/components/global-styles/shadow-utils.js.map +1 -0
  130. package/build/components/global-styles/shadows-edit-panel.js +458 -0
  131. package/build/components/global-styles/shadows-edit-panel.js.map +1 -0
  132. package/build/components/global-styles/shadows-panel.js +128 -0
  133. package/build/components/global-styles/shadows-panel.js.map +1 -0
  134. package/build/components/global-styles/style-variations-container.js +67 -18
  135. package/build/components/global-styles/style-variations-container.js.map +1 -1
  136. package/build/components/global-styles/subtitle.js +5 -4
  137. package/build/components/global-styles/subtitle.js.map +1 -1
  138. package/build/components/global-styles/typography-elements.js +53 -45
  139. package/build/components/global-styles/typography-elements.js.map +1 -1
  140. package/build/components/global-styles/typography-example.js +11 -8
  141. package/build/components/global-styles/typography-example.js.map +1 -1
  142. package/build/components/global-styles/typography-panel.js +2 -2
  143. package/build/components/global-styles/typography-panel.js.map +1 -1
  144. package/build/components/global-styles/typography-preview.js +5 -4
  145. package/build/components/global-styles/typography-preview.js.map +1 -1
  146. package/build/components/global-styles/ui.js +124 -92
  147. package/build/components/global-styles/ui.js.map +1 -1
  148. package/build/components/global-styles/utils.js +28 -0
  149. package/build/components/global-styles/utils.js.map +1 -1
  150. package/build/components/global-styles/variations/variation.js +27 -22
  151. package/build/components/global-styles/variations/variation.js.map +1 -1
  152. package/build/components/global-styles/variations/variations-color.js +18 -13
  153. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  154. package/build/components/global-styles/variations/variations-panel.js +27 -17
  155. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  156. package/build/components/global-styles/variations/variations-typography.js +37 -31
  157. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  158. package/build/components/global-styles-renderer/index.js +5 -1
  159. package/build/components/global-styles-renderer/index.js.map +1 -1
  160. package/build/components/global-styles-sidebar/default-sidebar.js +22 -18
  161. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  162. package/build/components/global-styles-sidebar/index.js +36 -26
  163. package/build/components/global-styles-sidebar/index.js.map +1 -1
  164. package/build/components/layout/index.js +92 -118
  165. package/build/components/layout/index.js.map +1 -1
  166. package/build/components/layout/router.js +83 -103
  167. package/build/components/layout/router.js.map +1 -1
  168. package/build/components/media/index.js +2 -2
  169. package/build/components/media/index.js.map +1 -1
  170. package/build/components/{header-edit-mode/more-menu → more-menu}/index.js +7 -3
  171. package/build/components/more-menu/index.js.map +1 -0
  172. package/build/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
  173. package/build/components/more-menu/site-export.js.map +1 -0
  174. package/build/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
  175. package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  176. package/build/components/page/header.js +24 -20
  177. package/build/components/page/header.js.map +1 -1
  178. package/build/components/page/index.js +12 -10
  179. package/build/components/page/index.js.map +1 -1
  180. package/build/components/page-pages/index.js +133 -52
  181. package/build/components/page-pages/index.js.map +1 -1
  182. package/build/components/page-patterns/delete-category-menu-item.js +23 -20
  183. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  184. package/build/components/page-patterns/header.js +47 -32
  185. package/build/components/page-patterns/header.js.map +1 -1
  186. package/build/components/page-patterns/index.js +116 -110
  187. package/build/components/page-patterns/index.js.map +1 -1
  188. package/build/components/page-patterns/rename-category-menu-item.js +14 -11
  189. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  190. package/build/components/page-patterns/use-patterns.js +7 -6
  191. package/build/components/page-patterns/use-patterns.js.map +1 -1
  192. package/build/components/page-templates/index.js +78 -59
  193. package/build/components/page-templates/index.js.map +1 -1
  194. package/build/components/pagination/index.js +59 -41
  195. package/build/components/pagination/index.js.map +1 -1
  196. package/build/components/plugin-template-setting-panel/index.js +4 -2
  197. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  198. package/build/components/resizable-frame/index.js +38 -32
  199. package/build/components/resizable-frame/index.js.map +1 -1
  200. package/build/components/revisions/index.js +26 -20
  201. package/build/components/revisions/index.js.map +1 -1
  202. package/build/components/routes/link.js +5 -4
  203. package/build/components/routes/link.js.map +1 -1
  204. package/build/components/save-button/index.js +5 -4
  205. package/build/components/save-button/index.js.map +1 -1
  206. package/build/components/save-hub/index.js +12 -11
  207. package/build/components/save-hub/index.js.map +1 -1
  208. package/build/components/save-panel/index.js +34 -28
  209. package/build/components/save-panel/index.js.map +1 -1
  210. package/build/components/sidebar/index.js +14 -11
  211. package/build/components/sidebar/index.js.map +1 -1
  212. package/build/components/sidebar-button/index.js +2 -2
  213. package/build/components/sidebar-button/index.js.map +1 -1
  214. package/build/components/sidebar-dataviews/add-new-view.js +56 -48
  215. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  216. package/build/components/sidebar-dataviews/custom-dataviews-list.js +106 -89
  217. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  218. package/build/components/sidebar-dataviews/dataview-item.js +18 -12
  219. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  220. package/build/components/sidebar-dataviews/default-views.js +48 -0
  221. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  222. package/build/components/sidebar-dataviews/index.js +21 -22
  223. package/build/components/sidebar-dataviews/index.js.map +1 -1
  224. package/build/components/sidebar-navigation-item/index.js +27 -25
  225. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  226. package/build/components/sidebar-navigation-screen/index.js +51 -39
  227. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-details-footer/index.js +24 -17
  229. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-details-panel/index.js +9 -7
  231. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  232. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
  233. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +5 -5
  235. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
  237. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-global-styles/index.js +54 -45
  239. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-main/index.js +45 -22
  241. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
  243. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +11 -10
  245. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  246. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +53 -42
  247. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
  249. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +43 -36
  251. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +16 -13
  253. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  255. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +27 -23
  257. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +50 -35
  259. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +12 -9
  261. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
  263. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  264. package/build/components/sidebar-navigation-screen-patterns/index.js +59 -64
  265. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  266. package/build/components/sidebar-navigation-screen-templates-browse/content.js +17 -17
  267. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  268. package/build/components/sidebar-navigation-screen-templates-browse/index.js +4 -4
  269. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  270. package/build/components/site-hub/index.js +52 -133
  271. package/build/components/site-hub/index.js.map +1 -1
  272. package/build/components/site-icon/index.js +8 -7
  273. package/build/components/site-icon/index.js.map +1 -1
  274. package/build/components/style-book/index.js +115 -99
  275. package/build/components/style-book/index.js.map +1 -1
  276. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +10 -30
  277. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  278. package/build/components/table/index.js +23 -15
  279. package/build/components/table/index.js.map +1 -1
  280. package/build/components/template-part-converter/convert-to-regular.js +5 -4
  281. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  282. package/build/components/template-part-converter/convert-to-template-part.js +23 -17
  283. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  284. package/build/components/template-part-converter/index.js +12 -10
  285. package/build/components/template-part-converter/index.js.map +1 -1
  286. package/build/components/welcome-guide/editor.js +20 -15
  287. package/build/components/welcome-guide/editor.js.map +1 -1
  288. package/build/components/welcome-guide/image.js +13 -12
  289. package/build/components/welcome-guide/image.js.map +1 -1
  290. package/build/components/welcome-guide/index.js +4 -2
  291. package/build/components/welcome-guide/index.js.map +1 -1
  292. package/build/components/welcome-guide/page.js +18 -13
  293. package/build/components/welcome-guide/page.js.map +1 -1
  294. package/build/components/welcome-guide/styles.js +45 -28
  295. package/build/components/welcome-guide/styles.js.map +1 -1
  296. package/build/components/welcome-guide/template.js +18 -13
  297. package/build/components/welcome-guide/template.js.map +1 -1
  298. package/build/deprecated.js +4 -4
  299. package/build/deprecated.js.map +1 -1
  300. package/build/hooks/commands/use-common-commands.js +12 -24
  301. package/build/hooks/commands/use-common-commands.js.map +1 -1
  302. package/build/hooks/commands/use-edit-mode-commands.js +2 -116
  303. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  304. package/build/hooks/index.js +0 -1
  305. package/build/hooks/index.js.map +1 -1
  306. package/build/hooks/push-changes-to-global-styles/index.js +26 -16
  307. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  308. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  309. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  310. package/build/index.js +3 -3
  311. package/build/index.js.map +1 -1
  312. package/build/store/private-actions.js +34 -13
  313. package/build/store/private-actions.js.map +1 -1
  314. package/build/store/selectors.js +2 -2
  315. package/build/store/selectors.js.map +1 -1
  316. package/build/utils/template-part-create.js +0 -62
  317. package/build/utils/template-part-create.js.map +1 -1
  318. package/build/utils/use-activate-theme.js +4 -5
  319. package/build/utils/use-activate-theme.js.map +1 -1
  320. package/build-module/components/add-new-page/index.js +34 -27
  321. package/build-module/components/add-new-page/index.js.map +1 -1
  322. package/build-module/components/add-new-pattern/index.js +98 -78
  323. package/build-module/components/add-new-pattern/index.js.map +1 -1
  324. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +36 -30
  325. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  326. package/build-module/components/add-new-template/add-custom-template-modal-content.js +121 -95
  327. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  328. package/build-module/components/add-new-template/index.js +89 -71
  329. package/build-module/components/add-new-template/index.js.map +1 -1
  330. package/build-module/components/add-new-template/utils.js +36 -17
  331. package/build-module/components/add-new-template/utils.js.map +1 -1
  332. package/build-module/components/app/index.js +11 -4
  333. package/build-module/components/app/index.js.map +1 -1
  334. package/build-module/components/block-editor/block-inspector-button.js +5 -4
  335. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  336. package/build-module/components/block-editor/inserter-media-categories.js +1 -1
  337. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  338. package/build-module/components/block-editor/use-editor-iframe-props.js +80 -0
  339. package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -0
  340. package/build-module/components/canvas-loader/index.js +14 -13
  341. package/build-module/components/canvas-loader/index.js.map +1 -1
  342. package/build-module/components/dataviews-actions/index.js +7 -4
  343. package/build-module/components/dataviews-actions/index.js.map +1 -1
  344. package/build-module/components/editor/index.js +91 -185
  345. package/build-module/components/editor/index.js.map +1 -1
  346. package/build-module/components/editor/use-editor-title.js +31 -0
  347. package/build-module/components/editor/use-editor-title.js.map +1 -0
  348. package/build-module/components/editor-canvas-container/index.js +29 -30
  349. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  350. package/build-module/components/error-boundary/index.js +2 -2
  351. package/build-module/components/error-boundary/index.js.map +1 -1
  352. package/build-module/components/error-boundary/warning.js +13 -11
  353. package/build-module/components/error-boundary/warning.js.map +1 -1
  354. package/build-module/components/global-styles/background-panel.js +6 -5
  355. package/build-module/components/global-styles/background-panel.js.map +1 -1
  356. package/build-module/components/global-styles/block-preview-panel.js +19 -17
  357. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  358. package/build-module/components/global-styles/color-indicator-wrapper.js +2 -2
  359. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  360. package/build-module/components/global-styles/color-palette-panel.js +31 -29
  361. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  362. package/build-module/components/global-styles/dimensions-panel.js +2 -2
  363. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  364. package/build-module/components/global-styles/font-families.js +58 -40
  365. package/build-module/components/global-styles/font-families.js.map +1 -1
  366. package/build-module/components/global-styles/font-family-item.js +18 -13
  367. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  368. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +26 -22
  369. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  370. package/build-module/components/global-styles/font-library-modal/context.js +7 -30
  371. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/font-card.js +25 -16
  373. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/font-collection.js +198 -153
  375. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  376. package/build-module/components/global-styles/font-library-modal/font-demo.js +14 -12
  377. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +30 -20
  379. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  380. package/build-module/components/global-styles/font-library-modal/index.js +42 -36
  381. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  382. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +157 -111
  383. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  384. package/build-module/components/global-styles/font-library-modal/library-font-details.js +18 -14
  385. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  386. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +26 -22
  387. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  388. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +42 -35
  389. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  390. package/build-module/components/global-styles/font-library-modal/utils/index.js +3 -3
  391. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  392. package/build-module/components/global-styles/gradients-palette-panel.js +42 -37
  393. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  394. package/build-module/components/global-styles/header.js +38 -28
  395. package/build-module/components/global-styles/header.js.map +1 -1
  396. package/build-module/components/global-styles/highlighted-colors.js +3 -4
  397. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  398. package/build-module/components/global-styles/hooks.js +11 -23
  399. package/build-module/components/global-styles/hooks.js.map +1 -1
  400. package/build-module/components/global-styles/icon-with-current-color.js +2 -2
  401. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  402. package/build-module/components/global-styles/navigation-button.js +16 -11
  403. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  404. package/build-module/components/global-styles/palette.js +42 -34
  405. package/build-module/components/global-styles/palette.js.map +1 -1
  406. package/build-module/components/global-styles/preset-colors.js +3 -4
  407. package/build-module/components/global-styles/preset-colors.js.map +1 -1
  408. package/build-module/components/global-styles/preview-colors.js +22 -20
  409. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  410. package/build-module/components/global-styles/preview-iframe.js +36 -29
  411. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  412. package/build-module/components/global-styles/preview-styles.js +96 -90
  413. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  414. package/build-module/components/global-styles/root-menu.js +31 -22
  415. package/build-module/components/global-styles/root-menu.js.map +1 -1
  416. package/build-module/components/global-styles/screen-background.js +8 -4
  417. package/build-module/components/global-styles/screen-background.js.map +1 -1
  418. package/build-module/components/global-styles/screen-block-list.js +35 -27
  419. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  420. package/build-module/components/global-styles/screen-block.js +64 -53
  421. package/build-module/components/global-styles/screen-block.js.map +1 -1
  422. package/build-module/components/global-styles/screen-color-palette.js +31 -19
  423. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  424. package/build-module/components/global-styles/screen-colors.js +20 -14
  425. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  426. package/build-module/components/global-styles/screen-css.js +22 -14
  427. package/build-module/components/global-styles/screen-css.js.map +1 -1
  428. package/build-module/components/global-styles/screen-layout.js +11 -4
  429. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  430. package/build-module/components/global-styles/screen-revisions/index.js +54 -42
  431. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  432. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +82 -70
  433. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  434. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  435. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  436. package/build-module/components/global-styles/screen-root.js +78 -42
  437. package/build-module/components/global-styles/screen-root.js.map +1 -1
  438. package/build-module/components/global-styles/screen-shadows.js +13 -0
  439. package/build-module/components/global-styles/screen-shadows.js.map +1 -0
  440. package/build-module/components/global-styles/screen-style-variations.js +16 -9
  441. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  442. package/build-module/components/global-styles/screen-typography-element.js +52 -45
  443. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  444. package/build-module/components/global-styles/screen-typography.js +17 -11
  445. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  446. package/build-module/components/global-styles/shadow-utils.js +221 -0
  447. package/build-module/components/global-styles/shadow-utils.js.map +1 -0
  448. package/build-module/components/global-styles/shadows-edit-panel.js +452 -0
  449. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -0
  450. package/build-module/components/global-styles/shadows-panel.js +121 -0
  451. package/build-module/components/global-styles/shadows-panel.js.map +1 -0
  452. package/build-module/components/global-styles/style-variations-container.js +68 -19
  453. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  454. package/build-module/components/global-styles/subtitle.js +5 -4
  455. package/build-module/components/global-styles/subtitle.js.map +1 -1
  456. package/build-module/components/global-styles/typography-elements.js +54 -45
  457. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  458. package/build-module/components/global-styles/typography-example.js +12 -8
  459. package/build-module/components/global-styles/typography-example.js.map +1 -1
  460. package/build-module/components/global-styles/typography-panel.js +2 -2
  461. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  462. package/build-module/components/global-styles/typography-preview.js +5 -4
  463. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  464. package/build-module/components/global-styles/ui.js +126 -92
  465. package/build-module/components/global-styles/ui.js.map +1 -1
  466. package/build-module/components/global-styles/utils.js +27 -0
  467. package/build-module/components/global-styles/utils.js.map +1 -1
  468. package/build-module/components/global-styles/variations/variation.js +27 -22
  469. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  470. package/build-module/components/global-styles/variations/variations-color.js +20 -14
  471. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  472. package/build-module/components/global-styles/variations/variations-panel.js +28 -18
  473. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  474. package/build-module/components/global-styles/variations/variations-typography.js +38 -31
  475. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  476. package/build-module/components/global-styles-renderer/index.js +5 -1
  477. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  478. package/build-module/components/global-styles-sidebar/default-sidebar.js +24 -18
  479. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  480. package/build-module/components/global-styles-sidebar/index.js +37 -26
  481. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  482. package/build-module/components/layout/index.js +97 -121
  483. package/build-module/components/layout/index.js.map +1 -1
  484. package/build-module/components/layout/router.js +83 -103
  485. package/build-module/components/layout/router.js.map +1 -1
  486. package/build-module/components/media/index.js +2 -2
  487. package/build-module/components/media/index.js.map +1 -1
  488. package/build-module/components/{header-edit-mode/more-menu → more-menu}/index.js +9 -3
  489. package/build-module/components/more-menu/index.js.map +1 -0
  490. package/build-module/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
  491. package/build-module/components/more-menu/site-export.js.map +1 -0
  492. package/build-module/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
  493. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  494. package/build-module/components/page/header.js +25 -19
  495. package/build-module/components/page/header.js.map +1 -1
  496. package/build-module/components/page/index.js +14 -11
  497. package/build-module/components/page/index.js.map +1 -1
  498. package/build-module/components/page-pages/index.js +138 -55
  499. package/build-module/components/page-pages/index.js.map +1 -1
  500. package/build-module/components/page-patterns/delete-category-menu-item.js +25 -20
  501. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  502. package/build-module/components/page-patterns/header.js +48 -32
  503. package/build-module/components/page-patterns/header.js.map +1 -1
  504. package/build-module/components/page-patterns/index.js +117 -110
  505. package/build-module/components/page-patterns/index.js.map +1 -1
  506. package/build-module/components/page-patterns/rename-category-menu-item.js +16 -11
  507. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  508. package/build-module/components/page-patterns/use-patterns.js +7 -6
  509. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  510. package/build-module/components/page-templates/index.js +80 -59
  511. package/build-module/components/page-templates/index.js.map +1 -1
  512. package/build-module/components/pagination/index.js +60 -41
  513. package/build-module/components/pagination/index.js.map +1 -1
  514. package/build-module/components/plugin-template-setting-panel/index.js +4 -2
  515. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  516. package/build-module/components/resizable-frame/index.js +40 -32
  517. package/build-module/components/resizable-frame/index.js.map +1 -1
  518. package/build-module/components/revisions/index.js +27 -20
  519. package/build-module/components/revisions/index.js.map +1 -1
  520. package/build-module/components/routes/link.js +5 -4
  521. package/build-module/components/routes/link.js.map +1 -1
  522. package/build-module/components/save-button/index.js +5 -4
  523. package/build-module/components/save-button/index.js.map +1 -1
  524. package/build-module/components/save-hub/index.js +12 -11
  525. package/build-module/components/save-hub/index.js.map +1 -1
  526. package/build-module/components/save-panel/index.js +35 -28
  527. package/build-module/components/save-panel/index.js.map +1 -1
  528. package/build-module/components/sidebar/index.js +14 -11
  529. package/build-module/components/sidebar/index.js.map +1 -1
  530. package/build-module/components/sidebar-button/index.js +2 -2
  531. package/build-module/components/sidebar-button/index.js.map +1 -1
  532. package/build-module/components/sidebar-dataviews/add-new-view.js +58 -48
  533. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  534. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +108 -89
  535. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  536. package/build-module/components/sidebar-dataviews/dataview-item.js +19 -12
  537. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  538. package/build-module/components/sidebar-dataviews/default-views.js +49 -1
  539. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  540. package/build-module/components/sidebar-dataviews/index.js +23 -22
  541. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-item/index.js +28 -25
  543. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  544. package/build-module/components/sidebar-navigation-screen/index.js +53 -39
  545. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  546. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +25 -17
  547. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  548. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +10 -7
  549. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  550. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
  551. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +5 -5
  553. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  554. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
  555. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  556. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +56 -45
  557. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-main/index.js +47 -22
  559. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
  561. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +11 -10
  563. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +55 -42
  565. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
  567. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  568. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +44 -36
  569. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  570. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +17 -13
  571. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  572. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  573. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  574. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +27 -23
  575. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  576. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +52 -35
  577. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +14 -9
  579. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  580. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
  581. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  582. package/build-module/components/sidebar-navigation-screen-patterns/index.js +61 -64
  583. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  584. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +18 -17
  585. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  586. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +4 -4
  587. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  588. package/build-module/components/site-hub/index.js +56 -136
  589. package/build-module/components/site-hub/index.js.map +1 -1
  590. package/build-module/components/site-icon/index.js +8 -7
  591. package/build-module/components/site-icon/index.js.map +1 -1
  592. package/build-module/components/style-book/index.js +116 -99
  593. package/build-module/components/style-book/index.js.map +1 -1
  594. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +10 -30
  595. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  596. package/build-module/components/table/index.js +24 -15
  597. package/build-module/components/table/index.js.map +1 -1
  598. package/build-module/components/template-part-converter/convert-to-regular.js +5 -4
  599. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  600. package/build-module/components/template-part-converter/convert-to-template-part.js +25 -16
  601. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  602. package/build-module/components/template-part-converter/index.js +12 -10
  603. package/build-module/components/template-part-converter/index.js.map +1 -1
  604. package/build-module/components/welcome-guide/editor.js +22 -15
  605. package/build-module/components/welcome-guide/editor.js.map +1 -1
  606. package/build-module/components/welcome-guide/image.js +14 -12
  607. package/build-module/components/welcome-guide/image.js.map +1 -1
  608. package/build-module/components/welcome-guide/index.js +6 -2
  609. package/build-module/components/welcome-guide/index.js.map +1 -1
  610. package/build-module/components/welcome-guide/page.js +20 -13
  611. package/build-module/components/welcome-guide/page.js.map +1 -1
  612. package/build-module/components/welcome-guide/styles.js +47 -28
  613. package/build-module/components/welcome-guide/styles.js.map +1 -1
  614. package/build-module/components/welcome-guide/template.js +20 -13
  615. package/build-module/components/welcome-guide/template.js.map +1 -1
  616. package/build-module/deprecated.js +4 -4
  617. package/build-module/deprecated.js.map +1 -1
  618. package/build-module/hooks/commands/use-common-commands.js +12 -23
  619. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  620. package/build-module/hooks/commands/use-edit-mode-commands.js +4 -118
  621. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  622. package/build-module/hooks/index.js +0 -1
  623. package/build-module/hooks/index.js.map +1 -1
  624. package/build-module/hooks/push-changes-to-global-styles/index.js +28 -16
  625. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  626. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  627. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  628. package/build-module/index.js +3 -3
  629. package/build-module/index.js.map +1 -1
  630. package/build-module/store/private-actions.js +34 -13
  631. package/build-module/store/private-actions.js.map +1 -1
  632. package/build-module/store/selectors.js +2 -2
  633. package/build-module/store/selectors.js.map +1 -1
  634. package/build-module/utils/template-part-create.js +0 -52
  635. package/build-module/utils/template-part-create.js.map +1 -1
  636. package/build-module/utils/use-activate-theme.js +4 -5
  637. package/build-module/utils/use-activate-theme.js.map +1 -1
  638. package/build-style/style-rtl.css +327 -634
  639. package/build-style/style.css +327 -634
  640. package/package.json +43 -44
  641. package/src/components/add-new-pattern/index.js +46 -37
  642. package/src/components/add-new-template/index.js +2 -0
  643. package/src/components/add-new-template/utils.js +77 -39
  644. package/src/components/block-editor/inserter-media-categories.js +1 -3
  645. package/src/components/block-editor/style.scss +12 -136
  646. package/src/components/block-editor/use-editor-iframe-props.js +79 -0
  647. package/src/components/canvas-loader/index.js +5 -2
  648. package/src/components/dataviews-actions/index.js +7 -2
  649. package/src/components/editor/index.js +116 -290
  650. package/src/components/editor/style.scss +1 -16
  651. package/src/components/editor/use-editor-title.js +35 -0
  652. package/src/components/editor-canvas-container/index.js +30 -35
  653. package/src/components/editor-canvas-container/style.scss +16 -0
  654. package/src/components/global-styles/background-panel.js +3 -2
  655. package/src/components/global-styles/color-palette-panel.js +1 -1
  656. package/src/components/global-styles/font-families.js +25 -18
  657. package/src/components/global-styles/font-family-item.js +2 -2
  658. package/src/components/global-styles/font-library-modal/collection-font-variant.js +2 -1
  659. package/src/components/global-styles/font-library-modal/context.js +6 -44
  660. package/src/components/global-styles/font-library-modal/font-collection.js +3 -5
  661. package/src/components/global-styles/font-library-modal/installed-fonts.js +42 -12
  662. package/src/components/global-styles/font-library-modal/library-font-variant.js +2 -1
  663. package/src/components/global-styles/font-library-modal/upload-fonts.js +1 -4
  664. package/src/components/global-styles/font-library-modal/utils/index.js +1 -1
  665. package/src/components/global-styles/hooks.js +10 -37
  666. package/src/components/global-styles/palette.js +9 -18
  667. package/src/components/global-styles/root-menu.js +16 -12
  668. package/src/components/global-styles/screen-block.js +1 -1
  669. package/src/components/global-styles/screen-css.js +1 -1
  670. package/src/components/global-styles/screen-layout.js +9 -2
  671. package/src/components/global-styles/screen-revisions/index.js +6 -0
  672. package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  673. package/src/components/global-styles/screen-revisions/style.scss +4 -8
  674. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  675. package/src/components/global-styles/screen-shadows.js +13 -0
  676. package/src/components/global-styles/screen-typography.js +1 -1
  677. package/src/components/global-styles/shadow-utils.js +158 -0
  678. package/src/components/global-styles/shadows-edit-panel.js +555 -0
  679. package/src/components/global-styles/shadows-panel.js +147 -0
  680. package/src/components/global-styles/style-variations-container.js +73 -10
  681. package/src/components/global-styles/style.scss +54 -5
  682. package/src/components/global-styles/test/shadow-utils.spec.js +251 -0
  683. package/src/components/global-styles/test/utils.spec.js +59 -0
  684. package/src/components/global-styles/ui.js +10 -6
  685. package/src/components/global-styles/utils.js +27 -0
  686. package/src/components/global-styles/variations/style.scss +7 -4
  687. package/src/components/global-styles/variations/variation.js +2 -0
  688. package/src/components/global-styles/variations/variations-color.js +8 -4
  689. package/src/components/global-styles/variations/variations-panel.js +16 -5
  690. package/src/components/global-styles/variations/variations-typography.js +2 -1
  691. package/src/components/global-styles-renderer/index.js +7 -1
  692. package/src/components/global-styles-sidebar/index.js +2 -0
  693. package/src/components/layout/index.js +24 -69
  694. package/src/components/layout/router.js +64 -79
  695. package/src/components/layout/style.scss +29 -66
  696. package/src/components/{header-edit-mode/more-menu → more-menu}/index.js +1 -1
  697. package/src/components/page/header.js +17 -13
  698. package/src/components/page/index.js +1 -5
  699. package/src/components/page/style.scss +21 -7
  700. package/src/components/page-pages/index.js +154 -30
  701. package/src/components/page-pages/style.scss +15 -0
  702. package/src/components/page-patterns/delete-category-menu-item.js +1 -2
  703. package/src/components/page-patterns/header.js +45 -33
  704. package/src/components/page-patterns/index.js +29 -63
  705. package/src/components/page-patterns/style.scss +21 -14
  706. package/src/components/page-patterns/use-patterns.js +13 -6
  707. package/src/components/pagination/index.js +21 -16
  708. package/src/components/resizable-frame/index.js +1 -1
  709. package/src/components/save-panel/index.js +2 -4
  710. package/src/components/sidebar-dataviews/add-new-view.js +5 -5
  711. package/src/components/sidebar-dataviews/custom-dataviews-list.js +5 -7
  712. package/src/components/sidebar-dataviews/dataview-item.js +8 -4
  713. package/src/components/sidebar-dataviews/default-views.js +61 -1
  714. package/src/components/sidebar-dataviews/index.js +4 -9
  715. package/src/components/sidebar-navigation-item/index.js +7 -7
  716. package/src/components/sidebar-navigation-screen/index.js +1 -1
  717. package/src/components/sidebar-navigation-screen/style.scss +2 -2
  718. package/src/components/sidebar-navigation-screen-global-styles/index.js +8 -2
  719. package/src/components/sidebar-navigation-screen-main/index.js +14 -4
  720. package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
  721. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  722. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  723. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -3
  724. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +0 -61
  725. package/src/components/sidebar-navigation-screen-patterns/category-item.js +15 -4
  726. package/src/components/sidebar-navigation-screen-patterns/index.js +11 -17
  727. package/src/components/sidebar-navigation-screen-templates-browse/content.js +1 -1
  728. package/src/components/sidebar-navigation-screen-templates-browse/index.js +1 -1
  729. package/src/components/site-hub/index.js +56 -148
  730. package/src/components/site-hub/style.scss +47 -13
  731. package/src/components/site-icon/style.scss +0 -4
  732. package/src/components/style-book/index.js +1 -1
  733. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +18 -23
  734. package/src/components/template-part-converter/convert-to-template-part.js +4 -1
  735. package/src/hooks/commands/use-common-commands.js +12 -23
  736. package/src/hooks/commands/use-edit-mode-commands.js +4 -118
  737. package/src/hooks/index.js +0 -1
  738. package/src/hooks/push-changes-to-global-styles/index.js +3 -1
  739. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
  740. package/src/index.js +1 -1
  741. package/src/store/private-actions.js +59 -23
  742. package/src/store/selectors.js +2 -2
  743. package/src/style.scss +0 -6
  744. package/src/utils/template-part-create.js +0 -67
  745. package/src/utils/use-activate-theme.js +2 -2
  746. package/build/components/block-editor/editor-canvas.js +0 -139
  747. package/build/components/block-editor/editor-canvas.js.map +0 -1
  748. package/build/components/block-editor/resizable-editor.js +0 -86
  749. package/build/components/block-editor/resizable-editor.js.map +0 -1
  750. package/build/components/block-editor/resize-handle.js +0 -57
  751. package/build/components/block-editor/resize-handle.js.map +0 -1
  752. package/build/components/block-editor/site-editor-canvas.js +0 -95
  753. package/build/components/block-editor/site-editor-canvas.js.map +0 -1
  754. package/build/components/code-editor/index.js +0 -111
  755. package/build/components/code-editor/index.js.map +0 -1
  756. package/build/components/create-template-part-modal/index.js +0 -151
  757. package/build/components/create-template-part-modal/index.js.map +0 -1
  758. package/build/components/header-edit-mode/index.js +0 -50
  759. package/build/components/header-edit-mode/index.js.map +0 -1
  760. package/build/components/header-edit-mode/more-menu/index.js.map +0 -1
  761. package/build/components/header-edit-mode/more-menu/site-export.js.map +0 -1
  762. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
  763. package/build/components/page-patterns/dataviews-pattern-actions.js +0 -311
  764. package/build/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
  765. package/build/components/pattern-modal/duplicate.js +0 -70
  766. package/build/components/pattern-modal/duplicate.js.map +0 -1
  767. package/build/components/pattern-modal/index.js +0 -23
  768. package/build/components/pattern-modal/index.js.map +0 -1
  769. package/build/components/pattern-modal/rename.js +0 -45
  770. package/build/components/pattern-modal/rename.js.map +0 -1
  771. package/build/components/rename-post-menu-item/index.js +0 -109
  772. package/build/components/rename-post-menu-item/index.js.map +0 -1
  773. package/build/components/sidebar-navigation-screen-page/index.js +0 -163
  774. package/build/components/sidebar-navigation-screen-page/index.js.map +0 -1
  775. package/build/components/sidebar-navigation-screen-page/page-details.js +0 -127
  776. package/build/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
  777. package/build/components/sidebar-navigation-screen-page/status-label.js +0 -65
  778. package/build/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
  779. package/build/components/sidebar-navigation-screen-pattern/index.js +0 -67
  780. package/build/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
  781. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -38
  782. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
  783. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -29
  784. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
  785. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -37
  786. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
  787. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -45
  788. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
  789. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -88
  790. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
  791. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -29
  792. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  793. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -138
  794. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
  795. package/build/components/sidebar-navigation-screen-template/home-template-details.js +0 -110
  796. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
  797. package/build/components/sidebar-navigation-screen-template/index.js +0 -121
  798. package/build/components/sidebar-navigation-screen-template/index.js.map +0 -1
  799. package/build/components/sidebar-navigation-screen-template/template-areas.js +0 -117
  800. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
  801. package/build/components/template-actions/index.js +0 -131
  802. package/build/components/template-actions/index.js.map +0 -1
  803. package/build/hooks/components.js +0 -10
  804. package/build/hooks/components.js.map +0 -1
  805. package/build/utils/get-is-list-page.js +0 -28
  806. package/build/utils/get-is-list-page.js.map +0 -1
  807. package/build-module/components/block-editor/editor-canvas.js +0 -131
  808. package/build-module/components/block-editor/editor-canvas.js.map +0 -1
  809. package/build-module/components/block-editor/resizable-editor.js +0 -79
  810. package/build-module/components/block-editor/resizable-editor.js.map +0 -1
  811. package/build-module/components/block-editor/resize-handle.js +0 -50
  812. package/build-module/components/block-editor/resize-handle.js.map +0 -1
  813. package/build-module/components/block-editor/site-editor-canvas.js +0 -86
  814. package/build-module/components/block-editor/site-editor-canvas.js.map +0 -1
  815. package/build-module/components/code-editor/index.js +0 -103
  816. package/build-module/components/code-editor/index.js.map +0 -1
  817. package/build-module/components/create-template-part-modal/index.js +0 -143
  818. package/build-module/components/create-template-part-modal/index.js.map +0 -1
  819. package/build-module/components/header-edit-mode/index.js +0 -42
  820. package/build-module/components/header-edit-mode/index.js.map +0 -1
  821. package/build-module/components/header-edit-mode/more-menu/index.js.map +0 -1
  822. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +0 -1
  823. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
  824. package/build-module/components/page-patterns/dataviews-pattern-actions.js +0 -304
  825. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
  826. package/build-module/components/pattern-modal/duplicate.js +0 -62
  827. package/build-module/components/pattern-modal/duplicate.js.map +0 -1
  828. package/build-module/components/pattern-modal/index.js +0 -14
  829. package/build-module/components/pattern-modal/index.js.map +0 -1
  830. package/build-module/components/pattern-modal/rename.js +0 -37
  831. package/build-module/components/pattern-modal/rename.js.map +0 -1
  832. package/build-module/components/rename-post-menu-item/index.js +0 -102
  833. package/build-module/components/rename-post-menu-item/index.js.map +0 -1
  834. package/build-module/components/sidebar-navigation-screen-page/index.js +0 -155
  835. package/build-module/components/sidebar-navigation-screen-page/index.js.map +0 -1
  836. package/build-module/components/sidebar-navigation-screen-page/page-details.js +0 -120
  837. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
  838. package/build-module/components/sidebar-navigation-screen-page/status-label.js +0 -57
  839. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
  840. package/build-module/components/sidebar-navigation-screen-pattern/index.js +0 -59
  841. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
  842. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -30
  843. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
  844. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -20
  845. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
  846. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -29
  847. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
  848. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
  849. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
  850. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -80
  851. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
  852. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -22
  853. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  854. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -130
  855. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
  856. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +0 -103
  857. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
  858. package/build-module/components/sidebar-navigation-screen-template/index.js +0 -113
  859. package/build-module/components/sidebar-navigation-screen-template/index.js.map +0 -1
  860. package/build-module/components/sidebar-navigation-screen-template/template-areas.js +0 -109
  861. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
  862. package/build-module/components/template-actions/index.js +0 -123
  863. package/build-module/components/template-actions/index.js.map +0 -1
  864. package/build-module/hooks/components.js +0 -7
  865. package/build-module/hooks/components.js.map +0 -1
  866. package/build-module/utils/get-is-list-page.js +0 -22
  867. package/build-module/utils/get-is-list-page.js.map +0 -1
  868. package/src/components/block-editor/editor-canvas.js +0 -158
  869. package/src/components/block-editor/resizable-editor.js +0 -82
  870. package/src/components/block-editor/resize-handle.js +0 -66
  871. package/src/components/block-editor/site-editor-canvas.js +0 -107
  872. package/src/components/code-editor/index.js +0 -94
  873. package/src/components/code-editor/style.scss +0 -95
  874. package/src/components/create-template-part-modal/index.js +0 -199
  875. package/src/components/create-template-part-modal/style.scss +0 -69
  876. package/src/components/header-edit-mode/index.js +0 -51
  877. package/src/components/header-edit-mode/style.scss +0 -3
  878. package/src/components/page-patterns/dataviews-pattern-actions.js +0 -350
  879. package/src/components/pattern-modal/duplicate.js +0 -55
  880. package/src/components/pattern-modal/index.js +0 -19
  881. package/src/components/pattern-modal/rename.js +0 -30
  882. package/src/components/rename-post-menu-item/index.js +0 -138
  883. package/src/components/sidebar-navigation-screen-page/index.js +0 -204
  884. package/src/components/sidebar-navigation-screen-page/page-details.js +0 -161
  885. package/src/components/sidebar-navigation-screen-page/status-label.js +0 -71
  886. package/src/components/sidebar-navigation-screen-page/style.scss +0 -69
  887. package/src/components/sidebar-navigation-screen-pattern/index.js +0 -57
  888. package/src/components/sidebar-navigation-screen-pattern/style.scss +0 -26
  889. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -31
  890. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -21
  891. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -33
  892. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
  893. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -98
  894. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -32
  895. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -205
  896. package/src/components/sidebar-navigation-screen-template/home-template-details.js +0 -144
  897. package/src/components/sidebar-navigation-screen-template/index.js +0 -134
  898. package/src/components/sidebar-navigation-screen-template/style.scss +0 -53
  899. package/src/components/sidebar-navigation-screen-template/template-areas.js +0 -135
  900. package/src/components/template-actions/index.js +0 -165
  901. package/src/hooks/components.js +0 -11
  902. package/src/utils/get-is-list-page.js +0 -23
  903. package/src/utils/test/template-part-create.js +0 -63
  904. /package/src/components/{header-edit-mode/more-menu → more-menu}/site-export.js +0 -0
  905. /package/src/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["__","sprintf","useEntityRecords","store","coreStore","useSelect","decodeEntities","__experimentalItemGroup","ItemGroup","Spinner","navigation","SidebarNavigationScreen","SidebarNavigationItem","PRELOADED_NAVIGATION_MENUS_QUERY","useLink","SingleNavigationMenu","useNavigationMenuHandlers","unlock","NAVIGATION_POST_TYPE","buildMenuLabel","title","id","status","hasCreatedFallback","SidebarNavigationScreenNavigationMenus","backPath","records","navigationMenus","isResolving","isResolvingNavigationMenus","hasResolved","hasResolvedNavigationMenus","isLoading","getNavigationFallbackId","firstNavigationMenu","handleSave","handleDelete","handleDuplicate","hasNavigationMenus","length","createElement","SidebarNavigationScreenWrapper","className","description","navigationMenu","edits","map","index","NavMenuItem","postId","key","withChevron","icon","rendered","children","actions","content","props","linkInfo","path"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tSpinner,\n} from '@wordpress/components';\nimport { navigation } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';\nimport { useLink } from '../routes/link';\nimport SingleNavigationMenu from '../sidebar-navigation-screen-navigation-menu/single-navigation-menu';\nimport useNavigationMenuHandlers from '../sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers';\nimport { unlock } from '../../lock-unlock';\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nfunction buildMenuLabel( title, id, status ) {\n\tif ( ! title ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title ),\n\t\tstatus\n\t);\n}\n\n// Save a boolean to prevent us creating a fallback more than once per session.\nlet hasCreatedFallback = false;\n\nexport default function SidebarNavigationScreenNavigationMenus( { backPath } ) {\n\tconst {\n\t\trecords: navigationMenus,\n\t\tisResolving: isResolvingNavigationMenus,\n\t\thasResolved: hasResolvedNavigationMenus,\n\t} = useEntityRecords(\n\t\t'postType',\n\t\tNAVIGATION_POST_TYPE,\n\t\tPRELOADED_NAVIGATION_MENUS_QUERY\n\t);\n\n\tconst isLoading =\n\t\tisResolvingNavigationMenus && ! hasResolvedNavigationMenus;\n\n\tconst { getNavigationFallbackId } = unlock( useSelect( coreStore ) );\n\n\tconst firstNavigationMenu = navigationMenus?.[ 0 ];\n\n\t// Save a boolean to prevent us creating a fallback more than once per session.\n\tif ( firstNavigationMenu ) {\n\t\thasCreatedFallback = true;\n\t}\n\n\t// If there is no navigation menu found\n\t// then trigger fallback algorithm to create one.\n\tif (\n\t\t! firstNavigationMenu &&\n\t\t! isResolvingNavigationMenus &&\n\t\thasResolvedNavigationMenus &&\n\t\t! hasCreatedFallback\n\t) {\n\t\tgetNavigationFallbackId();\n\t}\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst hasNavigationMenus = !! navigationMenus?.length;\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper backPath={ backPath }>\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 && ! hasNavigationMenus ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'No Navigation Menus found.' ) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// if single menu then render it\n\tif ( navigationMenus?.length === 1 ) {\n\t\treturn (\n\t\t\t<SingleNavigationMenu\n\t\t\t\tnavigationMenu={ firstNavigationMenu }\n\t\t\t\tbackPath={ backPath }\n\t\t\t\thandleDelete={ () => handleDelete( firstNavigationMenu ) }\n\t\t\t\thandleDuplicate={ () => handleDuplicate( firstNavigationMenu ) }\n\t\t\t\thandleSave={ ( edits ) =>\n\t\t\t\t\thandleSave( firstNavigationMenu, edits )\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper backPath={ backPath }>\n\t\t\t<ItemGroup>\n\t\t\t\t{ navigationMenus?.map( ( { id, title, status }, index ) => (\n\t\t\t\t\t<NavMenuItem\n\t\t\t\t\t\tpostId={ id }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ buildMenuLabel( title?.rendered, index + 1, status ) }\n\t\t\t\t\t</NavMenuItem>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n\nexport function SidebarNavigationScreenWrapper( {\n\tchildren,\n\tactions,\n\ttitle,\n\tdescription,\n\tbackPath,\n} ) {\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ title || __( 'Navigation' ) }\n\t\t\tactions={ actions }\n\t\t\tdescription={ description || __( 'Manage your Navigation Menus.' ) }\n\t\t\tbackPath={ backPath }\n\t\t\tcontent={ children }\n\t\t/>\n\t);\n}\n\nconst NavMenuItem = ( { postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostId,\n\t\tpath: '/navigation',\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,gBAAgB,EAAEC,KAAK,IAAIC,S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pDe,aAAA,CAAChC,SAAS,QACPmB,eAAe,EAAEmB,GAAG,CAAE,CAAE;IAAEzB,EAAE;IAAED,KAAK;IAAEE;EAAO,CAAC,EAAEyB,KAAK,KACrDP,aAAA,CAACQ,WAAW;IACXC,MAAM,EAAG5B,EAAI;IACb6B,GAAG,EAAG7B,EAAI;IACV8B,WAAW;IACXC,IAAI,EAAG1C;EAAY,GAEjBS,cAAc,CAAEC,KAAK,EAAEiC,QAAQ,EAAEN,KAAK,GAAG,CAAC,EAAEzB,MAAO,CACzC,CACZ,CACQ,CACoB,CAAC;AAEnC;AAEA,OAAO,SAASmB,8BAA8BA,CAAE;EAC/Ca,QAAQ;EACRC,OAAO;EACPnC,KAAK;EACLuB,WAAW;EACXlB;AACD,CAAC,EAAG;EACH,OACCe,aAAA,CAAC7B,uBAAuB;IACvBS,KAAK,EAAGA,KAAK,IAAIpB,EAAE,CAAE,YAAa,CAAG;IACrCuD,OAAO,EAAGA,OAAS;IACnBZ,WAAW,EAAGA,WAAW,IAAI3C,EAAE,CAAE,+BAAgC,CAAG;IACpEyB,QAAQ,EAAGA,QAAU;IACrB+B,OAAO,EAAGF;EAAU,CACpB,CAAC;AAEJ;AAEA,MAAMN,WAAW,GAAGA,CAAE;EAAEC,MAAM;EAAE,GAAGQ;AAAM,CAAC,KAAM;EAC/C,MAAMC,QAAQ,GAAG5C,OAAO,CAAE;IACzBmC,MAAM;IACNU,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOnB,aAAA,CAAC5B,qBAAqB;IAAA,GAAM8C,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__","sprintf","useEntityRecords","store","coreStore","useSelect","decodeEntities","__experimentalItemGroup","ItemGroup","Spinner","navigation","SidebarNavigationScreen","SidebarNavigationItem","PRELOADED_NAVIGATION_MENUS_QUERY","useLink","SingleNavigationMenu","useNavigationMenuHandlers","unlock","NAVIGATION_POST_TYPE","jsx","_jsx","buildMenuLabel","title","id","status","hasCreatedFallback","SidebarNavigationScreenNavigationMenus","backPath","records","navigationMenus","isResolving","isResolvingNavigationMenus","hasResolved","hasResolvedNavigationMenus","isLoading","getNavigationFallbackId","firstNavigationMenu","handleSave","handleDelete","handleDuplicate","hasNavigationMenus","length","SidebarNavigationScreenWrapper","children","className","description","navigationMenu","edits","map","index","NavMenuItem","postId","withChevron","icon","rendered","actions","content","props","linkInfo","postType"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tSpinner,\n} from '@wordpress/components';\nimport { navigation } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';\nimport { useLink } from '../routes/link';\nimport SingleNavigationMenu from '../sidebar-navigation-screen-navigation-menu/single-navigation-menu';\nimport useNavigationMenuHandlers from '../sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers';\nimport { unlock } from '../../lock-unlock';\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nfunction buildMenuLabel( title, id, status ) {\n\tif ( ! title ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title ),\n\t\tstatus\n\t);\n}\n\n// Save a boolean to prevent us creating a fallback more than once per session.\nlet hasCreatedFallback = false;\n\nexport default function SidebarNavigationScreenNavigationMenus( { backPath } ) {\n\tconst {\n\t\trecords: navigationMenus,\n\t\tisResolving: isResolvingNavigationMenus,\n\t\thasResolved: hasResolvedNavigationMenus,\n\t} = useEntityRecords(\n\t\t'postType',\n\t\tNAVIGATION_POST_TYPE,\n\t\tPRELOADED_NAVIGATION_MENUS_QUERY\n\t);\n\n\tconst isLoading =\n\t\tisResolvingNavigationMenus && ! hasResolvedNavigationMenus;\n\n\tconst { getNavigationFallbackId } = unlock( useSelect( coreStore ) );\n\n\tconst firstNavigationMenu = navigationMenus?.[ 0 ];\n\n\t// Save a boolean to prevent us creating a fallback more than once per session.\n\tif ( firstNavigationMenu ) {\n\t\thasCreatedFallback = true;\n\t}\n\n\t// If there is no navigation menu found\n\t// then trigger fallback algorithm to create one.\n\tif (\n\t\t! firstNavigationMenu &&\n\t\t! isResolvingNavigationMenus &&\n\t\thasResolvedNavigationMenus &&\n\t\t! hasCreatedFallback\n\t) {\n\t\tgetNavigationFallbackId();\n\t}\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst hasNavigationMenus = !! navigationMenus?.length;\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper backPath={ backPath }>\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 && ! hasNavigationMenus ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'No Navigation Menus found.' ) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// if single menu then render it\n\tif ( navigationMenus?.length === 1 ) {\n\t\treturn (\n\t\t\t<SingleNavigationMenu\n\t\t\t\tnavigationMenu={ firstNavigationMenu }\n\t\t\t\tbackPath={ backPath }\n\t\t\t\thandleDelete={ () => handleDelete( firstNavigationMenu ) }\n\t\t\t\thandleDuplicate={ () => handleDuplicate( firstNavigationMenu ) }\n\t\t\t\thandleSave={ ( edits ) =>\n\t\t\t\t\thandleSave( firstNavigationMenu, edits )\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper backPath={ backPath }>\n\t\t\t<ItemGroup>\n\t\t\t\t{ navigationMenus?.map( ( { id, title, status }, index ) => (\n\t\t\t\t\t<NavMenuItem\n\t\t\t\t\t\tpostId={ id }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ buildMenuLabel( title?.rendered, index + 1, status ) }\n\t\t\t\t\t</NavMenuItem>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n\nexport function SidebarNavigationScreenWrapper( {\n\tchildren,\n\tactions,\n\ttitle,\n\tdescription,\n\tbackPath,\n} ) {\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ title || __( 'Navigation' ) }\n\t\t\tactions={ actions }\n\t\t\tdescription={ description || __( 'Manage your Navigation Menus.' ) }\n\t\t\tbackPath={ backPath }\n\t\t\tcontent={ children }\n\t\t/>\n\t);\n}\n\nconst NavMenuItem = ( { postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostId,\n\t\tpostType: 'wp_navigation',\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,gBAAgB,EAAEC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AAC3E,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,SAASC,cAAc,QAAQ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,IAAA,CAACZ,SAAS;MAAAmC,QAAA,EACPd,eAAe,EAAEmB,GAAG,CAAE,CAAE;QAAEzB,EAAE;QAAED,KAAK;QAAEE;MAAO,CAAC,EAAEyB,KAAK,kBACrD7B,IAAA,CAAC8B,WAAW;QACXC,MAAM,EAAG5B,EAAI;QAEb6B,WAAW;QACXC,IAAI,EAAG3C,UAAY;QAAAiC,QAAA,EAEjBtB,cAAc,CAAEC,KAAK,EAAEgC,QAAQ,EAAEL,KAAK,GAAG,CAAC,EAAEzB,MAAO;MAAC,GAJhDD,EAKM,CACZ;IAAC,CACO;EAAC,CACmB,CAAC;AAEnC;AAEA,OAAO,SAASmB,8BAA8BA,CAAE;EAC/CC,QAAQ;EACRY,OAAO;EACPjC,KAAK;EACLuB,WAAW;EACXlB;AACD,CAAC,EAAG;EACH,oBACCP,IAAA,CAACT,uBAAuB;IACvBW,KAAK,EAAGA,KAAK,IAAItB,EAAE,CAAE,YAAa,CAAG;IACrCuD,OAAO,EAAGA,OAAS;IACnBV,WAAW,EAAGA,WAAW,IAAI7C,EAAE,CAAE,+BAAgC,CAAG;IACpE2B,QAAQ,EAAGA,QAAU;IACrB6B,OAAO,EAAGb;EAAU,CACpB,CAAC;AAEJ;AAEA,MAAMO,WAAW,GAAGA,CAAE;EAAEC,MAAM;EAAE,GAAGM;AAAM,CAAC,KAAM;EAC/C,MAAMC,QAAQ,GAAG5C,OAAO,CAAE;IACzBqC,MAAM;IACNQ,QAAQ,EAAE;EACX,CAAE,CAAC;EACH,oBAAOvC,IAAA,CAACR,qBAAqB;IAAA,GAAM8C,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -19,14 +18,13 @@ const POPOVER_PROPS = {
19
18
  * Internal dependencies
20
19
  */
21
20
  import { unlock } from '../../lock-unlock';
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { Fragment as _Fragment } from "react/jsx-runtime";
22
24
  const {
23
- useLocation,
24
25
  useHistory
25
26
  } = unlock(routerPrivateApis);
26
27
  export default function LeafMoreMenu(props) {
27
- const {
28
- params
29
- } = useLocation();
30
28
  const history = useHistory();
31
29
  const {
32
30
  block
@@ -61,53 +59,72 @@ export default function LeafMoreMenu(props) {
61
59
  name
62
60
  } = selectedBlock;
63
61
  if (attributes.kind === 'post-type' && attributes.id && attributes.type && history) {
62
+ const {
63
+ params
64
+ } = history.getLocationWithParams();
64
65
  history.push({
65
66
  postType: attributes.type,
66
- postId: attributes.id
67
+ postId: attributes.id,
68
+ canvas: 'edit'
67
69
  }, {
68
70
  backPath: params
69
71
  });
70
72
  }
71
73
  if (name === 'core/page-list-item' && attributes.id && history) {
74
+ const {
75
+ params
76
+ } = history.getLocationWithParams();
72
77
  history.push({
73
78
  postType: 'page',
74
- postId: attributes.id
79
+ postId: attributes.id,
80
+ canvas: 'edit'
75
81
  }, {
76
82
  backPath: params
77
83
  });
78
84
  }
79
- }, [history, params]);
80
- return createElement(DropdownMenu, {
85
+ }, [history]);
86
+ return /*#__PURE__*/_jsx(DropdownMenu, {
81
87
  icon: moreVertical,
82
88
  label: __('Options'),
83
89
  className: "block-editor-block-settings-menu",
84
90
  popoverProps: POPOVER_PROPS,
85
91
  noIcons: true,
86
- ...props
87
- }, ({
88
- onClose
89
- }) => createElement(Fragment, null, createElement(MenuGroup, null, createElement(MenuItem, {
90
- icon: chevronUp,
91
- onClick: () => {
92
- moveBlocksUp([clientId], rootClientId);
93
- onClose();
94
- }
95
- }, __('Move up')), createElement(MenuItem, {
96
- icon: chevronDown,
97
- onClick: () => {
98
- moveBlocksDown([clientId], rootClientId);
99
- onClose();
100
- }
101
- }, __('Move down')), block.attributes?.type === 'page' && block.attributes?.id && createElement(MenuItem, {
102
- onClick: () => {
103
- onGoToPage(block);
104
- onClose();
105
- }
106
- }, goToLabel)), createElement(MenuGroup, null, createElement(MenuItem, {
107
- onClick: () => {
108
- removeBlocks([clientId], false);
109
- onClose();
110
- }
111
- }, removeLabel))));
92
+ ...props,
93
+ children: ({
94
+ onClose
95
+ }) => /*#__PURE__*/_jsxs(_Fragment, {
96
+ children: [/*#__PURE__*/_jsxs(MenuGroup, {
97
+ children: [/*#__PURE__*/_jsx(MenuItem, {
98
+ icon: chevronUp,
99
+ onClick: () => {
100
+ moveBlocksUp([clientId], rootClientId);
101
+ onClose();
102
+ },
103
+ children: __('Move up')
104
+ }), /*#__PURE__*/_jsx(MenuItem, {
105
+ icon: chevronDown,
106
+ onClick: () => {
107
+ moveBlocksDown([clientId], rootClientId);
108
+ onClose();
109
+ },
110
+ children: __('Move down')
111
+ }), block.attributes?.type === 'page' && block.attributes?.id && /*#__PURE__*/_jsx(MenuItem, {
112
+ onClick: () => {
113
+ onGoToPage(block);
114
+ onClose();
115
+ },
116
+ children: goToLabel
117
+ })]
118
+ }), /*#__PURE__*/_jsx(MenuGroup, {
119
+ children: /*#__PURE__*/_jsx(MenuItem, {
120
+ onClick: () => {
121
+ removeBlocks([clientId], false);
122
+ onClose();
123
+ },
124
+ children: removeLabel
125
+ })
126
+ })]
127
+ })
128
+ });
112
129
  }
113
130
  //# sourceMappingURL=leaf-more-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["chevronUp","chevronDown","moreVertical","DropdownMenu","MenuItem","MenuGroup","useDispatch","useSelect","useCallback","__","sprintf","BlockTitle","store","blockEditorStore","privateApis","routerPrivateApis","POPOVER_PROPS","className","placement","unlock","useLocation","useHistory","LeafMoreMenu","props","params","history","block","clientId","moveBlocksDown","moveBlocksUp","removeBlocks","removeLabel","maximumLength","goToLabel","rootClientId","select","getBlockRootClientId","onGoToPage","selectedBlock","attributes","name","kind","id","type","push","postType","postId","backPath","createElement","icon","label","popoverProps","noIcons","onClose","Fragment","onClick"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { chevronUp, chevronDown, moreVertical } from '@wordpress/icons';\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { BlockTitle, store as blockEditorStore } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\nconst POPOVER_PROPS = {\n\tclassName: 'block-editor-block-settings-menu__popover',\n\tplacement: 'bottom-start',\n};\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function LeafMoreMenu( props ) {\n\tconst { params } = useLocation();\n\tconst history = useHistory();\n\tconst { block } = props;\n\tconst { clientId } = block;\n\tconst { moveBlocksDown, moveBlocksUp, removeBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst removeLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Remove %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst goToLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Go to %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst rootClientId = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId } = select( blockEditorStore );\n\n\t\t\treturn getBlockRootClientId( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onGoToPage = useCallback(\n\t\t( selectedBlock ) => {\n\t\t\tconst { attributes, name } = selectedBlock;\n\t\t\tif (\n\t\t\t\tattributes.kind === 'post-type' &&\n\t\t\t\tattributes.id &&\n\t\t\t\tattributes.type &&\n\t\t\t\thistory\n\t\t\t) {\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: attributes.type,\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: params,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( name === 'core/page-list-item' && attributes.id && history ) {\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: 'page',\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: params,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ history, params ]\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Options' ) }\n\t\t\tclassName=\"block-editor-block-settings-menu\"\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tnoIcons\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronUp }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksUp( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move up' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksDown( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move down' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t{ block.attributes?.type === 'page' &&\n\t\t\t\t\t\t\tblock.attributes?.id && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonGoToPage( block );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ goToLabel }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tremoveBlocks( [ clientId ], false );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ removeLabel }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,WAAW,EAAEC,YAAY,QAAQ,kBAAkB;AACvE,SAASC,YAAY,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,uBAAuB;AACzE,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,UAAU,EAAEC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AAC/E,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AAEpE,MAAMC,aAAa,GAAG;EACrBC,SAAS,EAAE,2CAA2C;EACtDC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC,WAAW;EAAEC;AAAW,CAAC,GAAGF,MAAM,CAAEJ,iBAAkB,CAAC;AAE/D,eAAe,SAASO,YAAYA,CAAEC,KAAK,EAAG;EAC7C,MAA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CAAC5C,QAAQ;IACRmD,OAAO,EAAGA,CAAA,KAAM;MACfzB,YAAY,CAAE,CAAEH,QAAQ,CAAE,EAAE,KAAM,CAAC;MACnC0B,OAAO,CAAC,CAAC;IACV;EAAG,GAEDtB,WACO,CACA,CACV,CAEU,CAAC;AAEjB","ignoreList":[]}
1
+ {"version":3,"names":["chevronUp","chevronDown","moreVertical","DropdownMenu","MenuItem","MenuGroup","useDispatch","useSelect","useCallback","__","sprintf","BlockTitle","store","blockEditorStore","privateApis","routerPrivateApis","POPOVER_PROPS","className","placement","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useHistory","LeafMoreMenu","props","history","block","clientId","moveBlocksDown","moveBlocksUp","removeBlocks","removeLabel","maximumLength","goToLabel","rootClientId","select","getBlockRootClientId","onGoToPage","selectedBlock","attributes","name","kind","id","type","params","getLocationWithParams","push","postType","postId","canvas","backPath","icon","label","popoverProps","noIcons","children","onClose","onClick"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { chevronUp, chevronDown, moreVertical } from '@wordpress/icons';\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { BlockTitle, store as blockEditorStore } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\nconst POPOVER_PROPS = {\n\tclassName: 'block-editor-block-settings-menu__popover',\n\tplacement: 'bottom-start',\n};\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function LeafMoreMenu( props ) {\n\tconst history = useHistory();\n\tconst { block } = props;\n\tconst { clientId } = block;\n\tconst { moveBlocksDown, moveBlocksUp, removeBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst removeLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Remove %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst goToLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Go to %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst rootClientId = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId } = select( blockEditorStore );\n\n\t\t\treturn getBlockRootClientId( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onGoToPage = useCallback(\n\t\t( selectedBlock ) => {\n\t\t\tconst { attributes, name } = selectedBlock;\n\t\t\tif (\n\t\t\t\tattributes.kind === 'post-type' &&\n\t\t\t\tattributes.id &&\n\t\t\t\tattributes.type &&\n\t\t\t\thistory\n\t\t\t) {\n\t\t\t\tconst { params } = history.getLocationWithParams();\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: attributes.type,\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: params,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( name === 'core/page-list-item' && attributes.id && history ) {\n\t\t\t\tconst { params } = history.getLocationWithParams();\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: 'page',\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: params,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ history ]\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Options' ) }\n\t\t\tclassName=\"block-editor-block-settings-menu\"\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tnoIcons\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronUp }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksUp( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move up' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksDown( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move down' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t{ block.attributes?.type === 'page' &&\n\t\t\t\t\t\t\tblock.attributes?.id && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonGoToPage( block );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ goToLabel }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tremoveBlocks( [ clientId ], false );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ removeLabel }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t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AW,CACJ;MAAC,CACD,CAAC;IAAA,CACX;EACF,CACY,CAAC;AAEjB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -13,6 +12,9 @@ import { store as coreStore } from '@wordpress/core-data';
13
12
  */
14
13
  import { unlock } from '../../lock-unlock';
15
14
  import LeafMoreMenu from './leaf-more-menu';
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { Fragment as _Fragment } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
18
  const {
17
19
  PrivateListView
18
20
  } = unlock(blockEditorPrivateApis);
@@ -68,13 +70,16 @@ export default function NavigationMenuContent({
68
70
 
69
71
  // The hidden block is needed because it makes block edit side effects trigger.
70
72
  // For example a navigation page list load its items has an effect on edit to load its items.
71
- return createElement(Fragment, null, !isLoading && createElement(PrivateListView, {
72
- rootClientId: listViewRootClientId,
73
- onSelect: offCanvasOnselect,
74
- blockSettingsMenu: LeafMoreMenu,
75
- showAppender: false
76
- }), createElement("div", {
77
- className: "edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor"
78
- }, createElement(BlockList, null)));
73
+ return /*#__PURE__*/_jsxs(_Fragment, {
74
+ children: [!isLoading && /*#__PURE__*/_jsx(PrivateListView, {
75
+ rootClientId: listViewRootClientId,
76
+ onSelect: offCanvasOnselect,
77
+ blockSettingsMenu: LeafMoreMenu,
78
+ showAppender: false
79
+ }), /*#__PURE__*/_jsx("div", {
80
+ className: "edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor",
81
+ children: /*#__PURE__*/_jsx(BlockList, {})
82
+ })]
83
+ });
79
84
  }
80
85
  //# sourceMappingURL=navigation-menu-content.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["privateApis","blockEditorPrivateApis","store","blockEditorStore","BlockList","useDispatch","useSelect","createBlock","useCallback","coreStore","unlock","LeafMoreMenu","PrivateListView","MAX_PAGE_COUNT","PAGES_QUERY","per_page","_fields","orderby","order","NavigationMenuContent","rootClientId","listViewRootClientId","isLoading","select","areInnerBlocksControlled","getBlockName","getBlockCount","getBlockOrder","isResolving","blockClientIds","hasOnlyPageListBlock","length","pageListHasBlocks","isLoadingPages","replaceBlock","__unstableMarkNextChangeAsNotPersistent","offCanvasOnselect","block","name","attributes","url","clientId","createElement","Fragment","onSelect","blockSettingsMenu","showAppender","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tBlockList,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { createBlock } from '@wordpress/blocks';\nimport { useCallback } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport LeafMoreMenu from './leaf-more-menu';\n\nconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\n// Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.\nconst MAX_PAGE_COUNT = 100;\nconst PAGES_QUERY = [\n\t'postType',\n\t'page',\n\t{\n\t\tper_page: MAX_PAGE_COUNT,\n\t\t_fields: [ 'id', 'link', 'menu_order', 'parent', 'title', 'type' ],\n\t\t// TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby\n\t\t// values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent\n\t\t// sort.\n\t\torderby: 'menu_order',\n\t\torder: 'asc',\n\t},\n];\n\nexport default function NavigationMenuContent( { rootClientId } ) {\n\tconst { listViewRootClientId, isLoading } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tareInnerBlocksControlled,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { isResolving } = select( coreStore );\n\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\n\t\t\tconst hasOnlyPageListBlock =\n\t\t\t\tblockClientIds.length === 1 &&\n\t\t\t\tgetBlockName( blockClientIds[ 0 ] ) === 'core/page-list';\n\t\t\tconst pageListHasBlocks =\n\t\t\t\thasOnlyPageListBlock &&\n\t\t\t\tgetBlockCount( blockClientIds[ 0 ] ) > 0;\n\n\t\t\tconst isLoadingPages = isResolving(\n\t\t\t\t'getEntityRecords',\n\t\t\t\tPAGES_QUERY\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tlistViewRootClientId: pageListHasBlocks\n\t\t\t\t\t? blockClientIds[ 0 ]\n\t\t\t\t\t: rootClientId,\n\t\t\t\t// This is a small hack to wait for the navigation block\n\t\t\t\t// to actually load its inner blocks.\n\t\t\t\tisLoading:\n\t\t\t\t\t! areInnerBlocksControlled( rootClientId ) ||\n\t\t\t\t\tisLoadingPages,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\tconst { replaceBlock, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst offCanvasOnselect = useCallback(\n\t\t( block ) => {\n\t\t\tif (\n\t\t\t\tblock.name === 'core/navigation-link' &&\n\t\t\t\t! block.attributes.url\n\t\t\t) {\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceBlock(\n\t\t\t\t\tblock.clientId,\n\t\t\t\t\tcreateBlock( 'core/navigation-link', block.attributes )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ __unstableMarkNextChangeAsNotPersistent, replaceBlock ]\n\t);\n\n\t// The hidden block is needed because it makes block edit side effects trigger.\n\t// For example a navigation page list load its items has an effect on edit to load its items.\n\treturn (\n\t\t<>\n\t\t\t{ ! isLoading && (\n\t\t\t\t<PrivateListView\n\t\t\t\t\trootClientId={ listViewRootClientId }\n\t\t\t\t\tonSelect={ offCanvasOnselect }\n\t\t\t\t\tblockSettingsMenu={ LeafMoreMenu }\n\t\t\t\t\tshowAppender={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor\">\n\t\t\t\t<BlockList />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,sBAAsB,EACrCC,KAAK,IAAIC,gBAAgB,EACzBC,SAAS,QACH,yBAAyB;AAChC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASN,KAAK,IAAIO,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,MAAM,kBAAkB;AAE3C,MAAM;EAAEC;AAAgB,CAAC,GAAGF,MAAM,CAAET,sBAAuB,CAAC;;AAE5D;AACA,MAAMY,cAAc,GAAG,GAAG;AAC1B,MAAMC,WAAW,GAAG,CACnB,UAAU,EACV,MAAM,EACN;EACCC,QAAQ,EAAEF,cAAc;EACxBG,OAAO,EAAE,CAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAE;EAClE;EACA;EACA;EACAC,OAAO,EAAE,YAAY;EACrBC,KAAK,EAAE;AACR,CAAC,CACD;AAED,eAAe,SAASC,qBAAqBA,CAAE;EAAEC;AAAa,CAAC,EAAG;EACjE,MAAM;IAAEC,oBAAoB;IAAEC;EAAU,CAAC,GAAGhB,SAAS,CAClDiB,MAAM,IAAM;IACb,MAAM;MACLC,wBAAwB;MACxBC,YAAY;MACZC,aAAa;MACbC;IACD,CAAC,GAAGJ,MAAM,CAAEpB,gBAAiB,CAAC;IAC9B,MAAM;MAAEyB;IAAY,CAAC,GAAGL,MAAM,CAAEd,SAAU,CAAC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EAA2E,GACzFL,aAAA,CAACtC,SAAS,MAAE,CACR,CACJ,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["privateApis","blockEditorPrivateApis","store","blockEditorStore","BlockList","useDispatch","useSelect","createBlock","useCallback","coreStore","unlock","LeafMoreMenu","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PrivateListView","MAX_PAGE_COUNT","PAGES_QUERY","per_page","_fields","orderby","order","NavigationMenuContent","rootClientId","listViewRootClientId","isLoading","select","areInnerBlocksControlled","getBlockName","getBlockCount","getBlockOrder","isResolving","blockClientIds","hasOnlyPageListBlock","length","pageListHasBlocks","isLoadingPages","replaceBlock","__unstableMarkNextChangeAsNotPersistent","offCanvasOnselect","block","name","attributes","url","clientId","children","onSelect","blockSettingsMenu","showAppender","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tBlockList,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { createBlock } from '@wordpress/blocks';\nimport { useCallback } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport LeafMoreMenu from './leaf-more-menu';\n\nconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\n// Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.\nconst MAX_PAGE_COUNT = 100;\nconst PAGES_QUERY = [\n\t'postType',\n\t'page',\n\t{\n\t\tper_page: MAX_PAGE_COUNT,\n\t\t_fields: [ 'id', 'link', 'menu_order', 'parent', 'title', 'type' ],\n\t\t// TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby\n\t\t// values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent\n\t\t// sort.\n\t\torderby: 'menu_order',\n\t\torder: 'asc',\n\t},\n];\n\nexport default function NavigationMenuContent( { rootClientId } ) {\n\tconst { listViewRootClientId, isLoading } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tareInnerBlocksControlled,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { isResolving } = select( coreStore );\n\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\n\t\t\tconst hasOnlyPageListBlock =\n\t\t\t\tblockClientIds.length === 1 &&\n\t\t\t\tgetBlockName( blockClientIds[ 0 ] ) === 'core/page-list';\n\t\t\tconst pageListHasBlocks =\n\t\t\t\thasOnlyPageListBlock &&\n\t\t\t\tgetBlockCount( blockClientIds[ 0 ] ) > 0;\n\n\t\t\tconst isLoadingPages = isResolving(\n\t\t\t\t'getEntityRecords',\n\t\t\t\tPAGES_QUERY\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tlistViewRootClientId: pageListHasBlocks\n\t\t\t\t\t? blockClientIds[ 0 ]\n\t\t\t\t\t: rootClientId,\n\t\t\t\t// This is a small hack to wait for the navigation block\n\t\t\t\t// to actually load its inner blocks.\n\t\t\t\tisLoading:\n\t\t\t\t\t! areInnerBlocksControlled( rootClientId ) ||\n\t\t\t\t\tisLoadingPages,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\tconst { replaceBlock, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst offCanvasOnselect = useCallback(\n\t\t( block ) => {\n\t\t\tif (\n\t\t\t\tblock.name === 'core/navigation-link' &&\n\t\t\t\t! block.attributes.url\n\t\t\t) {\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceBlock(\n\t\t\t\t\tblock.clientId,\n\t\t\t\t\tcreateBlock( 'core/navigation-link', block.attributes )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ __unstableMarkNextChangeAsNotPersistent, replaceBlock ]\n\t);\n\n\t// The hidden block is needed because it makes block edit side effects trigger.\n\t// For example a navigation page list load its items has an effect on edit to load its items.\n\treturn (\n\t\t<>\n\t\t\t{ ! isLoading && (\n\t\t\t\t<PrivateListView\n\t\t\t\t\trootClientId={ listViewRootClientId }\n\t\t\t\t\tonSelect={ offCanvasOnselect }\n\t\t\t\t\tblockSettingsMenu={ LeafMoreMenu }\n\t\t\t\t\tshowAppender={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor\">\n\t\t\t\t<BlockList />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,sBAAsB,EACrCC,KAAK,IAAIC,gBAAgB,EACzBC,SAAS,QACH,yBAAyB;AAChC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASN,KAAK,IAAIO,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE5C,MAAM;EAAEC;AAAgB,CAAC,GAAGR,MAAM,CAAET,sBAAuB,CAAC;;AAE5D;AACA,MAAMkB,cAAc,GAAG,GAAG;AAC1B,MAAMC,WAAW,GAAG,CACnB,UAAU,EACV,MAAM,EACN;EACCC,QAAQ,EAAEF,cAAc;EACxBG,OAAO,EAAE,CAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAE;EAClE;EACA;EACA;EACAC,OAAO,EAAE,YAAY;EACrBC,KAAK,EA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,UAAW,CACvD,CAAC;IACF;EACD,CAAC,EACD,CAAEJ,uCAAuC,EAAED,YAAY,CACxD,CAAC;;EAED;EACA;EACA,oBACCvB,KAAA,CAAAF,SAAA;IAAAiC,QAAA,GACG,CAAEpB,SAAS,iBACZf,IAAA,CAACK,eAAe;MACfQ,YAAY,EAAGC,oBAAsB;MACrCsB,QAAQ,EAAGP,iBAAmB;MAC9BQ,iBAAiB,EAAGvC,YAAc;MAClCwC,YAAY,EAAG;IAAO,CACtB,CACD,eACDtC,IAAA;MAAKuC,SAAS,EAAC,2EAA2E;MAAAJ,QAAA,eACzFnC,IAAA,CAACT,SAAS,IAAE;IAAC,CACT,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
@@ -1,31 +1,33 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * Internal dependencies
4
3
  */
5
4
  import SidebarNavigationItem from '../sidebar-navigation-item';
6
5
  import { useLink } from '../routes/link';
6
+ import { TEMPLATE_PART_POST_TYPE, TEMPLATE_PART_ALL_AREAS_CATEGORY, PATTERN_DEFAULT_CATEGORY, PATTERN_TYPES } from '../../utils/constants';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
7
8
  export default function CategoryItem({
8
9
  count,
9
10
  icon,
10
11
  id,
11
12
  isActive,
12
13
  label,
13
- type,
14
- path = '/patterns'
14
+ type
15
15
  }) {
16
16
  const linkInfo = useLink({
17
- path,
18
- categoryType: type,
19
- categoryId: id
17
+ categoryId: id !== TEMPLATE_PART_ALL_AREAS_CATEGORY && id !== PATTERN_DEFAULT_CATEGORY ? id : undefined,
18
+ postType: type === TEMPLATE_PART_POST_TYPE ? TEMPLATE_PART_POST_TYPE : PATTERN_TYPES.user
20
19
  });
21
20
  if (!count) {
22
21
  return;
23
22
  }
24
- return createElement(SidebarNavigationItem, {
23
+ return /*#__PURE__*/_jsx(SidebarNavigationItem, {
25
24
  ...linkInfo,
26
25
  icon: icon,
27
- suffix: createElement("span", null, count),
28
- "aria-current": isActive ? 'true' : undefined
29
- }, label);
26
+ suffix: /*#__PURE__*/_jsx("span", {
27
+ children: count
28
+ }),
29
+ "aria-current": isActive ? 'true' : undefined,
30
+ children: label
31
+ });
30
32
  }
31
33
  //# sourceMappingURL=category-item.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SidebarNavigationItem","useLink","CategoryItem","count","icon","id","isActive","label","type","path","linkInfo","categoryType","categoryId","createElement","suffix","undefined"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/category-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { useLink } from '../routes/link';\n\nexport default function CategoryItem( {\n\tcount,\n\ticon,\n\tid,\n\tisActive,\n\tlabel,\n\ttype,\n\tpath = '/patterns',\n} ) {\n\tconst linkInfo = useLink( {\n\t\tpath,\n\t\tcategoryType: type,\n\t\tcategoryId: id,\n\t} );\n\n\tif ( ! count ) {\n\t\treturn;\n\t}\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...linkInfo }\n\t\t\ticon={ icon }\n\t\t\tsuffix={ <span>{ count }</span> }\n\t\t\taria-current={ isActive ? 'true' : undefined }\n\t\t>\n\t\t\t{ label }\n\t\t</SidebarNavigationItem>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,OAAO,QAAQ,gBAAgB;AAExC,eAAe,SAASC,YAAYA,CAAE;EACrCC,KAAK;EACLC,IAAI;EACJC,EAAE;EACFC,QAAQ;EACRC,KAAK;EACLC,IAAI;EACJC,IAAI,GAAG;AACR,CAAC,EAAG;EACH,MAAMC,QAAQ,GAAGT,OAAO,CAAE;IACzBQ,IAAI;IACJE,YAAY,EAAEH,IAAI;IAClBI,UAAU,EAAEP;EACb,CAAE,CAAC;EAEH,IAAK,CAAEF,KAAK,EAAG;IACd;EACD;EAEA,OACCU,aAAA,CAACb,qBAAqB;IAAA,GAChBU,QAAQ;IACbN,IAAI,EAAGA,IAAM;IACbU,MAAM,EAAGD,aAAA,eAAQV,KAAa,CAAG;IACjC,gBAAeG,QAAQ,GAAG,MAAM,GAAGS;EAAW,GAE5CR,KACoB,CAAC;AAE1B","ignoreList":[]}
1
+ {"version":3,"names":["SidebarNavigationItem","useLink","TEMPLATE_PART_POST_TYPE","TEMPLATE_PART_ALL_AREAS_CATEGORY","PATTERN_DEFAULT_CATEGORY","PATTERN_TYPES","jsx","_jsx","CategoryItem","count","icon","id","isActive","label","type","linkInfo","categoryId","undefined","postType","user","suffix","children"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/category-item.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { useLink } from '../routes/link';\nimport {\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_ALL_AREAS_CATEGORY,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_TYPES,\n} from '../../utils/constants';\n\nexport default function CategoryItem( {\n\tcount,\n\ticon,\n\tid,\n\tisActive,\n\tlabel,\n\ttype,\n} ) {\n\tconst linkInfo = useLink( {\n\t\tcategoryId:\n\t\t\tid !== TEMPLATE_PART_ALL_AREAS_CATEGORY &&\n\t\t\tid !== PATTERN_DEFAULT_CATEGORY\n\t\t\t\t? id\n\t\t\t\t: undefined,\n\t\tpostType:\n\t\t\ttype === TEMPLATE_PART_POST_TYPE\n\t\t\t\t? TEMPLATE_PART_POST_TYPE\n\t\t\t\t: PATTERN_TYPES.user,\n\t} );\n\n\tif ( ! count ) {\n\t\treturn;\n\t}\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...linkInfo }\n\t\t\ticon={ icon }\n\t\t\tsuffix={ <span>{ count }</span> }\n\t\t\taria-current={ isActive ? 'true' : undefined }\n\t\t>\n\t\t\t{ label }\n\t\t</SidebarNavigationItem>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SACCC,uBAAuB,EACvBC,gCAAgC,EAChCC,wBAAwB,EACxBC,aAAa,QACP,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE/B,eAAe,SAASC,YAAYA,CAAE;EACrCC,KAAK;EACLC,IAAI;EACJC,EAAE;EACFC,QAAQ;EACRC,KAAK;EACLC;AACD,CAAC,EAAG;EACH,MAAMC,QAAQ,GAAGd,OAAO,CAAE;IACzBe,UAAU,EACTL,EAAE,KAAKR,gCAAgC,IACvCQ,EAAE,KAAKP,wBAAwB,GAC5BO,EAAE,GACFM,SAAS;IACbC,QAAQ,EACPJ,IAAI,KAAKZ,uBAAuB,GAC7BA,uBAAuB,GACvBG,aAAa,CAACc;EACnB,CAAE,CAAC;EAEH,IAAK,CAAEV,KAAK,EAAG;IACd;EACD;EAEA,oBACCF,IAAA,CAACP,qBAAqB;IAAA,GAChBe,QAAQ;IACbL,IAAI,EAAGA,IAAM;IACbU,MAAM,eAAGb,IAAA;MAAAc,QAAA,EAAQZ;IAAK,CAAQ,CAAG;IACjC,gBAAeG,QAAQ,GAAG,MAAM,GAAGK,SAAW;IAAAI,QAAA,EAE5CR;EAAK,CACe,CAAC;AAE1B","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -13,83 +12,76 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
13
12
  /**
14
13
  * Internal dependencies
15
14
  */
16
- import AddNewPattern from '../add-new-pattern';
17
15
  import SidebarNavigationScreen from '../sidebar-navigation-screen';
18
16
  import CategoryItem from './category-item';
19
17
  import { PATTERN_DEFAULT_CATEGORY, PATTERN_TYPES, TEMPLATE_PART_POST_TYPE, TEMPLATE_PART_ALL_AREAS_CATEGORY } from '../../utils/constants';
20
18
  import usePatternCategories from './use-pattern-categories';
21
19
  import useTemplatePartAreas from './use-template-part-areas';
22
20
  import { unlock } from '../../lock-unlock';
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { Fragment as _Fragment } from "react/jsx-runtime";
23
24
  const {
24
25
  useLocation
25
26
  } = unlock(routerPrivateApis);
26
27
  function CategoriesGroup({
27
- path,
28
28
  templatePartAreas,
29
29
  patternCategories,
30
30
  currentCategory,
31
31
  currentType
32
32
  }) {
33
33
  const [allPatterns, ...otherPatterns] = patternCategories;
34
- return createElement(ItemGroup, {
35
- className: "edit-site-sidebar-navigation-screen-patterns__group"
36
- }, createElement(CategoryItem, {
37
- key: "all",
38
- path: path,
39
- count: Object.values(templatePartAreas).map(({
34
+ return /*#__PURE__*/_jsxs(ItemGroup, {
35
+ className: "edit-site-sidebar-navigation-screen-patterns__group",
36
+ children: [/*#__PURE__*/_jsx(CategoryItem, {
37
+ count: Object.values(templatePartAreas).map(({
38
+ templateParts
39
+ }) => templateParts?.length || 0).reduce((acc, val) => acc + val, 0),
40
+ icon: getTemplatePartIcon() /* no name, so it provides the fallback icon */,
41
+ label: __('All template parts'),
42
+ id: TEMPLATE_PART_ALL_AREAS_CATEGORY,
43
+ type: TEMPLATE_PART_POST_TYPE,
44
+ isActive: currentCategory === TEMPLATE_PART_ALL_AREAS_CATEGORY && currentType === TEMPLATE_PART_POST_TYPE
45
+ }, "all"), Object.entries(templatePartAreas).map(([area, {
46
+ label,
40
47
  templateParts
41
- }) => templateParts?.length || 0).reduce((acc, val) => acc + val, 0),
42
- icon: getTemplatePartIcon() /* no name, so it provides the fallback icon */,
43
- label: __('All template parts'),
44
- id: TEMPLATE_PART_ALL_AREAS_CATEGORY,
45
- type: TEMPLATE_PART_POST_TYPE,
46
- isActive: currentCategory === TEMPLATE_PART_ALL_AREAS_CATEGORY && currentType === TEMPLATE_PART_POST_TYPE
47
- }), Object.entries(templatePartAreas).map(([area, {
48
- label,
49
- templateParts
50
- }]) => createElement(CategoryItem, {
51
- key: area,
52
- path: path,
53
- count: templateParts?.length,
54
- icon: getTemplatePartIcon(area),
55
- label: label,
56
- id: area,
57
- type: TEMPLATE_PART_POST_TYPE,
58
- isActive: currentCategory === area && currentType === TEMPLATE_PART_POST_TYPE
59
- })), createElement("div", {
60
- className: "edit-site-sidebar-navigation-screen-patterns__divider"
61
- }), allPatterns && createElement(CategoryItem, {
62
- key: allPatterns.name,
63
- path: path,
64
- count: allPatterns.count,
65
- label: allPatterns.label,
66
- icon: file,
67
- id: allPatterns.name,
68
- type: "pattern",
69
- isActive: currentCategory === `${allPatterns.name}` && (currentType === PATTERN_TYPES.theme || currentType === PATTERN_TYPES.user)
70
- }), otherPatterns.map(category => createElement(CategoryItem, {
71
- key: category.name,
72
- path: path,
73
- count: category.count,
74
- label: category.label,
75
- icon: file,
76
- id: category.name,
77
- type: "pattern",
78
- isActive: currentCategory === `${category.name}` && (currentType === PATTERN_TYPES.theme || currentType === PATTERN_TYPES.user)
79
- })));
48
+ }]) => /*#__PURE__*/_jsx(CategoryItem, {
49
+ count: templateParts?.length,
50
+ icon: getTemplatePartIcon(area),
51
+ label: label,
52
+ id: area,
53
+ type: TEMPLATE_PART_POST_TYPE,
54
+ isActive: currentCategory === area && currentType === TEMPLATE_PART_POST_TYPE
55
+ }, area)), /*#__PURE__*/_jsx("div", {
56
+ className: "edit-site-sidebar-navigation-screen-patterns__divider"
57
+ }), allPatterns && /*#__PURE__*/_jsx(CategoryItem, {
58
+ count: allPatterns.count,
59
+ label: allPatterns.label,
60
+ icon: file,
61
+ id: allPatterns.name,
62
+ type: PATTERN_TYPES.user,
63
+ isActive: currentCategory === `${allPatterns.name}` && currentType === PATTERN_TYPES.user
64
+ }, allPatterns.name), otherPatterns.map(category => /*#__PURE__*/_jsx(CategoryItem, {
65
+ count: category.count,
66
+ label: category.label,
67
+ icon: file,
68
+ id: category.name,
69
+ type: PATTERN_TYPES.user,
70
+ isActive: currentCategory === `${category.name}` && currentType === PATTERN_TYPES.user
71
+ }, category.name))]
72
+ });
80
73
  }
81
74
  export default function SidebarNavigationScreenPatterns({
82
75
  backPath
83
76
  }) {
84
77
  const {
85
78
  params: {
86
- categoryType,
87
- categoryId,
88
- path
79
+ postType,
80
+ categoryId
89
81
  }
90
82
  } = useLocation();
91
- const currentCategory = categoryId || PATTERN_DEFAULT_CATEGORY;
92
- const currentType = categoryType || PATTERN_TYPES.theme;
83
+ const currentType = postType || PATTERN_TYPES.user;
84
+ const currentCategory = categoryId || (currentType === PATTERN_TYPES.user ? PATTERN_DEFAULT_CATEGORY : TEMPLATE_PART_ALL_AREAS_CATEGORY);
93
85
  const {
94
86
  templatePartAreas,
95
87
  hasTemplateParts,
@@ -100,21 +92,26 @@ export default function SidebarNavigationScreenPatterns({
100
92
  hasPatterns
101
93
  } = usePatternCategories();
102
94
  const isBlockBasedTheme = useSelect(select => select(coreStore).getCurrentTheme()?.is_block_theme, []);
103
- return createElement(SidebarNavigationScreen, {
95
+ return /*#__PURE__*/_jsx(SidebarNavigationScreen, {
104
96
  isRoot: !isBlockBasedTheme,
105
97
  title: __('Patterns'),
106
98
  description: __('Manage what patterns are available when editing the site.'),
107
99
  backPath: backPath,
108
- actions: createElement(AddNewPattern, null),
109
- content: createElement(Fragment, null, isLoading && __('Loading items…'), !isLoading && createElement(Fragment, null, !hasTemplateParts && !hasPatterns && createElement(ItemGroup, {
110
- className: "edit-site-sidebar-navigation-screen-patterns__group"
111
- }, createElement(Item, null, __('No items found'))), createElement(CategoriesGroup, {
112
- path: path,
113
- templatePartAreas: templatePartAreas,
114
- patternCategories: patternCategories,
115
- currentCategory: currentCategory,
116
- currentType: currentType
117
- })))
100
+ content: /*#__PURE__*/_jsxs(_Fragment, {
101
+ children: [isLoading && __('Loading items…'), !isLoading && /*#__PURE__*/_jsxs(_Fragment, {
102
+ children: [!hasTemplateParts && !hasPatterns && /*#__PURE__*/_jsx(ItemGroup, {
103
+ className: "edit-site-sidebar-navigation-screen-patterns__group",
104
+ children: /*#__PURE__*/_jsx(Item, {
105
+ children: __('No items found')
106
+ })
107
+ }), /*#__PURE__*/_jsx(CategoriesGroup, {
108
+ templatePartAreas: templatePartAreas,
109
+ patternCategories: patternCategories,
110
+ currentCategory: currentCategory,
111
+ currentType: currentType
112
+ })]
113
+ })]
114
+ })
118
115
  });
119
116
  }
120
117
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalItemGroup","ItemGroup","__experimentalItem","Item","getTemplatePartIcon","__","store","coreStore","useSelect","file","privateApis","routerPrivateApis","AddNewPattern","SidebarNavigationScreen","CategoryItem","PATTERN_DEFAULT_CATEGORY","PATTERN_TYPES","TEMPLATE_PART_POST_TYPE","TEMPLATE_PART_ALL_AREAS_CATEGORY","usePatternCategories","useTemplatePartAreas","unlock","useLocation","CategoriesGroup","path","templatePartAreas","patternCategories","currentCategory","currentType","allPatterns","otherPatterns","createElement","className","key","count","Object","values","map","templateParts","length","reduce","acc","val","icon","label","id","type","isActive","entries","area","name","theme","user","category","SidebarNavigationScreenPatterns","backPath","params","categoryType","categoryId","hasTemplateParts","isLoading","hasPatterns","isBlockBasedTheme","select","getCurrentTheme","is_block_theme","isRoot","title","description","actions","content","Fragment"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n} from '@wordpress/components';\nimport { getTemplatePartIcon } from '@wordpress/editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { file } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport AddNewPattern from '../add-new-pattern';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport CategoryItem from './category-item';\nimport {\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_ALL_AREAS_CATEGORY,\n} from '../../utils/constants';\nimport usePatternCategories from './use-pattern-categories';\nimport useTemplatePartAreas from './use-template-part-areas';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction CategoriesGroup( {\n\tpath,\n\ttemplatePartAreas,\n\tpatternCategories,\n\tcurrentCategory,\n\tcurrentType,\n} ) {\n\tconst [ allPatterns, ...otherPatterns ] = patternCategories;\n\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t<CategoryItem\n\t\t\t\tkey=\"all\"\n\t\t\t\tpath={ path }\n\t\t\t\tcount={ Object.values( templatePartAreas )\n\t\t\t\t\t.map( ( { templateParts } ) => templateParts?.length || 0 )\n\t\t\t\t\t.reduce( ( acc, val ) => acc + val, 0 ) }\n\t\t\t\ticon={ getTemplatePartIcon() } /* no name, so it provides the fallback icon */\n\t\t\t\tlabel={ __( 'All template parts' ) }\n\t\t\t\tid={ TEMPLATE_PART_ALL_AREAS_CATEGORY }\n\t\t\t\ttype={ TEMPLATE_PART_POST_TYPE }\n\t\t\t\tisActive={\n\t\t\t\t\tcurrentCategory === TEMPLATE_PART_ALL_AREAS_CATEGORY &&\n\t\t\t\t\tcurrentType === TEMPLATE_PART_POST_TYPE\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ Object.entries( templatePartAreas ).map(\n\t\t\t\t( [ area, { label, templateParts } ] ) => (\n\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\tkey={ area }\n\t\t\t\t\t\tpath={ path }\n\t\t\t\t\t\tcount={ templateParts?.length }\n\t\t\t\t\t\ticon={ getTemplatePartIcon( area ) }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tid={ area }\n\t\t\t\t\t\ttype={ TEMPLATE_PART_POST_TYPE }\n\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\tcurrentCategory === area &&\n\t\t\t\t\t\t\tcurrentType === TEMPLATE_PART_POST_TYPE\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<div className=\"edit-site-sidebar-navigation-screen-patterns__divider\" />\n\t\t\t{ allPatterns && (\n\t\t\t\t<CategoryItem\n\t\t\t\t\tkey={ allPatterns.name }\n\t\t\t\t\tpath={ path }\n\t\t\t\t\tcount={ allPatterns.count }\n\t\t\t\t\tlabel={ allPatterns.label }\n\t\t\t\t\ticon={ file }\n\t\t\t\t\tid={ allPatterns.name }\n\t\t\t\t\ttype=\"pattern\"\n\t\t\t\t\tisActive={\n\t\t\t\t\t\tcurrentCategory === `${ allPatterns.name }` &&\n\t\t\t\t\t\t( currentType === PATTERN_TYPES.theme ||\n\t\t\t\t\t\t\tcurrentType === PATTERN_TYPES.user )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ otherPatterns.map( ( category ) => (\n\t\t\t\t<CategoryItem\n\t\t\t\t\tkey={ category.name }\n\t\t\t\t\tpath={ path }\n\t\t\t\t\tcount={ category.count }\n\t\t\t\t\tlabel={ category.label }\n\t\t\t\t\ticon={ file }\n\t\t\t\t\tid={ category.name }\n\t\t\t\t\ttype=\"pattern\"\n\t\t\t\t\tisActive={\n\t\t\t\t\t\tcurrentCategory === `${ category.name }` &&\n\t\t\t\t\t\t( currentType === PATTERN_TYPES.theme ||\n\t\t\t\t\t\t\tcurrentType === PATTERN_TYPES.user )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</ItemGroup>\n\t);\n}\n\nexport default function SidebarNavigationScreenPatterns( { backPath } ) {\n\tconst {\n\t\tparams: { categoryType, categoryId, path },\n\t} = useLocation();\n\tconst currentCategory = categoryId || PATTERN_DEFAULT_CATEGORY;\n\tconst currentType = categoryType || PATTERN_TYPES.theme;\n\n\tconst { templatePartAreas, hasTemplateParts, isLoading } =\n\t\tuseTemplatePartAreas();\n\tconst { patternCategories, hasPatterns } = usePatternCategories();\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot={ ! isBlockBasedTheme }\n\t\t\ttitle={ __( 'Patterns' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Manage what patterns are available when editing the site.'\n\t\t\t) }\n\t\t\tbackPath={ backPath }\n\t\t\tactions={ <AddNewPattern /> }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading items…' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! hasTemplateParts && ! hasPatterns && (\n\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t<Item>{ __( 'No items found' ) }</Item>\n\t\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<CategoriesGroup\n\t\t\t\t\t\t\t\tpath={ path }\n\t\t\t\t\t\t\t\ttemplatePartAreas={ templatePartAreas }\n\t\t\t\t\t\t\t\tpatternCategories={ patternCategories }\n\t\t\t\t\t\t\t\tcurrentCategory={ currentCategory }\n\t\t\t\t\t\t\t\tcurrentType={ currentType }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,uBAAuB,IAAIC,SAAS,EACpCC,kBAAkB,IAAIC,IAAI,QACpB,uBAAuB;AAC9B,SAASC,mBAAmB,QAAQ,mBAAmB;AACvD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,QAAQ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,CAAEE,WAAW,IACpC9B,aAAA,CAAC9B,SAAS;MAAC+B,SAAS,EAAC;IAAqD,GACzED,aAAA,CAAC5B,IAAI,QAAGE,EAAE,CAAE,gBAAiB,CAAS,CAC5B,CACX,EACD0B,aAAA,CAACR,eAAe;MACfC,IAAI,EAAGA,IAAM;MACbC,iBAAiB,EAAGA,iBAAmB;MACvCC,iBAAiB,EAAGA,iBAAmB;MACvCC,eAAe,EAAGA,eAAiB;MACnCC,WAAW,EAAGA;IAAa,CAC3B,CACA,CAEF;EACF,CACD,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["__experimentalItemGroup","ItemGroup","__experimentalItem","Item","getTemplatePartIcon","__","store","coreStore","useSelect","file","privateApis","routerPrivateApis","SidebarNavigationScreen","CategoryItem","PATTERN_DEFAULT_CATEGORY","PATTERN_TYPES","TEMPLATE_PART_POST_TYPE","TEMPLATE_PART_ALL_AREAS_CATEGORY","usePatternCategories","useTemplatePartAreas","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","useLocation","CategoriesGroup","templatePartAreas","patternCategories","currentCategory","currentType","allPatterns","otherPatterns","className","children","count","Object","values","map","templateParts","length","reduce","acc","val","icon","label","id","type","isActive","entries","area","name","user","category","SidebarNavigationScreenPatterns","backPath","params","postType","categoryId","hasTemplateParts","isLoading","hasPatterns","isBlockBasedTheme","select","getCurrentTheme","is_block_theme","isRoot","title","description","content"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n} from '@wordpress/components';\nimport { getTemplatePartIcon } from '@wordpress/editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { file } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport CategoryItem from './category-item';\nimport {\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_ALL_AREAS_CATEGORY,\n} from '../../utils/constants';\nimport usePatternCategories from './use-pattern-categories';\nimport useTemplatePartAreas from './use-template-part-areas';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction CategoriesGroup( {\n\ttemplatePartAreas,\n\tpatternCategories,\n\tcurrentCategory,\n\tcurrentType,\n} ) {\n\tconst [ allPatterns, ...otherPatterns ] = patternCategories;\n\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t<CategoryItem\n\t\t\t\tkey=\"all\"\n\t\t\t\tcount={ Object.values( templatePartAreas )\n\t\t\t\t\t.map( ( { templateParts } ) => templateParts?.length || 0 )\n\t\t\t\t\t.reduce( ( acc, val ) => acc + val, 0 ) }\n\t\t\t\ticon={ getTemplatePartIcon() } /* no name, so it provides the fallback icon */\n\t\t\t\tlabel={ __( 'All template parts' ) }\n\t\t\t\tid={ TEMPLATE_PART_ALL_AREAS_CATEGORY }\n\t\t\t\ttype={ TEMPLATE_PART_POST_TYPE }\n\t\t\t\tisActive={\n\t\t\t\t\tcurrentCategory === TEMPLATE_PART_ALL_AREAS_CATEGORY &&\n\t\t\t\t\tcurrentType === TEMPLATE_PART_POST_TYPE\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ Object.entries( templatePartAreas ).map(\n\t\t\t\t( [ area, { label, templateParts } ] ) => (\n\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\tkey={ area }\n\t\t\t\t\t\tcount={ templateParts?.length }\n\t\t\t\t\t\ticon={ getTemplatePartIcon( area ) }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tid={ area }\n\t\t\t\t\t\ttype={ TEMPLATE_PART_POST_TYPE }\n\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\tcurrentCategory === area &&\n\t\t\t\t\t\t\tcurrentType === TEMPLATE_PART_POST_TYPE\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<div className=\"edit-site-sidebar-navigation-screen-patterns__divider\" />\n\t\t\t{ allPatterns && (\n\t\t\t\t<CategoryItem\n\t\t\t\t\tkey={ allPatterns.name }\n\t\t\t\t\tcount={ allPatterns.count }\n\t\t\t\t\tlabel={ allPatterns.label }\n\t\t\t\t\ticon={ file }\n\t\t\t\t\tid={ allPatterns.name }\n\t\t\t\t\ttype={ PATTERN_TYPES.user }\n\t\t\t\t\tisActive={\n\t\t\t\t\t\tcurrentCategory === `${ allPatterns.name }` &&\n\t\t\t\t\t\tcurrentType === PATTERN_TYPES.user\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ otherPatterns.map( ( category ) => (\n\t\t\t\t<CategoryItem\n\t\t\t\t\tkey={ category.name }\n\t\t\t\t\tcount={ category.count }\n\t\t\t\t\tlabel={ category.label }\n\t\t\t\t\ticon={ file }\n\t\t\t\t\tid={ category.name }\n\t\t\t\t\ttype={ PATTERN_TYPES.user }\n\t\t\t\t\tisActive={\n\t\t\t\t\t\tcurrentCategory === `${ category.name }` &&\n\t\t\t\t\t\tcurrentType === PATTERN_TYPES.user\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</ItemGroup>\n\t);\n}\n\nexport default function SidebarNavigationScreenPatterns( { backPath } ) {\n\tconst {\n\t\tparams: { postType, categoryId },\n\t} = useLocation();\n\tconst currentType = postType || PATTERN_TYPES.user;\n\tconst currentCategory =\n\t\tcategoryId ||\n\t\t( currentType === PATTERN_TYPES.user\n\t\t\t? PATTERN_DEFAULT_CATEGORY\n\t\t\t: TEMPLATE_PART_ALL_AREAS_CATEGORY );\n\n\tconst { templatePartAreas, hasTemplateParts, isLoading } =\n\t\tuseTemplatePartAreas();\n\tconst { patternCategories, hasPatterns } = usePatternCategories();\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot={ ! isBlockBasedTheme }\n\t\t\ttitle={ __( 'Patterns' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Manage what patterns are available when editing the site.'\n\t\t\t) }\n\t\t\tbackPath={ backPath }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading items…' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! hasTemplateParts && ! hasPatterns && (\n\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t<Item>{ __( 'No items found' ) }</Item>\n\t\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<CategoriesGroup\n\t\t\t\t\t\t\t\ttemplatePartAreas={ templatePartAreas }\n\t\t\t\t\t\t\t\tpatternCategories={ patternCategories }\n\t\t\t\t\t\t\t\tcurrentCategory={ currentCategory }\n\t\t\t\t\t\t\t\tcurrentType={ currentType }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,uBAAuB,IAAIC,SAAS,EACpCC,kBAAkB,IAAIC,IAAI,QACpB,uBAAuB;AAC9B,SAASC,mBAAmB,QAAQ,mBAAmB;AACvD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,QAAQ,kBAAkB;AACvC,SAASC,WAAW,IAAIC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