@wordpress/edit-site 5.12.0 → 5.12.2

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 (904) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/build/components/add-new-pattern/index.js +99 -0
  3. package/build/components/add-new-pattern/index.js.map +1 -0
  4. package/build/components/add-new-template/add-custom-template-modal-content.js +9 -23
  5. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  6. package/build/components/add-new-template/index.js +2 -10
  7. package/build/components/add-new-template/index.js.map +1 -1
  8. package/build/components/add-new-template/new-template.js +75 -22
  9. package/build/components/add-new-template/new-template.js.map +1 -1
  10. package/build/components/app/index.js +2 -2
  11. package/build/components/app/index.js.map +1 -1
  12. package/build/components/block-editor/back-button.js +5 -3
  13. package/build/components/block-editor/back-button.js.map +1 -1
  14. package/build/components/block-editor/constants.js +9 -0
  15. package/build/components/block-editor/constants.js.map +1 -0
  16. package/build/components/block-editor/editor-canvas.js +8 -8
  17. package/build/components/block-editor/editor-canvas.js.map +1 -1
  18. package/build/components/block-editor/get-block-editor-provider.js +42 -0
  19. package/build/components/block-editor/get-block-editor-provider.js.map +1 -0
  20. package/build/components/block-editor/index.js +6 -132
  21. package/build/components/block-editor/index.js.map +1 -1
  22. package/build/components/block-editor/providers/default-block-editor-provider.js +58 -0
  23. package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
  24. package/build/components/block-editor/providers/navigation-block-editor-provider.js +117 -0
  25. package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
  26. package/build/components/block-editor/site-editor-canvas.js +137 -0
  27. package/build/components/block-editor/site-editor-canvas.js.map +1 -0
  28. package/build/components/block-editor/use-site-editor-settings.js +82 -0
  29. package/build/components/block-editor/use-site-editor-settings.js.map +1 -0
  30. package/build/components/canvas-spinner/index.js +18 -1
  31. package/build/components/canvas-spinner/index.js.map +1 -1
  32. package/build/components/create-pattern-modal/index.js +125 -0
  33. package/build/components/create-pattern-modal/index.js.map +1 -0
  34. package/build/components/create-template-part-modal/index.js +50 -6
  35. package/build/components/create-template-part-modal/index.js.map +1 -1
  36. package/build/components/editor/index.js +24 -13
  37. package/build/components/editor/index.js.map +1 -1
  38. package/build/components/editor-canvas-container/index.js +22 -4
  39. package/build/components/editor-canvas-container/index.js.map +1 -1
  40. package/build/components/global-styles/color-indicator-wrapper.js +4 -5
  41. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  42. package/build/components/global-styles/color-palette-panel.js +2 -2
  43. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  44. package/build/components/global-styles/dimensions-panel.js +2 -2
  45. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  46. package/build/components/global-styles/global-styles-provider.js +12 -16
  47. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  48. package/build/components/global-styles/gradients-palette-panel.js +2 -2
  49. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  50. package/build/components/global-styles/hooks.js +3 -3
  51. package/build/components/global-styles/hooks.js.map +1 -1
  52. package/build/components/global-styles/icon-with-current-color.js +4 -5
  53. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  54. package/build/components/global-styles/navigation-button.js +10 -11
  55. package/build/components/global-styles/navigation-button.js.map +1 -1
  56. package/build/components/global-styles/palette.js +3 -3
  57. package/build/components/global-styles/palette.js.map +1 -1
  58. package/build/components/global-styles/preview.js +2 -2
  59. package/build/components/global-styles/preview.js.map +1 -1
  60. package/build/components/global-styles/root-menu.js +2 -2
  61. package/build/components/global-styles/root-menu.js.map +1 -1
  62. package/build/components/global-styles/screen-block-list.js +2 -2
  63. package/build/components/global-styles/screen-block-list.js.map +1 -1
  64. package/build/components/global-styles/screen-block.js +2 -2
  65. package/build/components/global-styles/screen-block.js.map +1 -1
  66. package/build/components/global-styles/screen-colors.js +2 -2
  67. package/build/components/global-styles/screen-colors.js.map +1 -1
  68. package/build/components/global-styles/screen-css.js +2 -2
  69. package/build/components/global-styles/screen-css.js.map +1 -1
  70. package/build/components/global-styles/screen-layout.js +2 -2
  71. package/build/components/global-styles/screen-layout.js.map +1 -1
  72. package/build/components/global-styles/screen-revisions/index.js +4 -4
  73. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  74. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +2 -2
  75. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  76. package/build/components/global-styles/screen-root.js +2 -2
  77. package/build/components/global-styles/screen-root.js.map +1 -1
  78. package/build/components/global-styles/screen-typography.js +2 -2
  79. package/build/components/global-styles/screen-typography.js.map +1 -1
  80. package/build/components/global-styles/style-variations-container.js +11 -3
  81. package/build/components/global-styles/style-variations-container.js.map +1 -1
  82. package/build/components/global-styles/typography-panel.js +2 -2
  83. package/build/components/global-styles/typography-panel.js.map +1 -1
  84. package/build/components/global-styles/typography-preview.js +2 -2
  85. package/build/components/global-styles/typography-preview.js.map +1 -1
  86. package/build/components/global-styles/ui.js +95 -36
  87. package/build/components/global-styles/ui.js.map +1 -1
  88. package/build/components/global-styles-renderer/index.js +2 -2
  89. package/build/components/global-styles-renderer/index.js.map +1 -1
  90. package/build/components/header-edit-mode/document-actions/index.js +55 -22
  91. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  92. package/build/components/header-edit-mode/index.js +41 -16
  93. package/build/components/header-edit-mode/index.js.map +1 -1
  94. package/build/components/header-edit-mode/more-menu/index.js +36 -2
  95. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  96. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -7
  97. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  98. package/build/components/header-edit-mode/undo-redo/redo.js +2 -6
  99. package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  100. package/build/components/header-edit-mode/undo-redo/undo.js +2 -6
  101. package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  102. package/build/components/keyboard-shortcut-help-modal/index.js +2 -1
  103. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  104. package/build/components/keyboard-shortcuts/edit-mode.js +39 -3
  105. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  106. package/build/components/keyboard-shortcuts/index.js +7 -2
  107. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  108. package/build/components/keyboard-shortcuts/register.js +10 -1
  109. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  110. package/build/components/layout/hooks.js +21 -0
  111. package/build/components/layout/hooks.js.map +1 -1
  112. package/build/components/layout/index.js +126 -34
  113. package/build/components/layout/index.js.map +1 -1
  114. package/build/components/list/index.js +2 -2
  115. package/build/components/list/index.js.map +1 -1
  116. package/build/components/page/header.js +41 -0
  117. package/build/components/page/header.js.map +1 -0
  118. package/build/components/page/index.js +49 -0
  119. package/build/components/page/index.js.map +1 -0
  120. package/build/components/page-content-focus-manager/back-to-page-notification.js +73 -0
  121. package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
  122. package/build/components/page-content-focus-manager/constants.js +9 -0
  123. package/build/components/page-content-focus-manager/constants.js.map +1 -0
  124. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +60 -0
  125. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
  126. package/build/components/page-content-focus-manager/edit-template-notification.js +121 -0
  127. package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
  128. package/build/components/page-content-focus-manager/index.js +37 -0
  129. package/build/components/page-content-focus-manager/index.js.map +1 -0
  130. package/build/components/page-library/grid-item.js +169 -0
  131. package/build/components/page-library/grid-item.js.map +1 -0
  132. package/build/components/page-library/grid.js +49 -0
  133. package/build/components/page-library/grid.js.map +1 -0
  134. package/build/components/page-library/index.js +61 -0
  135. package/build/components/page-library/index.js.map +1 -0
  136. package/build/components/page-library/no-patterns.js +20 -0
  137. package/build/components/page-library/no-patterns.js.map +1 -0
  138. package/build/components/page-library/patterns-list.js +108 -0
  139. package/build/components/page-library/patterns-list.js.map +1 -0
  140. package/build/components/page-library/search-items.js +172 -0
  141. package/build/components/page-library/search-items.js.map +1 -0
  142. package/build/components/page-library/use-library-settings.js +53 -0
  143. package/build/components/page-library/use-library-settings.js.map +1 -0
  144. package/build/components/page-library/use-patterns.js +194 -0
  145. package/build/components/page-library/use-patterns.js.map +1 -0
  146. package/build/components/page-library/utils.js +30 -0
  147. package/build/components/page-library/utils.js.map +1 -0
  148. package/build/components/page-main/index.js +46 -0
  149. package/build/components/page-main/index.js.map +1 -0
  150. package/build/components/page-templates/index.js +101 -0
  151. package/build/components/page-templates/index.js.map +1 -0
  152. package/build/components/preferences-modal/enable-feature.js +9 -8
  153. package/build/components/preferences-modal/enable-feature.js.map +1 -1
  154. package/build/components/preferences-modal/index.js +30 -0
  155. package/build/components/preferences-modal/index.js.map +1 -1
  156. package/build/components/resizable-frame/index.js +6 -4
  157. package/build/components/resizable-frame/index.js.map +1 -1
  158. package/build/components/revisions/index.js +2 -2
  159. package/build/components/revisions/index.js.map +1 -1
  160. package/build/components/routes/link.js +7 -10
  161. package/build/components/routes/link.js.map +1 -1
  162. package/build/components/routes/use-title.js +2 -2
  163. package/build/components/routes/use-title.js.map +1 -1
  164. package/build/components/save-button/index.js +15 -11
  165. package/build/components/save-button/index.js.map +1 -1
  166. package/build/components/save-hub/index.js +2 -2
  167. package/build/components/save-hub/index.js.map +1 -1
  168. package/build/components/save-panel/index.js +5 -7
  169. package/build/components/save-panel/index.js.map +1 -1
  170. package/build/components/secondary-sidebar/inserter-sidebar.js +4 -8
  171. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  172. package/build/components/secondary-sidebar/list-view-sidebar.js +47 -10
  173. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  174. package/build/components/sidebar/index.js +12 -8
  175. package/build/components/sidebar/index.js.map +1 -1
  176. package/build/components/sidebar-button/index.js +2 -4
  177. package/build/components/sidebar-button/index.js.map +1 -1
  178. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +22 -8
  179. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  180. package/build/components/sidebar-edit-mode/index.js +8 -6
  181. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  182. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +84 -0
  183. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
  184. package/build/components/sidebar-edit-mode/page-panels/index.js +51 -38
  185. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  186. package/build/components/sidebar-edit-mode/page-panels/page-content.js +35 -0
  187. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
  188. package/build/components/sidebar-edit-mode/page-panels/page-status.js +192 -0
  189. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
  190. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +45 -0
  191. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
  192. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +98 -0
  193. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
  194. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +4 -7
  195. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  196. package/build/components/sidebar-edit-mode/settings-header/index.js +19 -6
  197. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  198. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +2 -2
  199. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/template-panel/index.js +10 -6
  201. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  202. package/build/components/sidebar-navigation-item/index.js +11 -7
  203. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  204. package/build/components/sidebar-navigation-screen/index.js +24 -9
  205. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  206. package/build/components/sidebar-navigation-screen-details-footer/index.js +36 -0
  207. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
  208. package/build/components/sidebar-navigation-screen-details-panel/index.js +58 -0
  209. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
  210. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +22 -0
  211. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
  212. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +35 -0
  213. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
  214. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +22 -0
  215. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
  216. package/build/components/sidebar-navigation-screen-global-styles/index.js +28 -16
  217. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  218. package/build/components/sidebar-navigation-screen-library/category-item.js +48 -0
  219. package/build/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
  220. package/build/components/sidebar-navigation-screen-library/index.js +112 -0
  221. package/build/components/sidebar-navigation-screen-library/index.js.map +1 -0
  222. package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +36 -0
  223. package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
  224. package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js +76 -0
  225. package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
  226. package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js +41 -0
  227. package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
  228. package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js +40 -0
  229. package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
  230. package/build/components/sidebar-navigation-screen-main/index.js +12 -13
  231. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  232. package/build/components/sidebar-navigation-screen-navigation-item/index.js +2 -2
  233. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  234. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +42 -0
  235. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
  236. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +41 -0
  237. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
  238. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +47 -92
  239. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +84 -0
  241. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
  242. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +71 -0
  243. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
  244. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +63 -0
  245. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
  246. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +49 -0
  247. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
  248. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +167 -0
  249. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
  250. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  251. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  252. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +58 -8
  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 +57 -10
  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 +21 -50
  257. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-page/index.js +14 -34
  259. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-page/page-details.js +29 -27
  261. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-page/status-label.js +8 -7
  263. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  264. package/build/components/sidebar-navigation-screen-pages/index.js +9 -8
  265. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  266. package/build/components/sidebar-navigation-screen-pattern/index.js +66 -0
  267. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
  268. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +41 -0
  269. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
  270. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +33 -0
  271. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
  272. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +40 -0
  273. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
  274. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +47 -0
  275. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
  276. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +82 -0
  277. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
  278. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +80 -0
  279. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
  280. package/build/components/sidebar-navigation-screen-template/home-template-details.js +212 -0
  281. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
  282. package/build/components/sidebar-navigation-screen-template/index.js +21 -7
  283. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  284. package/build/components/sidebar-navigation-screen-templates/index.js +11 -11
  285. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  286. package/build/components/site-hub/index.js +10 -12
  287. package/build/components/site-hub/index.js.map +1 -1
  288. package/build/components/style-book/index.js +10 -11
  289. package/build/components/style-book/index.js.map +1 -1
  290. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -4
  291. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  292. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +4 -4
  293. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  294. package/build/components/sync-state-with-url/use-sync-path-with-url.js +12 -2
  295. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  296. package/build/components/table/index.js +29 -0
  297. package/build/components/table/index.js.map +1 -0
  298. package/build/components/template-part-converter/convert-to-template-part.js +3 -21
  299. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  300. package/build/components/welcome-guide/editor.js +1 -1
  301. package/build/components/welcome-guide/editor.js.map +1 -1
  302. package/build/components/welcome-guide/styles.js +4 -3
  303. package/build/components/welcome-guide/styles.js.map +1 -1
  304. package/build/hooks/commands/use-common-commands.js +212 -0
  305. package/build/hooks/commands/use-common-commands.js.map +1 -0
  306. package/build/hooks/commands/use-edit-mode-commands.js +196 -24
  307. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  308. package/build/hooks/index.js +2 -0
  309. package/build/hooks/index.js.map +1 -1
  310. package/build/hooks/navigation-menu-edit.js +95 -0
  311. package/build/hooks/navigation-menu-edit.js.map +1 -0
  312. package/build/hooks/push-changes-to-global-styles/index.js +5 -3
  313. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  314. package/build/hooks/template-part-edit.js +6 -9
  315. package/build/hooks/template-part-edit.js.map +1 -1
  316. package/build/index.js +1 -0
  317. package/build/index.js.map +1 -1
  318. package/build/{private-apis.js → lock-unlock.js} +1 -1
  319. package/build/lock-unlock.js.map +1 -0
  320. package/build/store/actions.js +45 -9
  321. package/build/store/actions.js.map +1 -1
  322. package/build/store/index.js +3 -3
  323. package/build/store/index.js.map +1 -1
  324. package/build/store/reducer.js +7 -6
  325. package/build/store/reducer.js.map +1 -1
  326. package/build/store/selectors.js +42 -17
  327. package/build/store/selectors.js.map +1 -1
  328. package/build/utils/get-is-list-page.js +12 -5
  329. package/build/utils/get-is-list-page.js.map +1 -1
  330. package/build/utils/is-previewing-theme.js +2 -2
  331. package/build/utils/is-previewing-theme.js.map +1 -1
  332. package/build/utils/use-activate-theme.js +3 -3
  333. package/build/utils/use-activate-theme.js.map +1 -1
  334. package/build/utils/use-debounced-input.js +26 -0
  335. package/build/utils/use-debounced-input.js.map +1 -0
  336. package/build-module/components/add-new-pattern/index.js +82 -0
  337. package/build-module/components/add-new-pattern/index.js.map +1 -0
  338. package/build-module/components/add-new-template/add-custom-template-modal-content.js +7 -20
  339. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  340. package/build-module/components/add-new-template/index.js +2 -8
  341. package/build-module/components/add-new-template/index.js.map +1 -1
  342. package/build-module/components/add-new-template/new-template.js +76 -22
  343. package/build-module/components/add-new-template/new-template.js.map +1 -1
  344. package/build-module/components/app/index.js +1 -1
  345. package/build-module/components/app/index.js.map +1 -1
  346. package/build-module/components/block-editor/back-button.js +4 -2
  347. package/build-module/components/block-editor/back-button.js.map +1 -1
  348. package/build-module/components/block-editor/constants.js +2 -0
  349. package/build-module/components/block-editor/constants.js.map +1 -0
  350. package/build-module/components/block-editor/editor-canvas.js +6 -5
  351. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  352. package/build-module/components/block-editor/get-block-editor-provider.js +31 -0
  353. package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -0
  354. package/build-module/components/block-editor/index.js +9 -127
  355. package/build-module/components/block-editor/index.js.map +1 -1
  356. package/build-module/components/block-editor/providers/default-block-editor-provider.js +42 -0
  357. package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
  358. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +102 -0
  359. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
  360. package/build-module/components/block-editor/site-editor-canvas.js +115 -0
  361. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -0
  362. package/build-module/components/block-editor/use-site-editor-settings.js +67 -0
  363. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -0
  364. package/build-module/components/canvas-spinner/index.js +15 -1
  365. package/build-module/components/canvas-spinner/index.js.map +1 -1
  366. package/build-module/components/create-pattern-modal/index.js +113 -0
  367. package/build-module/components/create-pattern-modal/index.js.map +1 -0
  368. package/build-module/components/create-template-part-modal/index.js +47 -7
  369. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  370. package/build-module/components/editor/index.js +24 -13
  371. package/build-module/components/editor/index.js.map +1 -1
  372. package/build-module/components/editor-canvas-container/index.js +19 -2
  373. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  374. package/build-module/components/global-styles/color-indicator-wrapper.js +4 -4
  375. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  376. package/build-module/components/global-styles/color-palette-panel.js +1 -1
  377. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  378. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  379. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  380. package/build-module/components/global-styles/global-styles-provider.js +10 -15
  381. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  382. package/build-module/components/global-styles/gradients-palette-panel.js +1 -1
  383. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  384. package/build-module/components/global-styles/hooks.js +1 -1
  385. package/build-module/components/global-styles/hooks.js.map +1 -1
  386. package/build-module/components/global-styles/icon-with-current-color.js +4 -4
  387. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  388. package/build-module/components/global-styles/navigation-button.js +10 -8
  389. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  390. package/build-module/components/global-styles/palette.js +2 -2
  391. package/build-module/components/global-styles/palette.js.map +1 -1
  392. package/build-module/components/global-styles/preview.js +1 -1
  393. package/build-module/components/global-styles/preview.js.map +1 -1
  394. package/build-module/components/global-styles/root-menu.js +1 -1
  395. package/build-module/components/global-styles/root-menu.js.map +1 -1
  396. package/build-module/components/global-styles/screen-block-list.js +1 -1
  397. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  398. package/build-module/components/global-styles/screen-block.js +1 -1
  399. package/build-module/components/global-styles/screen-block.js.map +1 -1
  400. package/build-module/components/global-styles/screen-colors.js +1 -1
  401. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  402. package/build-module/components/global-styles/screen-css.js +1 -1
  403. package/build-module/components/global-styles/screen-css.js.map +1 -1
  404. package/build-module/components/global-styles/screen-layout.js +1 -1
  405. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  406. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  407. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  408. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -1
  409. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  410. package/build-module/components/global-styles/screen-root.js +1 -1
  411. package/build-module/components/global-styles/screen-root.js.map +1 -1
  412. package/build-module/components/global-styles/screen-typography.js +1 -1
  413. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  414. package/build-module/components/global-styles/style-variations-container.js +11 -3
  415. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  416. package/build-module/components/global-styles/typography-panel.js +1 -1
  417. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  418. package/build-module/components/global-styles/typography-preview.js +1 -1
  419. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  420. package/build-module/components/global-styles/ui.js +94 -35
  421. package/build-module/components/global-styles/ui.js.map +1 -1
  422. package/build-module/components/global-styles-renderer/index.js +1 -1
  423. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  424. package/build-module/components/header-edit-mode/document-actions/index.js +55 -22
  425. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  426. package/build-module/components/header-edit-mode/index.js +42 -17
  427. package/build-module/components/header-edit-mode/index.js.map +1 -1
  428. package/build-module/components/header-edit-mode/more-menu/index.js +35 -3
  429. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  430. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -4
  431. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  432. package/build-module/components/header-edit-mode/undo-redo/redo.js +2 -3
  433. package/build-module/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  434. package/build-module/components/header-edit-mode/undo-redo/undo.js +2 -3
  435. package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  436. package/build-module/components/keyboard-shortcut-help-modal/index.js +2 -1
  437. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  438. package/build-module/components/keyboard-shortcuts/edit-mode.js +36 -3
  439. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  440. package/build-module/components/keyboard-shortcuts/index.js +7 -2
  441. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  442. package/build-module/components/keyboard-shortcuts/register.js +10 -1
  443. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  444. package/build-module/components/layout/hooks.js +21 -0
  445. package/build-module/components/layout/hooks.js.map +1 -1
  446. package/build-module/components/layout/index.js +119 -28
  447. package/build-module/components/layout/index.js.map +1 -1
  448. package/build-module/components/list/index.js +1 -1
  449. package/build-module/components/list/index.js.map +1 -1
  450. package/build-module/components/page/header.js +33 -0
  451. package/build-module/components/page/header.js.map +1 -0
  452. package/build-module/components/page/index.js +37 -0
  453. package/build-module/components/page/index.js.map +1 -0
  454. package/build-module/components/page-content-focus-manager/back-to-page-notification.js +59 -0
  455. package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
  456. package/build-module/components/page-content-focus-manager/constants.js +2 -0
  457. package/build-module/components/page-content-focus-manager/constants.js.map +1 -0
  458. package/build-module/components/{page-content-lock/use-disable-non-content-blocks.js → page-content-focus-manager/disable-non-page-content-blocks.js} +18 -9
  459. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
  460. package/build-module/components/page-content-focus-manager/edit-template-notification.js +110 -0
  461. package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
  462. package/build-module/components/page-content-focus-manager/index.js +23 -0
  463. package/build-module/components/page-content-focus-manager/index.js.map +1 -0
  464. package/build-module/components/page-library/grid-item.js +149 -0
  465. package/build-module/components/page-library/grid-item.js.map +1 -0
  466. package/build-module/components/page-library/grid.js +38 -0
  467. package/build-module/components/page-library/grid.js.map +1 -0
  468. package/build-module/components/page-library/index.js +43 -0
  469. package/build-module/components/page-library/index.js.map +1 -0
  470. package/build-module/components/page-library/no-patterns.js +12 -0
  471. package/build-module/components/page-library/no-patterns.js.map +1 -0
  472. package/build-module/components/page-library/patterns-list.js +87 -0
  473. package/build-module/components/page-library/patterns-list.js.map +1 -0
  474. package/build-module/components/page-library/search-items.js +156 -0
  475. package/build-module/components/page-library/search-items.js.map +1 -0
  476. package/build-module/components/page-library/use-library-settings.js +40 -0
  477. package/build-module/components/page-library/use-library-settings.js.map +1 -0
  478. package/build-module/components/page-library/use-patterns.js +176 -0
  479. package/build-module/components/page-library/use-patterns.js.map +1 -0
  480. package/build-module/components/page-library/utils.js +13 -0
  481. package/build-module/components/page-library/utils.js.map +1 -0
  482. package/build-module/components/page-main/index.js +32 -0
  483. package/build-module/components/page-main/index.js.map +1 -0
  484. package/build-module/components/page-templates/index.js +80 -0
  485. package/build-module/components/page-templates/index.js.map +1 -0
  486. package/build-module/components/preferences-modal/enable-feature.js +9 -5
  487. package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
  488. package/build-module/components/preferences-modal/index.js +27 -0
  489. package/build-module/components/preferences-modal/index.js.map +1 -1
  490. package/build-module/components/resizable-frame/index.js +5 -3
  491. package/build-module/components/resizable-frame/index.js.map +1 -1
  492. package/build-module/components/revisions/index.js +1 -1
  493. package/build-module/components/revisions/index.js.map +1 -1
  494. package/build-module/components/routes/link.js +6 -6
  495. package/build-module/components/routes/link.js.map +1 -1
  496. package/build-module/components/routes/use-title.js +1 -1
  497. package/build-module/components/routes/use-title.js.map +1 -1
  498. package/build-module/components/save-button/index.js +15 -11
  499. package/build-module/components/save-button/index.js.map +1 -1
  500. package/build-module/components/save-hub/index.js +1 -1
  501. package/build-module/components/save-hub/index.js.map +1 -1
  502. package/build-module/components/save-panel/index.js +3 -4
  503. package/build-module/components/save-panel/index.js.map +1 -1
  504. package/build-module/components/secondary-sidebar/inserter-sidebar.js +4 -5
  505. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  506. package/build-module/components/secondary-sidebar/list-view-sidebar.js +44 -10
  507. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  508. package/build-module/components/sidebar/index.js +10 -7
  509. package/build-module/components/sidebar/index.js.map +1 -1
  510. package/build-module/components/sidebar-button/index.js +2 -3
  511. package/build-module/components/sidebar-button/index.js.map +1 -1
  512. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +19 -6
  513. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  514. package/build-module/components/sidebar-edit-mode/index.js +8 -6
  515. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  516. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +71 -0
  517. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
  518. package/build-module/components/sidebar-edit-mode/page-panels/index.js +51 -40
  519. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  520. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +23 -0
  521. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
  522. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +176 -0
  523. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
  524. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +33 -0
  525. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
  526. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +85 -0
  527. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
  528. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +4 -4
  529. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  530. package/build-module/components/sidebar-edit-mode/settings-header/index.js +20 -7
  531. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  532. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
  533. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  534. package/build-module/components/sidebar-edit-mode/template-panel/index.js +9 -6
  535. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-item/index.js +11 -7
  537. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  538. package/build-module/components/sidebar-navigation-screen/index.js +24 -9
  539. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  540. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +27 -0
  541. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
  542. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +30 -0
  543. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
  544. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
  545. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
  546. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +24 -0
  547. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
  548. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
  549. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
  550. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +23 -11
  551. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-library/category-item.js +37 -0
  553. package/build-module/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
  554. package/build-module/components/sidebar-navigation-screen-library/index.js +87 -0
  555. package/build-module/components/sidebar-navigation-screen-library/index.js.map +1 -0
  556. package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +25 -0
  557. package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
  558. package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js +61 -0
  559. package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
  560. package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js +34 -0
  561. package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
  562. package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js +27 -0
  563. package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
  564. package/build-module/components/sidebar-navigation-screen-main/index.js +13 -13
  565. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  567. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  568. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +33 -0
  569. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
  570. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +26 -0
  571. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
  572. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +45 -90
  573. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  574. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +70 -0
  575. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
  576. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +58 -0
  577. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
  578. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +56 -0
  579. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
  580. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +35 -0
  581. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
  582. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +155 -0
  583. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
  584. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  585. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  586. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +57 -9
  587. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  588. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +55 -7
  589. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  590. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +22 -50
  591. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  592. package/build-module/components/sidebar-navigation-screen-page/index.js +14 -34
  593. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  594. package/build-module/components/sidebar-navigation-screen-page/page-details.js +28 -28
  595. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  596. package/build-module/components/sidebar-navigation-screen-page/status-label.js +9 -8
  597. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  598. package/build-module/components/sidebar-navigation-screen-pages/index.js +8 -6
  599. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  600. package/build-module/components/sidebar-navigation-screen-pattern/index.js +46 -0
  601. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
  602. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
  603. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
  604. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +22 -0
  605. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
  606. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +27 -0
  607. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
  608. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +34 -0
  609. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
  610. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
  611. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
  612. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +64 -0
  613. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
  614. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +192 -0
  615. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
  616. package/build-module/components/sidebar-navigation-screen-template/index.js +18 -6
  617. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  618. package/build-module/components/sidebar-navigation-screen-templates/index.js +11 -10
  619. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  620. package/build-module/components/site-hub/index.js +8 -9
  621. package/build-module/components/site-hub/index.js.map +1 -1
  622. package/build-module/components/style-book/index.js +9 -9
  623. package/build-module/components/style-book/index.js.map +1 -1
  624. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +13 -3
  625. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  626. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  627. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  628. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +11 -1
  629. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  630. package/build-module/components/table/index.js +21 -0
  631. package/build-module/components/table/index.js.map +1 -0
  632. package/build-module/components/template-part-converter/convert-to-template-part.js +4 -20
  633. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  634. package/build-module/components/welcome-guide/editor.js +1 -1
  635. package/build-module/components/welcome-guide/editor.js.map +1 -1
  636. package/build-module/components/welcome-guide/styles.js +5 -3
  637. package/build-module/components/welcome-guide/styles.js.map +1 -1
  638. package/build-module/hooks/commands/use-common-commands.js +194 -0
  639. package/build-module/hooks/commands/use-common-commands.js.map +1 -0
  640. package/build-module/hooks/commands/use-edit-mode-commands.js +196 -26
  641. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  642. package/build-module/hooks/index.js +1 -0
  643. package/build-module/hooks/index.js.map +1 -1
  644. package/build-module/hooks/navigation-menu-edit.js +77 -0
  645. package/build-module/hooks/navigation-menu-edit.js.map +1 -0
  646. package/build-module/hooks/push-changes-to-global-styles/index.js +4 -2
  647. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  648. package/build-module/hooks/template-part-edit.js +5 -5
  649. package/build-module/hooks/template-part-edit.js.map +1 -1
  650. package/build-module/index.js +1 -0
  651. package/build-module/index.js.map +1 -1
  652. package/build-module/{private-apis.js → lock-unlock.js} +1 -1
  653. package/build-module/lock-unlock.js.map +1 -0
  654. package/build-module/store/actions.js +39 -7
  655. package/build-module/store/actions.js.map +1 -1
  656. package/build-module/store/index.js +1 -1
  657. package/build-module/store/index.js.map +1 -1
  658. package/build-module/store/reducer.js +6 -5
  659. package/build-module/store/reducer.js.map +1 -1
  660. package/build-module/store/selectors.js +37 -15
  661. package/build-module/store/selectors.js.map +1 -1
  662. package/build-module/utils/get-is-list-page.js +12 -5
  663. package/build-module/utils/get-is-list-page.js.map +1 -1
  664. package/build-module/utils/is-previewing-theme.js +2 -2
  665. package/build-module/utils/is-previewing-theme.js.map +1 -1
  666. package/build-module/utils/use-activate-theme.js +2 -2
  667. package/build-module/utils/use-activate-theme.js.map +1 -1
  668. package/build-module/utils/use-debounced-input.js +17 -0
  669. package/build-module/utils/use-debounced-input.js.map +1 -0
  670. package/build-style/style-rtl.css +424 -38
  671. package/build-style/style.css +424 -38
  672. package/package.json +44 -40
  673. package/src/components/add-new-pattern/index.js +92 -0
  674. package/src/components/add-new-template/add-custom-template-modal-content.js +1 -13
  675. package/src/components/add-new-template/index.js +0 -3
  676. package/src/components/add-new-template/new-template.js +121 -26
  677. package/src/components/add-new-template/style.scss +30 -2
  678. package/src/components/app/index.js +1 -1
  679. package/src/components/block-editor/back-button.js +5 -2
  680. package/src/components/block-editor/constants.js +1 -0
  681. package/src/components/block-editor/editor-canvas.js +1 -1
  682. package/src/components/block-editor/get-block-editor-provider.js +29 -0
  683. package/src/components/block-editor/index.js +15 -199
  684. package/src/components/block-editor/providers/default-block-editor-provider.js +44 -0
  685. package/src/components/block-editor/providers/navigation-block-editor-provider.js +114 -0
  686. package/src/components/block-editor/site-editor-canvas.js +155 -0
  687. package/src/components/block-editor/style.scss +6 -0
  688. package/src/components/block-editor/use-site-editor-settings.js +91 -0
  689. package/src/components/canvas-spinner/index.js +11 -1
  690. package/src/components/create-pattern-modal/index.js +134 -0
  691. package/src/components/create-pattern-modal/style.scss +3 -0
  692. package/src/components/create-template-part-modal/index.js +64 -4
  693. package/src/components/editor/index.js +25 -15
  694. package/src/components/editor/style.scss +4 -0
  695. package/src/components/editor-canvas-container/index.js +21 -4
  696. package/src/components/global-styles/color-palette-panel.js +1 -1
  697. package/src/components/global-styles/dimensions-panel.js +1 -1
  698. package/src/components/global-styles/global-styles-provider.js +10 -14
  699. package/src/components/global-styles/gradients-palette-panel.js +1 -1
  700. package/src/components/global-styles/hooks.js +1 -1
  701. package/src/components/global-styles/palette.js +2 -2
  702. package/src/components/global-styles/preview.js +1 -1
  703. package/src/components/global-styles/root-menu.js +1 -1
  704. package/src/components/global-styles/screen-block-list.js +1 -1
  705. package/src/components/global-styles/screen-block.js +1 -1
  706. package/src/components/global-styles/screen-colors.js +1 -1
  707. package/src/components/global-styles/screen-css.js +1 -1
  708. package/src/components/global-styles/screen-layout.js +1 -1
  709. package/src/components/global-styles/screen-revisions/index.js +1 -1
  710. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -1
  711. package/src/components/global-styles/screen-root.js +1 -1
  712. package/src/components/global-styles/screen-typography.js +1 -1
  713. package/src/components/global-styles/stories/index.js +1 -1
  714. package/src/components/global-styles/style-variations-container.js +13 -3
  715. package/src/components/global-styles/style.scss +11 -0
  716. package/src/components/global-styles/typography-panel.js +1 -1
  717. package/src/components/global-styles/typography-preview.js +1 -1
  718. package/src/components/global-styles/ui.js +115 -46
  719. package/src/components/global-styles-renderer/index.js +1 -1
  720. package/src/components/header-edit-mode/document-actions/index.js +51 -26
  721. package/src/components/header-edit-mode/document-actions/style.scss +9 -5
  722. package/src/components/header-edit-mode/index.js +100 -58
  723. package/src/components/header-edit-mode/more-menu/index.js +52 -7
  724. package/src/components/keyboard-shortcuts/edit-mode.js +40 -3
  725. package/src/components/keyboard-shortcuts/index.js +5 -1
  726. package/src/components/keyboard-shortcuts/register.js +11 -1
  727. package/src/components/layout/hooks.js +21 -0
  728. package/src/components/layout/index.js +207 -110
  729. package/src/components/layout/style.scss +65 -1
  730. package/src/components/list/index.js +1 -1
  731. package/src/components/page/header.js +38 -0
  732. package/src/components/page/index.js +38 -0
  733. package/src/components/page/style.scss +38 -0
  734. package/src/components/page-content-focus-manager/back-to-page-notification.js +70 -0
  735. package/src/components/{page-content-lock → page-content-focus-manager}/constants.js +1 -1
  736. package/src/components/{page-content-lock/use-disable-non-content-blocks.js → page-content-focus-manager/disable-non-page-content-blocks.js} +15 -7
  737. package/src/components/page-content-focus-manager/edit-template-notification.js +108 -0
  738. package/src/components/page-content-focus-manager/index.js +26 -0
  739. package/src/components/page-library/grid-item.js +179 -0
  740. package/src/components/page-library/grid.js +39 -0
  741. package/src/components/page-library/index.js +39 -0
  742. package/src/components/page-library/no-patterns.js +12 -0
  743. package/src/components/page-library/patterns-list.js +114 -0
  744. package/src/components/page-library/search-items.js +171 -0
  745. package/src/components/page-library/style.scss +105 -0
  746. package/src/components/page-library/use-library-settings.js +51 -0
  747. package/src/components/page-library/use-patterns.js +238 -0
  748. package/src/components/page-library/utils.js +21 -0
  749. package/src/components/page-main/index.js +27 -0
  750. package/src/components/page-templates/index.js +104 -0
  751. package/src/components/preferences-modal/enable-feature.js +5 -2
  752. package/src/components/preferences-modal/index.js +25 -0
  753. package/src/components/resizable-frame/index.js +3 -1
  754. package/src/components/revisions/index.js +1 -1
  755. package/src/components/routes/link.js +2 -2
  756. package/src/components/routes/use-title.js +1 -1
  757. package/src/components/save-button/index.js +14 -11
  758. package/src/components/save-hub/index.js +1 -1
  759. package/src/components/save-panel/index.js +1 -1
  760. package/src/components/secondary-sidebar/list-view-sidebar.js +53 -6
  761. package/src/components/sidebar/index.js +11 -7
  762. package/src/components/sidebar-button/style.scss +1 -1
  763. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +42 -29
  764. package/src/components/sidebar-edit-mode/index.js +8 -6
  765. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +69 -0
  766. package/src/components/sidebar-edit-mode/page-panels/index.js +53 -53
  767. package/src/components/sidebar-edit-mode/page-panels/page-content.js +27 -0
  768. package/src/components/sidebar-edit-mode/page-panels/page-status.js +233 -0
  769. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +35 -0
  770. package/src/components/sidebar-edit-mode/page-panels/publish-date.js +94 -0
  771. package/src/components/sidebar-edit-mode/page-panels/style.scss +31 -0
  772. package/src/components/sidebar-edit-mode/settings-header/index.js +18 -9
  773. package/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
  774. package/src/components/sidebar-edit-mode/template-panel/index.js +9 -6
  775. package/src/components/sidebar-navigation-item/index.js +6 -2
  776. package/src/components/sidebar-navigation-item/style.scss +8 -1
  777. package/src/components/sidebar-navigation-screen/index.js +22 -8
  778. package/src/components/sidebar-navigation-screen/style.scss +30 -9
  779. package/src/components/sidebar-navigation-screen-details-footer/index.js +45 -0
  780. package/src/components/sidebar-navigation-screen-details-footer/style.scss +5 -0
  781. package/src/components/sidebar-navigation-screen-details-panel/index.js +40 -0
  782. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
  783. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +29 -0
  784. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
  785. package/src/components/sidebar-navigation-screen-details-panel/style.scss +25 -0
  786. package/src/components/sidebar-navigation-screen-global-styles/index.js +24 -6
  787. package/src/components/sidebar-navigation-screen-global-styles/style.scss +0 -3
  788. package/src/components/sidebar-navigation-screen-library/category-item.js +43 -0
  789. package/src/components/sidebar-navigation-screen-library/index.js +136 -0
  790. package/src/components/sidebar-navigation-screen-library/style.scss +3 -0
  791. package/src/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +32 -0
  792. package/src/components/sidebar-navigation-screen-library/use-pattern-categories.js +64 -0
  793. package/src/components/sidebar-navigation-screen-library/use-template-part-areas.js +33 -0
  794. package/src/components/sidebar-navigation-screen-library/use-theme-patterns.js +44 -0
  795. package/src/components/sidebar-navigation-screen-main/index.js +11 -14
  796. package/src/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  797. package/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +45 -0
  798. package/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js +24 -0
  799. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +50 -96
  800. package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +89 -0
  801. package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +51 -0
  802. package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +62 -0
  803. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +39 -0
  804. package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +15 -0
  805. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +179 -0
  806. package/src/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  807. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +73 -14
  808. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +61 -2
  809. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +25 -47
  810. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +4 -0
  811. package/src/components/sidebar-navigation-screen-page/index.js +19 -58
  812. package/src/components/sidebar-navigation-screen-page/page-details.js +42 -39
  813. package/src/components/sidebar-navigation-screen-page/status-label.js +23 -19
  814. package/src/components/sidebar-navigation-screen-page/style.scss +1 -18
  815. package/src/components/sidebar-navigation-screen-pages/index.js +30 -29
  816. package/src/components/sidebar-navigation-screen-pattern/index.js +44 -0
  817. package/src/components/sidebar-navigation-screen-pattern/style.scss +25 -0
  818. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
  819. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +21 -0
  820. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +30 -0
  821. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +33 -0
  822. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
  823. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +86 -0
  824. package/src/components/sidebar-navigation-screen-template/home-template-details.js +230 -0
  825. package/src/components/sidebar-navigation-screen-template/index.js +19 -5
  826. package/src/components/sidebar-navigation-screen-template/style.scss +37 -14
  827. package/src/components/sidebar-navigation-screen-templates/index.js +18 -25
  828. package/src/components/site-hub/index.js +13 -9
  829. package/src/components/site-hub/style.scss +4 -3
  830. package/src/components/style-book/index.js +1 -1
  831. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -3
  832. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  833. package/src/components/sync-state-with-url/use-sync-path-with-url.js +11 -1
  834. package/src/components/table/index.js +33 -0
  835. package/src/components/table/style.scss +37 -0
  836. package/src/components/template-part-converter/convert-to-template-part.js +4 -27
  837. package/src/components/welcome-guide/editor.js +1 -1
  838. package/src/components/welcome-guide/styles.js +5 -3
  839. package/src/hooks/commands/use-common-commands.js +186 -0
  840. package/src/hooks/commands/use-edit-mode-commands.js +183 -28
  841. package/src/hooks/index.js +1 -0
  842. package/src/hooks/navigation-menu-edit.js +95 -0
  843. package/src/hooks/push-changes-to-global-styles/index.js +1 -1
  844. package/src/hooks/template-part-edit.js +1 -1
  845. package/src/index.js +1 -0
  846. package/src/store/actions.js +40 -8
  847. package/src/store/index.js +1 -1
  848. package/src/store/reducer.js +6 -5
  849. package/src/store/selectors.js +39 -9
  850. package/src/store/test/actions.js +8 -8
  851. package/src/store/test/reducer.js +11 -11
  852. package/src/store/test/selectors.js +10 -8
  853. package/src/style.scss +13 -2
  854. package/src/utils/get-is-list-page.js +16 -4
  855. package/src/utils/is-previewing-theme.js +4 -2
  856. package/src/utils/use-activate-theme.js +3 -2
  857. package/src/utils/use-debounced-input.js +17 -0
  858. package/build/components/add-new-template/new-template-part.js +0 -113
  859. package/build/components/add-new-template/new-template-part.js.map +0 -1
  860. package/build/components/page-content-lock/constants.js +0 -9
  861. package/build/components/page-content-lock/constants.js.map +0 -1
  862. package/build/components/page-content-lock/index.js +0 -29
  863. package/build/components/page-content-lock/index.js.map +0 -1
  864. package/build/components/page-content-lock/use-disable-non-content-blocks.js +0 -49
  865. package/build/components/page-content-lock/use-disable-non-content-blocks.js.map +0 -1
  866. package/build/components/page-content-lock/use-page-content-lock-notifications.js +0 -112
  867. package/build/components/page-content-lock/use-page-content-lock-notifications.js.map +0 -1
  868. package/build/components/sidebar-edit-mode/page-panels/content-blocks-list.js +0 -79
  869. package/build/components/sidebar-edit-mode/page-panels/content-blocks-list.js.map +0 -1
  870. package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -52
  871. package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
  872. package/build/components/sidebar-navigation-screen-template-part/index.js +0 -105
  873. package/build/components/sidebar-navigation-screen-template-part/index.js.map +0 -1
  874. package/build/components/sidebar-navigation-subtitle/index.js +0 -17
  875. package/build/components/sidebar-navigation-subtitle/index.js.map +0 -1
  876. package/build/private-apis.js.map +0 -1
  877. package/build-module/components/add-new-template/new-template-part.js +0 -93
  878. package/build-module/components/add-new-template/new-template-part.js.map +0 -1
  879. package/build-module/components/page-content-lock/constants.js +0 -2
  880. package/build-module/components/page-content-lock/constants.js.map +0 -1
  881. package/build-module/components/page-content-lock/index.js +0 -14
  882. package/build-module/components/page-content-lock/index.js.map +0 -1
  883. package/build-module/components/page-content-lock/use-disable-non-content-blocks.js.map +0 -1
  884. package/build-module/components/page-content-lock/use-page-content-lock-notifications.js +0 -98
  885. package/build-module/components/page-content-lock/use-page-content-lock-notifications.js.map +0 -1
  886. package/build-module/components/sidebar-edit-mode/page-panels/content-blocks-list.js +0 -67
  887. package/build-module/components/sidebar-edit-mode/page-panels/content-blocks-list.js.map +0 -1
  888. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -39
  889. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
  890. package/build-module/components/sidebar-navigation-screen-template-part/index.js +0 -86
  891. package/build-module/components/sidebar-navigation-screen-template-part/index.js.map +0 -1
  892. package/build-module/components/sidebar-navigation-subtitle/index.js +0 -9
  893. package/build-module/components/sidebar-navigation-subtitle/index.js.map +0 -1
  894. package/build-module/private-apis.js.map +0 -1
  895. package/src/components/add-new-template/new-template-part.js +0 -109
  896. package/src/components/page-content-lock/index.js +0 -14
  897. package/src/components/page-content-lock/use-page-content-lock-notifications.js +0 -128
  898. package/src/components/sidebar-edit-mode/page-panels/content-blocks-list.js +0 -77
  899. package/src/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -47
  900. package/src/components/sidebar-navigation-screen-template-part/index.js +0 -103
  901. package/src/components/sidebar-navigation-screen-templates/style.scss +0 -4
  902. package/src/components/sidebar-navigation-subtitle/index.js +0 -5
  903. package/src/components/sidebar-navigation-subtitle/style.scss +0 -7
  904. /package/src/{private-apis.js → lock-unlock.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/layout/index.js"],"names":["classnames","useSelect","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","__unstableUseNavigateRegions","useNavigateRegions","useReducedMotion","useViewportMatch","useResizeObserver","__","useState","useRef","NavigableRegion","store","keyboardShortcutsStore","CommandMenu","privateApis","commandsPrivateApis","preferencesStore","routerPrivateApis","coreCommandsPrivateApis","Sidebar","Editor","ListPage","ErrorBoundary","editSiteStore","getIsListPage","Header","useInitEditedEntityFromURL","SiteHub","ResizableFrame","useSyncCanvasModeWithURL","unlock","SavePanel","KeyboardShortcutsRegister","KeyboardShortcutsGlobal","useEditModeCommands","useIsSiteEditorLoading","useCommands","useCommandContext","useLocation","ANIMATION_DURATION","Layout","hubRef","params","isListPage","isEditorPage","hasFixedToolbar","canvasMode","previousShortcut","nextShortcut","select","getAllShortcutKeyCombinations","getCanvasMode","get","isEditing","navigateRegionsProps","previous","next","disableMotion","isMobileViewport","showSidebar","showCanvas","isFullCanvas","canvasResizer","canvasSize","fullResizer","isResizing","isEditorLoading","commandContext","ref","className","div","y","type","duration","ease","opacity","width","scale","transition"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SACCC,gBAAgB,IAAIC,MADrB,EAECC,yBAAyB,IAAIC,eAF9B,EAGCC,4BAA4B,IAAIC,kBAHjC,QAIO,uBAJP;AAKA,SACCC,gBADD,EAECC,gBAFD,EAGCC,iBAHD,QAIO,oBAJP;AAKA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,EAAmBC,MAAnB,QAAiC,oBAAjC;AACA,SAASC,eAAT,QAAgC,sBAAhC;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AACA,SACCC,WADD,EAECC,WAAW,IAAIC,mBAFhB,QAGO,qBAHP;AAIA,SAASJ,KAAK,IAAIK,gBAAlB,QAA0C,wBAA1C;AACA,SAASF,WAAW,IAAIG,iBAAxB,QAAiD,mBAAjD;AACA,SAASH,WAAW,IAAII,uBAAxB,QAAuD,0BAAvD;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,QAAP,MAAqB,SAArB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,SAASX,KAAK,IAAIY,aAAlB,QAAuC,aAAvC;AACA,OAAOC,aAAP,MAA0B,8BAA1B;AACA,OAAOC,MAAP,MAAmB,qBAAnB;AACA,OAAOC,0BAAP,MAAuC,wDAAvC;AACA,OAAOC,OAAP,MAAoB,aAApB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,wBAAP,MAAqC,sDAArC;AACA,SAASC,MAAT,QAAuB,oBAAvB;AACA,OAAOC,S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B,CA5BD,CAVF,CAhCF,CA3CD,CALD,CADD;AA+IA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useRef } from '@wordpress/element';\nimport { NavigableRegion } from '@wordpress/interface';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport {\n\tCommandMenu,\n\tprivateApis as commandsPrivateApis,\n} from '@wordpress/commands';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\n\n/**\n * Internal dependencies\n */\nimport Sidebar from '../sidebar';\nimport Editor from '../editor';\nimport ListPage from '../list';\nimport ErrorBoundary from '../error-boundary';\nimport { store as editSiteStore } from '../../store';\nimport getIsListPage from '../../utils/get-is-list-page';\nimport Header from '../header-edit-mode';\nimport useInitEditedEntityFromURL from '../sync-state-with-url/use-init-edited-entity-from-url';\nimport SiteHub from '../site-hub';\nimport ResizableFrame from '../resizable-frame';\nimport useSyncCanvasModeWithURL from '../sync-state-with-url/use-sync-canvas-mode-with-url';\nimport { unlock } from '../../private-apis';\nimport SavePanel from '../save-panel';\nimport KeyboardShortcutsRegister from '../keyboard-shortcuts/register';\nimport KeyboardShortcutsGlobal from '../keyboard-shortcuts/global';\nimport { useEditModeCommands } from '../../hooks/commands/use-edit-mode-commands';\nimport { useIsSiteEditorLoading } from './hooks';\n\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { useLocation } = unlock( routerPrivateApis );\n\nconst ANIMATION_DURATION = 0.5;\n\nexport default function Layout() {\n\t// This ensures the edited entity id and type are initialized properly.\n\tuseInitEditedEntityFromURL();\n\tuseSyncCanvasModeWithURL();\n\tuseCommands();\n\tuseEditModeCommands();\n\n\tconst hubRef = useRef();\n\tconst { params } = useLocation();\n\tconst isListPage = getIsListPage( params );\n\tconst isEditorPage = ! isListPage;\n\tconst { hasFixedToolbar, canvasMode, previousShortcut, nextShortcut } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getAllShortcutKeyCombinations } = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t);\n\t\t\tconst { getCanvasMode } = unlock( select( editSiteStore ) );\n\t\t\treturn {\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\tpreviousShortcut: getAllShortcutKeyCombinations(\n\t\t\t\t\t'core/edit-site/previous-region'\n\t\t\t\t),\n\t\t\t\tnextShortcut: getAllShortcutKeyCombinations(\n\t\t\t\t\t'core/edit-site/next-region'\n\t\t\t\t),\n\t\t\t\thasFixedToolbar:\n\t\t\t\t\tselect( preferencesStore ).get( 'fixedToolbar' ),\n\t\t\t};\n\t\t}, [] );\n\tconst isEditing = canvasMode === 'edit';\n\tconst navigateRegionsProps = useNavigateRegions( {\n\t\tprevious: previousShortcut,\n\t\tnext: nextShortcut,\n\t} );\n\tconst disableMotion = useReducedMotion();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst showSidebar =\n\t\t( isMobileViewport && ! isListPage ) ||\n\t\t( ! isMobileViewport && ( canvasMode === 'view' || ! isEditorPage ) );\n\tconst showCanvas =\n\t\t( isMobileViewport && isEditorPage && isEditing ) ||\n\t\t! isMobileViewport ||\n\t\t! isEditorPage;\n\tconst isFullCanvas =\n\t\t( isMobileViewport && isListPage ) || ( isEditorPage && isEditing );\n\tconst [ canvasResizer, canvasSize ] = useResizeObserver();\n\tconst [ fullResizer ] = useResizeObserver();\n\tconst [ isResizing ] = useState( false );\n\tconst isEditorLoading = useIsSiteEditorLoading();\n\n\t// Sets the right context for the command center\n\tconst commandContext =\n\t\tcanvasMode === 'edit' && isEditorPage\n\t\t\t? 'site-editor-edit'\n\t\t\t: 'site-editor';\n\tuseCommandContext( commandContext );\n\n\t// Synchronizing the URL with the store value of canvasMode happens in an effect\n\t// This condition ensures the component is only rendered after the synchronization happens\n\t// which prevents any animations due to potential canvasMode value change.\n\tif ( canvasMode === 'init' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommandMenu />\n\t\t\t<KeyboardShortcutsRegister />\n\t\t\t<KeyboardShortcutsGlobal />\n\t\t\t{ fullResizer }\n\t\t\t<div\n\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-layout',\n\t\t\t\t\tnavigateRegionsProps.className,\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-full-canvas': isFullCanvas,\n\t\t\t\t\t\t'is-edit-mode': isEditing,\n\t\t\t\t\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<SiteHub ref={ hubRef } className=\"edit-site-layout__hub\" />\n\n\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t{ isEditorPage && isEditing && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__header\"\n\t\t\t\t\t\t\tariaLabel={ __( 'Editor top bar' ) }\n\t\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\ty: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\ty: '-100%',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\ty: '-100%',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t: ANIMATION_DURATION,\n\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ isEditing && <Header /> }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t</AnimatePresence>\n\n\t\t\t\t<div className=\"edit-site-layout__content\">\n\t\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t\t{ showSidebar && (\n\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\tduration: ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__sidebar\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\t\t\tariaLabel={ __( 'Navigation' ) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Sidebar />\n\t\t\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AnimatePresence>\n\n\t\t\t\t\t<SavePanel />\n\n\t\t\t\t\t{ showCanvas && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-layout__canvas-container',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-resizing': isResizing,\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\t\t{ canvasResizer }\n\t\t\t\t\t\t\t{ !! canvasSize.width && (\n\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\twhileHover={\n\t\t\t\t\t\t\t\t\t\tisEditorPage && canvasMode === 'view'\n\t\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 1.005,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tduration:\n\t\t\t\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\t\t\tisResizing\n\t\t\t\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\t\t\t: 0.5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\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\tinitial={ false }\n\t\t\t\t\t\t\t\t\tlayout=\"position\"\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__canvas\"\n\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\tduration:\n\t\t\t\t\t\t\t\t\t\t\tdisableMotion || isResizing\n\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: ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t\t\t\t\t\t{ isEditorPage && (\n\t\t\t\t\t\t\t\t\t\t\t<ResizableFrame\n\t\t\t\t\t\t\t\t\t\t\t\tisReady={ ! isEditorLoading }\n\t\t\t\t\t\t\t\t\t\t\t\tisFullWidth={ isEditing }\n\t\t\t\t\t\t\t\t\t\t\t\toversizedClassName=\"edit-site-layout__resizable-frame-oversized\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Editor\n\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisEditorLoading\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</ResizableFrame>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ isListPage && <ListPage /> }\n\t\t\t\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/layout/index.js"],"names":["classnames","useSelect","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","__unstableUseNavigateRegions","useNavigateRegions","useReducedMotion","useViewportMatch","useResizeObserver","__","useState","useRef","NavigableRegion","store","keyboardShortcutsStore","CommandMenu","privateApis","commandsPrivateApis","preferencesStore","blockEditorPrivateApis","routerPrivateApis","coreCommandsPrivateApis","Sidebar","Editor","ErrorBoundary","editSiteStore","getIsListPage","Header","useInitEditedEntityFromURL","SiteHub","ResizableFrame","useSyncCanvasModeWithURL","unlock","SavePanel","KeyboardShortcutsRegister","KeyboardShortcutsGlobal","useCommonCommands","useEditModeCommands","PageMain","useIsSiteEditorLoading","useCommands","useCommandContext","useLocation","useGlobalStyle","ANIMATION_DURATION","Layout","hubRef","params","isMobileViewport","isListPage","isEditorPage","isDistractionFree","hasFixedToolbar","canvasMode","previousShortcut","nextShortcut","select","getAllShortcutKeyCombinations","getCanvasMode","get","isEditing","navigateRegionsProps","previous","next","disableMotion","showSidebar","showCanvas","isFullCanvas","canvasResizer","canvasSize","fullResizer","isResizing","isEditorLoading","headerAnimationState","commandContext","backgroundColor","gradientValue","ref","className","opacity","transition","type","delay","delayChildren","isDistractionFreeHovering","view","edit","undefined","div","x","duration","ease","display","transitionEnd","width","scale","background"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SACCC,gBAAgB,IAAIC,MADrB,EAECC,yBAAyB,IAAIC,eAF9B,EAGCC,4BAA4B,IAAIC,kBAHjC,QAIO,uBAJP;AAKA,SACCC,gBADD,EAECC,gBAFD,EAGCC,iBAHD,QAIO,oBAJP;AAKA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,EAAmBC,MAAnB,QAAiC,oBAAjC;AACA,SAASC,eAAT,QAAgC,sBAAhC;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,+BAAhD;AACA,SACCC,WADD,EAECC,WAAW,IAAIC,mBAFhB,QAGO,qBAHP;AAIA,SAASJ,KAAK,IAAIK,gBAAlB,QAA0C,wBAA1C;AACA,SAASF,WAAW,IAAIG,sBAAxB,QAAsD,yBAAtD;AACA,SAASH,WAAW,IAAII,iBAAxB,QAAiD,mBAAjD;AACA,SAASJ,WAAW,IAAIK,uBAAxB,QAAuD,0BAAvD;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,SAASX,KAAK,IAAI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U,EACTpB,aADS,aACTA,aADS,cACTA,aADS,GAETD;AAHkB;AANrB,KAYC,cAAC,MAAD;AACC,IAAA,SAAS,EACRH;AAFF,IAZD,CADD,CA7BD,CAVF,CAHF,CA3CF,CA/ED,CALD,CADD;AAwMA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useRef } from '@wordpress/element';\nimport { NavigableRegion } from '@wordpress/interface';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport {\n\tCommandMenu,\n\tprivateApis as commandsPrivateApis,\n} from '@wordpress/commands';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\n\n/**\n * Internal dependencies\n */\nimport Sidebar from '../sidebar';\nimport Editor from '../editor';\nimport ErrorBoundary from '../error-boundary';\nimport { store as editSiteStore } from '../../store';\nimport getIsListPage from '../../utils/get-is-list-page';\nimport Header from '../header-edit-mode';\nimport useInitEditedEntityFromURL from '../sync-state-with-url/use-init-edited-entity-from-url';\nimport SiteHub from '../site-hub';\nimport ResizableFrame from '../resizable-frame';\nimport useSyncCanvasModeWithURL from '../sync-state-with-url/use-sync-canvas-mode-with-url';\nimport { unlock } from '../../lock-unlock';\nimport SavePanel from '../save-panel';\nimport KeyboardShortcutsRegister from '../keyboard-shortcuts/register';\nimport KeyboardShortcutsGlobal from '../keyboard-shortcuts/global';\nimport { useCommonCommands } from '../../hooks/commands/use-common-commands';\nimport { useEditModeCommands } from '../../hooks/commands/use-edit-mode-commands';\nimport PageMain from '../page-main';\nimport { useIsSiteEditorLoading } from './hooks';\n\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { useLocation } = unlock( routerPrivateApis );\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nconst ANIMATION_DURATION = 0.5;\n\nexport default function Layout() {\n\t// This ensures the edited entity id and type are initialized properly.\n\tuseInitEditedEntityFromURL();\n\tuseSyncCanvasModeWithURL();\n\tuseCommands();\n\tuseEditModeCommands();\n\tuseCommonCommands();\n\n\tconst hubRef = useRef();\n\tconst { params } = useLocation();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isListPage = getIsListPage( params, isMobileViewport );\n\tconst isEditorPage = ! isListPage;\n\n\tconst {\n\t\tisDistractionFree,\n\t\thasFixedToolbar,\n\t\tcanvasMode,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t} = useSelect( ( select ) => {\n\t\tconst { getAllShortcutKeyCombinations } = select(\n\t\t\tkeyboardShortcutsStore\n\t\t);\n\t\tconst { getCanvasMode } = unlock( select( editSiteStore ) );\n\t\treturn {\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tpreviousShortcut: getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-site/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-site/next-region'\n\t\t\t),\n\t\t\thasFixedToolbar: select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'fixedToolbar'\n\t\t\t),\n\t\t\tisDistractionFree: select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'distractionFree'\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst isEditing = canvasMode === 'edit';\n\tconst navigateRegionsProps = useNavigateRegions( {\n\t\tprevious: previousShortcut,\n\t\tnext: nextShortcut,\n\t} );\n\tconst disableMotion = useReducedMotion();\n\tconst showSidebar =\n\t\t( isMobileViewport && ! isListPage ) ||\n\t\t( ! isMobileViewport && ( canvasMode === 'view' || ! isEditorPage ) );\n\tconst showCanvas =\n\t\t( isMobileViewport && isEditorPage && isEditing ) ||\n\t\t! isMobileViewport ||\n\t\t! isEditorPage;\n\tconst isFullCanvas =\n\t\t( isMobileViewport && isListPage ) || ( isEditorPage && isEditing );\n\tconst [ canvasResizer, canvasSize ] = useResizeObserver();\n\tconst [ fullResizer ] = useResizeObserver();\n\tconst [ isResizing ] = useState( false );\n\tconst isEditorLoading = useIsSiteEditorLoading();\n\n\t// This determines which animation variant should apply to the header.\n\t// There is also a `isDistractionFreeHovering` state that gets priority\n\t// when hovering the `edit-site-layout__header-container` in distraction\n\t// free mode. It's set via framer and trickles down to all the children\n\t// so they can use this variant state too.\n\t//\n\t// TODO: The issue with this is we want to have the hover state stick when hovering\n\t// a popover opened via the header. We'll probably need to lift this state to\n\t// handle it ourselves. Also, focusWithin the header needs to be handled.\n\tlet headerAnimationState;\n\n\tif ( canvasMode === 'view' ) {\n\t\t// We need 'view' to always take priority so 'isDistractionFree'\n\t\t// doesn't bleed over into the view (sidebar) state\n\t\theaderAnimationState = 'view';\n\t} else if ( isDistractionFree ) {\n\t\theaderAnimationState = 'isDistractionFree';\n\t} else {\n\t\theaderAnimationState = canvasMode; // edit, view, init\n\t}\n\n\t// Sets the right context for the command center\n\tconst commandContext =\n\t\tcanvasMode === 'edit' && isEditorPage\n\t\t\t? 'site-editor-edit'\n\t\t\t: 'site-editor';\n\tuseCommandContext( commandContext );\n\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( 'color.gradient' );\n\n\t// Synchronizing the URL with the store value of canvasMode happens in an effect\n\t// This condition ensures the component is only rendered after the synchronization happens\n\t// which prevents any animations due to potential canvasMode value change.\n\tif ( canvasMode === 'init' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommandMenu />\n\t\t\t<KeyboardShortcutsRegister />\n\t\t\t<KeyboardShortcutsGlobal />\n\t\t\t{ fullResizer }\n\t\t\t<div\n\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-layout',\n\t\t\t\t\tnavigateRegionsProps.className,\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-distraction-free': isDistractionFree && isEditing,\n\t\t\t\t\t\t'is-full-canvas': isFullCanvas,\n\t\t\t\t\t\t'is-edit-mode': isEditing,\n\t\t\t\t\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-layout__header-container\"\n\t\t\t\t\tvariants={ {\n\t\t\t\t\t\tisDistractionFree: {\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\tdelay: 0.8,\n\t\t\t\t\t\t\t\tdelayChildren: 0.8,\n\t\t\t\t\t\t\t}, // How long to wait before the header exits\n\t\t\t\t\t\t},\n\t\t\t\t\t\tisDistractionFreeHovering: {\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\tdelay: 0.2,\n\t\t\t\t\t\t\t\tdelayChildren: 0.2,\n\t\t\t\t\t\t\t}, // How long to wait before the header shows\n\t\t\t\t\t\t},\n\t\t\t\t\t\tview: { opacity: 1 },\n\t\t\t\t\t\tedit: { opacity: 1 },\n\t\t\t\t\t} }\n\t\t\t\t\twhileHover={\n\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t? 'isDistractionFreeHovering'\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tanimate={ headerAnimationState }\n\t\t\t\t>\n\t\t\t\t\t<SiteHub\n\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\tisDistractionFree: { x: '-100%' },\n\t\t\t\t\t\t\tisDistractionFreeHovering: { x: 0 },\n\t\t\t\t\t\t\tview: { x: 0 },\n\t\t\t\t\t\t\tedit: { x: 0 },\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tref={ hubRef }\n\t\t\t\t\t\tclassName=\"edit-site-layout__hub\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t\t{ isEditorPage && isEditing && (\n\t\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__header\"\n\t\t\t\t\t\t\t\tariaLabel={ __( 'Editor top bar' ) }\n\t\t\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\t\t\tisDistractionFree: { opacity: 0 },\n\t\t\t\t\t\t\t\t\tisDistractionFreeHovering: { opacity: 1 },\n\t\t\t\t\t\t\t\t\tview: { opacity: 1 },\n\t\t\t\t\t\t\t\t\tedit: { opacity: 1 },\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\tduration: disableMotion ? 0 : 0.2,\n\t\t\t\t\t\t\t\t\tease: 'easeOut',\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{ isEditing && <Header /> }\n\t\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AnimatePresence>\n\t\t\t\t</motion.div>\n\n\t\t\t\t<div className=\"edit-site-layout__content\">\n\t\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t\t\tshowSidebar\n\t\t\t\t\t\t\t\t\t\t? { opacity: 1, display: 'block' }\n\t\t\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\t\t\t\ttransitionEnd: {\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\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}\n\t\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\tduration:\n\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\tdisableMotion || isMobileViewport\n\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t: ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__sidebar\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\t\t\tariaLabel={ __( 'Navigation' ) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Sidebar />\n\t\t\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</AnimatePresence>\n\n\t\t\t\t\t<SavePanel />\n\n\t\t\t\t\t{ showCanvas && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ isListPage && <PageMain /> }\n\t\t\t\t\t\t\t{ isEditorPage && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t'edit-site-layout__canvas-container',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'is-resizing': isResizing,\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\t\t{ canvasResizer }\n\t\t\t\t\t\t\t\t\t{ !! canvasSize.width && (\n\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\twhileHover={\n\t\t\t\t\t\t\t\t\t\t\t\tisEditorPage &&\n\t\t\t\t\t\t\t\t\t\t\t\tcanvasMode === 'view'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 1.005,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tduration:\n\t\t\t\t\t\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\t\t\t\t\tisResizing\n\t\t\t\t\t\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\t\t\t\t\t: 0.5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tinitial={ false }\n\t\t\t\t\t\t\t\t\t\t\tlayout=\"position\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__canvas\"\n\t\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\t\t\tduration:\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisableMotion || isResizing\n\t\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\t: ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\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\t\t<ErrorBoundary>\n\t\t\t\t\t\t\t\t\t\t\t\t<ResizableFrame\n\t\t\t\t\t\t\t\t\t\t\t\t\tisReady={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t! isEditorLoading\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tisFullWidth={ isEditing }\n\t\t\t\t\t\t\t\t\t\t\t\t\toversizedClassName=\"edit-site-layout__resizable-frame-oversized\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tinnerContentStyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackgroundColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Editor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisEditorLoading\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</ResizableFrame>\n\t\t\t\t\t\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\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</div>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
@@ -18,7 +18,7 @@ import useRegisterShortcuts from './use-register-shortcuts';
18
18
  import Header from './header';
19
19
  import Table from './table';
20
20
  import useTitle from '../routes/use-title';
21
- import { unlock } from '../../private-apis';
21
+ import { unlock } from '../../lock-unlock';
22
22
  const {
23
23
  useLocation
24
24
  } = unlock(routerPrivateApis);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/list/index.js"],"names":["store","coreStore","useSelect","InterfaceSkeleton","__","sprintf","keyboardShortcutsStore","EditorSnackbars","privateApis","routerPrivateApis","useRegisterShortcuts","Header","Table","useTitle","unlock","useLocation","List","params","path","templateType","previousShortcut","nextShortcut","select","getAllShortcutKeyCombinations","postType","getPostType","labels","name","itemsListLabel","items_list","detailedRegionLabels","header","body","undefined","previous","next"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,iBAAT,QAAkC,sBAAlC;AACA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASL,KAAK,IAAIM,sBAAlB,QAAgD,+BAAhD;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,WAAW,IAAIC,iBAAxB,QAAiD,mBAAjD;AAEA;AACA;AACA;;AACA,OAAOC,oBAAP,MAAiC,0BAAjC;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,SAASC,MAAT,QAAuB,oBAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAkBD,MAAM,CAAEL,iBAAF,CAA9B;AAEA,eAAe,SAASO,IAAT,GAAgB;AAC9B,QAAM;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O,EAAG,cAAC,eAAD,OAJX;AAKC,IAAA,OAAO,EAAG,cAAC,KAAD;AAAO,MAAA,YAAY,EAAGA;AAAtB,MALX;AAMC,IAAA,SAAS,EAAG;AACXe,MAAAA,QAAQ,EAAEd,gBADC;AAEXe,MAAAA,IAAI,EAAEd;AAFK;AANb,IADD;AAaA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { InterfaceSkeleton } from '@wordpress/interface';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { EditorSnackbars } from '@wordpress/editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport useRegisterShortcuts from './use-register-shortcuts';\nimport Header from './header';\nimport Table from './table';\nimport useTitle from '../routes/use-title';\nimport { unlock } from '../../private-apis';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function List() {\n\tconst {\n\t\tparams: { path },\n\t} = useLocation();\n\tconst templateType =\n\t\tpath === '/wp_template/all' ? 'wp_template' : 'wp_template_part';\n\n\tuseRegisterShortcuts();\n\n\tconst { previousShortcut, nextShortcut } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-site/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-site/next-region' ),\n\t\t};\n\t}, [] );\n\n\tconst postType = useSelect(\n\t\t( select ) => select( coreStore ).getPostType( templateType ),\n\t\t[ templateType ]\n\t);\n\n\tuseTitle( postType?.labels?.name );\n\n\t// `postType` could load in asynchronously. Only provide the detailed region labels if\n\t// the postType has loaded, otherwise `InterfaceSkeleton` will fallback to the defaults.\n\tconst itemsListLabel = postType?.labels?.items_list;\n\tconst detailedRegionLabels = postType\n\t\t? {\n\t\t\t\theader: sprintf(\n\t\t\t\t\t// translators: %s - the name of the page, 'Header' as in the header area of that page.\n\t\t\t\t\t__( '%s - Header' ),\n\t\t\t\t\titemsListLabel\n\t\t\t\t),\n\t\t\t\tbody: sprintf(\n\t\t\t\t\t// translators: %s - the name of the page, 'Content' as in the content area of that page.\n\t\t\t\t\t__( '%s - Content' ),\n\t\t\t\t\titemsListLabel\n\t\t\t\t),\n\t\t }\n\t\t: undefined;\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tclassName=\"edit-site-list\"\n\t\t\tlabels={ detailedRegionLabels }\n\t\t\theader={ <Header templateType={ templateType } /> }\n\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\tcontent={ <Table templateType={ templateType } /> }\n\t\t\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\n\t\t\t} }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/list/index.js"],"names":["store","coreStore","useSelect","InterfaceSkeleton","__","sprintf","keyboardShortcutsStore","EditorSnackbars","privateApis","routerPrivateApis","useRegisterShortcuts","Header","Table","useTitle","unlock","useLocation","List","params","path","templateType","previousShortcut","nextShortcut","select","getAllShortcutKeyCombinations","postType","getPostType","labels","name","itemsListLabel","items_list","detailedRegionLabels","header","body","undefined","previous","next"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,iBAAT,QAAkC,sBAAlC;AACA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASL,KAAK,IAAIM,sBAAlB,QAAgD,+BAAhD;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,WAAW,IAAIC,iBAAxB,QAAiD,mBAAjD;AAEA;AACA;AACA;;AACA,OAAOC,oBAAP,MAAiC,0BAAjC;A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A,EAAE,CAAE,cAAF,CAFU,EAGZwB,cAHY;AANb,GADkC,GAalCK,SAbH;AAeA,SACC,cAAC,iBAAD;AACC,IAAA,SAAS,EAAC,gBADX;AAEC,IAAA,MAAM,EAAGH,oBAFV;AAGC,IAAA,MAAM,EAAG,cAAC,MAAD;AAAQ,MAAA,YAAY,EAAGX;AAAvB,MAHV;AAIC,IAAA,OAAO,EAAG,cAAC,eAAD,OAJX;AAKC,IAAA,OAAO,EAAG,cAAC,KAAD;AAAO,MAAA,YAAY,EAAGA;AAAtB,MALX;AAMC,IAAA,SAAS,EAAG;AACXe,MAAAA,QAAQ,EAAEd,gBADC;AAEXe,MAAAA,IAAI,EAAEd;AAFK;AANb,IADD;AAaA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { InterfaceSkeleton } from '@wordpress/interface';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { EditorSnackbars } from '@wordpress/editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport useRegisterShortcuts from './use-register-shortcuts';\nimport Header from './header';\nimport Table from './table';\nimport useTitle from '../routes/use-title';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function List() {\n\tconst {\n\t\tparams: { path },\n\t} = useLocation();\n\tconst templateType =\n\t\tpath === '/wp_template/all' ? 'wp_template' : 'wp_template_part';\n\n\tuseRegisterShortcuts();\n\n\tconst { previousShortcut, nextShortcut } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-site/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-site/next-region' ),\n\t\t};\n\t}, [] );\n\n\tconst postType = useSelect(\n\t\t( select ) => select( coreStore ).getPostType( templateType ),\n\t\t[ templateType ]\n\t);\n\n\tuseTitle( postType?.labels?.name );\n\n\t// `postType` could load in asynchronously. Only provide the detailed region labels if\n\t// the postType has loaded, otherwise `InterfaceSkeleton` will fallback to the defaults.\n\tconst itemsListLabel = postType?.labels?.items_list;\n\tconst detailedRegionLabels = postType\n\t\t? {\n\t\t\t\theader: sprintf(\n\t\t\t\t\t// translators: %s - the name of the page, 'Header' as in the header area of that page.\n\t\t\t\t\t__( '%s - Header' ),\n\t\t\t\t\titemsListLabel\n\t\t\t\t),\n\t\t\t\tbody: sprintf(\n\t\t\t\t\t// translators: %s - the name of the page, 'Content' as in the content area of that page.\n\t\t\t\t\t__( '%s - Content' ),\n\t\t\t\t\titemsListLabel\n\t\t\t\t),\n\t\t }\n\t\t: undefined;\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tclassName=\"edit-site-list\"\n\t\t\tlabels={ detailedRegionLabels }\n\t\t\theader={ <Header templateType={ templateType } /> }\n\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\tcontent={ <Table templateType={ templateType } /> }\n\t\t\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\n\t\t\t} }\n\t\t/>\n\t);\n}\n"]}
@@ -0,0 +1,33 @@
1
+ import { createElement } from "@wordpress/element";
2
+
3
+ /**
4
+ * WordPress dependencies
5
+ */
6
+ import { __experimentalHeading as Heading, __experimentalText as Text, __experimentalHStack as HStack, FlexBlock, FlexItem } from '@wordpress/components';
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+
11
+ export default function Header({
12
+ title,
13
+ subTitle,
14
+ actions
15
+ }) {
16
+ return createElement(HStack, {
17
+ as: "header",
18
+ alignment: "left",
19
+ className: "edit-site-page-header"
20
+ }, createElement(FlexBlock, {
21
+ className: "edit-site-page-header__page-title"
22
+ }, createElement(Heading, {
23
+ as: "h1",
24
+ level: 4,
25
+ className: "edit-site-page-header__title"
26
+ }, title), subTitle && createElement(Text, {
27
+ as: "p",
28
+ className: "edit-site-page-header__sub-title"
29
+ }, subTitle)), createElement(FlexItem, {
30
+ className: "edit-site-page-header__actions"
31
+ }, actions));
32
+ }
33
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/page/header.js"],"names":["__experimentalHeading","Heading","__experimentalText","Text","__experimentalHStack","HStack","FlexBlock","FlexItem","Header","title","subTitle","actions"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,qBAAqB,IAAIC,OAD1B,EAECC,kBAAkB,IAAIC,IAFvB,EAGCC,oBAAoB,IAAIC,MAHzB,EAICC,SAJD,EAKCC,QALD,QAMO,uBANP;AAQA;AACA;AACA;;AAEA,eAAe,SAASC,MAAT,CAAiB;AAAEC,EAAAA,KAAF;AAASC,EAAAA,QAAT;AAAmBC,EAAAA;AAAnB,CAAjB,EAAgD;AAC9D,SACC,cAAC,MAAD;AAAQ,IAAA,EAAE,EAAC,QAAX;AAAoB,IAAA,SAAS,EAAC,MAA9B;AAAqC,IAAA,SAAS,EAAC;AAA/C,KACC,cAAC,SAAD;AAAW,IAAA,SAAS,EAAC;AAArB,KACC,cAAC,OAAD;AACC,IAAA,EAAE,EAAC,IADJ;AAEC,IAAA,KAAK,EAAG,CAFT;AAGC,IAAA,SAAS,EAAC;AAHX,KAKGF,KALH,CADD,EAQGC,QAAQ,IACT,cAAC,IAAD;AAAM,IAAA,EAAE,EAAC,GAAT;AAAa,IAAA,SAAS,EAAC;AAAvB,KACGA,QADH,CATF,CADD,EAeC,cAAC,QAAD;AAAU,IAAA,SAAS,EAAC;AAApB,KACGC,OADH,CAfD,CADD;AAqBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHeading as Heading,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\tFlexBlock,\n\tFlexItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\n\nexport default function Header( { title, subTitle, actions } ) {\n\treturn (\n\t\t<HStack as=\"header\" alignment=\"left\" className=\"edit-site-page-header\">\n\t\t\t<FlexBlock className=\"edit-site-page-header__page-title\">\n\t\t\t\t<Heading\n\t\t\t\t\tas=\"h1\"\n\t\t\t\t\tlevel={ 4 }\n\t\t\t\t\tclassName=\"edit-site-page-header__title\"\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t{ subTitle && (\n\t\t\t\t\t<Text as=\"p\" className=\"edit-site-page-header__sub-title\">\n\t\t\t\t\t\t{ subTitle }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t</FlexBlock>\n\t\t\t<FlexItem className=\"edit-site-page-header__actions\">\n\t\t\t\t{ actions }\n\t\t\t</FlexItem>\n\t\t</HStack>\n\t);\n}\n"]}
@@ -0,0 +1,37 @@
1
+ import { createElement } from "@wordpress/element";
2
+
3
+ /**
4
+ * External dependencies
5
+ */
6
+ import classnames from 'classnames';
7
+ /**
8
+ * WordPress dependencies
9
+ */
10
+
11
+ import { NavigableRegion } from '@wordpress/interface';
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+
16
+ import Header from './header';
17
+ export default function Page({
18
+ title,
19
+ subTitle,
20
+ actions,
21
+ children,
22
+ className,
23
+ hideTitleFromUI = false
24
+ }) {
25
+ const classes = classnames('edit-site-page', className);
26
+ return createElement(NavigableRegion, {
27
+ className: classes,
28
+ ariaLabel: title
29
+ }, !hideTitleFromUI && title && createElement(Header, {
30
+ title: title,
31
+ subTitle: subTitle,
32
+ actions: actions
33
+ }), createElement("div", {
34
+ className: "edit-site-page-content"
35
+ }, children));
36
+ }
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/page/index.js"],"names":["classnames","NavigableRegion","Header","Page","title","subTitle","actions","children","className","hideTitleFromUI","classes"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,eAAT,QAAgC,sBAAhC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,eAAe,SAASC,IAAT,CAAe;AAC7BC,EAAAA,KAD6B;AAE7BC,EAAAA,QAF6B;AAG7BC,EAAAA,OAH6B;AAI7BC,EAAAA,QAJ6B;AAK7BC,EAAAA,SAL6B;AAM7BC,EAAAA,eAAe,GAAG;AANW,CAAf,EAOX;AACH,QAAMC,OAAO,GAAGV,UAAU,CAAE,gBAAF,EAAoBQ,SAApB,CAA1B;AAEA,SACC,cAAC,eAAD;AAAiB,IAAA,SAAS,EAAGE,OAA7B;AAAuC,IAAA,SAAS,EAAGN;AAAnD,KACG,CAAEK,eAAF,IAAqBL,KAArB,IACD,cAAC,MAAD;AACC,IAAA,KAAK,EAAGA,KADT;AAEC,IAAA,QAAQ,EAAGC,QAFZ;AAGC,IAAA,OAAO,EAAGC;AAHX,IAFF,EAQC;AAAK,IAAA,SAAS,EAAC;AAAf,KAA0CC,QAA1C,CARD,CADD;AAYA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { NavigableRegion } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport Header from './header';\n\nexport default function Page( {\n\ttitle,\n\tsubTitle,\n\tactions,\n\tchildren,\n\tclassName,\n\thideTitleFromUI = false,\n} ) {\n\tconst classes = classnames( 'edit-site-page', className );\n\n\treturn (\n\t\t<NavigableRegion className={ classes } ariaLabel={ title }>\n\t\t\t{ ! hideTitleFromUI && title && (\n\t\t\t\t<Header\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tsubTitle={ subTitle }\n\t\t\t\t\tactions={ actions }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-page-content\">{ children }</div>\n\t\t</NavigableRegion>\n\t);\n}\n"]}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useSelect, useDispatch } from '@wordpress/data';
5
+ import { useEffect, useRef } from '@wordpress/element';
6
+ import { store as noticesStore } from '@wordpress/notices';
7
+ import { __ } from '@wordpress/i18n';
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+
12
+ import { store as editSiteStore } from '../../store';
13
+ /**
14
+ * Component that displays a 'You are editing a template' notification when the
15
+ * user switches from focusing on editing page content to editing a template.
16
+ */
17
+
18
+ export default function BackToPageNotification() {
19
+ useBackToPageNotification();
20
+ return null;
21
+ }
22
+ /**
23
+ * Hook that displays a 'You are editing a template' notification when the user
24
+ * switches from focusing on editing page content to editing a template.
25
+ */
26
+
27
+ export function useBackToPageNotification() {
28
+ const {
29
+ isPage,
30
+ hasPageContentFocus
31
+ } = useSelect(select => ({
32
+ isPage: select(editSiteStore).isPage(),
33
+ hasPageContentFocus: select(editSiteStore).hasPageContentFocus()
34
+ }), []);
35
+ const alreadySeen = useRef(false);
36
+ const prevHasPageContentFocus = useRef(false);
37
+ const {
38
+ createInfoNotice
39
+ } = useDispatch(noticesStore);
40
+ const {
41
+ setHasPageContentFocus
42
+ } = useDispatch(editSiteStore);
43
+ useEffect(() => {
44
+ if (!alreadySeen.current && isPage && prevHasPageContentFocus.current && !hasPageContentFocus) {
45
+ createInfoNotice(__('You are editing a template.'), {
46
+ isDismissible: true,
47
+ type: 'snackbar',
48
+ actions: [{
49
+ label: __('Back to page'),
50
+ onClick: () => setHasPageContentFocus(true)
51
+ }]
52
+ });
53
+ alreadySeen.current = true;
54
+ }
55
+
56
+ prevHasPageContentFocus.current = hasPageContentFocus;
57
+ }, [alreadySeen, isPage, prevHasPageContentFocus, hasPageContentFocus, createInfoNotice, setHasPageContentFocus]);
58
+ }
59
+ //# sourceMappingURL=back-to-page-notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/back-to-page-notification.js"],"names":["useSelect","useDispatch","useEffect","useRef","store","noticesStore","__","editSiteStore","BackToPageNotification","useBackToPageNotification","isPage","hasPageContentFocus","select","alreadySeen","prevHasPageContentFocus","createInfoNotice","setHasPageContentFocus","current","isDismissible","type","actions","label","onClick"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,SAAT,EAAoBC,MAApB,QAAkC,oBAAlC;AACA,SAASC,KAAK,IAAIC,YAAlB,QAAsC,oBAAtC;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,SAASF,KAAK,IAAIG,aAAlB,QAAuC,aAAvC;AAEA;AACA;AACA;AACA;;AACA,eAAe,SAASC,sBAAT,GAAkC;AAChDC,EAAAA,yBAAyB;AACzB,SAAO,IAAP;AACA;AAED;AACA;AACA;AACA;;AACA,OAAO,SAASA,yBAAT,GAAqC;AAC3C,QAAM;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,MAAkCX,SAAS,CAC9CY,MAAF,KAAgB;AACfF,IAAAA,MAAM,EAAEE,MAAM,CAAEL,aAAF,CAAN,CAAwBG,MAAxB,EADO;AAEfC,IAAAA,mBAAmB,EAAEC,MAAM,CAAEL,aAAF,CAAN,CAAwBI,mBAAxB;AAFN,GAAhB,CADgD,EAKhD,EALgD,CAAjD;AAQA,QAAME,WAAW,GAAGV,MAAM,CAAE,KAAF,CAA1B;AACA,QAAMW,uBAAuB,GAAGX,MAAM,CAAE,KAAF,CAAtC;AAEA,QAAM;AAAEY,IAAAA;AAAF,MAAuBd,WAAW,CAAEI,YAAF,CAAxC;AACA,QAAM;AAAEW,IAAAA;AAAF,MAA6Bf,WAAW,CAAEM,aAAF,CAA9C;AAEAL,EAAAA,SAAS,CAAE,MAAM;AAChB,QACC,CAAEW,WAAW,CAACI,OAAd,IACAP,MADA,IAEAI,uBAAuB,CAACG,OAFxB,IAGA,CAAEN,mBAJH,EAKE;AACDI,MAAAA,gBAAgB,CAAET,EAAE,CAAE,6BAAF,CAAJ,EAAuC;AACtDY,QAAAA,aAAa,EAAE,IADuC;AAEtDC,QAAAA,IAAI,EAAE,UAFgD;AAGtDC,QAAAA,OAAO,EAAE,CACR;AACCC,UAAAA,KAAK,EAAEf,EAAE,CAAE,cAAF,CADV;AAECgB,UAAAA,OAAO,EAAE,MAAMN,sBAAsB,CAAE,IAAF;AAFtC,SADQ;AAH6C,OAAvC,CAAhB;AAUAH,MAAAA,WAAW,CAACI,OAAZ,GAAsB,IAAtB;AACA;;AACDH,IAAAA,uBAAuB,CAACG,OAAxB,GAAkCN,mBAAlC;AACA,GApBQ,EAoBN,CACFE,WADE,EAEFH,MAFE,EAGFI,uBAHE,EAIFH,mBAJE,EAKFI,gBALE,EAMFC,sBANE,CApBM,CAAT;AA4BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\n/**\n * Component that displays a 'You are editing a template' notification when the\n * user switches from focusing on editing page content to editing a template.\n */\nexport default function BackToPageNotification() {\n\tuseBackToPageNotification();\n\treturn null;\n}\n\n/**\n * Hook that displays a 'You are editing a template' notification when the user\n * switches from focusing on editing page content to editing a template.\n */\nexport function useBackToPageNotification() {\n\tconst { isPage, hasPageContentFocus } = useSelect(\n\t\t( select ) => ( {\n\t\t\tisPage: select( editSiteStore ).isPage(),\n\t\t\thasPageContentFocus: select( editSiteStore ).hasPageContentFocus(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst alreadySeen = useRef( false );\n\tconst prevHasPageContentFocus = useRef( false );\n\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\tconst { setHasPageContentFocus } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! alreadySeen.current &&\n\t\t\tisPage &&\n\t\t\tprevHasPageContentFocus.current &&\n\t\t\t! hasPageContentFocus\n\t\t) {\n\t\t\tcreateInfoNotice( __( 'You are editing a template.' ), {\n\t\t\t\tisDismissible: true,\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Back to page' ),\n\t\t\t\t\t\tonClick: () => setHasPageContentFocus( true ),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t} );\n\t\t\talreadySeen.current = true;\n\t\t}\n\t\tprevHasPageContentFocus.current = hasPageContentFocus;\n\t}, [\n\t\talreadySeen,\n\t\tisPage,\n\t\tprevHasPageContentFocus,\n\t\thasPageContentFocus,\n\t\tcreateInfoNotice,\n\t\tsetHasPageContentFocus,\n\t] );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export const PAGE_CONTENT_BLOCK_TYPES = ['core/post-title', 'core/post-featured-image', 'core/post-content'];
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/constants.js"],"names":["PAGE_CONTENT_BLOCK_TYPES"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB,GAAG,CACvC,iBADuC,EAEvC,0BAFuC,EAGvC,mBAHuC,CAAjC","sourcesContent":["export const PAGE_CONTENT_BLOCK_TYPES = [\n\t'core/post-title',\n\t'core/post-featured-image',\n\t'core/post-content',\n];\n"]}
@@ -11,26 +11,35 @@ import { useEffect } from '@wordpress/element';
11
11
  * Internal dependencies
12
12
  */
13
13
 
14
- import { unlock } from '../../private-apis';
15
- import { CONTENT_BLOCK_TYPES } from './constants';
14
+ import { unlock } from '../../lock-unlock';
15
+ import { PAGE_CONTENT_BLOCK_TYPES } from './constants';
16
16
  const {
17
17
  useBlockEditingMode
18
18
  } = unlock(blockEditorPrivateApis);
19
+ /**
20
+ * Component that when rendered, makes it so that the site editor allows only
21
+ * page content to be edited.
22
+ */
23
+
24
+ export default function DisableNonPageContentBlocks() {
25
+ useDisableNonPageContentBlocks();
26
+ }
19
27
  /**
20
28
  * Disables non-content blocks using the `useBlockEditingMode` hook.
21
29
  */
22
30
 
23
- export function useDisableNonContentBlocks() {
31
+ export function useDisableNonPageContentBlocks() {
24
32
  useBlockEditingMode('disabled');
25
33
  useEffect(() => {
26
- addFilter('editor.BlockEdit', 'core/edit-site/disable-non-content-blocks', withDisableNonContentBlocks);
34
+ addFilter('editor.BlockEdit', 'core/edit-site/disable-non-content-blocks', withDisableNonPageContentBlocks);
27
35
  return () => removeFilter('editor.BlockEdit', 'core/edit-site/disable-non-content-blocks');
28
36
  }, []);
29
37
  }
30
- const withDisableNonContentBlocks = createHigherOrderComponent(BlockEdit => props => {
31
- const isContent = CONTENT_BLOCK_TYPES.includes(props.name);
38
+ const withDisableNonPageContentBlocks = createHigherOrderComponent(BlockEdit => props => {
39
+ const isContent = PAGE_CONTENT_BLOCK_TYPES.includes(props.name);
32
40
  const mode = isContent ? 'contentOnly' : undefined;
33
41
  useBlockEditingMode(mode);
34
- return createElement(BlockEdit, props);
35
- }, 'withBlockEditingMode');
36
- //# sourceMappingURL=use-disable-non-content-blocks.js.map
42
+ return createElement(BlockEdit, { ...props
43
+ });
44
+ }, 'withDisableNonPageContentBlocks');
45
+ //# sourceMappingURL=disable-non-page-content-blocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/disable-non-page-content-blocks.js"],"names":["createHigherOrderComponent","addFilter","removeFilter","privateApis","blockEditorPrivateApis","useEffect","unlock","PAGE_CONTENT_BLOCK_TYPES","useBlockEditingMode","DisableNonPageContentBlocks","useDisableNonPageContentBlocks","withDisableNonPageContentBlocks","BlockEdit","props","isContent","includes","name","mode","undefined"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,0BAAT,QAA2C,oBAA3C;AACA,SAASC,SAAT,EAAoBC,YAApB,QAAwC,kBAAxC;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AACA,SAASC,SAAT,QAA0B,oBAA1B;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,SAASC,wBAAT,QAAyC,aAAzC;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAA0BF,MAAM,CAAEF,sBAAF,CAAtC;AAEA;AACA;AACA;AACA;;AACA,eAAe,SAASK,2BAAT,GAAuC;AACrDC,EAAAA,8BAA8B;AAC9B;AAED;AACA;AACA;;AACA,OAAO,SAASA,8BAAT,GAA0C;AAChDF,EAAAA,mBAAmB,CAAE,UAAF,CAAnB;AACAH,EAAAA,SAAS,CAAE,MAAM;AAChBJ,IAAAA,SAAS,CACR,kBADQ,EAER,2CAFQ,EAGRU,+BAHQ,CAAT;AAKA,WAAO,MACNT,YAAY,CACX,kBADW,EAEX,2CAFW,CADb;AAKA,GAXQ,EAWN,EAXM,CAAT;AAYA;AAED,MAAMS,+BAA+B,GAAGX,0BAA0B,CAC/DY,SAAF,IAAmBC,KAAF,IAAa;AAC7B,QAAMC,SAAS,GAAGP,wBAAwB,CAACQ,QAAzB,CAAmCF,KAAK,CAACG,IAAzC,CAAlB;AACA,QAAMC,IAAI,GAAGH,SAAS,GAAG,aAAH,GAAmBI,SAAzC;AACAV,EAAAA,mBAAmB,CAAES,IAAF,CAAnB;AACA,SAAO,cAAC,SAAD,OAAgBJ;AAAhB,IAAP;AACA,CANgE,EAOjE,iCAPiE,CAAlE","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter, removeFilter } from '@wordpress/hooks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { PAGE_CONTENT_BLOCK_TYPES } from './constants';\n\nconst { useBlockEditingMode } = unlock( blockEditorPrivateApis );\n\n/**\n * Component that when rendered, makes it so that the site editor allows only\n * page content to be edited.\n */\nexport default function DisableNonPageContentBlocks() {\n\tuseDisableNonPageContentBlocks();\n}\n\n/**\n * Disables non-content blocks using the `useBlockEditingMode` hook.\n */\nexport function useDisableNonPageContentBlocks() {\n\tuseBlockEditingMode( 'disabled' );\n\tuseEffect( () => {\n\t\taddFilter(\n\t\t\t'editor.BlockEdit',\n\t\t\t'core/edit-site/disable-non-content-blocks',\n\t\t\twithDisableNonPageContentBlocks\n\t\t);\n\t\treturn () =>\n\t\t\tremoveFilter(\n\t\t\t\t'editor.BlockEdit',\n\t\t\t\t'core/edit-site/disable-non-content-blocks'\n\t\t\t);\n\t}, [] );\n}\n\nconst withDisableNonPageContentBlocks = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isContent = PAGE_CONTENT_BLOCK_TYPES.includes( props.name );\n\t\tconst mode = isContent ? 'contentOnly' : undefined;\n\t\tuseBlockEditingMode( mode );\n\t\treturn <BlockEdit { ...props } />;\n\t},\n\t'withDisableNonPageContentBlocks'\n);\n"]}
@@ -0,0 +1,110 @@
1
+ import { createElement } from "@wordpress/element";
2
+
3
+ /**
4
+ * WordPress dependencies
5
+ */
6
+ import { useSelect, useDispatch } from '@wordpress/data';
7
+ import { useEffect, useState, useRef } from '@wordpress/element';
8
+ import { store as noticesStore } from '@wordpress/notices';
9
+ import { __ } from '@wordpress/i18n';
10
+ import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+
15
+ import { store as editSiteStore } from '../../store';
16
+ /**
17
+ * Component that:
18
+ *
19
+ * - Displays a 'Edit your template to edit this block' notification when the
20
+ * user is focusing on editing page content and clicks on a disabled template
21
+ * block.
22
+ * - Displays a 'Edit your template to edit this block' dialog when the user
23
+ * is focusing on editing page conetnt and double clicks on a disabled
24
+ * template block.
25
+ *
26
+ * @param {Object} props
27
+ * @param {import('react').RefObject<HTMLElement>} props.contentRef Ref to the block
28
+ * editor iframe canvas.
29
+ */
30
+
31
+ export default function EditTemplateNotification({
32
+ contentRef
33
+ }) {
34
+ const hasPageContentFocus = useSelect(select => select(editSiteStore).hasPageContentFocus(), []);
35
+ const {
36
+ getNotices
37
+ } = useSelect(noticesStore);
38
+ const {
39
+ createInfoNotice,
40
+ removeNotice
41
+ } = useDispatch(noticesStore);
42
+ const {
43
+ setHasPageContentFocus
44
+ } = useDispatch(editSiteStore);
45
+ const [isDialogOpen, setIsDialogOpen] = useState(false);
46
+ const lastNoticeId = useRef(0);
47
+ useEffect(() => {
48
+ const handleClick = async event => {
49
+ if (!hasPageContentFocus) {
50
+ return;
51
+ }
52
+
53
+ if (!event.target.classList.contains('is-root-container')) {
54
+ return;
55
+ }
56
+
57
+ const isNoticeAlreadyShowing = getNotices().some(notice => notice.id === lastNoticeId.current);
58
+
59
+ if (isNoticeAlreadyShowing) {
60
+ return;
61
+ }
62
+
63
+ const {
64
+ notice
65
+ } = await createInfoNotice(__('Edit your template to edit this block.'), {
66
+ isDismissible: true,
67
+ type: 'snackbar',
68
+ actions: [{
69
+ label: __('Edit template'),
70
+ onClick: () => setHasPageContentFocus(false)
71
+ }]
72
+ });
73
+ lastNoticeId.current = notice.id;
74
+ };
75
+
76
+ const handleDblClick = event => {
77
+ if (!hasPageContentFocus) {
78
+ return;
79
+ }
80
+
81
+ if (!event.target.classList.contains('is-root-container')) {
82
+ return;
83
+ }
84
+
85
+ if (lastNoticeId.current) {
86
+ removeNotice(lastNoticeId.current);
87
+ }
88
+
89
+ setIsDialogOpen(true);
90
+ };
91
+
92
+ const canvas = contentRef.current;
93
+ canvas?.addEventListener('click', handleClick);
94
+ canvas?.addEventListener('dblclick', handleDblClick);
95
+ return () => {
96
+ canvas?.removeEventListener('click', handleClick);
97
+ canvas?.removeEventListener('dblclick', handleDblClick);
98
+ };
99
+ }, [lastNoticeId, hasPageContentFocus, contentRef.current]);
100
+ return createElement(ConfirmDialog, {
101
+ isOpen: isDialogOpen,
102
+ confirmButtonText: __('Edit template'),
103
+ onConfirm: () => {
104
+ setIsDialogOpen(false);
105
+ setHasPageContentFocus(false);
106
+ },
107
+ onCancel: () => setIsDialogOpen(false)
108
+ }, __('Edit your template to edit this block.'));
109
+ }
110
+ //# sourceMappingURL=edit-template-notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/edit-template-notification.js"],"names":["useSelect","useDispatch","useEffect","useState","useRef","store","noticesStore","__","__experimentalConfirmDialog","ConfirmDialog","editSiteStore","EditTemplateNotification","contentRef","hasPageContentFocus","select","getNotices","createInfoNotice","removeNotice","setHasPageContentFocus","isDialogOpen","setIsDialogOpen","lastNoticeId","handleClick","event","target","classList","contains","isNoticeAlreadyShowing","some","notice","id","current","isDismissible","type","actions","label","onClick","handleDblClick","canvas","addEventListener","removeEventListener"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,SAAT,EAAoBC,QAApB,EAA8BC,MAA9B,QAA4C,oBAA5C;AACA,SAASC,KAAK,IAAIC,YAAlB,QAAsC,oBAAtC;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,2BAA2B,IAAIC,aAAxC,QAA6D,uBAA7D;AAEA;AACA;AACA;;AACA,SAASJ,KAAK,IAAIK,aAAlB,QAAuC,aAAvC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,wBAAT,CAAmC;AAAEC,EAAAA;AAAF,CAAnC,EAAoD;AAClE,QAAMC,mBAAmB,GAAGb,SAAS,CAClCc,MAAF,IAAcA,MAAM,CAAEJ,aAAF,CAAN,CAAwBG,mBAAxB,EADsB,EAEpC,EAFoC,CAArC;AAIA,QAAM;AAAEE,IAAAA;AAAF,MAAiBf,SAAS,CAAEM,YAAF,CAAhC;AAEA,QAAM;AAAEU,IAAAA,gBAAF;AAAoBC,IAAAA;AAApB,MAAqChB,WAAW,CAAEK,YAAF,CA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C3Bd,QAAAA,YAAY,CAAEI,YAAY,CAACU,OAAf,CAAZ;AACA;;AACDX,MAAAA,eAAe,CAAE,IAAF,CAAf;AACA,KAXD;;AAaA,UAAMkB,MAAM,GAAG1B,UAAU,CAACmB,OAA1B;AACAO,IAAAA,MAAM,EAAEC,gBAAR,CAA0B,OAA1B,EAAmCjB,WAAnC;AACAgB,IAAAA,MAAM,EAAEC,gBAAR,CAA0B,UAA1B,EAAsCF,cAAtC;AACA,WAAO,MAAM;AACZC,MAAAA,MAAM,EAAEE,mBAAR,CAA6B,OAA7B,EAAsClB,WAAtC;AACAgB,MAAAA,MAAM,EAAEE,mBAAR,CAA6B,UAA7B,EAAyCH,cAAzC;AACA,KAHD;AAIA,GAlDQ,EAkDN,CAAEhB,YAAF,EAAgBR,mBAAhB,EAAqCD,UAAU,CAACmB,OAAhD,CAlDM,CAAT;AAoDA,SACC,cAAC,aAAD;AACC,IAAA,MAAM,EAAGZ,YADV;AAEC,IAAA,iBAAiB,EAAGZ,EAAE,CAAE,eAAF,CAFvB;AAGC,IAAA,SAAS,EAAG,MAAM;AACjBa,MAAAA,eAAe,CAAE,KAAF,CAAf;AACAF,MAAAA,sBAAsB,CAAE,KAAF,CAAtB;AACA,KANF;AAOC,IAAA,QAAQ,EAAG,MAAME,eAAe,CAAE,KAAF;AAPjC,KASGb,EAAE,CAAE,wCAAF,CATL,CADD;AAaA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useState, useRef } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\n/**\n * Component that:\n *\n * - Displays a 'Edit your template to edit this block' notification when the\n * user is focusing on editing page content and clicks on a disabled template\n * block.\n * - Displays a 'Edit your template to edit this block' dialog when the user\n * is focusing on editing page conetnt and double clicks on a disabled\n * template block.\n *\n * @param {Object} props\n * @param {import('react').RefObject<HTMLElement>} props.contentRef Ref to the block\n * editor iframe canvas.\n */\nexport default function EditTemplateNotification( { contentRef } ) {\n\tconst hasPageContentFocus = useSelect(\n\t\t( select ) => select( editSiteStore ).hasPageContentFocus(),\n\t\t[]\n\t);\n\tconst { getNotices } = useSelect( noticesStore );\n\n\tconst { createInfoNotice, removeNotice } = useDispatch( noticesStore );\n\tconst { setHasPageContentFocus } = useDispatch( editSiteStore );\n\n\tconst [ isDialogOpen, setIsDialogOpen ] = useState( false );\n\n\tconst lastNoticeId = useRef( 0 );\n\n\tuseEffect( () => {\n\t\tconst handleClick = async ( event ) => {\n\t\t\tif ( ! hasPageContentFocus ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( ! event.target.classList.contains( 'is-root-container' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isNoticeAlreadyShowing = getNotices().some(\n\t\t\t\t( notice ) => notice.id === lastNoticeId.current\n\t\t\t);\n\t\t\tif ( isNoticeAlreadyShowing ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { notice } = await createInfoNotice(\n\t\t\t\t__( 'Edit your template to edit this block.' ),\n\t\t\t\t{\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Edit template' ),\n\t\t\t\t\t\t\tonClick: () => setHasPageContentFocus( false ),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\t\tlastNoticeId.current = notice.id;\n\t\t};\n\n\t\tconst handleDblClick = ( event ) => {\n\t\t\tif ( ! hasPageContentFocus ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( ! event.target.classList.contains( 'is-root-container' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( lastNoticeId.current ) {\n\t\t\t\tremoveNotice( lastNoticeId.current );\n\t\t\t}\n\t\t\tsetIsDialogOpen( true );\n\t\t};\n\n\t\tconst canvas = contentRef.current;\n\t\tcanvas?.addEventListener( 'click', handleClick );\n\t\tcanvas?.addEventListener( 'dblclick', handleDblClick );\n\t\treturn () => {\n\t\t\tcanvas?.removeEventListener( 'click', handleClick );\n\t\t\tcanvas?.removeEventListener( 'dblclick', handleDblClick );\n\t\t};\n\t}, [ lastNoticeId, hasPageContentFocus, contentRef.current ] );\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isDialogOpen }\n\t\t\tconfirmButtonText={ __( 'Edit template' ) }\n\t\t\tonConfirm={ () => {\n\t\t\t\tsetIsDialogOpen( false );\n\t\t\t\tsetHasPageContentFocus( false );\n\t\t\t} }\n\t\t\tonCancel={ () => setIsDialogOpen( false ) }\n\t\t>\n\t\t\t{ __( 'Edit your template to edit this block.' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { createElement, Fragment } from "@wordpress/element";
2
+
3
+ /**
4
+ * WordPress dependencies
5
+ */
6
+ import { useSelect } from '@wordpress/data';
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+
11
+ import { store as editSiteStore } from '../../store';
12
+ import DisableNonPageContentBlocks from './disable-non-page-content-blocks';
13
+ import EditTemplateNotification from './edit-template-notification';
14
+ import BackToPageNotification from './back-to-page-notification';
15
+ export default function PageContentFocusManager({
16
+ contentRef
17
+ }) {
18
+ const hasPageContentFocus = useSelect(select => select(editSiteStore).hasPageContentFocus(), []);
19
+ return createElement(Fragment, null, hasPageContentFocus && createElement(DisableNonPageContentBlocks, null), createElement(EditTemplateNotification, {
20
+ contentRef: contentRef
21
+ }), createElement(BackToPageNotification, null));
22
+ }
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/index.js"],"names":["useSelect","store","editSiteStore","DisableNonPageContentBlocks","EditTemplateNotification","BackToPageNotification","PageContentFocusManager","contentRef","hasPageContentFocus","select"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,aAAvC;AACA,OAAOC,2BAAP,MAAwC,mCAAxC;AACA,OAAOC,wBAAP,MAAqC,8BAArC;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AAEA,eAAe,SAASC,uBAAT,CAAkC;AAAEC,EAAAA;AAAF,CAAlC,EAAmD;AACjE,QAAMC,mBAAmB,GAAGR,SAAS,CAClCS,MAAF,IAAcA,MAAM,CAAEP,aAAF,CAAN,CAAwBM,mBAAxB,EADsB,EAEpC,EAFoC,CAArC;AAIA,SACC,8BACGA,mBAAmB,IAAI,cAAC,2BAAD,OAD1B,EAEC,cAAC,wBAAD;AAA0B,IAAA,UAAU,EAAGD;AAAvC,IAFD,EAGC,cAAC,sBAAD,OAHD,CADD;AAOA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport DisableNonPageContentBlocks from './disable-non-page-content-blocks';\nimport EditTemplateNotification from './edit-template-notification';\nimport BackToPageNotification from './back-to-page-notification';\n\nexport default function PageContentFocusManager( { contentRef } ) {\n\tconst hasPageContentFocus = useSelect(\n\t\t( select ) => select( editSiteStore ).hasPageContentFocus(),\n\t\t[]\n\t);\n\treturn (\n\t\t<>\n\t\t\t{ hasPageContentFocus && <DisableNonPageContentBlocks /> }\n\t\t\t<EditTemplateNotification contentRef={ contentRef } />\n\t\t\t<BackToPageNotification />\n\t\t</>\n\t);\n}\n"]}