@wordpress/edit-site 5.35.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (886) 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/use-editor-iframe-props.js +88 -0
  19. package/build/components/block-editor/use-editor-iframe-props.js.map +1 -0
  20. package/build/components/canvas-loader/index.js +13 -12
  21. package/build/components/canvas-loader/index.js.map +1 -1
  22. package/build/components/dataviews-actions/index.js +7 -4
  23. package/build/components/dataviews-actions/index.js.map +1 -1
  24. package/build/components/editor/index.js +59 -148
  25. package/build/components/editor/index.js.map +1 -1
  26. package/build/components/editor-canvas-container/index.js +27 -29
  27. package/build/components/editor-canvas-container/index.js.map +1 -1
  28. package/build/components/error-boundary/index.js +2 -2
  29. package/build/components/error-boundary/index.js.map +1 -1
  30. package/build/components/error-boundary/warning.js +13 -11
  31. package/build/components/error-boundary/warning.js.map +1 -1
  32. package/build/components/global-styles/background-panel.js +6 -5
  33. package/build/components/global-styles/background-panel.js.map +1 -1
  34. package/build/components/global-styles/block-preview-panel.js +19 -17
  35. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  36. package/build/components/global-styles/color-indicator-wrapper.js +2 -2
  37. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  38. package/build/components/global-styles/color-palette-panel.js +30 -29
  39. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  40. package/build/components/global-styles/dimensions-panel.js +2 -2
  41. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  42. package/build/components/global-styles/font-families.js +55 -39
  43. package/build/components/global-styles/font-families.js.map +1 -1
  44. package/build/components/global-styles/font-family-item.js +17 -13
  45. package/build/components/global-styles/font-family-item.js.map +1 -1
  46. package/build/components/global-styles/font-library-modal/collection-font-variant.js +25 -22
  47. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/context.js +7 -30
  49. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  50. package/build/components/global-styles/font-library-modal/font-card.js +24 -16
  51. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/font-collection.js +195 -152
  53. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/font-demo.js +14 -12
  55. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +29 -20
  57. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/index.js +41 -36
  59. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/installed-fonts.js +153 -109
  61. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/library-font-details.js +16 -14
  63. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/library-font-variant.js +25 -22
  65. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/upload-fonts.js +40 -34
  67. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  68. package/build/components/global-styles/font-library-modal/utils/index.js +3 -3
  69. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  70. package/build/components/global-styles/gradients-palette-panel.js +41 -37
  71. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  72. package/build/components/global-styles/header.js +37 -28
  73. package/build/components/global-styles/header.js.map +1 -1
  74. package/build/components/global-styles/highlighted-colors.js +3 -4
  75. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  76. package/build/components/global-styles/hooks.js +11 -23
  77. package/build/components/global-styles/hooks.js.map +1 -1
  78. package/build/components/global-styles/icon-with-current-color.js +2 -2
  79. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  80. package/build/components/global-styles/navigation-button.js +15 -11
  81. package/build/components/global-styles/navigation-button.js.map +1 -1
  82. package/build/components/global-styles/palette.js +39 -32
  83. package/build/components/global-styles/palette.js.map +1 -1
  84. package/build/components/global-styles/preset-colors.js +3 -4
  85. package/build/components/global-styles/preset-colors.js.map +1 -1
  86. package/build/components/global-styles/preview-colors.js +22 -20
  87. package/build/components/global-styles/preview-colors.js.map +1 -1
  88. package/build/components/global-styles/preview-iframe.js +34 -29
  89. package/build/components/global-styles/preview-iframe.js.map +1 -1
  90. package/build/components/global-styles/preview-styles.js +95 -90
  91. package/build/components/global-styles/preview-styles.js.map +1 -1
  92. package/build/components/global-styles/root-menu.js +28 -21
  93. package/build/components/global-styles/root-menu.js.map +1 -1
  94. package/build/components/global-styles/screen-background.js +6 -4
  95. package/build/components/global-styles/screen-background.js.map +1 -1
  96. package/build/components/global-styles/screen-block-list.js +33 -27
  97. package/build/components/global-styles/screen-block-list.js.map +1 -1
  98. package/build/components/global-styles/screen-block.js +62 -53
  99. package/build/components/global-styles/screen-block.js.map +1 -1
  100. package/build/components/global-styles/screen-color-palette.js +29 -19
  101. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  102. package/build/components/global-styles/screen-colors.js +18 -14
  103. package/build/components/global-styles/screen-colors.js.map +1 -1
  104. package/build/components/global-styles/screen-css.js +20 -14
  105. package/build/components/global-styles/screen-css.js.map +1 -1
  106. package/build/components/global-styles/screen-layout.js +9 -4
  107. package/build/components/global-styles/screen-layout.js.map +1 -1
  108. package/build/components/global-styles/screen-revisions/index.js +52 -42
  109. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  110. package/build/components/global-styles/screen-revisions/revisions-buttons.js +81 -70
  111. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  112. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  113. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  114. package/build/components/global-styles/screen-root.js +76 -42
  115. package/build/components/global-styles/screen-root.js.map +1 -1
  116. package/build/components/global-styles/screen-shadows.js +22 -0
  117. package/build/components/global-styles/screen-shadows.js.map +1 -0
  118. package/build/components/global-styles/screen-style-variations.js +14 -9
  119. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  120. package/build/components/global-styles/screen-typography-element.js +50 -45
  121. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  122. package/build/components/global-styles/screen-typography.js +15 -11
  123. package/build/components/global-styles/screen-typography.js.map +1 -1
  124. package/build/components/global-styles/shadow-utils.js +230 -0
  125. package/build/components/global-styles/shadow-utils.js.map +1 -0
  126. package/build/components/global-styles/shadows-edit-panel.js +458 -0
  127. package/build/components/global-styles/shadows-edit-panel.js.map +1 -0
  128. package/build/components/global-styles/shadows-panel.js +128 -0
  129. package/build/components/global-styles/shadows-panel.js.map +1 -0
  130. package/build/components/global-styles/style-variations-container.js +67 -18
  131. package/build/components/global-styles/style-variations-container.js.map +1 -1
  132. package/build/components/global-styles/subtitle.js +5 -4
  133. package/build/components/global-styles/subtitle.js.map +1 -1
  134. package/build/components/global-styles/typography-elements.js +53 -45
  135. package/build/components/global-styles/typography-elements.js.map +1 -1
  136. package/build/components/global-styles/typography-example.js +11 -8
  137. package/build/components/global-styles/typography-example.js.map +1 -1
  138. package/build/components/global-styles/typography-panel.js +2 -2
  139. package/build/components/global-styles/typography-panel.js.map +1 -1
  140. package/build/components/global-styles/typography-preview.js +5 -4
  141. package/build/components/global-styles/typography-preview.js.map +1 -1
  142. package/build/components/global-styles/ui.js +124 -92
  143. package/build/components/global-styles/ui.js.map +1 -1
  144. package/build/components/global-styles/utils.js +28 -0
  145. package/build/components/global-styles/utils.js.map +1 -1
  146. package/build/components/global-styles/variations/variation.js +27 -22
  147. package/build/components/global-styles/variations/variation.js.map +1 -1
  148. package/build/components/global-styles/variations/variations-color.js +18 -13
  149. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  150. package/build/components/global-styles/variations/variations-panel.js +27 -17
  151. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  152. package/build/components/global-styles/variations/variations-typography.js +37 -31
  153. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  154. package/build/components/global-styles-renderer/index.js +5 -1
  155. package/build/components/global-styles-renderer/index.js.map +1 -1
  156. package/build/components/global-styles-sidebar/default-sidebar.js +22 -18
  157. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  158. package/build/components/global-styles-sidebar/index.js +34 -26
  159. package/build/components/global-styles-sidebar/index.js.map +1 -1
  160. package/build/components/layout/index.js +112 -95
  161. package/build/components/layout/index.js.map +1 -1
  162. package/build/components/layout/router.js +83 -103
  163. package/build/components/layout/router.js.map +1 -1
  164. package/build/components/media/index.js +2 -2
  165. package/build/components/media/index.js.map +1 -1
  166. package/build/components/{header-edit-mode/more-menu → more-menu}/index.js +7 -3
  167. package/build/components/more-menu/index.js.map +1 -0
  168. package/build/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
  169. package/build/components/more-menu/site-export.js.map +1 -0
  170. package/build/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
  171. package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  172. package/build/components/page/header.js +24 -20
  173. package/build/components/page/header.js.map +1 -1
  174. package/build/components/page/index.js +12 -10
  175. package/build/components/page/index.js.map +1 -1
  176. package/build/components/page-pages/index.js +133 -52
  177. package/build/components/page-pages/index.js.map +1 -1
  178. package/build/components/page-patterns/delete-category-menu-item.js +23 -20
  179. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  180. package/build/components/page-patterns/header.js +47 -32
  181. package/build/components/page-patterns/header.js.map +1 -1
  182. package/build/components/page-patterns/index.js +114 -108
  183. package/build/components/page-patterns/index.js.map +1 -1
  184. package/build/components/page-patterns/rename-category-menu-item.js +14 -11
  185. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  186. package/build/components/page-patterns/use-patterns.js +7 -6
  187. package/build/components/page-patterns/use-patterns.js.map +1 -1
  188. package/build/components/page-templates/index.js +78 -59
  189. package/build/components/page-templates/index.js.map +1 -1
  190. package/build/components/pagination/index.js +50 -41
  191. package/build/components/pagination/index.js.map +1 -1
  192. package/build/components/plugin-template-setting-panel/index.js +4 -2
  193. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  194. package/build/components/resizable-frame/index.js +38 -32
  195. package/build/components/resizable-frame/index.js.map +1 -1
  196. package/build/components/revisions/index.js +26 -20
  197. package/build/components/revisions/index.js.map +1 -1
  198. package/build/components/routes/link.js +5 -4
  199. package/build/components/routes/link.js.map +1 -1
  200. package/build/components/save-button/index.js +5 -4
  201. package/build/components/save-button/index.js.map +1 -1
  202. package/build/components/save-hub/index.js +12 -11
  203. package/build/components/save-hub/index.js.map +1 -1
  204. package/build/components/save-panel/index.js +34 -28
  205. package/build/components/save-panel/index.js.map +1 -1
  206. package/build/components/sidebar/index.js +14 -11
  207. package/build/components/sidebar/index.js.map +1 -1
  208. package/build/components/sidebar-button/index.js +2 -2
  209. package/build/components/sidebar-button/index.js.map +1 -1
  210. package/build/components/sidebar-dataviews/add-new-view.js +56 -48
  211. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  212. package/build/components/sidebar-dataviews/custom-dataviews-list.js +106 -89
  213. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  214. package/build/components/sidebar-dataviews/dataview-item.js +12 -10
  215. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  216. package/build/components/sidebar-dataviews/default-views.js +48 -0
  217. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  218. package/build/components/sidebar-dataviews/index.js +21 -22
  219. package/build/components/sidebar-dataviews/index.js.map +1 -1
  220. package/build/components/sidebar-navigation-item/index.js +27 -25
  221. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen/index.js +51 -39
  223. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  224. package/build/components/sidebar-navigation-screen-details-footer/index.js +24 -17
  225. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  226. package/build/components/sidebar-navigation-screen-details-panel/index.js +9 -7
  227. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  228. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
  229. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +5 -5
  231. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  232. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
  233. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-global-styles/index.js +54 -45
  235. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-main/index.js +45 -22
  237. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
  239. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +11 -10
  241. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +53 -42
  243. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
  245. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  246. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +42 -36
  247. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +16 -13
  249. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  250. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  251. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +27 -23
  253. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  254. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +50 -35
  255. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +12 -9
  257. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
  259. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-patterns/index.js +58 -63
  261. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-templates-browse/content.js +17 -17
  263. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  264. package/build/components/sidebar-navigation-screen-templates-browse/index.js +4 -4
  265. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  266. package/build/components/site-hub/index.js +81 -72
  267. package/build/components/site-hub/index.js.map +1 -1
  268. package/build/components/site-icon/index.js +8 -7
  269. package/build/components/site-icon/index.js.map +1 -1
  270. package/build/components/style-book/index.js +115 -99
  271. package/build/components/style-book/index.js.map +1 -1
  272. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +10 -30
  273. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  274. package/build/components/table/index.js +23 -15
  275. package/build/components/table/index.js.map +1 -1
  276. package/build/components/template-part-converter/convert-to-regular.js +5 -4
  277. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  278. package/build/components/template-part-converter/convert-to-template-part.js +23 -17
  279. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  280. package/build/components/template-part-converter/index.js +12 -10
  281. package/build/components/template-part-converter/index.js.map +1 -1
  282. package/build/components/welcome-guide/editor.js +20 -15
  283. package/build/components/welcome-guide/editor.js.map +1 -1
  284. package/build/components/welcome-guide/image.js +13 -12
  285. package/build/components/welcome-guide/image.js.map +1 -1
  286. package/build/components/welcome-guide/index.js +4 -2
  287. package/build/components/welcome-guide/index.js.map +1 -1
  288. package/build/components/welcome-guide/page.js +18 -13
  289. package/build/components/welcome-guide/page.js.map +1 -1
  290. package/build/components/welcome-guide/styles.js +45 -28
  291. package/build/components/welcome-guide/styles.js.map +1 -1
  292. package/build/components/welcome-guide/template.js +18 -13
  293. package/build/components/welcome-guide/template.js.map +1 -1
  294. package/build/deprecated.js +4 -4
  295. package/build/deprecated.js.map +1 -1
  296. package/build/hooks/commands/use-common-commands.js +12 -24
  297. package/build/hooks/commands/use-common-commands.js.map +1 -1
  298. package/build/hooks/commands/use-edit-mode-commands.js +2 -116
  299. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  300. package/build/hooks/index.js +0 -1
  301. package/build/hooks/index.js.map +1 -1
  302. package/build/hooks/push-changes-to-global-styles/index.js +25 -16
  303. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  304. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  305. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  306. package/build/index.js +3 -3
  307. package/build/index.js.map +1 -1
  308. package/build/store/private-actions.js +7 -1
  309. package/build/store/private-actions.js.map +1 -1
  310. package/build/store/selectors.js +2 -2
  311. package/build/store/selectors.js.map +1 -1
  312. package/build/utils/template-part-create.js +0 -62
  313. package/build/utils/template-part-create.js.map +1 -1
  314. package/build/utils/use-activate-theme.js +4 -5
  315. package/build/utils/use-activate-theme.js.map +1 -1
  316. package/build-module/components/add-new-page/index.js +34 -27
  317. package/build-module/components/add-new-page/index.js.map +1 -1
  318. package/build-module/components/add-new-pattern/index.js +98 -78
  319. package/build-module/components/add-new-pattern/index.js.map +1 -1
  320. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +36 -30
  321. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  322. package/build-module/components/add-new-template/add-custom-template-modal-content.js +121 -95
  323. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  324. package/build-module/components/add-new-template/index.js +89 -71
  325. package/build-module/components/add-new-template/index.js.map +1 -1
  326. package/build-module/components/add-new-template/utils.js +36 -17
  327. package/build-module/components/add-new-template/utils.js.map +1 -1
  328. package/build-module/components/app/index.js +11 -4
  329. package/build-module/components/app/index.js.map +1 -1
  330. package/build-module/components/block-editor/block-inspector-button.js +5 -4
  331. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  332. package/build-module/components/block-editor/use-editor-iframe-props.js +80 -0
  333. package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -0
  334. package/build-module/components/canvas-loader/index.js +14 -13
  335. package/build-module/components/canvas-loader/index.js.map +1 -1
  336. package/build-module/components/dataviews-actions/index.js +7 -4
  337. package/build-module/components/dataviews-actions/index.js.map +1 -1
  338. package/build-module/components/editor/index.js +65 -152
  339. package/build-module/components/editor/index.js.map +1 -1
  340. package/build-module/components/editor-canvas-container/index.js +29 -30
  341. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  342. package/build-module/components/error-boundary/index.js +2 -2
  343. package/build-module/components/error-boundary/index.js.map +1 -1
  344. package/build-module/components/error-boundary/warning.js +13 -11
  345. package/build-module/components/error-boundary/warning.js.map +1 -1
  346. package/build-module/components/global-styles/background-panel.js +6 -5
  347. package/build-module/components/global-styles/background-panel.js.map +1 -1
  348. package/build-module/components/global-styles/block-preview-panel.js +19 -17
  349. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  350. package/build-module/components/global-styles/color-indicator-wrapper.js +2 -2
  351. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  352. package/build-module/components/global-styles/color-palette-panel.js +31 -29
  353. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  354. package/build-module/components/global-styles/dimensions-panel.js +2 -2
  355. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  356. package/build-module/components/global-styles/font-families.js +58 -40
  357. package/build-module/components/global-styles/font-families.js.map +1 -1
  358. package/build-module/components/global-styles/font-family-item.js +18 -13
  359. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  360. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +26 -22
  361. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  362. package/build-module/components/global-styles/font-library-modal/context.js +7 -30
  363. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  364. package/build-module/components/global-styles/font-library-modal/font-card.js +25 -16
  365. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  366. package/build-module/components/global-styles/font-library-modal/font-collection.js +198 -153
  367. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  368. package/build-module/components/global-styles/font-library-modal/font-demo.js +14 -12
  369. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  370. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +30 -20
  371. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/index.js +42 -36
  373. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +157 -111
  375. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  376. package/build-module/components/global-styles/font-library-modal/library-font-details.js +18 -14
  377. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +26 -22
  379. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  380. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +42 -35
  381. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  382. package/build-module/components/global-styles/font-library-modal/utils/index.js +3 -3
  383. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  384. package/build-module/components/global-styles/gradients-palette-panel.js +42 -37
  385. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  386. package/build-module/components/global-styles/header.js +38 -28
  387. package/build-module/components/global-styles/header.js.map +1 -1
  388. package/build-module/components/global-styles/highlighted-colors.js +3 -4
  389. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  390. package/build-module/components/global-styles/hooks.js +11 -23
  391. package/build-module/components/global-styles/hooks.js.map +1 -1
  392. package/build-module/components/global-styles/icon-with-current-color.js +2 -2
  393. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  394. package/build-module/components/global-styles/navigation-button.js +16 -11
  395. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  396. package/build-module/components/global-styles/palette.js +42 -34
  397. package/build-module/components/global-styles/palette.js.map +1 -1
  398. package/build-module/components/global-styles/preset-colors.js +3 -4
  399. package/build-module/components/global-styles/preset-colors.js.map +1 -1
  400. package/build-module/components/global-styles/preview-colors.js +22 -20
  401. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  402. package/build-module/components/global-styles/preview-iframe.js +36 -29
  403. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  404. package/build-module/components/global-styles/preview-styles.js +96 -90
  405. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  406. package/build-module/components/global-styles/root-menu.js +31 -22
  407. package/build-module/components/global-styles/root-menu.js.map +1 -1
  408. package/build-module/components/global-styles/screen-background.js +8 -4
  409. package/build-module/components/global-styles/screen-background.js.map +1 -1
  410. package/build-module/components/global-styles/screen-block-list.js +35 -27
  411. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  412. package/build-module/components/global-styles/screen-block.js +64 -53
  413. package/build-module/components/global-styles/screen-block.js.map +1 -1
  414. package/build-module/components/global-styles/screen-color-palette.js +31 -19
  415. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  416. package/build-module/components/global-styles/screen-colors.js +20 -14
  417. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  418. package/build-module/components/global-styles/screen-css.js +22 -14
  419. package/build-module/components/global-styles/screen-css.js.map +1 -1
  420. package/build-module/components/global-styles/screen-layout.js +11 -4
  421. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  422. package/build-module/components/global-styles/screen-revisions/index.js +54 -42
  423. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  424. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +82 -70
  425. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  426. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  427. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  428. package/build-module/components/global-styles/screen-root.js +78 -42
  429. package/build-module/components/global-styles/screen-root.js.map +1 -1
  430. package/build-module/components/global-styles/screen-shadows.js +13 -0
  431. package/build-module/components/global-styles/screen-shadows.js.map +1 -0
  432. package/build-module/components/global-styles/screen-style-variations.js +16 -9
  433. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  434. package/build-module/components/global-styles/screen-typography-element.js +52 -45
  435. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  436. package/build-module/components/global-styles/screen-typography.js +17 -11
  437. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  438. package/build-module/components/global-styles/shadow-utils.js +221 -0
  439. package/build-module/components/global-styles/shadow-utils.js.map +1 -0
  440. package/build-module/components/global-styles/shadows-edit-panel.js +452 -0
  441. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -0
  442. package/build-module/components/global-styles/shadows-panel.js +121 -0
  443. package/build-module/components/global-styles/shadows-panel.js.map +1 -0
  444. package/build-module/components/global-styles/style-variations-container.js +68 -19
  445. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  446. package/build-module/components/global-styles/subtitle.js +5 -4
  447. package/build-module/components/global-styles/subtitle.js.map +1 -1
  448. package/build-module/components/global-styles/typography-elements.js +54 -45
  449. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  450. package/build-module/components/global-styles/typography-example.js +12 -8
  451. package/build-module/components/global-styles/typography-example.js.map +1 -1
  452. package/build-module/components/global-styles/typography-panel.js +2 -2
  453. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  454. package/build-module/components/global-styles/typography-preview.js +5 -4
  455. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  456. package/build-module/components/global-styles/ui.js +126 -92
  457. package/build-module/components/global-styles/ui.js.map +1 -1
  458. package/build-module/components/global-styles/utils.js +27 -0
  459. package/build-module/components/global-styles/utils.js.map +1 -1
  460. package/build-module/components/global-styles/variations/variation.js +27 -22
  461. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  462. package/build-module/components/global-styles/variations/variations-color.js +19 -13
  463. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  464. package/build-module/components/global-styles/variations/variations-panel.js +28 -18
  465. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  466. package/build-module/components/global-styles/variations/variations-typography.js +38 -31
  467. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  468. package/build-module/components/global-styles-renderer/index.js +5 -1
  469. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  470. package/build-module/components/global-styles-sidebar/default-sidebar.js +24 -18
  471. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  472. package/build-module/components/global-styles-sidebar/index.js +35 -26
  473. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  474. package/build-module/components/layout/index.js +115 -96
  475. package/build-module/components/layout/index.js.map +1 -1
  476. package/build-module/components/layout/router.js +83 -103
  477. package/build-module/components/layout/router.js.map +1 -1
  478. package/build-module/components/media/index.js +2 -2
  479. package/build-module/components/media/index.js.map +1 -1
  480. package/build-module/components/{header-edit-mode/more-menu → more-menu}/index.js +9 -3
  481. package/build-module/components/more-menu/index.js.map +1 -0
  482. package/build-module/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
  483. package/build-module/components/more-menu/site-export.js.map +1 -0
  484. package/build-module/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
  485. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  486. package/build-module/components/page/header.js +25 -19
  487. package/build-module/components/page/header.js.map +1 -1
  488. package/build-module/components/page/index.js +14 -11
  489. package/build-module/components/page/index.js.map +1 -1
  490. package/build-module/components/page-pages/index.js +138 -55
  491. package/build-module/components/page-pages/index.js.map +1 -1
  492. package/build-module/components/page-patterns/delete-category-menu-item.js +25 -20
  493. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  494. package/build-module/components/page-patterns/header.js +48 -32
  495. package/build-module/components/page-patterns/header.js.map +1 -1
  496. package/build-module/components/page-patterns/index.js +115 -108
  497. package/build-module/components/page-patterns/index.js.map +1 -1
  498. package/build-module/components/page-patterns/rename-category-menu-item.js +16 -11
  499. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  500. package/build-module/components/page-patterns/use-patterns.js +7 -6
  501. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  502. package/build-module/components/page-templates/index.js +80 -59
  503. package/build-module/components/page-templates/index.js.map +1 -1
  504. package/build-module/components/pagination/index.js +51 -41
  505. package/build-module/components/pagination/index.js.map +1 -1
  506. package/build-module/components/plugin-template-setting-panel/index.js +4 -2
  507. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  508. package/build-module/components/resizable-frame/index.js +40 -32
  509. package/build-module/components/resizable-frame/index.js.map +1 -1
  510. package/build-module/components/revisions/index.js +27 -20
  511. package/build-module/components/revisions/index.js.map +1 -1
  512. package/build-module/components/routes/link.js +5 -4
  513. package/build-module/components/routes/link.js.map +1 -1
  514. package/build-module/components/save-button/index.js +5 -4
  515. package/build-module/components/save-button/index.js.map +1 -1
  516. package/build-module/components/save-hub/index.js +12 -11
  517. package/build-module/components/save-hub/index.js.map +1 -1
  518. package/build-module/components/save-panel/index.js +35 -28
  519. package/build-module/components/save-panel/index.js.map +1 -1
  520. package/build-module/components/sidebar/index.js +14 -11
  521. package/build-module/components/sidebar/index.js.map +1 -1
  522. package/build-module/components/sidebar-button/index.js +2 -2
  523. package/build-module/components/sidebar-button/index.js.map +1 -1
  524. package/build-module/components/sidebar-dataviews/add-new-view.js +58 -48
  525. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  526. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +108 -89
  527. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  528. package/build-module/components/sidebar-dataviews/dataview-item.js +13 -10
  529. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  530. package/build-module/components/sidebar-dataviews/default-views.js +49 -1
  531. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  532. package/build-module/components/sidebar-dataviews/index.js +23 -22
  533. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  534. package/build-module/components/sidebar-navigation-item/index.js +28 -25
  535. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-screen/index.js +53 -39
  537. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  538. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +25 -17
  539. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  540. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +10 -7
  541. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
  543. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  544. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +5 -5
  545. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  546. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
  547. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  548. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +56 -45
  549. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  550. package/build-module/components/sidebar-navigation-screen-main/index.js +47 -22
  551. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
  553. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  554. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +11 -10
  555. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  556. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +55 -42
  557. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
  559. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +43 -36
  561. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +17 -13
  563. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  565. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +27 -23
  567. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  568. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +52 -35
  569. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  570. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +14 -9
  571. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  572. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
  573. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  574. package/build-module/components/sidebar-navigation-screen-patterns/index.js +60 -63
  575. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  576. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +18 -17
  577. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +4 -4
  579. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  580. package/build-module/components/site-hub/index.js +83 -73
  581. package/build-module/components/site-hub/index.js.map +1 -1
  582. package/build-module/components/site-icon/index.js +8 -7
  583. package/build-module/components/site-icon/index.js.map +1 -1
  584. package/build-module/components/style-book/index.js +116 -99
  585. package/build-module/components/style-book/index.js.map +1 -1
  586. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +10 -30
  587. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  588. package/build-module/components/table/index.js +24 -15
  589. package/build-module/components/table/index.js.map +1 -1
  590. package/build-module/components/template-part-converter/convert-to-regular.js +5 -4
  591. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  592. package/build-module/components/template-part-converter/convert-to-template-part.js +25 -16
  593. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  594. package/build-module/components/template-part-converter/index.js +12 -10
  595. package/build-module/components/template-part-converter/index.js.map +1 -1
  596. package/build-module/components/welcome-guide/editor.js +22 -15
  597. package/build-module/components/welcome-guide/editor.js.map +1 -1
  598. package/build-module/components/welcome-guide/image.js +14 -12
  599. package/build-module/components/welcome-guide/image.js.map +1 -1
  600. package/build-module/components/welcome-guide/index.js +6 -2
  601. package/build-module/components/welcome-guide/index.js.map +1 -1
  602. package/build-module/components/welcome-guide/page.js +20 -13
  603. package/build-module/components/welcome-guide/page.js.map +1 -1
  604. package/build-module/components/welcome-guide/styles.js +47 -28
  605. package/build-module/components/welcome-guide/styles.js.map +1 -1
  606. package/build-module/components/welcome-guide/template.js +20 -13
  607. package/build-module/components/welcome-guide/template.js.map +1 -1
  608. package/build-module/deprecated.js +4 -4
  609. package/build-module/deprecated.js.map +1 -1
  610. package/build-module/hooks/commands/use-common-commands.js +12 -23
  611. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  612. package/build-module/hooks/commands/use-edit-mode-commands.js +4 -118
  613. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  614. package/build-module/hooks/index.js +0 -1
  615. package/build-module/hooks/index.js.map +1 -1
  616. package/build-module/hooks/push-changes-to-global-styles/index.js +27 -16
  617. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  618. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  619. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  620. package/build-module/index.js +3 -3
  621. package/build-module/index.js.map +1 -1
  622. package/build-module/store/private-actions.js +7 -1
  623. package/build-module/store/private-actions.js.map +1 -1
  624. package/build-module/store/selectors.js +2 -2
  625. package/build-module/store/selectors.js.map +1 -1
  626. package/build-module/utils/template-part-create.js +0 -52
  627. package/build-module/utils/template-part-create.js.map +1 -1
  628. package/build-module/utils/use-activate-theme.js +4 -5
  629. package/build-module/utils/use-activate-theme.js.map +1 -1
  630. package/build-style/style-rtl.css +289 -554
  631. package/build-style/style.css +289 -554
  632. package/package.json +43 -44
  633. package/src/components/add-new-pattern/index.js +46 -37
  634. package/src/components/add-new-template/index.js +2 -0
  635. package/src/components/add-new-template/utils.js +77 -39
  636. package/src/components/block-editor/style.scss +4 -139
  637. package/src/components/block-editor/use-editor-iframe-props.js +79 -0
  638. package/src/components/canvas-loader/index.js +5 -2
  639. package/src/components/dataviews-actions/index.js +7 -2
  640. package/src/components/editor/index.js +65 -211
  641. package/src/components/editor/style.scss +2 -13
  642. package/src/components/editor-canvas-container/index.js +30 -35
  643. package/src/components/editor-canvas-container/style.scss +16 -0
  644. package/src/components/global-styles/background-panel.js +3 -2
  645. package/src/components/global-styles/color-palette-panel.js +1 -1
  646. package/src/components/global-styles/font-families.js +25 -18
  647. package/src/components/global-styles/font-family-item.js +2 -2
  648. package/src/components/global-styles/font-library-modal/collection-font-variant.js +2 -1
  649. package/src/components/global-styles/font-library-modal/context.js +6 -44
  650. package/src/components/global-styles/font-library-modal/font-collection.js +3 -5
  651. package/src/components/global-styles/font-library-modal/installed-fonts.js +42 -12
  652. package/src/components/global-styles/font-library-modal/library-font-variant.js +2 -1
  653. package/src/components/global-styles/font-library-modal/upload-fonts.js +1 -4
  654. package/src/components/global-styles/font-library-modal/utils/index.js +1 -1
  655. package/src/components/global-styles/hooks.js +10 -37
  656. package/src/components/global-styles/palette.js +9 -18
  657. package/src/components/global-styles/root-menu.js +16 -12
  658. package/src/components/global-styles/screen-block.js +1 -1
  659. package/src/components/global-styles/screen-layout.js +9 -2
  660. package/src/components/global-styles/screen-revisions/index.js +6 -0
  661. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
  662. package/src/components/global-styles/screen-shadows.js +13 -0
  663. package/src/components/global-styles/screen-typography.js +1 -1
  664. package/src/components/global-styles/shadow-utils.js +158 -0
  665. package/src/components/global-styles/shadows-edit-panel.js +555 -0
  666. package/src/components/global-styles/shadows-panel.js +147 -0
  667. package/src/components/global-styles/style-variations-container.js +73 -10
  668. package/src/components/global-styles/style.scss +54 -5
  669. package/src/components/global-styles/test/shadow-utils.spec.js +251 -0
  670. package/src/components/global-styles/test/utils.spec.js +59 -0
  671. package/src/components/global-styles/ui.js +10 -6
  672. package/src/components/global-styles/utils.js +27 -0
  673. package/src/components/global-styles/variations/style.scss +7 -4
  674. package/src/components/global-styles/variations/variation.js +2 -0
  675. package/src/components/global-styles/variations/variations-color.js +2 -1
  676. package/src/components/global-styles/variations/variations-panel.js +16 -5
  677. package/src/components/global-styles/variations/variations-typography.js +2 -1
  678. package/src/components/global-styles-renderer/index.js +7 -1
  679. package/src/components/layout/index.js +7 -2
  680. package/src/components/layout/router.js +64 -79
  681. package/src/components/layout/style.scss +11 -8
  682. package/src/components/{header-edit-mode/more-menu → more-menu}/index.js +1 -1
  683. package/src/components/page/header.js +17 -13
  684. package/src/components/page/index.js +1 -5
  685. package/src/components/page/style.scss +21 -7
  686. package/src/components/page-pages/index.js +154 -30
  687. package/src/components/page-pages/style.scss +15 -0
  688. package/src/components/page-patterns/delete-category-menu-item.js +1 -2
  689. package/src/components/page-patterns/header.js +45 -33
  690. package/src/components/page-patterns/index.js +14 -51
  691. package/src/components/page-patterns/style.scss +21 -14
  692. package/src/components/page-patterns/use-patterns.js +13 -6
  693. package/src/components/resizable-frame/index.js +1 -1
  694. package/src/components/save-panel/index.js +2 -4
  695. package/src/components/sidebar-dataviews/add-new-view.js +5 -5
  696. package/src/components/sidebar-dataviews/custom-dataviews-list.js +5 -7
  697. package/src/components/sidebar-dataviews/dataview-item.js +2 -2
  698. package/src/components/sidebar-dataviews/default-views.js +61 -1
  699. package/src/components/sidebar-dataviews/index.js +4 -9
  700. package/src/components/sidebar-navigation-item/index.js +7 -7
  701. package/src/components/sidebar-navigation-screen-global-styles/index.js +8 -2
  702. package/src/components/sidebar-navigation-screen-main/index.js +14 -4
  703. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  704. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  705. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -3
  706. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +0 -61
  707. package/src/components/sidebar-navigation-screen-patterns/category-item.js +5 -3
  708. package/src/components/sidebar-navigation-screen-patterns/index.js +6 -16
  709. package/src/components/sidebar-navigation-screen-templates-browse/content.js +1 -1
  710. package/src/components/sidebar-navigation-screen-templates-browse/index.js +1 -1
  711. package/src/components/site-hub/index.js +11 -12
  712. package/src/components/site-hub/style.scss +46 -9
  713. package/src/components/style-book/index.js +1 -1
  714. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +18 -23
  715. package/src/components/template-part-converter/convert-to-template-part.js +4 -1
  716. package/src/hooks/commands/use-common-commands.js +12 -23
  717. package/src/hooks/commands/use-edit-mode-commands.js +4 -118
  718. package/src/hooks/index.js +0 -1
  719. package/src/hooks/push-changes-to-global-styles/index.js +2 -1
  720. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
  721. package/src/index.js +1 -1
  722. package/src/store/private-actions.js +9 -1
  723. package/src/store/selectors.js +2 -2
  724. package/src/style.scss +0 -6
  725. package/src/utils/template-part-create.js +0 -67
  726. package/src/utils/use-activate-theme.js +2 -2
  727. package/build/components/block-editor/editor-canvas.js +0 -139
  728. package/build/components/block-editor/editor-canvas.js.map +0 -1
  729. package/build/components/block-editor/resizable-editor.js +0 -86
  730. package/build/components/block-editor/resizable-editor.js.map +0 -1
  731. package/build/components/block-editor/resize-handle.js +0 -57
  732. package/build/components/block-editor/resize-handle.js.map +0 -1
  733. package/build/components/block-editor/site-editor-canvas.js +0 -95
  734. package/build/components/block-editor/site-editor-canvas.js.map +0 -1
  735. package/build/components/code-editor/index.js +0 -111
  736. package/build/components/code-editor/index.js.map +0 -1
  737. package/build/components/create-template-part-modal/index.js +0 -151
  738. package/build/components/create-template-part-modal/index.js.map +0 -1
  739. package/build/components/header-edit-mode/index.js +0 -50
  740. package/build/components/header-edit-mode/index.js.map +0 -1
  741. package/build/components/header-edit-mode/more-menu/index.js.map +0 -1
  742. package/build/components/header-edit-mode/more-menu/site-export.js.map +0 -1
  743. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
  744. package/build/components/page-patterns/dataviews-pattern-actions.js +0 -311
  745. package/build/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
  746. package/build/components/pattern-modal/duplicate.js +0 -70
  747. package/build/components/pattern-modal/duplicate.js.map +0 -1
  748. package/build/components/pattern-modal/index.js +0 -23
  749. package/build/components/pattern-modal/index.js.map +0 -1
  750. package/build/components/pattern-modal/rename.js +0 -45
  751. package/build/components/pattern-modal/rename.js.map +0 -1
  752. package/build/components/rename-post-menu-item/index.js +0 -109
  753. package/build/components/rename-post-menu-item/index.js.map +0 -1
  754. package/build/components/sidebar-navigation-screen-page/index.js +0 -163
  755. package/build/components/sidebar-navigation-screen-page/index.js.map +0 -1
  756. package/build/components/sidebar-navigation-screen-page/page-details.js +0 -127
  757. package/build/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
  758. package/build/components/sidebar-navigation-screen-page/status-label.js +0 -65
  759. package/build/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
  760. package/build/components/sidebar-navigation-screen-pattern/index.js +0 -67
  761. package/build/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
  762. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -38
  763. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
  764. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -29
  765. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
  766. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -37
  767. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
  768. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -45
  769. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
  770. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -88
  771. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
  772. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -29
  773. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  774. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -138
  775. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
  776. package/build/components/sidebar-navigation-screen-template/home-template-details.js +0 -110
  777. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
  778. package/build/components/sidebar-navigation-screen-template/index.js +0 -121
  779. package/build/components/sidebar-navigation-screen-template/index.js.map +0 -1
  780. package/build/components/sidebar-navigation-screen-template/template-areas.js +0 -117
  781. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
  782. package/build/components/template-actions/index.js +0 -131
  783. package/build/components/template-actions/index.js.map +0 -1
  784. package/build/hooks/components.js +0 -10
  785. package/build/hooks/components.js.map +0 -1
  786. package/build/utils/get-is-list-page.js +0 -28
  787. package/build/utils/get-is-list-page.js.map +0 -1
  788. package/build-module/components/block-editor/editor-canvas.js +0 -131
  789. package/build-module/components/block-editor/editor-canvas.js.map +0 -1
  790. package/build-module/components/block-editor/resizable-editor.js +0 -79
  791. package/build-module/components/block-editor/resizable-editor.js.map +0 -1
  792. package/build-module/components/block-editor/resize-handle.js +0 -50
  793. package/build-module/components/block-editor/resize-handle.js.map +0 -1
  794. package/build-module/components/block-editor/site-editor-canvas.js +0 -86
  795. package/build-module/components/block-editor/site-editor-canvas.js.map +0 -1
  796. package/build-module/components/code-editor/index.js +0 -103
  797. package/build-module/components/code-editor/index.js.map +0 -1
  798. package/build-module/components/create-template-part-modal/index.js +0 -143
  799. package/build-module/components/create-template-part-modal/index.js.map +0 -1
  800. package/build-module/components/header-edit-mode/index.js +0 -42
  801. package/build-module/components/header-edit-mode/index.js.map +0 -1
  802. package/build-module/components/header-edit-mode/more-menu/index.js.map +0 -1
  803. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +0 -1
  804. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
  805. package/build-module/components/page-patterns/dataviews-pattern-actions.js +0 -304
  806. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
  807. package/build-module/components/pattern-modal/duplicate.js +0 -62
  808. package/build-module/components/pattern-modal/duplicate.js.map +0 -1
  809. package/build-module/components/pattern-modal/index.js +0 -14
  810. package/build-module/components/pattern-modal/index.js.map +0 -1
  811. package/build-module/components/pattern-modal/rename.js +0 -37
  812. package/build-module/components/pattern-modal/rename.js.map +0 -1
  813. package/build-module/components/rename-post-menu-item/index.js +0 -102
  814. package/build-module/components/rename-post-menu-item/index.js.map +0 -1
  815. package/build-module/components/sidebar-navigation-screen-page/index.js +0 -155
  816. package/build-module/components/sidebar-navigation-screen-page/index.js.map +0 -1
  817. package/build-module/components/sidebar-navigation-screen-page/page-details.js +0 -120
  818. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
  819. package/build-module/components/sidebar-navigation-screen-page/status-label.js +0 -57
  820. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
  821. package/build-module/components/sidebar-navigation-screen-pattern/index.js +0 -59
  822. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
  823. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -30
  824. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
  825. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -20
  826. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
  827. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -29
  828. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
  829. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
  830. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
  831. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -80
  832. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
  833. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -22
  834. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  835. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -130
  836. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
  837. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +0 -103
  838. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
  839. package/build-module/components/sidebar-navigation-screen-template/index.js +0 -113
  840. package/build-module/components/sidebar-navigation-screen-template/index.js.map +0 -1
  841. package/build-module/components/sidebar-navigation-screen-template/template-areas.js +0 -109
  842. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
  843. package/build-module/components/template-actions/index.js +0 -123
  844. package/build-module/components/template-actions/index.js.map +0 -1
  845. package/build-module/hooks/components.js +0 -7
  846. package/build-module/hooks/components.js.map +0 -1
  847. package/build-module/utils/get-is-list-page.js +0 -22
  848. package/build-module/utils/get-is-list-page.js.map +0 -1
  849. package/src/components/block-editor/editor-canvas.js +0 -158
  850. package/src/components/block-editor/resizable-editor.js +0 -82
  851. package/src/components/block-editor/resize-handle.js +0 -66
  852. package/src/components/block-editor/site-editor-canvas.js +0 -107
  853. package/src/components/code-editor/index.js +0 -94
  854. package/src/components/code-editor/style.scss +0 -95
  855. package/src/components/create-template-part-modal/index.js +0 -199
  856. package/src/components/create-template-part-modal/style.scss +0 -69
  857. package/src/components/header-edit-mode/index.js +0 -51
  858. package/src/components/header-edit-mode/style.scss +0 -3
  859. package/src/components/page-patterns/dataviews-pattern-actions.js +0 -350
  860. package/src/components/pattern-modal/duplicate.js +0 -55
  861. package/src/components/pattern-modal/index.js +0 -19
  862. package/src/components/pattern-modal/rename.js +0 -30
  863. package/src/components/rename-post-menu-item/index.js +0 -138
  864. package/src/components/sidebar-navigation-screen-page/index.js +0 -204
  865. package/src/components/sidebar-navigation-screen-page/page-details.js +0 -161
  866. package/src/components/sidebar-navigation-screen-page/status-label.js +0 -71
  867. package/src/components/sidebar-navigation-screen-page/style.scss +0 -69
  868. package/src/components/sidebar-navigation-screen-pattern/index.js +0 -57
  869. package/src/components/sidebar-navigation-screen-pattern/style.scss +0 -26
  870. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -31
  871. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -21
  872. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -33
  873. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
  874. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -98
  875. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -32
  876. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -205
  877. package/src/components/sidebar-navigation-screen-template/home-template-details.js +0 -144
  878. package/src/components/sidebar-navigation-screen-template/index.js +0 -134
  879. package/src/components/sidebar-navigation-screen-template/style.scss +0 -53
  880. package/src/components/sidebar-navigation-screen-template/template-areas.js +0 -135
  881. package/src/components/template-actions/index.js +0 -165
  882. package/src/hooks/components.js +0 -11
  883. package/src/utils/get-is-list-page.js +0 -23
  884. package/src/utils/test/template-part-create.js +0 -63
  885. /package/src/components/{header-edit-mode/more-menu → more-menu}/site-export.js +0 -0
  886. /package/src/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +0 -0
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -28,6 +27,9 @@ import SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-d
28
27
  import ColorVariations from '../global-styles/variations/variations-color';
29
28
  import TypographyVariations from '../global-styles/variations/variations-typography';
30
29
  import { useColorVariations, useTypographyVariations } from '../global-styles/hooks';
30
+ import { jsx as _jsx } from "react/jsx-runtime";
31
+ import { jsxs as _jsxs } from "react/jsx-runtime";
32
+ import { Fragment as _Fragment } from "react/jsx-runtime";
31
33
  const noop = () => {};
32
34
  export function SidebarNavigationItemGlobalStyles(props) {
33
35
  const {
@@ -38,12 +40,15 @@ export function SidebarNavigationItemGlobalStyles(props) {
38
40
  } = unlock(useDispatch(editSiteStore));
39
41
  const hasGlobalStyleVariations = useSelect(select => !!select(coreStore).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, []);
40
42
  if (hasGlobalStyleVariations) {
41
- return createElement(SidebarNavigationItem, {
43
+ return /*#__PURE__*/_jsx(SidebarNavigationItem, {
42
44
  ...props,
43
- path: "/wp_global_styles"
45
+ params: {
46
+ path: '/wp_global_styles'
47
+ },
48
+ uid: "global-styles-navigation-item"
44
49
  });
45
50
  }
46
- return createElement(SidebarNavigationItem, {
51
+ return /*#__PURE__*/_jsx(SidebarNavigationItem, {
47
52
  ...props,
48
53
  onClick: () => {
49
54
  // Switch to edit mode.
@@ -73,22 +78,24 @@ function SidebarNavigationScreenGlobalStylesContent() {
73
78
  // the block editor store's `__internalIsInitialized` is true before
74
79
  // rendering the iframe. Without this, the iframe previews will not render
75
80
  // in mobile viewport sizes, where the editor canvas is hidden.
76
- return createElement(BlockEditorProvider, {
81
+ return /*#__PURE__*/_jsx(BlockEditorProvider, {
77
82
  settings: storedSettings,
78
83
  onChange: noop,
79
- onInput: noop
80
- }, createElement(VStack, {
81
- spacing: 10,
82
- className: "edit-site-global-styles-variation-container"
83
- }, createElement(StyleVariationsContainer, {
84
- gap: gap
85
- }), colorVariations?.length && createElement(ColorVariations, {
86
- title: __('Colors'),
87
- gap: gap
88
- }), typographyVariations?.length && createElement(TypographyVariations, {
89
- title: __('Typography'),
90
- gap: gap
91
- })));
84
+ onInput: noop,
85
+ children: /*#__PURE__*/_jsxs(VStack, {
86
+ spacing: 10,
87
+ className: "edit-site-global-styles-variation-container",
88
+ children: [/*#__PURE__*/_jsx(StyleVariationsContainer, {
89
+ gap: gap
90
+ }), colorVariations?.length && /*#__PURE__*/_jsx(ColorVariations, {
91
+ title: __('Palettes'),
92
+ gap: gap
93
+ }), typographyVariations?.length && /*#__PURE__*/_jsx(TypographyVariations, {
94
+ title: __('Typography'),
95
+ gap: gap
96
+ })]
97
+ })
98
+ });
92
99
  }
93
100
  export default function SidebarNavigationScreenGlobalStyles({
94
101
  backPath
@@ -157,32 +164,36 @@ export default function SidebarNavigationScreenGlobalStyles({
157
164
  const hasRevisions = revisionsCount > 0;
158
165
  const modifiedDateTime = revisions?.[0]?.modified;
159
166
  const shouldShowGlobalStylesFooter = hasRevisions && !isLoadingRevisions && modifiedDateTime;
160
- return createElement(Fragment, null, createElement(SidebarNavigationScreen, {
161
- title: __('Styles'),
162
- description: __('Choose a different style combination for the theme styles.'),
163
- backPath: backPath,
164
- content: createElement(SidebarNavigationScreenGlobalStylesContent, null),
165
- footer: shouldShowGlobalStylesFooter && createElement(SidebarNavigationScreenDetailsFooter, {
166
- record: revisions?.[0],
167
- onClick: openRevisions
168
- }),
169
- actions: createElement(Fragment, null, !isMobileViewport && createElement(SidebarButton, {
170
- icon: seen,
171
- label: __('Style Book'),
172
- onClick: () => setEditorCanvasContainerView(!isStyleBookOpened ? 'style-book' : undefined),
173
- isPressed: isStyleBookOpened
174
- }), createElement(SidebarButton, {
175
- icon: edit,
176
- label: __('Edit styles'),
177
- onClick: async () => await openGlobalStyles()
178
- }))
179
- }), isStyleBookOpened && !isMobileViewport && isViewMode && createElement(StyleBook, {
180
- enableResizing: false,
181
- isSelected: () => false,
182
- onClick: openStyleBook,
183
- onSelect: openStyleBook,
184
- showCloseButton: false,
185
- showTabs: false
186
- }));
167
+ return /*#__PURE__*/_jsxs(_Fragment, {
168
+ children: [/*#__PURE__*/_jsx(SidebarNavigationScreen, {
169
+ title: __('Styles'),
170
+ description: __('Choose a different style combination for the theme styles.'),
171
+ backPath: backPath,
172
+ content: /*#__PURE__*/_jsx(SidebarNavigationScreenGlobalStylesContent, {}),
173
+ footer: shouldShowGlobalStylesFooter && /*#__PURE__*/_jsx(SidebarNavigationScreenDetailsFooter, {
174
+ record: revisions?.[0],
175
+ onClick: openRevisions
176
+ }),
177
+ actions: /*#__PURE__*/_jsxs(_Fragment, {
178
+ children: [!isMobileViewport && /*#__PURE__*/_jsx(SidebarButton, {
179
+ icon: seen,
180
+ label: __('Style Book'),
181
+ onClick: () => setEditorCanvasContainerView(!isStyleBookOpened ? 'style-book' : undefined),
182
+ isPressed: isStyleBookOpened
183
+ }), /*#__PURE__*/_jsx(SidebarButton, {
184
+ icon: edit,
185
+ label: __('Edit styles'),
186
+ onClick: async () => await openGlobalStyles()
187
+ })]
188
+ })
189
+ }), isStyleBookOpened && !isMobileViewport && isViewMode && /*#__PURE__*/_jsx(StyleBook, {
190
+ enableResizing: false,
191
+ isSelected: () => false,
192
+ onClick: openStyleBook,
193
+ onSelect: openStyleBook,
194
+ showCloseButton: false,
195
+ showTabs: false
196
+ })]
197
+ });
187
198
  }
188
199
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","edit","seen","useSelect","useDispatch","store","coreStore","__experimentalVStack","VStack","useViewportMatch","BlockEditorProvider","useCallback","editorStore","preferencesStore","SidebarNavigationScreen","StyleVariationsContainer","unlock","editSiteStore","SidebarButton","SidebarNavigationItem","StyleBook","useGlobalStylesRevisions","SidebarNavigationScreenDetailsFooter","ColorVariations","TypographyVariations","useColorVariations","useTypographyVariations","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","setCanvasMode","hasGlobalStyleVariations","select","__experimentalGetCurrentThemeGlobalStylesVariations","length","createElement","path","onClick","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","colorVariations","typographyVariations","gap","settings","onChange","onInput","spacing","className","title","SidebarNavigationScreenGlobalStyles","backPath","revisions","isLoading","isLoadingRevisions","setIsListViewOpened","isMobileViewport","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","_globalStyles$_links$","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","set","setPreference","openGlobalStyles","Promise","all","openStyleBook","openRevisions","hasRevisions","modifiedDateTime","modified","shouldShowGlobalStylesFooter","Fragment","description","content","footer","record","actions","icon","label","isPressed","enableResizing","isSelected","onSelect","showCloseButton","showTabs"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { useCallback } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport ColorVariations from '../global-styles/variations/variations-color';\nimport TypographyVariations from '../global-styles/variations/variations-typography';\nimport {\n\tuseColorVariations,\n\tuseTypographyVariations,\n} from '../global-styles/hooks';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn <SidebarNavigationItem { ...props } path=\"/wp_global_styles\" />;\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst colorVariations = useColorVariations();\n\tconst typographyVariations = useTypographyVariations();\n\tconst gap = 3;\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<VStack\n\t\t\t\tspacing={ 10 }\n\t\t\t\tclassName=\"edit-site-global-styles-variation-container\"\n\t\t\t>\n\t\t\t\t<StyleVariationsContainer gap={ gap } />\n\t\t\t\t{ colorVariations?.length && (\n\t\t\t\t\t<ColorVariations title={ __( 'Colors' ) } gap={ gap } />\n\t\t\t\t) }\n\t\t\t\t{ typographyVariations?.length && (\n\t\t\t\t\t<TypographyVariations\n\t\t\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\t\t\tgap={ gap }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</BlockEditorProvider>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles( { backPath } ) {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\treturn Promise.all( [\n\t\t\tsetPreference( 'core', 'distractionFree', false ),\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, setPreference ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AAC7C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASN,KAAK,IAAIO,WAAW,QAAQ,mBAAmB;AACxD,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,wBAAwB,MAAM,6CAA6C;AAClF,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASX,KAAK,IAAIY,aAAa,QAAQ,aAAa;AACpD,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,wBAAwB,MAAM,+DAA+D;AACpG,OAAOC,oCAAoC,MAAM,6CAA6C;AAC9F,OAAOC,eAAe,MAAM,8CAA8C;AAC1E,OAAOC,oBAAoB,MAAM,mDAAmD;AACpF,SACCC,kBAAkB,EAClBC,uBAAuB,QACjB,wBAAwB;AAE/B,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,OAAO,SAASC,iCAAiCA,CAAEC,KAAK,EAAG;EAC1D,MAAM;IAA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e;IAC1BkB,eAAe,EAAG,KAAO;IACzBC,QAAQ,EAAG;EAAO,CAClB,CAED,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["__","edit","seen","useSelect","useDispatch","store","coreStore","__experimentalVStack","VStack","useViewportMatch","BlockEditorProvider","useCallback","editorStore","preferencesStore","SidebarNavigationScreen","StyleVariationsContainer","unlock","editSiteStore","SidebarButton","SidebarNavigationItem","StyleBook","useGlobalStylesRevisions","SidebarNavigationScreenDetailsFooter","ColorVariations","TypographyVariations","useColorVariations","useTypographyVariations","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","setCanvasMode","hasGlobalStyleVariations","select","__experimentalGetCurrentThemeGlobalStylesVariations","length","params","path","uid","onClick","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","colorVariations","typographyVariations","gap","settings","onChange","onInput","children","spacing","className","title","SidebarNavigationScreenGlobalStyles","backPath","revisions","isLoading","isLoadingRevisions","setIsListViewOpened","isMobileViewport","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","_globalStyles$_links$","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","set","setPreference","openGlobalStyles","Promise","all","openStyleBook","openRevisions","hasRevisions","modifiedDateTime","modified","shouldShowGlobalStylesFooter","description","content","footer","record","actions","icon","label","isPressed","enableResizing","isSelected","onSelect","showCloseButton","showTabs"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { useCallback } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport ColorVariations from '../global-styles/variations/variations-color';\nimport TypographyVariations from '../global-styles/variations/variations-typography';\nimport {\n\tuseColorVariations,\n\tuseTypographyVariations,\n} from '../global-styles/hooks';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<SidebarNavigationItem\n\t\t\t\t{ ...props }\n\t\t\t\tparams={ { path: '/wp_global_styles' } }\n\t\t\t\tuid=\"global-styles-navigation-item\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst colorVariations = useColorVariations();\n\tconst typographyVariations = useTypographyVariations();\n\tconst gap = 3;\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<VStack\n\t\t\t\tspacing={ 10 }\n\t\t\t\tclassName=\"edit-site-global-styles-variation-container\"\n\t\t\t>\n\t\t\t\t<StyleVariationsContainer gap={ gap } />\n\t\t\t\t{ colorVariations?.length && (\n\t\t\t\t\t<ColorVariations title={ __( 'Palettes' ) } gap={ gap } />\n\t\t\t\t) }\n\t\t\t\t{ typographyVariations?.length && (\n\t\t\t\t\t<TypographyVariations\n\t\t\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\t\t\tgap={ gap }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</BlockEditorProvider>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles( { backPath } ) {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\treturn Promise.all( [\n\t\t\tsetPreference( 'core', 'distractionFree', false ),\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, setPreference ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AAC7C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASN,KAAK,IAAIO,WAAW,QAAQ,mBAAmB;AACxD,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,wBAAwB,MAAM,6CAA6C;AAClF,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASX,KAAK,IAAIY,aAAa,QAAQ,aAAa;AACpD,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,wBAAwB,MAAM,+DAA+D;AACpG,OAAOC,oCAAoC,MAAM,6CAA6C;AAC9F,OAAOC,eAAe,MAAM,8CAA8C;AAC1E,OAAOC,oBAAoB,MAAM,mDAAmD;AACpF,SACCC,kBAAkB,EAClBC,uBAAuB,QACjB,wBAAwB;AAAC,SAAAC,GA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AGjG,EAAE,CAAE,aAAc,CAAG;UAC7B6C,OAAO,EAAG,MAAAA,CAAA,KAAY,MAAMqC,gBAAgB,CAAC;QAAG,CAChD,CAAC;MAAA,CACD;IACF,CACD,CAAC,EACAd,iBAAiB,IAAI,CAAEH,gBAAgB,IAAIE,UAAU,iBACtDvC,IAAA,CAACR,SAAS;MACT+E,cAAc,EAAG,KAAO;MACxBC,UAAU,EAAGA,CAAA,KAAM,KAAO;MAC1BvD,OAAO,EAAGwC,aAAe;MACzBgB,QAAQ,EAAGhB,aAAe;MAC1BiB,eAAe,EAAG,KAAO;MACzBC,QAAQ,EAAG;IAAO,CAClB,CACD;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -16,6 +15,10 @@ import SidebarNavigationItem from '../sidebar-navigation-item';
16
15
  import { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';
17
16
  import { unlock } from '../../lock-unlock';
18
17
  import { store as editSiteStore } from '../../store';
18
+ import { NAVIGATION_POST_TYPE, TEMPLATE_POST_TYPE, PATTERN_TYPES } from '../../utils/constants';
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { jsxs as _jsxs } from "react/jsx-runtime";
21
+ import { Fragment as _Fragment } from "react/jsx-runtime";
19
22
  export default function SidebarNavigationScreenMain() {
20
23
  const {
21
24
  setEditorCanvasContainerView
@@ -25,30 +28,52 @@ export default function SidebarNavigationScreenMain() {
25
28
  useEffect(() => {
26
29
  setEditorCanvasContainerView(undefined);
27
30
  }, [setEditorCanvasContainerView]);
28
- return createElement(SidebarNavigationScreen, {
31
+ return /*#__PURE__*/_jsx(SidebarNavigationScreen, {
29
32
  isRoot: true,
30
33
  title: __('Design'),
31
34
  description: __('Customize the appearance of your website using the block editor.'),
32
- content: createElement(Fragment, null, createElement(ItemGroup, null, createElement(SidebarNavigationItem, {
33
- path: "/navigation",
34
- withChevron: true,
35
- icon: navigation
36
- }, __('Navigation')), createElement(SidebarNavigationItemGlobalStyles, {
37
- withChevron: true,
38
- icon: styles
39
- }, __('Styles')), createElement(SidebarNavigationItem, {
40
- path: "/page",
41
- withChevron: true,
42
- icon: page
43
- }, __('Pages')), createElement(SidebarNavigationItem, {
44
- path: "/wp_template",
45
- withChevron: true,
46
- icon: layout
47
- }, __('Templates')), createElement(SidebarNavigationItem, {
48
- path: "/patterns",
49
- withChevron: true,
50
- icon: symbol
51
- }, __('Patterns'))))
35
+ content: /*#__PURE__*/_jsx(_Fragment, {
36
+ children: /*#__PURE__*/_jsxs(ItemGroup, {
37
+ children: [/*#__PURE__*/_jsx(SidebarNavigationItem, {
38
+ uid: "navigation-navigation-item",
39
+ params: {
40
+ postType: NAVIGATION_POST_TYPE
41
+ },
42
+ withChevron: true,
43
+ icon: navigation,
44
+ children: __('Navigation')
45
+ }), /*#__PURE__*/_jsx(SidebarNavigationItemGlobalStyles, {
46
+ uid: "styles-navigation-item",
47
+ withChevron: true,
48
+ icon: styles,
49
+ children: __('Styles')
50
+ }), /*#__PURE__*/_jsx(SidebarNavigationItem, {
51
+ uid: "page-navigation-item",
52
+ params: {
53
+ postType: 'page'
54
+ },
55
+ withChevron: true,
56
+ icon: page,
57
+ children: __('Pages')
58
+ }), /*#__PURE__*/_jsx(SidebarNavigationItem, {
59
+ uid: "template-navigation-item",
60
+ params: {
61
+ postType: TEMPLATE_POST_TYPE
62
+ },
63
+ withChevron: true,
64
+ icon: layout,
65
+ children: __('Templates')
66
+ }), /*#__PURE__*/_jsx(SidebarNavigationItem, {
67
+ uid: "patterns-navigation-item",
68
+ params: {
69
+ postType: PATTERN_TYPES.user
70
+ },
71
+ withChevron: true,
72
+ icon: symbol,
73
+ children: __('Patterns')
74
+ })]
75
+ })
76
+ })
52
77
  });
53
78
  }
54
79
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalItemGroup","ItemGroup","__","layout","symbol","navigation","styles","page","useDispatch","useEffect","SidebarNavigationScreen","SidebarNavigationItem","SidebarNavigationItemGlobalStyles","unlock","store","editSiteStore","SidebarNavigationScreenMain","setEditorCanvasContainerView","undefined","createElement","isRoot","title","description","content","Fragment","path","withChevron","icon"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-main/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { layout, symbol, navigation, styles, page } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nexport default function SidebarNavigationScreenMain() {\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\t// Clear the editor canvas container view when accessing the main navigation screen.\n\tuseEffect( () => {\n\t\tsetEditorCanvasContainerView( undefined );\n\t}, [ setEditorCanvasContainerView ] );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t\t) }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tpath=\"/navigation\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Navigation' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItemGlobalStyles\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ styles }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t\t</SidebarNavigationItemGlobalStyles>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tpath=\"/page\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ page }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Pages' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tpath=\"/wp_template\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Templates' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tpath=\"/patterns\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Patterns' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,uBAAuB,IAAIC,SAAS,QAAQ,uBAAuB;AAC5E,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,MAAM,EAAEC,UAAU,EAAEC,MAAM,EAAEC,IAAI,QAAQ,kBAAkB;AAC3E,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;AACA,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AAEpD,eAAe,SAASC,2BAA2BA,CAAA,EAAG;EACrD,MAAM;IAAEC;EAA6B,CAAC,GAAGJ,MAAM,CAC9CL,WAAW,CAAEO,aAAc,CAC5B,CAAC;;EAED;EACAN,SAAS,CAAE,MAAM;IAChBQ,4BAA4B,CAAEC,SAAU,CAAC;EAC1C,CAAC,EAAE,CAAED,4BAA4B,CAAG,CAAC;EAErC,OACCE,aAAA,CAACT,uBAAuB;IACvBU,MAAM;IACNC,KAAK,EAAGnB,EAAE,CAAE,QAAS,CAAG;IACxBoB,WAAW,EAAGpB,EAAE,CACf,kEACD,CAAG;IACHqB,OAAO,EACNJ,aAAA,CAAAK,QAAA,QACCL,aAAA,CAAClB,SAAS,QACTkB,aAAA,CAACR,qBAAqB;MACrBc,IAAI,EAAC,aAAa;MAClBC,WAAW;MACXC,IAAI,EAAGtB;IAAY,GAEjBH,EAAE,CAAE,YAAa,CACG,CAAC,EACxBiB,aAAA,CAACP,iCAAiC;MACjCc,WAAW;MACXC,IAAI,EAAGrB;IAAQ,GAEbJ,EAAE,CAAE,QAAS,CACmB,CAAC,EACpCiB,aAAA,CAACR,qBAAqB;MACrBc,IAAI,EAAC,OAAO;MACZC,WAAW;MACXC,IAAI,EAAGpB;IAAM,GAEXL,EAAE,CAAE,OAAQ,CACQ,CAAC,EACxBiB,aAAA,CAACR,qBAAqB;MACrBc,IAAI,EAAC,cAAc;MACnBC,WAAW;MACXC,IAAI,EAAGxB;IAAQ,GAEbD,EAAE,CAAE,WAAY,CACI,CAAC,EACxBiB,aAAA,CAACR,qBAAqB;MACrBc,IAAI,EAAC,WAAW;MAChBC,WAAW;MACXC,IAAI,EAAGvB;IAAQ,GAEbF,EAAE,CAAE,UAAW,CACK,CACb,CACV;EACF,CACD,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["__experimentalItemGroup","ItemGroup","__","layout","symbol","navigation","styles","page","useDispatch","useEffect","SidebarNavigationScreen","SidebarNavigationItem","SidebarNavigationItemGlobalStyles","unlock","store","editSiteStore","NAVIGATION_POST_TYPE","TEMPLATE_POST_TYPE","PATTERN_TYPES","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SidebarNavigationScreenMain","setEditorCanvasContainerView","undefined","isRoot","title","description","content","children","uid","params","postType","withChevron","icon","user"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-main/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { layout, symbol, navigation, styles, page } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n\tPATTERN_TYPES,\n} from '../../utils/constants';\n\nexport default function SidebarNavigationScreenMain() {\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\t// Clear the editor canvas container view when accessing the main navigation screen.\n\tuseEffect( () => {\n\t\tsetEditorCanvasContainerView( undefined );\n\t}, [ setEditorCanvasContainerView ] );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t\t) }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tuid=\"navigation-navigation-item\"\n\t\t\t\t\t\t\tparams={ { postType: NAVIGATION_POST_TYPE } }\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Navigation' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItemGlobalStyles\n\t\t\t\t\t\t\tuid=\"styles-navigation-item\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ styles }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t\t</SidebarNavigationItemGlobalStyles>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tuid=\"page-navigation-item\"\n\t\t\t\t\t\t\tparams={ { postType: 'page' } }\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ page }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Pages' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tuid=\"template-navigation-item\"\n\t\t\t\t\t\t\tparams={ { postType: TEMPLATE_POST_TYPE } }\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Templates' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tuid=\"patterns-navigation-item\"\n\t\t\t\t\t\t\tparams={ { postType: PATTERN_TYPES.user } }\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Patterns' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,uBAAuB,IAAIC,SAAS,QA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,YAAa;QAAC,CACE,CAAC,eACxBkB,IAAA,CAACR,iCAAiC;UACjCqB,GAAG,EAAC,wBAAwB;UAC5BG,WAAW;UACXC,IAAI,EAAG/B,MAAQ;UAAA0B,QAAA,EAEb9B,EAAE,CAAE,QAAS;QAAC,CACkB,CAAC,eACpCkB,IAAA,CAACT,qBAAqB;UACrBsB,GAAG,EAAC,sBAAsB;UAC1BC,MAAM,EAAG;YAAEC,QAAQ,EAAE;UAAO,CAAG;UAC/BC,WAAW;UACXC,IAAI,EAAG9B,IAAM;UAAAyB,QAAA,EAEX9B,EAAE,CAAE,OAAQ;QAAC,CACO,CAAC,eACxBkB,IAAA,CAACT,qBAAqB;UACrBsB,GAAG,EAAC,0BAA0B;UAC9BC,MAAM,EAAG;YAAEC,QAAQ,EAAElB;UAAmB,CAAG;UAC3CmB,WAAW;UACXC,IAAI,EAAGlC,MAAQ;UAAA6B,QAAA,EAEb9B,EAAE,CAAE,WAAY;QAAC,CACG,CAAC,eACxBkB,IAAA,CAACT,qBAAqB;UACrBsB,GAAG,EAAC,0BAA0B;UAC9BC,MAAM,EAAG;YAAEC,QAAQ,EAAEjB,aAAa,CAACoB;UAAK,CAAG;UAC3CF,WAAW;UACXC,IAAI,EAAGjC,MAAQ;UAAA4B,QAAA,EAEb9B,EAAE,CAAE,UAAW;QAAC,CACI,CAAC;MAAA,CACd;IAAC,CACX;EACF,CACD,CAAC;AAEJ","ignoreList":[]}
@@ -1,14 +1,14 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
5
4
  import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';
6
5
  import { __ } from '@wordpress/i18n';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  export default function DeleteConfirmDialog({
8
8
  onClose,
9
9
  onConfirm
10
10
  }) {
11
- return createElement(ConfirmDialog, {
11
+ return /*#__PURE__*/_jsx(ConfirmDialog, {
12
12
  isOpen: true,
13
13
  onConfirm: () => {
14
14
  onConfirm();
@@ -17,7 +17,8 @@ export default function DeleteConfirmDialog({
17
17
  onClose();
18
18
  },
19
19
  onCancel: onClose,
20
- confirmButtonText: __('Delete')
21
- }, __('Are you sure you want to delete this Navigation Menu?'));
20
+ confirmButtonText: __('Delete'),
21
+ children: __('Are you sure you want to delete this Navigation Menu?')
22
+ });
22
23
  }
23
24
  //# sourceMappingURL=delete-confirm-dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalConfirmDialog","ConfirmDialog","__","DeleteConfirmDialog","onClose","onConfirm","createElement","isOpen","onCancel","confirmButtonText"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function DeleteConfirmDialog( { onClose, onConfirm } ) {\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen\n\t\t\tonConfirm={ () => {\n\t\t\t\tonConfirm();\n\n\t\t\t\t// Immediate close avoids ability to hit delete multiple times.\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t\tonCancel={ onClose }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t>\n\t\t\t{ __( 'Are you sure you want to delete this Navigation Menu?' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,2BAA2B,IAAIC,aAAa,QAAQ,uBAAuB;AACpF,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,eAAe,SAASC,mBAAmBA,CAAE;EAAEC,OAAO;EAAEC;AAAU,CAAC,EAAG;EACrE,OACCC,aAAA,CAACL,aAAa;IACbM,MAAM;IACNF,SAAS,EAAGA,CAAA,KAAM;MACjBA,SAAS,CAAC,CAAC;;MAEX;MACAD,OAAO,CAAC,CAAC;IACV,CAAG;IACHI,QAAQ,EAAGJ,OAAS;IACpBK,iBAAiB,EAAGP,EAAE,CAAE,QAAS;EAAG,GAElCA,EAAE,CAAE,uDAAwD,CAChD,CAAC;AAElB","ignoreList":[]}
1
+ {"version":3,"names":["__experimentalConfirmDialog","ConfirmDialog","__","jsx","_jsx","DeleteConfirmDialog","onClose","onConfirm","isOpen","onCancel","confirmButtonText","children"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function DeleteConfirmDialog( { onClose, onConfirm } ) {\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen\n\t\t\tonConfirm={ () => {\n\t\t\t\tonConfirm();\n\n\t\t\t\t// Immediate close avoids ability to hit delete multiple times.\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t\tonCancel={ onClose }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t>\n\t\t\t{ __( 'Are you sure you want to delete this Navigation Menu?' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,2BAA2B,IAAIC,aAAa,QAAQ,uBAAuB;AACpF,SAASC,EAAE,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAErC,eAAe,SAASC,mBAAmBA,CAAE;EAAEC,OAAO;EAAEC;AAAU,CAAC,EAAG;EACrE,oBACCH,IAAA,CAACH,aAAa;IACbO,MAAM;IACND,SAAS,EAAGA,CAAA,KAAM;MACjBA,SAAS,CAAC,CAAC;;MAEX;MACAD,OAAO,CAAC,CAAC;IACV,CAAG;IACHG,QAAQ,EAAGH,OAAS;IACpBI,iBAAiB,EAAGR,EAAE,CAAE,QAAS,CAAG;IAAAS,QAAA,EAElCT,EAAE,CAAE,uDAAwD;EAAC,CACjD,CAAC;AAElB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -18,6 +17,7 @@ import SingleNavigationMenu from './single-navigation-menu';
18
17
  import useNavigationMenuHandlers from './use-navigation-menu-handlers';
19
18
  import buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';
20
19
  import { unlock } from '../../lock-unlock';
20
+ import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const {
22
22
  useLocation
23
23
  } = unlock(routerPrivateApis);
@@ -58,22 +58,23 @@ export default function SidebarNavigationScreenNavigationMenu({
58
58
  const _handleSave = edits => handleSave(navigationMenu, edits);
59
59
  const _handleDuplicate = () => handleDuplicate(navigationMenu);
60
60
  if (isLoading) {
61
- return createElement(SidebarNavigationScreenWrapper, {
61
+ return /*#__PURE__*/_jsx(SidebarNavigationScreenWrapper, {
62
62
  description: __('Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'),
63
- backPath: backPath
64
- }, createElement(Spinner, {
65
- className: "edit-site-sidebar-navigation-screen-navigation-menus__loading"
66
- }));
63
+ backPath: backPath,
64
+ children: /*#__PURE__*/_jsx(Spinner, {
65
+ className: "edit-site-sidebar-navigation-screen-navigation-menus__loading"
66
+ })
67
+ });
67
68
  }
68
69
  if (!isLoading && !navigationMenu) {
69
- return createElement(SidebarNavigationScreenWrapper, {
70
+ return /*#__PURE__*/_jsx(SidebarNavigationScreenWrapper, {
70
71
  description: __('Navigation Menu missing.'),
71
72
  backPath: backPath
72
73
  });
73
74
  }
74
75
  if (!navigationMenu?.content?.raw) {
75
- return createElement(SidebarNavigationScreenWrapper, {
76
- actions: createElement(ScreenNavigationMoreMenu, {
76
+ return /*#__PURE__*/_jsx(SidebarNavigationScreenWrapper, {
77
+ actions: /*#__PURE__*/_jsx(ScreenNavigationMoreMenu, {
77
78
  menuId: navigationMenu?.id,
78
79
  menuTitle: decodeEntities(menuTitle),
79
80
  onDelete: _handleDelete,
@@ -85,7 +86,7 @@ export default function SidebarNavigationScreenNavigationMenu({
85
86
  description: __('This Navigation Menu is empty.')
86
87
  });
87
88
  }
88
- return createElement(SingleNavigationMenu, {
89
+ return /*#__PURE__*/_jsx(SingleNavigationMenu, {
89
90
  navigationMenu: navigationMenu,
90
91
  backPath: backPath,
91
92
  handleDelete: _handleDelete,
@@ -1 +1 @@
1
- {"version":3,"names":["useEntityRecord","store","coreStore","Spinner","__","useSelect","decodeEntities","privateApis","routerPrivateApis","SidebarNavigationScreenWrapper","ScreenNavigationMoreMenu","SingleNavigationMenu","useNavigationMenuHandlers","buildNavigationLabel","unlock","useLocation","postType","SidebarNavigationScreenNavigationMenu","backPath","params","postId","record","navigationMenu","isResolving","isSaving","isDeleting","select","isSavingEntityRecord","isDeletingEntityRecord","isLoading","menuTitle","title","rendered","slug","handleSave","handleDelete","handleDuplicate","_handleDelete","_handleSave","edits","_handleDuplicate","createElement","description","className","content","raw","actions","menuId","id","onDelete","onSave","onDuplicate","status"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { Spinner } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu( { backPath } ) {\n\tconst {\n\t\tparams: { postId },\n\t} = useLocation();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuId={ navigationMenu?.id }\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tbackPath={ backPath }\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\tbackPath={ backPath }\n\t\t\thandleDelete={ _handleDelete }\n\t\t\thandleSave={ _handleSave }\n\t\t\thandleDuplicate={ _handleDuplicate }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AAC1E,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA,SAASC,8BAA8B,QAAQ,+CAA+C;AAC9F,OAAOC,wBAAwB,MAAM,aAAa;AAClD,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,yBAAyB,MAAM,gCAAgC;AACtE,OAAOC,oBAAoB,MAAM,sEAAsE;AACvG,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAAY,CAAC,GAAGD,MAAM,CAAEN,iBAAkB,CAAC;AAEnD,OAAO,MAAMQ,QAAQ,GAAI,eAAc;AAEvC,eAAe,SAASC,qCAAqCA,CAAE;EAAEC;AAAS,CAAC,EA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C;EAEA,IAAK,CAAEd,SAAS,IAAI,CAAEP,cAAc,EAAG;IACtC,OACCmB,aAAA,CAAChC,8BAA8B;MAC9BiC,WAAW,EAAGtC,EAAE,CAAE,0BAA2B,CAAG;MAChDc,QAAQ,EAAGA;IAAU,CACrB,CAAC;EAEJ;EAEA,IAAK,CAAEI,cAAc,EAAEsB,OAAO,EAAEC,GAAG,EAAG;IACrC,OACCJ,aAAA,CAAChC,8BAA8B;MAC9BqC,OAAO,EACNL,aAAA,CAAC/B,wBAAwB;QACxBqC,MAAM,EAAGzB,cAAc,EAAE0B,EAAI;QAC7BlB,SAAS,EAAGxB,cAAc,CAAEwB,SAAU,CAAG;QACzCmB,QAAQ,EAAGZ,aAAe;QAC1Ba,MAAM,EAAGZ,WAAa;QACtBa,WAAW,EAAGX;MAAkB,CAChC,CACD;MACDtB,QAAQ,EAAGA,QAAU;MACrBa,KAAK,EAAGlB,oBAAoB,CAC3BS,cAAc,EAAES,KAAK,EACrBT,cAAc,EAAE0B,EAAE,EAClB1B,cAAc,EAAE8B,MACjB,CAAG;MACHV,WAAW,EAAGtC,EAAE,CAAE,gCAAiC;IAAG,CACtD,CAAC;EAEJ;EAEA,OACCqC,aAAA,CAAC9B,oBAAoB;IACpBW,cAAc,EAAGA,cAAgB;IACjCJ,QAAQ,EAAGA,QAAU;IACrBiB,YAAY,EAAGE,aAAe;IAC9BH,UAAU,EAAGI,WAAa;IAC1BF,eAAe,EAAGI;EAAkB,CACpC,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["useEntityRecord","store","coreStore","Spinner","__","useSelect","decodeEntities","privateApis","routerPrivateApis","SidebarNavigationScreenWrapper","ScreenNavigationMoreMenu","SingleNavigationMenu","useNavigationMenuHandlers","buildNavigationLabel","unlock","jsx","_jsx","useLocation","postType","SidebarNavigationScreenNavigationMenu","backPath","params","postId","record","navigationMenu","isResolving","isSaving","isDeleting","select","isSavingEntityRecord","isDeletingEntityRecord","isLoading","menuTitle","title","rendered","slug","handleSave","handleDelete","handleDuplicate","_handleDelete","_handleSave","edits","_handleDuplicate","description","children","className","content","raw","actions","menuId","id","onDelete","onSave","onDuplicate","status"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { Spinner } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu( { backPath } ) {\n\tconst {\n\t\tparams: { postId },\n\t} = useLocation();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuId={ navigationMenu?.id }\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tbackPath={ backPath }\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\tbackPath={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B,SAAU,CAAG;QACzCmB,QAAQ,EAAGZ,aAAe;QAC1Ba,MAAM,EAAGZ,WAAa;QACtBa,WAAW,EAAGX;MAAkB,CAChC,CACD;MACDtB,QAAQ,EAAGA,QAAU;MACrBa,KAAK,EAAGpB,oBAAoB,CAC3BW,cAAc,EAAES,KAAK,EACrBT,cAAc,EAAE0B,EAAE,EAClB1B,cAAc,EAAE8B,MACjB,CAAG;MACHX,WAAW,EAAGvC,EAAE,CAAE,gCAAiC;IAAG,CACtD,CAAC;EAEJ;EAEA,oBACCY,IAAA,CAACL,oBAAoB;IACpBa,cAAc,EAAGA,cAAgB;IACjCJ,QAAQ,EAAGA,QAAU;IACrBiB,YAAY,EAAGE,aAAe;IAC9BH,UAAU,EAAGI,WAAa;IAC1BF,eAAe,EAAGI;EAAkB,CACpC,CAAC;AAEJ","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -14,6 +13,9 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
14
13
  import RenameModal from './rename-modal';
15
14
  import DeleteConfirmDialog from './delete-confirm-dialog';
16
15
  import { unlock } from '../../lock-unlock';
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ import { Fragment as _Fragment } from "react/jsx-runtime";
17
19
  const {
18
20
  useHistory
19
21
  } = unlock(routerPrivateApis);
@@ -37,47 +39,58 @@ export default function ScreenNavigationMoreMenu(props) {
37
39
  };
38
40
  const openRenameModal = () => setRenameModalOpen(true);
39
41
  const openDeleteConfirmDialog = () => setDeleteConfirmDialogOpen(true);
40
- return createElement(Fragment, null, createElement(DropdownMenu, {
41
- className: "sidebar-navigation__more-menu",
42
- label: __('Actions'),
43
- icon: moreVertical,
44
- popoverProps: POPOVER_PROPS
45
- }, ({
46
- onClose
47
- }) => createElement("div", null, createElement(MenuGroup, null, createElement(MenuItem, {
48
- onClick: () => {
49
- openRenameModal();
50
- // Close the dropdown after opening the modal.
51
- onClose();
52
- }
53
- }, __('Rename')), createElement(MenuItem, {
54
- onClick: () => {
55
- history.push({
56
- postId: menuId,
57
- postType: 'wp_navigation',
58
- canvas: 'edit'
59
- });
60
- }
61
- }, __('Edit')), createElement(MenuItem, {
62
- onClick: () => {
63
- onDuplicate();
64
- onClose();
65
- }
66
- }, __('Duplicate')), createElement(MenuItem, {
67
- isDestructive: true,
68
- onClick: () => {
69
- openDeleteConfirmDialog();
42
+ return /*#__PURE__*/_jsxs(_Fragment, {
43
+ children: [/*#__PURE__*/_jsx(DropdownMenu, {
44
+ className: "sidebar-navigation__more-menu",
45
+ label: __('Actions'),
46
+ icon: moreVertical,
47
+ popoverProps: POPOVER_PROPS,
48
+ children: ({
49
+ onClose
50
+ }) => /*#__PURE__*/_jsx("div", {
51
+ children: /*#__PURE__*/_jsxs(MenuGroup, {
52
+ children: [/*#__PURE__*/_jsx(MenuItem, {
53
+ onClick: () => {
54
+ openRenameModal();
55
+ // Close the dropdown after opening the modal.
56
+ onClose();
57
+ },
58
+ children: __('Rename')
59
+ }), /*#__PURE__*/_jsx(MenuItem, {
60
+ onClick: () => {
61
+ history.push({
62
+ postId: menuId,
63
+ postType: 'wp_navigation',
64
+ canvas: 'edit'
65
+ });
66
+ },
67
+ children: __('Edit')
68
+ }), /*#__PURE__*/_jsx(MenuItem, {
69
+ onClick: () => {
70
+ onDuplicate();
71
+ onClose();
72
+ },
73
+ children: __('Duplicate')
74
+ }), /*#__PURE__*/_jsx(MenuItem, {
75
+ isDestructive: true,
76
+ onClick: () => {
77
+ openDeleteConfirmDialog();
70
78
 
71
- // Close the dropdown after opening the modal.
72
- onClose();
73
- }
74
- }, __('Delete'))))), deleteConfirmDialogOpen && createElement(DeleteConfirmDialog, {
75
- onClose: closeModals,
76
- onConfirm: onDelete
77
- }), renameModalOpen && createElement(RenameModal, {
78
- onClose: closeModals,
79
- menuTitle: menuTitle,
80
- onSave: onSave
81
- }));
79
+ // Close the dropdown after opening the modal.
80
+ onClose();
81
+ },
82
+ children: __('Delete')
83
+ })]
84
+ })
85
+ })
86
+ }), deleteConfirmDialogOpen && /*#__PURE__*/_jsx(DeleteConfirmDialog, {
87
+ onClose: closeModals,
88
+ onConfirm: onDelete
89
+ }), renameModalOpen && /*#__PURE__*/_jsx(RenameModal, {
90
+ onClose: closeModals,
91
+ menuTitle: menuTitle,
92
+ onSave: onSave
93
+ })]
94
+ });
82
95
  }
83
96
  //# sourceMappingURL=more-menu.js.map