@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
  * External dependencies
4
3
  */
@@ -8,23 +7,20 @@ import clsx from 'clsx';
8
7
  * WordPress dependencies
9
8
  */
10
9
  import { useDispatch, useSelect } from '@wordpress/data';
11
- import { Notice, __unstableAnimatePresence as AnimatePresence, __unstableMotion as motion } from '@wordpress/components';
12
- import { useInstanceId, useViewportMatch, useReducedMotion } from '@wordpress/compose';
13
- import { store as preferencesStore } from '@wordpress/preferences';
14
- import { BlockBreadcrumb, BlockToolbar, store as blockEditorStore } from '@wordpress/block-editor';
15
- import { EditorKeyboardShortcutsRegister, EditorKeyboardShortcuts, EditorNotices, EditorSnackbars, privateApis as editorPrivateApis, store as editorStore } from '@wordpress/editor';
10
+ import { Notice } from '@wordpress/components';
11
+ import { useInstanceId } from '@wordpress/compose';
12
+ import { EditorKeyboardShortcutsRegister, privateApis as editorPrivateApis, store as editorStore } from '@wordpress/editor';
16
13
  import { __, sprintf } from '@wordpress/i18n';
17
14
  import { store as coreDataStore } from '@wordpress/core-data';
18
15
  import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
19
- import { useState, useCallback } from '@wordpress/element';
16
+ import { useCallback, useMemo } from '@wordpress/element';
20
17
  import { store as noticesStore } from '@wordpress/notices';
21
18
  import { privateApis as routerPrivateApis } from '@wordpress/router';
19
+ import { store as preferencesStore } from '@wordpress/preferences';
22
20
 
23
21
  /**
24
22
  * Internal dependencies
25
23
  */
26
- import CodeEditor from '../code-editor';
27
- import Header from '../header-edit-mode';
28
24
  import WelcomeGuide from '../welcome-guide';
29
25
  import { store as editSiteStore } from '../../store';
30
26
  import { GlobalStylesRenderer } from '../global-styles-renderer';
@@ -32,21 +28,22 @@ import useTitle from '../routes/use-title';
32
28
  import CanvasLoader from '../canvas-loader';
33
29
  import { unlock } from '../../lock-unlock';
34
30
  import useEditedEntityRecord from '../use-edited-entity-record';
35
- import PatternModal from '../pattern-modal';
36
31
  import { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';
37
- import SiteEditorCanvas from '../block-editor/site-editor-canvas';
38
32
  import TemplatePartConverter from '../template-part-converter';
39
33
  import { useSpecificEditorSettings } from '../block-editor/use-site-editor-settings';
40
34
  import PluginTemplateSettingPanel from '../plugin-template-setting-panel';
41
35
  import GlobalStylesSidebar from '../global-styles-sidebar';
36
+ import { isPreviewingTheme } from '../../utils/is-previewing-theme';
37
+ import { getEditorCanvasContainerTitle, useHasEditorCanvasContainer } from '../editor-canvas-container';
38
+ import SaveButton from '../save-button';
39
+ import SiteEditorMoreMenu from '../more-menu';
40
+ import useEditorIframeProps from '../block-editor/use-editor-iframe-props';
41
+ import { jsx as _jsx } from "react/jsx-runtime";
42
+ import { jsxs as _jsxs } from "react/jsx-runtime";
43
+ import { Fragment as _Fragment } from "react/jsx-runtime";
42
44
  const {
45
+ EditorInterface,
43
46
  ExperimentalEditorProvider: EditorProvider,
44
- InserterSidebar,
45
- ListViewSidebar,
46
- InterfaceSkeleton,
47
- ComplementaryArea,
48
- interfaceStore,
49
- SavePublishPanels,
50
47
  Sidebar
51
48
  } = unlock(editorPrivateApis);
52
49
  const {
@@ -55,22 +52,8 @@ const {
55
52
  const {
56
53
  BlockKeyboardShortcuts
57
54
  } = unlock(blockLibraryPrivateApis);
58
- const interfaceLabels = {
59
- /* translators: accessibility text for the editor content landmark region. */
60
- body: __('Editor content'),
61
- /* translators: accessibility text for the editor settings landmark region. */
62
- sidebar: __('Editor settings'),
63
- /* translators: accessibility text for the editor publish landmark region. */
64
- actions: __('Editor publish'),
65
- /* translators: accessibility text for the editor footer landmark region. */
66
- footer: __('Editor footer'),
67
- /* translators: accessibility text for the editor header landmark region. */
68
- header: __('Editor top bar')
69
- };
70
- const ANIMATION_DURATION = 0.25;
71
55
  export default function Editor({
72
- isLoading,
73
- onClick
56
+ isLoading
74
57
  }) {
75
58
  const {
76
59
  record: editedPost,
@@ -80,46 +63,30 @@ export default function Editor({
80
63
  const {
81
64
  type: editedPostType
82
65
  } = editedPost;
83
- const isLargeViewport = useViewportMatch('medium');
84
- const disableMotion = useReducedMotion();
85
66
  const {
86
67
  context,
87
68
  contextPost,
88
69
  editorMode,
89
70
  canvasMode,
90
- blockEditorMode,
91
- isRightSidebarOpen,
92
- isInserterOpen,
93
- isListViewOpen,
94
- isDistractionFree,
95
- showIconLabels,
96
- showBlockBreadcrumbs,
97
- postTypeLabel,
98
71
  isEditingPage,
99
- supportsGlobalStyles
72
+ supportsGlobalStyles,
73
+ showIconLabels,
74
+ editorCanvasView,
75
+ currentPostIsTrashed
100
76
  } = useSelect(select => {
101
- const {
102
- get
103
- } = select(preferencesStore);
104
77
  const {
105
78
  getEditedPostContext,
106
79
  getCanvasMode,
107
80
  isPage
108
81
  } = unlock(select(editSiteStore));
109
82
  const {
110
- __unstableGetEditorMode
111
- } = select(blockEditorStore);
112
- const {
113
- getActiveComplementaryArea
114
- } = select(interfaceStore);
83
+ get
84
+ } = select(preferencesStore);
115
85
  const {
116
86
  getEntityRecord,
117
87
  getCurrentTheme
118
88
  } = select(coreDataStore);
119
89
  const {
120
- isInserterOpened,
121
- isListViewOpened,
122
- getPostTypeLabel,
123
90
  getEditorMode
124
91
  } = select(editorStore);
125
92
  const _context = getEditedPostContext();
@@ -131,25 +98,19 @@ export default function Editor({
131
98
  contextPost: _context?.postId ? getEntityRecord('postType', _context.postType, _context.postId) : undefined,
132
99
  editorMode: getEditorMode(),
133
100
  canvasMode: getCanvasMode(),
134
- blockEditorMode: __unstableGetEditorMode(),
135
- isInserterOpen: isInserterOpened(),
136
- isListViewOpen: isListViewOpened(),
137
- isRightSidebarOpen: getActiveComplementaryArea('core'),
138
- isDistractionFree: get('core', 'distractionFree'),
139
- showBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
140
- showIconLabels: get('core', 'showIconLabels'),
141
- postTypeLabel: getPostTypeLabel(),
142
101
  isEditingPage: isPage(),
143
- supportsGlobalStyles: getCurrentTheme()?.is_block_theme
102
+ supportsGlobalStyles: getCurrentTheme()?.is_block_theme,
103
+ showIconLabels: get('core', 'showIconLabels'),
104
+ editorCanvasView: unlock(select(editSiteStore)).getEditorCanvasContainerView(),
105
+ currentPostIsTrashed: select(editorStore).getCurrentPostAttribute('status') === 'trash'
144
106
  };
145
107
  }, []);
108
+ const _isPreviewingTheme = isPreviewingTheme();
109
+ const hasDefaultEditorCanvasView = !useHasEditorCanvasContainer();
110
+ const iframeProps = useEditorIframeProps();
146
111
  const isViewMode = canvasMode === 'view';
147
112
  const isEditMode = canvasMode === 'edit';
148
113
  const showVisualEditor = isViewMode || editorMode === 'visual';
149
- const shouldShowBlockBreadcrumbs = !isDistractionFree && showBlockBreadcrumbs && isEditMode && showVisualEditor && blockEditorMode !== 'zoom-out';
150
- const shouldShowInserter = isEditMode && showVisualEditor && isInserterOpen;
151
- const shouldShowListView = isEditMode && showVisualEditor && isListViewOpen;
152
- const secondarySidebarLabel = isListViewOpen ? __('List View') : __('Block Library');
153
114
  const postWithTemplate = !!context?.postId;
154
115
  let title;
155
116
  if (hasLoadedPost) {
@@ -163,20 +124,13 @@ export default function Editor({
163
124
  // action in <URLQueryController> from double-announcing.
164
125
  useTitle(hasLoadedPost && title);
165
126
  const loadingProgressId = useInstanceId(CanvasLoader, 'edit-site-editor__loading-progress');
166
- const {
167
- closeGeneralSidebar
168
- } = useDispatch(editSiteStore);
169
127
  const settings = useSpecificEditorSettings();
128
+ const styles = useMemo(() => [...settings.styles, {
129
+ // Forming a "block formatting context" to prevent margin collapsing.
130
+ // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
170
131
 
171
- // Local state for save panel.
172
- // Note 'truthy' callback implies an open panel.
173
- const [entitiesSavedStatesCallback, setEntitiesSavedStatesCallback] = useState(false);
174
- const closeEntitiesSavedStates = useCallback(arg => {
175
- if (typeof entitiesSavedStatesCallback === 'function') {
176
- entitiesSavedStatesCallback(arg);
177
- }
178
- setEntitiesSavedStatesCallback(false);
179
- }, [entitiesSavedStatesCallback]);
132
+ css: `body{${canvasMode === 'view' ? `min-height: 100vh; ${currentPostIsTrashed ? '' : 'cursor: pointer;'}` : ''}}}`
133
+ }], [settings.styles, canvasMode, currentPostIsTrashed]);
180
134
  const {
181
135
  createSuccessNotice
182
136
  } = useDispatch(noticesStore);
@@ -184,12 +138,10 @@ export default function Editor({
184
138
  const onActionPerformed = useCallback((actionId, items) => {
185
139
  switch (actionId) {
186
140
  case 'move-to-trash':
141
+ case 'delete-post':
187
142
  {
188
143
  history.push({
189
- path: '/' + items[0].type,
190
- postId: undefined,
191
- postType: undefined,
192
- canvas: 'view'
144
+ postType: items[0].type
193
145
  });
194
146
  }
195
147
  break;
@@ -206,7 +158,6 @@ export default function Editor({
206
158
  label: __('Edit'),
207
159
  onClick: () => {
208
160
  history.push({
209
- path: undefined,
210
161
  postId: newItem.id,
211
162
  postType: newItem.type,
212
163
  canvas: 'edit'
@@ -219,73 +170,35 @@ export default function Editor({
219
170
  }
220
171
  }, [history, createSuccessNotice]);
221
172
  const isReady = !isLoading && (postWithTemplate && !!contextPost && !!editedPost || !postWithTemplate && !!editedPost);
222
- return createElement(Fragment, null, !isReady ? createElement(CanvasLoader, {
223
- id: loadingProgressId
224
- }) : null, isEditMode && createElement(WelcomeGuide, null), hasLoadedPost && !editedPost && createElement(Notice, {
225
- status: "warning",
226
- isDismissible: false
227
- }, __("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")), isReady && createElement(EditorProvider, {
228
- post: postWithTemplate ? contextPost : editedPost,
229
- __unstableTemplate: postWithTemplate ? editedPost : undefined,
230
- settings: settings,
231
- useSubRegistry: false
232
- }, createElement(InterfaceSkeleton, {
233
- isDistractionFree: isDistractionFree,
234
- enableRegionNavigation: false,
235
- className: clsx('edit-site-editor__interface-skeleton', {
236
- 'show-icon-labels': showIconLabels,
237
- 'is-entity-save-view-open': !!entitiesSavedStatesCallback
238
- }),
239
- header: createElement(AnimatePresence, {
240
- initial: false
241
- }, canvasMode === 'edit' && createElement(motion.div, {
242
- initial: {
243
- marginTop: -60
244
- },
245
- animate: {
246
- marginTop: 0
247
- },
248
- exit: {
249
- marginTop: -60
250
- },
251
- transition: {
252
- type: 'tween',
253
- duration:
254
- // Disable transition in mobile to emulate a full page transition.
255
- disableMotion || !isLargeViewport ? 0 : ANIMATION_DURATION,
256
- ease: [0.6, 0, 0.4, 1]
257
- }
258
- }, createElement(Header, {
259
- setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
260
- }))),
261
- actions: createElement(SavePublishPanels, {
262
- closeEntitiesSavedStates: closeEntitiesSavedStates,
263
- isEntitiesSavedStatesOpen: entitiesSavedStatesCallback,
264
- setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
265
- }),
266
- notices: createElement(EditorSnackbars, null),
267
- content: createElement(Fragment, null, createElement(GlobalStylesRenderer, null), isEditMode && createElement(EditorNotices, null), showVisualEditor && createElement(Fragment, null, createElement(TemplatePartConverter, null), !isLargeViewport && createElement(BlockToolbar, {
268
- hideDragHandle: true
269
- }), createElement(SiteEditorCanvas, {
270
- onClick: onClick
271
- }), createElement(PatternModal, null)), editorMode === 'text' && isEditMode && createElement(CodeEditor, null), isEditMode && createElement(Fragment, null, createElement(EditorKeyboardShortcutsRegister, null), createElement(EditorKeyboardShortcuts, null), createElement(BlockKeyboardShortcuts, null))),
272
- secondarySidebar: isEditMode && (shouldShowInserter && createElement(InserterSidebar, {
273
- closeGeneralSidebar: closeGeneralSidebar,
274
- isRightSidebarOpen: isRightSidebarOpen
275
- }) || shouldShowListView && createElement(ListViewSidebar, null)),
276
- sidebar: isEditMode && !isDistractionFree && createElement(ComplementaryArea.Slot, {
277
- scope: "core"
278
- }),
279
- footer: shouldShowBlockBreadcrumbs && createElement(BlockBreadcrumb, {
280
- rootLabelText: postTypeLabel
281
- }),
282
- labels: {
283
- ...interfaceLabels,
284
- secondarySidebar: secondarySidebarLabel
285
- }
286
- }), createElement(Sidebar, {
287
- onActionPerformed: onActionPerformed,
288
- extraPanels: !isEditingPage && createElement(PluginTemplateSettingPanel.Slot, null)
289
- }), supportsGlobalStyles && createElement(GlobalStylesSidebar, null)));
173
+ return /*#__PURE__*/_jsxs(_Fragment, {
174
+ children: [/*#__PURE__*/_jsx(GlobalStylesRenderer, {}), /*#__PURE__*/_jsx(EditorKeyboardShortcutsRegister, {}), isEditMode && /*#__PURE__*/_jsx(BlockKeyboardShortcuts, {}), showVisualEditor && /*#__PURE__*/_jsx(TemplatePartConverter, {}), !isReady ? /*#__PURE__*/_jsx(CanvasLoader, {
175
+ id: loadingProgressId
176
+ }) : null, isEditMode && /*#__PURE__*/_jsx(WelcomeGuide, {}), hasLoadedPost && !editedPost && /*#__PURE__*/_jsx(Notice, {
177
+ status: "warning",
178
+ isDismissible: false,
179
+ children: __("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")
180
+ }), isReady && /*#__PURE__*/_jsxs(EditorProvider, {
181
+ post: postWithTemplate ? contextPost : editedPost,
182
+ __unstableTemplate: postWithTemplate ? editedPost : undefined,
183
+ settings: settings,
184
+ useSubRegistry: false,
185
+ children: [/*#__PURE__*/_jsx(SiteEditorMoreMenu, {}), /*#__PURE__*/_jsx(EditorInterface, {
186
+ className: clsx('edit-site-editor__interface-skeleton', {
187
+ 'show-icon-labels': showIconLabels
188
+ }),
189
+ styles: styles,
190
+ enableRegionNavigation: false,
191
+ customSaveButton: _isPreviewingTheme && /*#__PURE__*/_jsx(SaveButton, {
192
+ size: "compact"
193
+ }),
194
+ forceDisableBlockTools: !hasDefaultEditorCanvasView,
195
+ title: !hasDefaultEditorCanvasView ? getEditorCanvasContainerTitle(editorCanvasView) : undefined,
196
+ iframeProps: iframeProps
197
+ }), /*#__PURE__*/_jsx(Sidebar, {
198
+ onActionPerformed: onActionPerformed,
199
+ extraPanels: !isEditingPage && /*#__PURE__*/_jsx(PluginTemplateSettingPanel.Slot, {})
200
+ }), supportsGlobalStyles && /*#__PURE__*/_jsx(GlobalStylesSidebar, {})]
201
+ })]
202
+ });
290
203
  }
291
204
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useDispatch","useSelect","Notice","__unstableAnimatePresence","AnimatePresence","__unstableMotion","motion","useInstanceId","useViewportMatch","useReducedMotion","store","preferencesStore","BlockBreadcrumb","BlockToolbar","blockEditorStore","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","EditorNotices","EditorSnackbars","privateApis","editorPrivateApis","editorStore","__","sprintf","coreDataStore","blockLibraryPrivateApis","useState","useCallback","noticesStore","routerPrivateApis","CodeEditor","Header","WelcomeGuide","editSiteStore","GlobalStylesRenderer","useTitle","CanvasLoader","unlock","useEditedEntityRecord","PatternModal","POST_TYPE_LABELS","TEMPLATE_POST_TYPE","SiteEditorCanvas","TemplatePartConverter","useSpecificEditorSettings","PluginTemplateSettingPanel","GlobalStylesSidebar","ExperimentalEditorProvider","EditorProvider","InserterSidebar","ListViewSidebar","InterfaceSkeleton","ComplementaryArea","interfaceStore","SavePublishPanels","Sidebar","useHistory","BlockKeyboardShortcuts","interfaceLabels","body","sidebar","actions","footer","header","ANIMATION_DURATION","Editor","isLoading","onClick","record","editedPost","getTitle","isLoaded","hasLoadedPost","type","editedPostType","isLargeViewport","disableMotion","context","contextPost","editorMode","canvasMode","blockEditorMode","isRightSidebarOpen","isInserterOpen","isListViewOpen","isDistractionFree","showIconLabels","showBlockBreadcrumbs","postTypeLabel","isEditingPage","supportsGlobalStyles","select","get","getEditedPostContext","getCanvasMode","isPage","__unstableGetEditorMode","getActiveComplementaryArea","getEntityRecord","getCurrentTheme","isInserterOpened","isListViewOpened","getPostTypeLabel","getEditorMode","_context","postId","postType","undefined","is_block_theme","isViewMode","isEditMode","showVisualEditor","shouldShowBlockBreadcrumbs","shouldShowInserter","shouldShowListView","secondarySidebarLabel","postWithTemplate","title","_POST_TYPE_LABELS$edi","loadingProgressId","closeGeneralSidebar","settings","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","arg","createSuccessNotice","history","onActionPerformed","actionId","items","push","path","canvas","newItem","_title","rendered","id","label","isReady","createElement","Fragment","status","isDismissible","post","__unstableTemplate","useSubRegistry","enableRegionNavigation","className","initial","div","marginTop","animate","exit","transition","duration","ease","isEntitiesSavedStatesOpen","notices","content","hideDragHandle","secondarySidebar","Slot","scope","rootLabelText","labels","extraPanels"],"sources":["@wordpress/edit-site/src/components/editor/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tNotice,\n\t__unstableAnimatePresence as AnimatePresence,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport {\n\tuseInstanceId,\n\tuseViewportMatch,\n\tuseReducedMotion,\n} from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorNotices,\n\tEditorSnackbars,\n\tprivateApis as editorPrivateApis,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { useState, useCallback } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport CodeEditor from '../code-editor';\nimport Header from '../header-edit-mode';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport useTitle from '../routes/use-title';\nimport CanvasLoader from '../canvas-loader';\nimport { unlock } from '../../lock-unlock';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport PatternModal from '../pattern-modal';\nimport { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport SiteEditorCanvas from '../block-editor/site-editor-canvas';\nimport TemplatePartConverter from '../template-part-converter';\nimport { useSpecificEditorSettings } from '../block-editor/use-site-editor-settings';\nimport PluginTemplateSettingPanel from '../plugin-template-setting-panel';\nimport GlobalStylesSidebar from '../global-styles-sidebar';\n\nconst {\n\tExperimentalEditorProvider: EditorProvider,\n\tInserterSidebar,\n\tListViewSidebar,\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tinterfaceStore,\n\tSavePublishPanels,\n\tSidebar,\n} = unlock( editorPrivateApis );\nconst { useHistory } = unlock( routerPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n\t/* translators: accessibility text for the editor header landmark region. */\n\theader: __( 'Editor top bar' ),\n};\n\nconst ANIMATION_DURATION = 0.25;\n\nexport default function Editor( { isLoading, onClick } ) {\n\tconst {\n\t\trecord: editedPost,\n\t\tgetTitle,\n\t\tisLoaded: hasLoadedPost,\n\t} = useEditedEntityRecord();\n\n\tconst { type: editedPostType } = editedPost;\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst disableMotion = useReducedMotion();\n\n\tconst {\n\t\tcontext,\n\t\tcontextPost,\n\t\teditorMode,\n\t\tcanvasMode,\n\t\tblockEditorMode,\n\t\tisRightSidebarOpen,\n\t\tisInserterOpen,\n\t\tisListViewOpen,\n\t\tisDistractionFree,\n\t\tshowIconLabels,\n\t\tshowBlockBreadcrumbs,\n\t\tpostTypeLabel,\n\t\tisEditingPage,\n\t\tsupportsGlobalStyles,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditedPostContext, getCanvasMode, isPage } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst { getEntityRecord, getCurrentTheme } = select( coreDataStore );\n\t\tconst {\n\t\t\tisInserterOpened,\n\t\t\tisListViewOpened,\n\t\t\tgetPostTypeLabel,\n\t\t\tgetEditorMode,\n\t\t} = select( editorStore );\n\t\tconst _context = getEditedPostContext();\n\n\t\t// The currently selected entity to display.\n\t\t// Typically template or template part in the site editor.\n\t\treturn {\n\t\t\tcontext: _context,\n\t\t\tcontextPost: _context?.postId\n\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t_context.postType,\n\t\t\t\t\t\t_context.postId\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t\teditorMode: getEditorMode(),\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tisRightSidebarOpen: getActiveComplementaryArea( 'core' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tpostTypeLabel: getPostTypeLabel(),\n\t\t\tisEditingPage: isPage(),\n\t\t\tsupportsGlobalStyles: getCurrentTheme()?.is_block_theme,\n\t\t};\n\t}, [] );\n\n\tconst isViewMode = canvasMode === 'view';\n\tconst isEditMode = canvasMode === 'edit';\n\tconst showVisualEditor = isViewMode || editorMode === 'visual';\n\tconst shouldShowBlockBreadcrumbs =\n\t\t! isDistractionFree &&\n\t\tshowBlockBreadcrumbs &&\n\t\tisEditMode &&\n\t\tshowVisualEditor &&\n\t\tblockEditorMode !== 'zoom-out';\n\tconst shouldShowInserter = isEditMode && showVisualEditor && isInserterOpen;\n\tconst shouldShowListView = isEditMode && showVisualEditor && isListViewOpen;\n\tconst secondarySidebarLabel = isListViewOpen\n\t\t? __( 'List View' )\n\t\t: __( 'Block Library' );\n\tconst postWithTemplate = !! context?.postId;\n\n\tlet title;\n\tif ( hasLoadedPost ) {\n\t\ttitle = sprintf(\n\t\t\t// translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).\n\t\t\t__( '%1$s ‹ %2$s' ),\n\t\t\tgetTitle(),\n\t\t\tPOST_TYPE_LABELS[ editedPostType ] ??\n\t\t\t\tPOST_TYPE_LABELS[ TEMPLATE_POST_TYPE ]\n\t\t);\n\t}\n\n\t// Only announce the title once the editor is ready to prevent \"Replace\"\n\t// action in <URLQueryController> from double-announcing.\n\tuseTitle( hasLoadedPost && title );\n\n\tconst loadingProgressId = useInstanceId(\n\t\tCanvasLoader,\n\t\t'edit-site-editor__loading-progress'\n\t);\n\n\tconst { closeGeneralSidebar } = useDispatch( editSiteStore );\n\n\tconst settings = useSpecificEditorSettings();\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\tconst history = useHistory();\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/' + items[ 0 ].type,\n\t\t\t\t\t\t\tpostId: undefined,\n\t\t\t\t\t\t\tpostType: undefined,\n\t\t\t\t\t\t\tcanvas: 'view',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst _title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\t_title\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\t\t\t\t\tpath: undefined,\n\t\t\t\t\t\t\t\t\t\t\t\tpostId: newItem.id,\n\t\t\t\t\t\t\t\t\t\t\t\tpostType: newItem.type,\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\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}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ history, createSuccessNotice ]\n\t);\n\n\tconst isReady =\n\t\t! isLoading &&\n\t\t( ( postWithTemplate && !! contextPost && !! editedPost ) ||\n\t\t\t( ! postWithTemplate && !! editedPost ) );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! isReady ? <CanvasLoader id={ loadingProgressId } /> : null }\n\t\t\t{ isEditMode && <WelcomeGuide /> }\n\t\t\t{ hasLoadedPost && ! editedPost && (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ isReady && (\n\t\t\t\t<EditorProvider\n\t\t\t\t\tpost={ postWithTemplate ? contextPost : editedPost }\n\t\t\t\t\t__unstableTemplate={\n\t\t\t\t\t\tpostWithTemplate ? editedPost : undefined\n\t\t\t\t\t}\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<InterfaceSkeleton\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t\tenableRegionNavigation={ false }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-editor__interface-skeleton',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t\t\t\t\t\t'is-entity-save-view-open':\n\t\t\t\t\t\t\t\t\t!! entitiesSavedStatesCallback,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\theader={\n\t\t\t\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t\t\t\t{ canvasMode === 'edit' && (\n\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\t\t\t\tmarginTop: -60,\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\t\t\t\tmarginTop: -60,\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\t\tduration:\n\t\t\t\t\t\t\t\t\t\t\t\t// Disable transition in mobile to emulate a full page transition.\n\t\t\t\t\t\t\t\t\t\t\t\tdisableMotion ||\n\t\t\t\t\t\t\t\t\t\t\t\t! isLargeViewport\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\t\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Header\n\t\t\t\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\t<SavePublishPanels\n\t\t\t\t\t\t\t\tcloseEntitiesSavedStates={\n\t\t\t\t\t\t\t\t\tcloseEntitiesSavedStates\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<GlobalStylesRenderer />\n\t\t\t\t\t\t\t\t{ isEditMode && <EditorNotices /> }\n\t\t\t\t\t\t\t\t{ showVisualEditor && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<TemplatePartConverter />\n\t\t\t\t\t\t\t\t\t\t{ ! isLargeViewport && (\n\t\t\t\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t<SiteEditorCanvas onClick={ onClick } />\n\t\t\t\t\t\t\t\t\t\t<PatternModal />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ editorMode === 'text' && isEditMode && (\n\t\t\t\t\t\t\t\t\t<CodeEditor />\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ isEditMode && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcuts />\n\t\t\t\t\t\t\t\t\t\t<BlockKeyboardShortcuts />\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</>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsecondarySidebar={\n\t\t\t\t\t\t\tisEditMode &&\n\t\t\t\t\t\t\t( ( shouldShowInserter && (\n\t\t\t\t\t\t\t\t<InserterSidebar\n\t\t\t\t\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\t\t\t\t\tisRightSidebarOpen={ isRightSidebarOpen }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) ||\n\t\t\t\t\t\t\t\t( shouldShowListView && <ListViewSidebar /> ) )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsidebar={\n\t\t\t\t\t\t\tisEditMode &&\n\t\t\t\t\t\t\t! isDistractionFree && (\n\t\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core\" />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfooter={\n\t\t\t\t\t\t\tshouldShowBlockBreadcrumbs && (\n\t\t\t\t\t\t\t\t<BlockBreadcrumb\n\t\t\t\t\t\t\t\t\trootLabelText={ postTypeLabel }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabels={ {\n\t\t\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={\n\t\t\t\t\t\t\t! isEditingPage && (\n\t\t\t\t\t\t\t\t<PluginTemplateSettingPanel.Slot />\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{ supportsGlobalSty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AEhB,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useDispatch","useSelect","Notice","useInstanceId","EditorKeyboardShortcutsRegister","privateApis","editorPrivateApis","store","editorStore","__","sprintf","coreDataStore","blockLibraryPrivateApis","useCallback","useMemo","noticesStore","routerPrivateApis","preferencesStore","WelcomeGuide","editSiteStore","GlobalStylesRenderer","useTitle","CanvasLoader","unlock","useEditedEntityRecord","POST_TYPE_LABELS","TEMPLATE_POST_TYPE","TemplatePartConverter","useSpecificEditorSettings","PluginTemplateSettingPanel","GlobalStylesSidebar","isPreviewingTheme","getEditorCanvasContainerTitle","useHasEditorCanvasContainer","SaveButton","SiteEditorMoreMenu","useEditorIframeProps","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","EditorInterface","ExperimentalEditorProvider","EditorProvider","Sidebar","useHistory","BlockKeyboardShortcuts","Editor","isLoading","record","editedPost","getTitle","isLoaded","hasLoadedPost","type","editedPostType","context","contextPost","editorMode","canvasMode","isEditingPage","supportsGlobalStyles","showIconLabels","editorCanvasView","currentPostIsTrashed","select","getEditedPostContext","getCanvasMode","isPage","get","getEntityRecord","getCurrentTheme","getEditorMode","_context","postId","postType","undefined","is_block_theme","getEditorCanvasContainerView","getCurrentPostAttribute","_isPreviewingTheme","hasDefaultEditorCanvasView","iframeProps","isViewMode","isEditMode","showVisualEditor","postWithTemplate","title","_POST_TYPE_LABELS$edi","loadingProgressId","settings","styles","css","createSuccessNotice","history","onActionPerformed","actionId","items","push","newItem","_title","rendered","id","actions","label","onClick","canvas","isReady","children","status","isDismissible","post","__unstableTemplate","useSubRegistry","className","enableRegionNavigation","customSaveButton","size","forceDisableBlockTools","extraPanels","Slot"],"sources":["@wordpress/edit-site/src/components/editor/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Notice } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tEditorKeyboardShortcutsRegister,\n\tprivateApis as editorPrivateApis,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport useTitle from '../routes/use-title';\nimport CanvasLoader from '../canvas-loader';\nimport { unlock } from '../../lock-unlock';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport TemplatePartConverter from '../template-part-converter';\nimport { useSpecificEditorSettings } from '../block-editor/use-site-editor-settings';\nimport PluginTemplateSettingPanel from '../plugin-template-setting-panel';\nimport GlobalStylesSidebar from '../global-styles-sidebar';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport SaveButton from '../save-button';\nimport SiteEditorMoreMenu from '../more-menu';\nimport useEditorIframeProps from '../block-editor/use-editor-iframe-props';\n\nconst {\n\tEditorInterface,\n\tExperimentalEditorProvider: EditorProvider,\n\tSidebar,\n} = unlock( editorPrivateApis );\nconst { useHistory } = unlock( routerPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\n\nexport default function Editor( { isLoading } ) {\n\tconst {\n\t\trecord: editedPost,\n\t\tgetTitle,\n\t\tisLoaded: hasLoadedPost,\n\t} = useEditedEntityRecord();\n\tconst { type: editedPostType } = editedPost;\n\tconst {\n\t\tcontext,\n\t\tcontextPost,\n\t\teditorMode,\n\t\tcanvasMode,\n\t\tisEditingPage,\n\t\tsupportsGlobalStyles,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t\tcurrentPostIsTrashed,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostContext, getCanvasMode, isPage } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEntityRecord, getCurrentTheme } = select( coreDataStore );\n\t\tconst { getEditorMode } = select( editorStore );\n\t\tconst _context = getEditedPostContext();\n\n\t\t// The currently selected entity to display.\n\t\t// Typically template or template part in the site editor.\n\t\treturn {\n\t\t\tcontext: _context,\n\t\t\tcontextPost: _context?.postId\n\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t_context.postType,\n\t\t\t\t\t\t_context.postId\n\t\t\t\t )\n\t\t\t\t: undefined,\n\t\t\teditorMode: getEditorMode(),\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tisEditingPage: isPage(),\n\t\t\tsupportsGlobalStyles: getCurrentTheme()?.is_block_theme,\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tcurrentPostIsTrashed:\n\t\t\t\tselect( editorStore ).getCurrentPostAttribute( 'status' ) ===\n\t\t\t\t'trash',\n\t\t};\n\t}, [] );\n\tconst _isPreviewingTheme = isPreviewingTheme();\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\tconst iframeProps = useEditorIframeProps();\n\n\tconst isViewMode = canvasMode === 'view';\n\tconst isEditMode = canvasMode === 'edit';\n\tconst showVisualEditor = isViewMode || editorMode === 'visual';\n\tconst postWithTemplate = !! context?.postId;\n\n\tlet title;\n\tif ( hasLoadedPost ) {\n\t\ttitle = sprintf(\n\t\t\t// translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).\n\t\t\t__( '%1$s ‹ %2$s' ),\n\t\t\tgetTitle(),\n\t\t\tPOST_TYPE_LABELS[ editedPostType ] ??\n\t\t\t\tPOST_TYPE_LABELS[ TEMPLATE_POST_TYPE ]\n\t\t);\n\t}\n\n\t// Only announce the title once the editor is ready to prevent \"Replace\"\n\t// action in <URLQueryController> from double-announcing.\n\tuseTitle( hasLoadedPost && title );\n\n\tconst loadingProgressId = useInstanceId(\n\t\tCanvasLoader,\n\t\t'edit-site-editor__loading-progress'\n\t);\n\n\tconst settings = useSpecificEditorSettings();\n\tconst styles = useMemo(\n\t\t() => [\n\t\t\t...settings.styles,\n\t\t\t{\n\t\t\t\t// Forming a \"block formatting context\" to prevent margin collapsing.\n\t\t\t\t// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context\n\n\t\t\t\tcss: `body{${\n\t\t\t\t\tcanvasMode === 'view'\n\t\t\t\t\t\t? `min-height: 100vh; ${\n\t\t\t\t\t\t\t\tcurrentPostIsTrashed ? '' : 'cursor: pointer;'\n\t\t\t\t\t\t }`\n\t\t\t\t\t\t: ''\n\t\t\t\t}}}`,\n\t\t\t},\n\t\t],\n\t\t[ settings.styles, canvasMode, currentPostIsTrashed ]\n\t);\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\tconst history = useHistory();\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\tcase 'delete-post':\n\t\t\t\t\t{\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpostType: items[ 0 ].type,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst _title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\t_title\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\t\t\t\t\tpostId: newItem.id,\n\t\t\t\t\t\t\t\t\t\t\t\tpostType: newItem.type,\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\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}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ history, createSuccessNotice ]\n\t);\n\n\tconst isReady =\n\t\t! isLoading &&\n\t\t( ( postWithTemplate && !! contextPost && !! editedPost ) ||\n\t\t\t( ! postWithTemplate && !! editedPost ) );\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesRenderer />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t{ isEditMode && <BlockKeyboardShortcuts /> }\n\t\t\t{ showVisualEditor && <TemplatePartConverter /> }\n\t\t\t{ ! isReady ? <CanvasLoader id={ loadingProgressId } /> : null }\n\t\t\t{ isEditMode && <WelcomeGuide /> }\n\t\t\t{ hasLoadedPost && ! editedPost && (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ isReady && (\n\t\t\t\t<EditorProvider\n\t\t\t\t\tpost={ postWithTemplate ? contextPost : editedPost }\n\t\t\t\t\t__unstableTemplate={\n\t\t\t\t\t\tpostWithTemplate ? editedPost : undefined\n\t\t\t\t\t}\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<SiteEditorMoreMenu />\n\t\t\t\t\t<EditorInterface\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-editor__interface-skeleton',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\tenableRegionNavigation={ false }\n\t\t\t\t\t\tcustomSaveButton={\n\t\t\t\t\t\t\t_isPreviewingTheme && <SaveButton size=\"compact\" />\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforceDisableBlockTools={ ! hasDefaultEditorCanvasView }\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t! hasDefaultEditorCanvasView\n\t\t\t\t\t\t\t\t? getEditorCanvasContainerTitle(\n\t\t\t\t\t\t\t\t\t\teditorCanvasView\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tiframeProps={ iframeProps }\n\t\t\t\t\t/>\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={\n\t\t\t\t\t\t\t! isEditingPage && (\n\t\t\t\t\t\t\t\t<PluginTemplateSettingPanel.Slot />\n\t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rG,EAAE,CACH,2EACD;IAAC,CACM,CACR,EACCoG,OAAO,iBACRrE,KAAA,CAACK,cAAc;MACdoE,IAAI,EAAGzB,gBAAgB,GAAG7B,WAAW,GAAGP,UAAY;MACpD8D,kBAAkB,EACjB1B,gBAAgB,GAAGpC,UAAU,GAAG0B,SAChC;MACDc,QAAQ,EAAGA,QAAU;MACrBuB,cAAc,EAAG,KAAO;MAAAL,QAAA,gBAExBxE,IAAA,CAACH,kBAAkB,IAAE,CAAC,eACtBG,IAAA,CAACK,eAAe;QACfyE,SAAS,EAAGrH,IAAI,CACf,sCAAsC,EACtC;UACC,kBAAkB,EAAEiE;QACrB,CACD,CAAG;QACH6B,MAAM,EAAGA,MAAQ;QACjBwB,sBAAsB,EAAG,KAAO;QAChCC,gBAAgB,EACfpC,kBAAkB,iBAAI5C,IAAA,CAACJ,UAAU;UAACqF,IAAI,EAAC;QAAS,CAAE,CAClD;QACDC,sBAAsB,EAAG,CAAErC,0BAA4B;QACvDM,KAAK,EACJ,CAAEN,0BAA0B,GACzBnD,6BAA6B,CAC7BiC,gBACA,CAAC,GACDa,SACH;QACDM,WAAW,EAAGA;MAAa,CAC3B,CAAC,eACF9C,IAAA,CAACQ,OAAO;QACPmD,iBAAiB,EAAGA,iBAAmB;QACvCwB,WAAW,EACV,CAAE3D,aAAa,iBACdxB,IAAA,CAACT,0BAA0B,CAAC6F,IAAI,IAAE;MAEnC,CACD,CAAC,EACA3D,oBAAoB,iBAAIzB,IAAA,CAACR,mBAAmB,IAAE,CAAC;IAAA,CAClC,CAChB;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
@@ -1,23 +1,27 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
5
4
  import { Children, cloneElement, useState } from '@wordpress/element';
6
- import { Button, privateApis as componentsPrivateApis, __experimentalUseSlotFills as useSlotFills } from '@wordpress/components';
5
+ import { Button, __experimentalUseSlotFills as useSlotFills } from '@wordpress/components';
7
6
  import { ESCAPE } from '@wordpress/keycodes';
8
7
  import { __ } from '@wordpress/i18n';
9
8
  import { useDispatch, useSelect } from '@wordpress/data';
10
9
  import { closeSmall } from '@wordpress/icons';
11
10
  import { useFocusOnMount, useFocusReturn } from '@wordpress/compose';
12
11
  import { store as preferencesStore } from '@wordpress/preferences';
13
- import { store as editorStore } from '@wordpress/editor';
12
+ import { store as editorStore, privateApis as editorPrivateApis } from '@wordpress/editor';
14
13
 
15
14
  /**
16
15
  * Internal dependencies
17
16
  */
18
17
  import { unlock } from '../../lock-unlock';
19
18
  import { store as editSiteStore } from '../../store';
20
- import ResizableEditor from '../block-editor/resizable-editor';
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { jsxs as _jsxs } from "react/jsx-runtime";
21
+ const {
22
+ EditorContentSlotFill,
23
+ ResizableEditor
24
+ } = unlock(editorPrivateApis);
21
25
 
22
26
  /**
23
27
  * Returns a translated string for the title of the editor canvas container.
@@ -37,17 +41,6 @@ function getEditorCanvasContainerTitle(view) {
37
41
  return '';
38
42
  }
39
43
  }
40
-
41
- // Creates a private slot fill.
42
- const {
43
- createPrivateSlotFill
44
- } = unlock(componentsPrivateApis);
45
- const SLOT_FILL_NAME = 'EditSiteEditorCanvasContainerSlot';
46
- const {
47
- privateKey,
48
- Slot: EditorCanvasContainerSlot,
49
- Fill: EditorCanvasContainerFill
50
- } = createPrivateSlotFill(SLOT_FILL_NAME);
51
44
  function EditorCanvasContainer({
52
45
  children,
53
46
  closeButtonLabel,
@@ -98,25 +91,31 @@ function EditorCanvasContainer({
98
91
  }
99
92
  const title = getEditorCanvasContainerTitle(editorCanvasContainerView);
100
93
  const shouldShowCloseButton = onClose || closeButtonLabel;
101
- return createElement(EditorCanvasContainerFill, null, createElement(ResizableEditor, {
102
- enableResizing: enableResizing
103
- }, createElement("section", {
104
- className: "edit-site-editor-canvas-container",
105
- ref: shouldShowCloseButton ? focusOnMountRef : null,
106
- onKeyDown: closeOnEscape,
107
- "aria-label": title
108
- }, shouldShowCloseButton && createElement(Button, {
109
- className: "edit-site-editor-canvas-container__close-button",
110
- icon: closeSmall,
111
- label: closeButtonLabel || __('Close'),
112
- onClick: onCloseContainer
113
- }), childrenWithProps)));
94
+ return /*#__PURE__*/_jsx(EditorContentSlotFill.Fill, {
95
+ children: /*#__PURE__*/_jsx("div", {
96
+ className: "edit-site-editor-canvas-container",
97
+ children: /*#__PURE__*/_jsx(ResizableEditor, {
98
+ enableResizing: enableResizing,
99
+ children: /*#__PURE__*/_jsxs("section", {
100
+ className: "edit-site-editor-canvas-container__section",
101
+ ref: shouldShowCloseButton ? focusOnMountRef : null,
102
+ onKeyDown: closeOnEscape,
103
+ "aria-label": title,
104
+ children: [shouldShowCloseButton && /*#__PURE__*/_jsx(Button, {
105
+ className: "edit-site-editor-canvas-container__close-button",
106
+ icon: closeSmall,
107
+ label: closeButtonLabel || __('Close'),
108
+ onClick: onCloseContainer
109
+ }), childrenWithProps]
110
+ })
111
+ })
112
+ })
113
+ });
114
114
  }
115
115
  function useHasEditorCanvasContainer() {
116
- const fills = useSlotFills(privateKey);
116
+ const fills = useSlotFills(EditorContentSlotFill.privateKey);
117
117
  return !!fills?.length;
118
118
  }
119
- EditorCanvasContainer.Slot = EditorCanvasContainerSlot;
120
119
  export default EditorCanvasContainer;
121
120
  export { useHasEditorCanvasContainer, getEditorCanvasContainerTitle };
122
121
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Children","cloneElement","useState","Button","privateApis","componentsPrivateApis","__experimentalUseSlotFills","useSlotFills","ESCAPE","__","useDispatch","useSelect","closeSmall","useFocusOnMount","useFocusReturn","store","preferencesStore","editorStore","unlock","editSiteStore","ResizableEditor","getEditorCanvasContainerTitle","view","createPrivateSlotFill","SLOT_FILL_NAME","privateKey","Slot","EditorCanvasContainerSlot","Fill","EditorCanvasContainerFill","EditorCanvasContainer","children","closeButtonLabel","onClose","enableResizing","editorCanvasContainerView","showListViewByDefault","select","_editorCanvasContainerView","getEditorCanvasContainerView","_showListViewByDefault","get","isClosed","setIsClosed","setEditorCanvasContainerView","setIsListViewOpened","focusOnMountRef","sectionFocusReturnRef","onCloseContainer","undefined","closeOnEscape","event","keyCode","defaultPrevented","preventDefault","childrenWithProps","Array","isArray","map","child","index","ref","title","shouldShowCloseButton","createElement","className","onKeyDown","icon","label","onClick","useHasEditorCanvasContainer","fills","length"],"sources":["@wordpress/edit-site/src/components/editor-canvas-container/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Children, cloneElement, useState } from '@wordpress/element';\nimport {\n\tButton,\n\tprivateApis as componentsPrivateApis,\n\t__experimentalUseSlotFills as useSlotFills,\n} from '@wordpress/components';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { closeSmall } from '@wordpress/icons';\nimport { useFocusOnMount, useFocusReturn } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport ResizableEditor from '../block-editor/resizable-editor';\n\n/**\n * Returns a translated string for the title of the editor canvas container.\n *\n * @param {string} view Editor canvas container view.\n *\n * @return {string} Translated string corresponding to value of view. Default is ''.\n */\nfunction getEditorCanvasContainerTitle( view ) {\n\tswitch ( view ) {\n\t\tcase 'style-book':\n\t\t\treturn __( 'Style Book' );\n\t\tcase 'global-styles-revisions':\n\t\tcase 'global-styles-revisions:style-book':\n\t\t\treturn __( 'Style Revisions' );\n\t\tdefault:\n\t\t\treturn '';\n\t}\n}\n\n// Creates a private slot fill.\nconst { createPrivateSlotFill } = unlock( componentsPrivateApis );\nconst SLOT_FILL_NAME = 'EditSiteEditorCanvasContainerSlot';\nconst {\n\tprivateKey,\n\tSlot: EditorCanvasContainerSlot,\n\tFill: EditorCanvasContainerFill,\n} = createPrivateSlotFill( SLOT_FILL_NAME );\n\nfunction EditorCanvasContainer( {\n\tchildren,\n\tcloseButtonLabel,\n\tonClose,\n\tenableResizing = false,\n} ) {\n\tconst { editorCanvasContainerView, showListViewByDefault } = useSelect(\n\t\t( select ) => {\n\t\t\tconst _editorCanvasContainerView = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView();\n\n\t\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'showListViewByDefault'\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\teditorCanvasContainerView: _editorCanvasContainerView,\n\t\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst sectionFocusReturnRef = useFocusReturn();\n\n\tfunction onCloseContainer() {\n\t\tsetIsListViewOpened( showListViewByDefault );\n\t\tsetEditorCanvasContainerView( undefined );\n\t\tsetIsClosed( true );\n\t\tif ( typeof onClose === 'function' ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tonCloseContainer();\n\t\t}\n\t}\n\n\tconst childrenWithProps = Array.isArray( children )\n\t\t? Children.map( children, ( child, index ) =>\n\t\t\t\tindex === 0\n\t\t\t\t\t? cloneElement( child, {\n\t\t\t\t\t\t\tref: sectionFocusReturnRef,\n\t\t\t\t\t } )\n\t\t\t\t\t: child\n\t\t )\n\t\t: cloneElement( children, {\n\t\t\t\tref: sectionFocusReturnRef,\n\t\t } );\n\n\tif ( isClosed ) {\n\t\treturn null;\n\t}\n\n\tconst title = getEditorCanvasContainerTitle( editorCanvasContainerView );\n\tconst shouldShowCloseButton = onClose || closeButtonLabel;\n\n\treturn (\n\t\t<EditorCanvasContainerFill>\n\t\t\t<ResizableEditor enableResizing={ enableResizing }>\n\t\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t\t<section\n\t\t\t\t\tclassName=\"edit-site-editor-canvas-container\"\n\t\t\t\t\tref={ shouldShowCloseButton ? focusOnMountRef : null }\n\t\t\t\t\tonKeyDown={ closeOnEscape }\n\t\t\t\t\taria-label={ title }\n\t\t\t\t>\n\t\t\t\t\t{ shouldShowCloseButton && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"edit-site-editor-canvas-container__close-button\"\n\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\tlabel={ closeButtonLabel || __( 'Close' ) }\n\t\t\t\t\t\t\tonClick={ onCloseContainer }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ childrenWithProps }\n\t\t\t\t</section>\n\t\t\t</ResizableEditor>\n\t\t</EditorCanvasContainerFill>\n\t);\n}\nfunction useHasEditorCanvasContainer() {\n\tconst fills = useSlotFills( privateKey );\n\treturn !! fills?.length;\n}\n\nEditorCanvasContainer.Slot = EditorCanvasContainerSlot;\nexport default EditorCanvasContainer;\nexport { useHasEditorCanvasContainer, getEditorCanvasContainerTitle };\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,oBAAoB;AACrE,SACCC,MAAM,EACNC,WAAW,IAAIC,qBAAqB,EACpCC,0BAA0B,IAAIC,YAAY,QACpC,uBAAuB;AAC9B,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,eAAe,EAAEC,cAAc,QAAQ,oBAAo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gBAAgB;EAEzD,OACCgC,aAAA,CAACnC,yBAAyB,QACzBmC,aAAA,CAAC5C,eAAe;IAACc,cAAc,EAAGA;EAAgB,GAEjD8B,aAAA;IACCC,SAAS,EAAC,mCAAmC;IAC7CJ,GAAG,EAAGE,qBAAqB,GAAGjB,eAAe,GAAG,IAAM;IACtDoB,SAAS,EAAGhB,aAAe;IAC3B,cAAaY;EAAO,GAElBC,qBAAqB,IACtBC,aAAA,CAAC7D,MAAM;IACN8D,SAAS,EAAC,iDAAiD;IAC3DE,IAAI,EAAGvD,UAAY;IACnBwD,KAAK,EAAGpC,gBAAgB,IAAIvB,EAAE,CAAE,OAAQ,CAAG;IAC3C4D,OAAO,EAAGrB;EAAkB,CAC5B,CACD,EACCO,iBACM,CACO,CACS,CAAC;AAE9B;AACA,SAASe,2BAA2BA,CAAA,EAAG;EACtC,MAAMC,KAAK,GAAGhE,YAAY,CAAEkB,UAAW,CAAC;EACxC,OAAO,CAAC,CAAE8C,KAAK,EAAEC,MAAM;AACxB;AAEA1C,qBAAqB,CAACJ,IAAI,GAAGC,yBAAyB;AACtD,eAAeG,qBAAqB;AACpC,SAASwC,2BAA2B,EAAEjD,6BAA6B","ignoreList":[]}
1
+ {"version":3,"names":["Children","cloneElement","useState","Button","__experimentalUseSlotFills","useSlotFills","ESCAPE","__","useDispatch","useSelect","closeSmall","useFocusOnMount","useFocusReturn","store","preferencesStore","editorStore","privateApis","editorPrivateApis","unlock","editSiteStore","jsx","_jsx","jsxs","_jsxs","EditorContentSlotFill","ResizableEditor","getEditorCanvasContainerTitle","view","EditorCanvasContainer","children","closeButtonLabel","onClose","enableResizing","editorCanvasContainerView","showListViewByDefault","select","_editorCanvasContainerView","getEditorCanvasContainerView","_showListViewByDefault","get","isClosed","setIsClosed","setEditorCanvasContainerView","setIsListViewOpened","focusOnMountRef","sectionFocusReturnRef","onCloseContainer","undefined","closeOnEscape","event","keyCode","defaultPrevented","preventDefault","childrenWithProps","Array","isArray","map","child","index","ref","title","shouldShowCloseButton","Fill","className","onKeyDown","icon","label","onClick","useHasEditorCanvasContainer","fills","privateKey","length"],"sources":["@wordpress/edit-site/src/components/editor-canvas-container/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Children, cloneElement, useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalUseSlotFills as useSlotFills,\n} from '@wordpress/components';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { closeSmall } from '@wordpress/icons';\nimport { useFocusOnMount, useFocusReturn } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { EditorContentSlotFill, ResizableEditor } = unlock( editorPrivateApis );\n\n/**\n * Returns a translated string for the title of the editor canvas container.\n *\n * @param {string} view Editor canvas container view.\n *\n * @return {string} Translated string corresponding to value of view. Default is ''.\n */\nfunction getEditorCanvasContainerTitle( view ) {\n\tswitch ( view ) {\n\t\tcase 'style-book':\n\t\t\treturn __( 'Style Book' );\n\t\tcase 'global-styles-revisions':\n\t\tcase 'global-styles-revisions:style-book':\n\t\t\treturn __( 'Style Revisions' );\n\t\tdefault:\n\t\t\treturn '';\n\t}\n}\n\nfunction EditorCanvasContainer( {\n\tchildren,\n\tcloseButtonLabel,\n\tonClose,\n\tenableResizing = false,\n} ) {\n\tconst { editorCanvasContainerView, showListViewByDefault } = useSelect(\n\t\t( select ) => {\n\t\t\tconst _editorCanvasContainerView = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView();\n\n\t\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'showListViewByDefault'\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\teditorCanvasContainerView: _editorCanvasContainerView,\n\t\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst sectionFocusReturnRef = useFocusReturn();\n\n\tfunction onCloseContainer() {\n\t\tsetIsListViewOpened( showListViewByDefault );\n\t\tsetEditorCanvasContainerView( undefined );\n\t\tsetIsClosed( true );\n\t\tif ( typeof onClose === 'function' ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tonCloseContainer();\n\t\t}\n\t}\n\n\tconst childrenWithProps = Array.isArray( children )\n\t\t? Children.map( children, ( child, index ) =>\n\t\t\t\tindex === 0\n\t\t\t\t\t? cloneElement( child, {\n\t\t\t\t\t\t\tref: sectionFocusReturnRef,\n\t\t\t\t\t } )\n\t\t\t\t\t: child\n\t\t )\n\t\t: cloneElement( children, {\n\t\t\t\tref: sectionFocusReturnRef,\n\t\t } );\n\n\tif ( isClosed ) {\n\t\treturn null;\n\t}\n\n\tconst title = getEditorCanvasContainerTitle( editorCanvasContainerView );\n\tconst shouldShowCloseButton = onClose || closeButtonLabel;\n\n\treturn (\n\t\t<EditorContentSlotFill.Fill>\n\t\t\t<div className=\"edit-site-editor-canvas-container\">\n\t\t\t\t<ResizableEditor enableResizing={ enableResizing }>\n\t\t\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t\t\t<section\n\t\t\t\t\t\tclassName=\"edit-site-editor-canvas-container__section\"\n\t\t\t\t\t\tref={ shouldShowCloseButton ? focusOnMountRef : null }\n\t\t\t\t\t\tonKeyDown={ closeOnEscape }\n\t\t\t\t\t\taria-label={ title }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ shouldShowCloseButton && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-editor-canvas-container__close-button\"\n\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\tlabel={ closeButtonLabel || __( 'Close' ) }\n\t\t\t\t\t\t\t\tonClick={ onCloseContainer }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ childrenWithProps }\n\t\t\t\t\t</section>\n\t\t\t\t</ResizableEditor>\n\t\t\t</div>\n\t\t</EditorContentSlotFill.Fill>\n\t);\n}\nfunction useHasEditorCanvasContainer() {\n\tconst fills = useSlotFills( EditorContentSlotFill.privateKey );\n\treturn !! fills?.length;\n}\n\nexport default EditorCanvasContainer;\nexport { useHasEditorCanvasContainer, getEditorCanvasContainerTitle };\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,oBAAoB;AACrE,SACCC,MAAM,EACNC,0BAA0B,IAAIC,YAAY,QACpC,uBAAuB;AAC9B,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,eAAe,EAAEC,cAAc,QAAQ,oBAAoB;AACpE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAClE,SACCD,KAAK,IAAIE,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASL,KAAK,IAAIM,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErD,MA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xC,IAAA,CAAClB,MAAM;YACN4D,SAAS,EAAC,iDAAiD;YAC3DE,IAAI,EAAGvD,UAAY;YACnBwD,KAAK,EAAGpC,gBAAgB,IAAIvB,EAAE,CAAE,OAAQ,CAAG;YAC3C4D,OAAO,EAAGrB;UAAkB,CAC5B,CACD,EACCO,iBAAiB;QAAA,CACX;MAAC,CACM;IAAC,CACd;EAAC,CACqB,CAAC;AAE/B;AACA,SAASe,2BAA2BA,CAAA,EAAG;EACtC,MAAMC,KAAK,GAAGhE,YAAY,CAAEmB,qBAAqB,CAAC8C,UAAW,CAAC;EAC9D,OAAO,CAAC,CAAED,KAAK,EAAEE,MAAM;AACxB;AAEA,eAAe3C,qBAAqB;AACpC,SAASwC,2BAA2B,EAAE1C,6BAA6B","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -10,6 +9,7 @@ import { doAction } from '@wordpress/hooks';
10
9
  * Internal dependencies
11
10
  */
12
11
  import ErrorBoundaryWarning from './warning';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  export default class ErrorBoundary extends Component {
14
14
  constructor() {
15
15
  super(...arguments);
@@ -29,7 +29,7 @@ export default class ErrorBoundary extends Component {
29
29
  if (!this.state.error) {
30
30
  return this.props.children;
31
31
  }
32
- return createElement(ErrorBoundaryWarning, {
32
+ return /*#__PURE__*/_jsx(ErrorBoundaryWarning, {
33
33
  message: __('The editor has encountered an unexpected error.'),
34
34
  error: this.state.error
35
35
  });
@@ -1 +1 @@
1
- {"version":3,"names":["Component","__","doAction","ErrorBoundaryWarning","ErrorBoundary","constructor","arguments","state","error","componentDidCatch","getDerivedStateFromError","render","props","children","createElement","message"],"sources":["@wordpress/edit-site/src/components/error-boundary/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundaryWarning from './warning';\n\nexport default class ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tif ( ! this.state.error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<ErrorBoundaryWarning\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'The editor has encountered an unexpected error.'\n\t\t\t\t) }\n\t\t\t\terror={ this.state.error }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,kBAAkB;;AAE3C;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,WAAW;AAE5C,eAAe,MAAMC,aAAa,SAASJ,SAAS,CAAC;EACpDK,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,KAAK,GAAG;MACZC,KAAK,EAAE;IACR,CAAC;EACF;EAEAC,iBAAiBA,CAAED,KAAK,EAAG;IAC1BN,QAAQ,CAAE,kCAAkC,EAAEM,KAAM,CAAC;EACtD;EAEA,OAAOE,wBAAwBA,CAAEF,KAAK,EAAG;IACxC,OAAO;MAAEA;IAAM,CAAC;EACjB;EAEAG,MAAMA,CAAA,EAAG;IACR,IAAK,CAAE,IAAI,CAACJ,KAAK,CAACC,KAAK,EAAG;MACzB,OAAO,IAAI,CAACI,KAAK,CAACC,QAAQ;IAC3B;IAEA,OACCC,aAAA,CAACX,oBAAoB;MACpBY,OAAO,EAAGd,EAAE,CACX,iDACD,CAAG;MACHO,KAAK,EAAG,IAAI,CAACD,KAAK,CAACC;IAAO,CAC1B,CAAC;EAEJ;AACD","ignoreList":[]}
1
+ {"version":3,"names":["Component","__","doAction","ErrorBoundaryWarning","jsx","_jsx","ErrorBoundary","constructor","arguments","state","error","componentDidCatch","getDerivedStateFromError","render","props","children","message"],"sources":["@wordpress/edit-site/src/components/error-boundary/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundaryWarning from './warning';\n\nexport default class ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tif ( ! this.state.error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<ErrorBoundaryWarning\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'The editor has encountered an unexpected error.'\n\t\t\t\t) }\n\t\t\t\terror={ this.state.error }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,kBAAkB;;AAE3C;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7C,eAAe,MAAMC,aAAa,SAASN,SAAS,CAAC;EACpDO,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,KAAK,GAAG;MACZC,KAAK,EAAE;IACR,CAAC;EACF;EAEAC,iBAAiBA,CAAED,KAAK,EAAG;IAC1BR,QAAQ,CAAE,kCAAkC,EAAEQ,KAAM,CAAC;EACtD;EAEA,OAAOE,wBAAwBA,CAAEF,KAAK,EAAG;IACxC,OAAO;MAAEA;IAAM,CAAC;EACjB;EAEAG,MAAMA,CAAA,EAAG;IACR,IAAK,CAAE,IAAI,CAACJ,KAAK,CAACC,KAAK,EAAG;MACzB,OAAO,IAAI,CAACI,KAAK,CAACC,QAAQ;IAC3B;IAEA,oBACCV,IAAA,CAACF,oBAAoB;MACpBa,OAAO,EAAGf,EAAE,CACX,iDACD,CAAG;MACHS,KAAK,EAAG,IAAI,CAACD,KAAK,CAACC;IAAO,CAC1B,CAAC;EAEJ;AACD","ignoreList":[]}