@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
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.SidebarNavigationScreenWrapper = SidebarNavigationScreenWrapper;
8
8
  exports.default = SidebarNavigationScreenNavigationMenus;
9
- var _react = require("react");
10
9
  var _i18n = require("@wordpress/i18n");
11
10
  var _coreData = require("@wordpress/core-data");
12
11
  var _data = require("@wordpress/data");
@@ -21,6 +20,7 @@ var _singleNavigationMenu = _interopRequireDefault(require("../sidebar-navigatio
21
20
  var _useNavigationMenuHandlers = _interopRequireDefault(require("../sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers"));
22
21
  var _lockUnlock = require("../../lock-unlock");
23
22
  var _constants2 = require("../../utils/constants");
23
+ var _jsxRuntime = require("react/jsx-runtime");
24
24
  /**
25
25
  * WordPress dependencies
26
26
  */
@@ -76,14 +76,15 @@ function SidebarNavigationScreenNavigationMenus({
76
76
  } = (0, _useNavigationMenuHandlers.default)();
77
77
  const hasNavigationMenus = !!navigationMenus?.length;
78
78
  if (isLoading) {
79
- return (0, _react.createElement)(SidebarNavigationScreenWrapper, {
80
- backPath: backPath
81
- }, (0, _react.createElement)(_components.Spinner, {
82
- className: "edit-site-sidebar-navigation-screen-navigation-menus__loading"
83
- }));
79
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(SidebarNavigationScreenWrapper, {
80
+ backPath: backPath,
81
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Spinner, {
82
+ className: "edit-site-sidebar-navigation-screen-navigation-menus__loading"
83
+ })
84
+ });
84
85
  }
85
86
  if (!isLoading && !hasNavigationMenus) {
86
- return (0, _react.createElement)(SidebarNavigationScreenWrapper, {
87
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(SidebarNavigationScreenWrapper, {
87
88
  description: (0, _i18n.__)('No Navigation Menus found.'),
88
89
  backPath: backPath
89
90
  });
@@ -91,7 +92,7 @@ function SidebarNavigationScreenNavigationMenus({
91
92
 
92
93
  // if single menu then render it
93
94
  if (navigationMenus?.length === 1) {
94
- return (0, _react.createElement)(_singleNavigationMenu.default, {
95
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_singleNavigationMenu.default, {
95
96
  navigationMenu: firstNavigationMenu,
96
97
  backPath: backPath,
97
98
  handleDelete: () => handleDelete(firstNavigationMenu),
@@ -99,18 +100,21 @@ function SidebarNavigationScreenNavigationMenus({
99
100
  handleSave: edits => handleSave(firstNavigationMenu, edits)
100
101
  });
101
102
  }
102
- return (0, _react.createElement)(SidebarNavigationScreenWrapper, {
103
- backPath: backPath
104
- }, (0, _react.createElement)(_components.__experimentalItemGroup, null, navigationMenus?.map(({
105
- id,
106
- title,
107
- status
108
- }, index) => (0, _react.createElement)(NavMenuItem, {
109
- postId: id,
110
- key: id,
111
- withChevron: true,
112
- icon: _icons.navigation
113
- }, buildMenuLabel(title?.rendered, index + 1, status)))));
103
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(SidebarNavigationScreenWrapper, {
104
+ backPath: backPath,
105
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalItemGroup, {
106
+ children: navigationMenus?.map(({
107
+ id,
108
+ title,
109
+ status
110
+ }, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(NavMenuItem, {
111
+ postId: id,
112
+ withChevron: true,
113
+ icon: _icons.navigation,
114
+ children: buildMenuLabel(title?.rendered, index + 1, status)
115
+ }, id))
116
+ })
117
+ });
114
118
  }
115
119
  function SidebarNavigationScreenWrapper({
116
120
  children,
@@ -119,7 +123,7 @@ function SidebarNavigationScreenWrapper({
119
123
  description,
120
124
  backPath
121
125
  }) {
122
- return (0, _react.createElement)(_sidebarNavigationScreen.default, {
126
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreen.default, {
123
127
  title: title || (0, _i18n.__)('Navigation'),
124
128
  actions: actions,
125
129
  description: description || (0, _i18n.__)('Manage your Navigation Menus.'),
@@ -133,9 +137,9 @@ const NavMenuItem = ({
133
137
  }) => {
134
138
  const linkInfo = (0, _link.useLink)({
135
139
  postId,
136
- path: '/navigation'
140
+ postType: 'wp_navigation'
137
141
  });
138
- return (0, _react.createElement)(_sidebarNavigationItem.default, {
142
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationItem.default, {
139
143
  ...linkInfo,
140
144
  ...props
141
145
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_coreData","_data","_htmlEntities","_components","_icons","_sidebarNavigationScreen","_interopRequireDefault","_sidebarNavigationItem","_constants","_link","_singleNavigationMenu","_useNavigationMenuHandlers","_lockUnlock","_constants2","buildMenuLabel","title","id","status","sprintf","__","decodeEntities","hasCreatedFallback","SidebarNavigationScreenNavigationMenus","backPath","records","navigationMenus","isResolving","isResolvingNavigationMenus","hasResolved","hasResolvedNavigationMenus","useEntityRecords","NAVIGATION_POST_TYPE","PRELOADED_NAVIGATION_MENUS_QUERY","isLoading","getNavigationFallbackId","unlock","useSelect","coreStore","firstNavigationMenu","handleSave","handleDelete","handleDuplicate","useNavigationMenuHandlers","hasNavigationMenus","length","_react","createElement","SidebarNavigationScreenWrapper","Spinner","className","description","default","navigationMenu","edits","__experimentalItemGroup","map","index","NavMenuItem","postId","key","withChevron","icon","navigation","rendered","children","actions","content","props","linkInfo","useLink","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":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAIA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,wBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,qBAAA,GAAAJ,sBAAA,CAAAP,OAAA;AACA,IAAAY,0BAAA,GAAAL,sBAAA,CAAAP,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AAxBA;AACA;AACA;;AAYA;AACA;AACA;;AAUA;AACA,SAASe,cAAcA,CAAEC,KAAK,EAAEC,EAAE,EAAEC,MAAM,EAAG;EAC5C,IAAK,CAAEF,KAAK,EAAG;IACd;IACA,OAAO,IAAAG,aAAO,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC,EAAEH,EAAG,CAAC;EAC5C;EAEA,IAAKC,MAAM,KAAK,SAAS,EAAG;IAC3B,OAAO,IAAAG,4BAAc,EAAEL,KAAM,CAAC;EAC/B;EAEA,OAAO,IAAAG,aAAO;EACb;EACA,IAAAC,QAAE,EAAE,aAAc,CAAC,EACnB,IAAAC,4BAAc,EAAEL,KAAM,CAAC,EACvBE,MACD,CAAC;AACF;;AAEA;AACA,IAAII,kBAAkB,GAAG,KAAK;AAEf,SAASC,sCAAsCA,CAAE;EAA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,EAAGF;EAAU,CACpB,CAAC;AAEJ;AAEA,MAAMP,WAAW,GAAGA,CAAE;EAAEC,MAAM;EAAE,GAAGS;AAAM,CAAC,KAAM;EAC/C,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBX,MAAM;IACNY,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAO,IAAAzB,MAAA,CAAAC,aAAA,EAACvC,sBAAA,CAAA4C,OAAqB;IAAA,GAAMiB,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_coreData","_data","_htmlEntities","_components","_icons","_sidebarNavigationScreen","_interopRequireDefault","_sidebarNavigationItem","_constants","_link","_singleNavigationMenu","_useNavigationMenuHandlers","_lockUnlock","_constants2","_jsxRuntime","buildMenuLabel","title","id","status","sprintf","__","decodeEntities","hasCreatedFallback","SidebarNavigationScreenNavigationMenus","backPath","records","navigationMenus","isResolving","isResolvingNavigationMenus","hasResolved","hasResolvedNavigationMenus","useEntityRecords","NAVIGATION_POST_TYPE","PRELOADED_NAVIGATION_MENUS_QUERY","isLoading","getNavigationFallbackId","unlock","useSelect","coreStore","firstNavigationMenu","handleSave","handleDelete","handleDuplicate","useNavigationMenuHandlers","hasNavigationMenus","length","jsx","SidebarNavigationScreenWrapper","children","Spinner","className","description","default","navigationMenu","edits","__experimentalItemGroup","map","index","NavMenuItem","postId","withChevron","icon","navigation","rendered","actions","content","props","linkInfo","useLink","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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAIA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,wBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,qBAAA,GAAAJ,sBAAA,CAAAP,OAAA;AACA,IAAAY,0BAAA,GAAAL,sBAAA,CAAAP,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AAA6D,IAAAe,WAAA,GAAAf,OAAA;AAxB7D;AACA;AACA;;AAYA;AACA;AACA;;AAUA;AACA,SAASgB,cAAcA,CAAEC,KAAK,EAAEC,EAAE,EAAEC,MAAM,EAAG;EAC5C,IAAK,CAAEF,KAAK,EAAG;IACd;IACA,OAAO,IAAAG,aAAO,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC,EAAEH,E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AC;AAEnC;AAEO,SAAS8B,8BAA8BA,CAAE;EAC/CC,QAAQ;EACRgB,OAAO;EACPhD,KAAK;EACLmC,WAAW;EACX3B;AACD,CAAC,EAAG;EACH,oBACC,IAAAV,WAAA,CAAAgC,GAAA,EAACzC,wBAAA,CAAA+C,OAAuB;IACvBpC,KAAK,EAAGA,KAAK,IAAI,IAAAI,QAAE,EAAE,YAAa,CAAG;IACrC4C,OAAO,EAAGA,OAAS;IACnBb,WAAW,EAAGA,WAAW,IAAI,IAAA/B,QAAE,EAAE,+BAAgC,CAAG;IACpEI,QAAQ,EAAGA,QAAU;IACrByC,OAAO,EAAGjB;EAAU,CACpB,CAAC;AAEJ;AAEA,MAAMU,WAAW,GAAGA,CAAE;EAAEC,MAAM;EAAE,GAAGO;AAAM,CAAC,KAAM;EAC/C,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBT,MAAM;IACNU,QAAQ,EAAE;EACX,CAAE,CAAC;EACH,oBAAO,IAAAvD,WAAA,CAAAgC,GAAA,EAACvC,sBAAA,CAAA6C,OAAqB;IAAA,GAAMe,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC","ignoreList":[]}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = LeafMoreMenu;
7
- var _react = require("react");
8
7
  var _icons = require("@wordpress/icons");
9
8
  var _components = require("@wordpress/components");
10
9
  var _data = require("@wordpress/data");
@@ -13,6 +12,7 @@ var _i18n = require("@wordpress/i18n");
13
12
  var _blockEditor = require("@wordpress/block-editor");
14
13
  var _router = require("@wordpress/router");
15
14
  var _lockUnlock = require("../../lock-unlock");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
16
  /**
17
17
  * WordPress dependencies
18
18
  */
@@ -27,13 +27,9 @@ const POPOVER_PROPS = {
27
27
  */
28
28
 
29
29
  const {
30
- useLocation,
31
30
  useHistory
32
31
  } = (0, _lockUnlock.unlock)(_router.privateApis);
33
32
  function LeafMoreMenu(props) {
34
- const {
35
- params
36
- } = useLocation();
37
33
  const history = useHistory();
38
34
  const {
39
35
  block
@@ -68,53 +64,72 @@ function LeafMoreMenu(props) {
68
64
  name
69
65
  } = selectedBlock;
70
66
  if (attributes.kind === 'post-type' && attributes.id && attributes.type && history) {
67
+ const {
68
+ params
69
+ } = history.getLocationWithParams();
71
70
  history.push({
72
71
  postType: attributes.type,
73
- postId: attributes.id
72
+ postId: attributes.id,
73
+ canvas: 'edit'
74
74
  }, {
75
75
  backPath: params
76
76
  });
77
77
  }
78
78
  if (name === 'core/page-list-item' && attributes.id && history) {
79
+ const {
80
+ params
81
+ } = history.getLocationWithParams();
79
82
  history.push({
80
83
  postType: 'page',
81
- postId: attributes.id
84
+ postId: attributes.id,
85
+ canvas: 'edit'
82
86
  }, {
83
87
  backPath: params
84
88
  });
85
89
  }
86
- }, [history, params]);
87
- return (0, _react.createElement)(_components.DropdownMenu, {
90
+ }, [history]);
91
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownMenu, {
88
92
  icon: _icons.moreVertical,
89
93
  label: (0, _i18n.__)('Options'),
90
94
  className: "block-editor-block-settings-menu",
91
95
  popoverProps: POPOVER_PROPS,
92
96
  noIcons: true,
93
- ...props
94
- }, ({
95
- onClose
96
- }) => (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.MenuGroup, null, (0, _react.createElement)(_components.MenuItem, {
97
- icon: _icons.chevronUp,
98
- onClick: () => {
99
- moveBlocksUp([clientId], rootClientId);
100
- onClose();
101
- }
102
- }, (0, _i18n.__)('Move up')), (0, _react.createElement)(_components.MenuItem, {
103
- icon: _icons.chevronDown,
104
- onClick: () => {
105
- moveBlocksDown([clientId], rootClientId);
106
- onClose();
107
- }
108
- }, (0, _i18n.__)('Move down')), block.attributes?.type === 'page' && block.attributes?.id && (0, _react.createElement)(_components.MenuItem, {
109
- onClick: () => {
110
- onGoToPage(block);
111
- onClose();
112
- }
113
- }, goToLabel)), (0, _react.createElement)(_components.MenuGroup, null, (0, _react.createElement)(_components.MenuItem, {
114
- onClick: () => {
115
- removeBlocks([clientId], false);
116
- onClose();
117
- }
118
- }, removeLabel))));
97
+ ...props,
98
+ children: ({
99
+ onClose
100
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
101
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.MenuGroup, {
102
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuItem, {
103
+ icon: _icons.chevronUp,
104
+ onClick: () => {
105
+ moveBlocksUp([clientId], rootClientId);
106
+ onClose();
107
+ },
108
+ children: (0, _i18n.__)('Move up')
109
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuItem, {
110
+ icon: _icons.chevronDown,
111
+ onClick: () => {
112
+ moveBlocksDown([clientId], rootClientId);
113
+ onClose();
114
+ },
115
+ children: (0, _i18n.__)('Move down')
116
+ }), block.attributes?.type === 'page' && block.attributes?.id && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuItem, {
117
+ onClick: () => {
118
+ onGoToPage(block);
119
+ onClose();
120
+ },
121
+ children: goToLabel
122
+ })]
123
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuGroup, {
124
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuItem, {
125
+ onClick: () => {
126
+ removeBlocks([clientId], false);
127
+ onClose();
128
+ },
129
+ children: removeLabel
130
+ })
131
+ })]
132
+ })
133
+ });
119
134
  }
120
135
  //# sourceMappingURL=leaf-more-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_icons","require","_components","_data","_element","_i18n","_blockEditor","_router","_lockUnlock","POPOVER_PROPS","className","placement","useLocation","useHistory","unlock","routerPrivateApis","LeafMoreMenu","props","params","history","block","clientId","moveBlocksDown","moveBlocksUp","removeBlocks","useDispatch","blockEditorStore","removeLabel","sprintf","__","BlockTitle","maximumLength","goToLabel","rootClientId","useSelect","select","getBlockRootClientId","onGoToPage","useCallback","selectedBlock","attributes","name","kind","id","type","push","postType","postId","backPath","_react","createElement","DropdownMenu","icon","moreVertical","label","popoverProps","noIcons","onClose","Fragment","MenuGroup","MenuItem","chevronUp","onClick","chevronDown"],"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":";;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAUA,IAAAO,WAAA,GAAAP,OAAA;AApBA;AACA;AACA;;AAUA,MAAMQ,aAAa,GAAG;EACrBC,SAAS,EAAE,2CAA2C;EACtDC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;;AAGA,MAAM;EAAEC,WAAW;EAAEC;AAAW,CAAC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E,EAAE,WAAY,CACT,CAAC,EACTT,KAAK,CAACoB,UAAU,EAAEI,IAAI,KAAK,MAAM,IAClCxB,KAAK,CAACoB,UAAU,EAAEG,EAAE,IACnB,IAAAM,MAAA,CAAAC,aAAA,EAAChD,WAAA,CAAA0D,QAAQ;IACRE,OAAO,EAAGA,CAAA,KAAM;MACfzB,UAAU,CAAEjB,KAAM,CAAC;MACnBqC,OAAO,CAAC,CAAC;IACV;EAAG,GAEDzB,SACO,CAEF,CAAC,EACZ,IAAAiB,MAAA,CAAAC,aAAA,EAAChD,WAAA,CAAAyD,SAAS,QACT,IAAAV,MAAA,CAAAC,aAAA,EAAChD,WAAA,CAAA0D,QAAQ;IACRE,OAAO,EAAGA,CAAA,KAAM;MACftC,YAAY,CAAE,CAAEH,QAAQ,CAAE,EAAE,KAAM,CAAC;MACnCoC,OAAO,CAAC,CAAC;IACV;EAAG,GAED9B,WACO,CACA,CACV,CAEU,CAAC;AAEjB","ignoreList":[]}
1
+ {"version":3,"names":["_icons","require","_components","_data","_element","_i18n","_blockEditor","_router","_lockUnlock","_jsxRuntime","POPOVER_PROPS","className","placement","useHistory","unlock","routerPrivateApis","LeafMoreMenu","props","history","block","clientId","moveBlocksDown","moveBlocksUp","removeBlocks","useDispatch","blockEditorStore","removeLabel","sprintf","__","BlockTitle","maximumLength","goToLabel","rootClientId","useSelect","select","getBlockRootClientId","onGoToPage","useCallback","selectedBlock","attributes","name","kind","id","type","params","getLocationWithParams","push","postType","postId","canvas","backPath","jsx","DropdownMenu","icon","moreVertical","label","popoverProps","noIcons","children","onClose","jsxs","Fragment","MenuGroup","MenuItem","chevronUp","onClick","chevronDown"],"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\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAUA,IAAAO,WAAA,GAAAP,OAAA;AAA2C,IAAAQ,WAAA,GAAAR,OAAA;AApB3C;AACA;AACA;;AAUA,MAAMS,aAAa,GAAG;EACrBC,SAAS,EAAE,2CAA2C;EACtDC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;;AAGA,MAAM;EAAEC;AAAW,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEnC,SAASC,YAAYA,CAAEC,KAAK,EAAG;EAC7C,MAAMC,OAAO,GAAGL,UAAU,CAAC,CAAC;EAC5B,MAAM;IAAEM;EAAM,CAAC,GAAGF,KAAK;EACvB,MAAM;IAAEG;EAAS,CAAC,GAAGD,KAAK;EAC1B,MAAM;IAAEE,cAAc;IAAEC,YAAY;IAAEC;EAAa,CA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,EAAEI,IAAI,KAAK,MAAM,IAClCxB,KAAK,CAACoB,UAAU,EAAEG,EAAE,iBACnB,IAAAjC,WAAA,CAAA0C,GAAA,EAACjD,WAAA,CAAA6D,QAAQ;UACRE,OAAO,EAAGA,CAAA,KAAM;YACf7B,UAAU,CAAEjB,KAAM,CAAC;YACnBwC,OAAO,CAAC,CAAC;UACV,CAAG;UAAAD,QAAA,EAED3B;QAAS,CACF,CACV;MAAA,CACQ,CAAC,eACZ,IAAAtB,WAAA,CAAA0C,GAAA,EAACjD,WAAA,CAAA4D,SAAS;QAAAJ,QAAA,eACT,IAAAjD,WAAA,CAAA0C,GAAA,EAACjD,WAAA,CAAA6D,QAAQ;UACRE,OAAO,EAAGA,CAAA,KAAM;YACf1C,YAAY,CAAE,CAAEH,QAAQ,CAAE,EAAE,KAAM,CAAC;YACnCuC,OAAO,CAAC,CAAC;UACV,CAAG;UAAAD,QAAA,EAEDhC;QAAW,CACJ;MAAC,CACD,CAAC;IAAA,CACX;EACF,CACY,CAAC;AAEjB","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = NavigationMenuContent;
8
- var _react = require("react");
9
8
  var _blockEditor = require("@wordpress/block-editor");
10
9
  var _data = require("@wordpress/data");
11
10
  var _blocks = require("@wordpress/blocks");
@@ -13,6 +12,7 @@ var _element = require("@wordpress/element");
13
12
  var _coreData = require("@wordpress/core-data");
14
13
  var _lockUnlock = require("../../lock-unlock");
15
14
  var _leafMoreMenu = _interopRequireDefault(require("./leaf-more-menu"));
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
16
  /**
17
17
  * WordPress dependencies
18
18
  */
@@ -76,13 +76,16 @@ function NavigationMenuContent({
76
76
 
77
77
  // The hidden block is needed because it makes block edit side effects trigger.
78
78
  // For example a navigation page list load its items has an effect on edit to load its items.
79
- return (0, _react.createElement)(_react.Fragment, null, !isLoading && (0, _react.createElement)(PrivateListView, {
80
- rootClientId: listViewRootClientId,
81
- onSelect: offCanvasOnselect,
82
- blockSettingsMenu: _leafMoreMenu.default,
83
- showAppender: false
84
- }), (0, _react.createElement)("div", {
85
- className: "edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor"
86
- }, (0, _react.createElement)(_blockEditor.BlockList, null)));
79
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
80
+ children: [!isLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)(PrivateListView, {
81
+ rootClientId: listViewRootClientId,
82
+ onSelect: offCanvasOnselect,
83
+ blockSettingsMenu: _leafMoreMenu.default,
84
+ showAppender: false
85
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
86
+ className: "edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor",
87
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockList, {})
88
+ })]
89
+ });
87
90
  }
88
91
  //# sourceMappingURL=navigation-menu-content.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_data","_blocks","_element","_coreData","_lockUnlock","_leafMoreMenu","_interopRequireDefault","PrivateListView","unlock","blockEditorPrivateApis","MAX_PAGE_COUNT","PAGES_QUERY","per_page","_fields","orderby","order","NavigationMenuContent","rootClientId","listViewRootClientId","isLoading","useSelect","select","areInnerBlocksControlled","getBlockName","getBlockCount","getBlockOrder","blockEditorStore","isResolving","coreStore","blockClientIds","hasOnlyPageListBlock","length","pageListHasBlocks","isLoadingPages","replaceBlock","__unstableMarkNextChangeAsNotPersistent","useDispatch","offCanvasOnselect","useCallback","block","name","attributes","url","clientId","createBlock","_react","createElement","Fragment","onSelect","blockSettingsMenu","LeafMoreMenu","showAppender","className","BlockList"],"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":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IA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AAa,CAAC,IAC1CgB;IACF,CAAC;EACF,CAAC,EACD,CAAEhB,YAAY,CACf,CAAC;EACD,MAAM;IAAEiB,YAAY;IAAEC;EAAwC,CAAC,GAC9D,IAAAC,iBAAW,EAAEV,kBAAiB,CAAC;EAEhC,MAAMW,iBAAiB,GAAG,IAAAC,oBAAW,EAClCC,KAAK,IAAM;IACZ,IACCA,KAAK,CAACC,IAAI,KAAK,sBAAsB,IACrC,CAAED,KAAK,CAACE,UAAU,CAACC,GAAG,EACrB;MACDP,uCAAuC,CAAC,CAAC;MACzCD,YAAY,CACXK,KAAK,CAACI,QAAQ,EACd,IAAAC,mBAAW,EAAE,sBAAsB,EAAEL,KAAK,CAACE,UAAW,CACvD,CAAC;IACF;EACD,CAAC,EACD,CAAEN,uCAAuC,EAAED,YAAY,CACxD,CAAC;;EAED;EACA;EACA,OACC,IAAAW,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACG,CAAE5B,SAAS,IACZ,IAAA0B,MAAA,CAAAC,aAAA,EAACvC,eAAe;IACfU,YAAY,EAAGC,oBAAsB;IACrC8B,QAAQ,EAAGX,iBAAmB;IAC9BY,iBAAiB,EAAGC,qBAAc;IAClCC,YAAY,EAAG;EAAO,CACtB,CACD,EACD,IAAAN,MAAA,CAAAC,aAAA;IAAKM,SAAS,EAAC;EAA2E,GACzF,IAAAP,MAAA,CAAAC,aAAA,EAAChD,YAAA,CAAAuD,SAAS,MAAE,CACR,CACJ,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_blockEditor","require","_data","_blocks","_element","_coreData","_lockUnlock","_leafMoreMenu","_interopRequireDefault","_jsxRuntime","PrivateListView","unlock","blockEditorPrivateApis","MAX_PAGE_COUNT","PAGES_QUERY","per_page","_fields","orderby","order","NavigationMenuContent","rootClientId","listViewRootClientId","isLoading","useSelect","select","areInnerBlocksControlled","getBlockName","getBlockCount","getBlockOrder","blockEditorStore","isResolving","coreStore","blockClientIds","hasOnlyPageListBlock","length","pageListHasBlocks","isLoadingPages","replaceBlock","__unstableMarkNextChangeAsNotPersistent","useDispatch","offCanvasOnselect","useCallback","block","name","attributes","url","clientId","createBlock","jsxs","Fragment","children","jsx","onSelect","blockSettingsMenu","LeafMoreMenu","showAppender","className","BlockList"],"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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A,eACzF,IAAAzC,WAAA,CAAA0C,GAAA,EAACnD,YAAA,CAAAyD,SAAS,IAAE;IAAC,CACT,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = CategoryItem;
8
- var _react = require("react");
9
8
  var _sidebarNavigationItem = _interopRequireDefault(require("../sidebar-navigation-item"));
10
9
  var _link = require("../routes/link");
10
+ var _constants = require("../../utils/constants");
11
+ var _jsxRuntime = require("react/jsx-runtime");
11
12
  /**
12
13
  * Internal dependencies
13
14
  */
@@ -18,22 +19,23 @@ function CategoryItem({
18
19
  id,
19
20
  isActive,
20
21
  label,
21
- type,
22
- path = '/patterns'
22
+ type
23
23
  }) {
24
24
  const linkInfo = (0, _link.useLink)({
25
- path,
26
- categoryType: type,
27
- categoryId: id
25
+ categoryId: id !== _constants.TEMPLATE_PART_ALL_AREAS_CATEGORY && id !== _constants.PATTERN_DEFAULT_CATEGORY ? id : undefined,
26
+ postType: type === _constants.TEMPLATE_PART_POST_TYPE ? _constants.TEMPLATE_PART_POST_TYPE : _constants.PATTERN_TYPES.user
28
27
  });
29
28
  if (!count) {
30
29
  return;
31
30
  }
32
- return (0, _react.createElement)(_sidebarNavigationItem.default, {
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationItem.default, {
33
32
  ...linkInfo,
34
33
  icon: icon,
35
- suffix: (0, _react.createElement)("span", null, count),
36
- "aria-current": isActive ? 'true' : undefined
37
- }, label);
34
+ suffix: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
35
+ children: count
36
+ }),
37
+ "aria-current": isActive ? 'true' : undefined,
38
+ children: label
39
+ });
38
40
  }
39
41
  //# sourceMappingURL=category-item.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_sidebarNavigationItem","_interopRequireDefault","require","_link","CategoryItem","count","icon","id","isActive","label","type","path","linkInfo","useLink","categoryType","categoryId","_react","createElement","default","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":";;;;;;;;AAGA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIe,SAASE,YAAYA,CAAE;EACrCC,KAAK;EACLC,IAAI;EACJC,EAAE;EACFC,QAAQ;EACRC,KAAK;EACLC,IAAI;EACJC,IAAI,GAAG;AACR,CAAC,EAAG;EACH,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBF,IAAI;IACJG,YAAY,EAAEJ,IAAI;IAClBK,UAAU,EAAER;EACb,CAAE,CAAC;EAEH,IAAK,CAAEF,KAAK,EAAG;IACd;EACD;EAEA,OACC,IAAAW,MAAA,CAAAC,aAAA,EAACjB,sBAAA,CAAAkB,OAAqB;IAAA,GAChBN,QAAQ;IACbN,IAAI,EAAGA,IAAM;IACba,MAAM,EAAG,IAAAH,MAAA,CAAAC,aAAA,gBAAQZ,KAAa,CAAG;IACjC,gBAAeG,QAAQ,GAAG,MAAM,GAAGY;EAAW,GAE5CX,KACoB,CAAC;AAE1B","ignoreList":[]}
1
+ {"version":3,"names":["_sidebarNavigationItem","_interopRequireDefault","require","_link","_constants","_jsxRuntime","CategoryItem","count","icon","id","isActive","label","type","linkInfo","useLink","categoryId","TEMPLATE_PART_ALL_AREAS_CATEGORY","PATTERN_DEFAULT_CATEGORY","undefined","postType","TEMPLATE_PART_POST_TYPE","PATTERN_TYPES","user","jsx","default","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":";;;;;;;AAGA,IAAAA,sBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAK+B,IAAAG,WAAA,GAAAH,OAAA;AAV/B;AACA;AACA;;AAUe,SAASI,YAAYA,CAAE;EACrCC,KAAK;EACLC,IAAI;EACJC,EAAE;EACFC,QAAQ;EACRC,KAAK;EACLC;AACD,CAAC,EAAG;EACH,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBC,UAAU,EACTN,EAAE,KAAKO,2CAAgC,IACvCP,EAAE,KAAKQ,mCAAwB,GAC5BR,EAAE,GACFS,SAAS;IACbC,QAAQ,EACPP,IAAI,KAAKQ,kCAAuB,GAC7BA,kCAAuB,GACvBC,wBAAa,CAACC;EACnB,CAAE,CAAC;EAEH,IAAK,CAAEf,KAAK,EAAG;IACd;EACD;EAEA,oBACC,IAAAF,WAAA,CAAAkB,GAAA,EAACvB,sBAAA,CAAAwB,OAAqB;IAAA,GAChBX,QAAQ;IACbL,IAAI,EAAGA,IAAM;IACbiB,MAAM,eAAG,IAAApB,WAAA,CAAAkB,GAAA;MAAAG,QAAA,EAAQnB;IAAK,CAAQ,CAAG;IACjC,gBAAeG,QAAQ,GAAG,MAAM,GAAGQ,SAAW;IAAAQ,QAAA,EAE5Cf;EAAK,CACe,CAAC;AAE1B","ignoreList":[]}