@wordpress/edit-site 5.16.0 → 5.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (997) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-page/index.js +3 -13
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +13 -26
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +9 -28
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +3 -10
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/new-template.js +19 -49
  13. package/build/components/add-new-template/new-template.js.map +1 -1
  14. package/build/components/add-new-template/template-actions-loading-screen.js +1 -3
  15. package/build/components/add-new-template/template-actions-loading-screen.js.map +1 -1
  16. package/build/components/add-new-template/utils.js +52 -102
  17. package/build/components/add-new-template/utils.js.map +1 -1
  18. package/build/components/app/index.js +2 -19
  19. package/build/components/app/index.js.map +1 -1
  20. package/build/components/block-editor/back-button.js +1 -11
  21. package/build/components/block-editor/back-button.js.map +1 -1
  22. package/build/components/block-editor/block-inspector-button.js +3 -14
  23. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  24. package/build/components/block-editor/constants.js.map +1 -1
  25. package/build/components/block-editor/editor-canvas.js +5 -14
  26. package/build/components/block-editor/editor-canvas.js.map +1 -1
  27. package/build/components/block-editor/get-block-editor-provider.js +0 -7
  28. package/build/components/block-editor/get-block-editor-provider.js.map +1 -1
  29. package/build/components/block-editor/index.js +10 -15
  30. package/build/components/block-editor/index.js.map +1 -1
  31. package/build/components/block-editor/inserter-media-categories.js +30 -45
  32. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  33. package/build/components/block-editor/providers/default-block-editor-provider.js +1 -10
  34. package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
  35. package/build/components/block-editor/providers/navigation-block-editor-provider.js +10 -19
  36. package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
  37. package/build/components/block-editor/resizable-editor.js +3 -8
  38. package/build/components/block-editor/resizable-editor.js.map +1 -1
  39. package/build/components/block-editor/resize-handle.js +1 -7
  40. package/build/components/block-editor/resize-handle.js.map +1 -1
  41. package/build/components/block-editor/site-editor-canvas.js +6 -22
  42. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  43. package/build/components/block-editor/use-site-editor-settings.js +11 -29
  44. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  45. package/build/components/canvas-spinner/index.js +31 -5
  46. package/build/components/canvas-spinner/index.js.map +1 -1
  47. package/build/components/code-editor/index.js +3 -18
  48. package/build/components/code-editor/index.js.map +1 -1
  49. package/build/components/create-template-part-modal/index.js +4 -19
  50. package/build/components/create-template-part-modal/index.js.map +1 -1
  51. package/build/components/editor/index.js +30 -46
  52. package/build/components/editor/index.js.map +1 -1
  53. package/build/components/editor-canvas-container/index.js +2 -28
  54. package/build/components/editor-canvas-container/index.js.map +1 -1
  55. package/build/components/error-boundary/index.js +1 -12
  56. package/build/components/error-boundary/index.js.map +1 -1
  57. package/build/components/error-boundary/warning.js +1 -7
  58. package/build/components/error-boundary/warning.js.map +1 -1
  59. package/build/components/global-styles/block-preview-panel.js +22 -13
  60. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  61. package/build/components/global-styles/color-indicator-wrapper.js +1 -6
  62. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  63. package/build/components/global-styles/color-palette-panel.js +1 -8
  64. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  65. package/build/components/global-styles/dimensions-panel.js +14 -16
  66. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  67. package/build/components/global-styles/global-styles-provider.js +1 -22
  68. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  69. package/build/components/global-styles/gradients-palette-panel.js +1 -11
  70. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  71. package/build/components/global-styles/header.js +3 -7
  72. package/build/components/global-styles/header.js.map +1 -1
  73. package/build/components/global-styles/hooks.js +26 -15
  74. package/build/components/global-styles/hooks.js.map +1 -1
  75. package/build/components/global-styles/icon-with-current-color.js +1 -5
  76. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  77. package/build/components/global-styles/index.js +0 -2
  78. package/build/components/global-styles/index.js.map +1 -1
  79. package/build/components/global-styles/navigation-button.js +3 -7
  80. package/build/components/global-styles/navigation-button.js.map +1 -1
  81. package/build/components/global-styles/palette.js +3 -15
  82. package/build/components/global-styles/palette.js.map +1 -1
  83. package/build/components/global-styles/preview.js +7 -18
  84. package/build/components/global-styles/preview.js.map +1 -1
  85. package/build/components/global-styles/root-menu.js +1 -10
  86. package/build/components/global-styles/root-menu.js.map +1 -1
  87. package/build/components/global-styles/screen-block-list.js +10 -32
  88. package/build/components/global-styles/screen-block-list.js.map +1 -1
  89. package/build/components/global-styles/screen-block.js +28 -49
  90. package/build/components/global-styles/screen-block.js.map +1 -1
  91. package/build/components/global-styles/screen-color-palette.js +1 -9
  92. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  93. package/build/components/global-styles/screen-colors.js +2 -14
  94. package/build/components/global-styles/screen-colors.js.map +1 -1
  95. package/build/components/global-styles/screen-css.js +1 -10
  96. package/build/components/global-styles/screen-css.js.map +1 -1
  97. package/build/components/global-styles/screen-layout.js +2 -13
  98. package/build/components/global-styles/screen-layout.js.map +1 -1
  99. package/build/components/global-styles/screen-revisions/index.js +7 -25
  100. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  101. package/build/components/global-styles/screen-revisions/revisions-buttons.js +20 -24
  102. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  103. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +12 -22
  104. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  105. package/build/components/global-styles/screen-root.js +2 -20
  106. package/build/components/global-styles/screen-root.js.map +1 -1
  107. package/build/components/global-styles/screen-style-variations.js +6 -15
  108. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  109. package/build/components/global-styles/screen-typography-element.js +2 -12
  110. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  111. package/build/components/global-styles/screen-typography.js +4 -17
  112. package/build/components/global-styles/screen-typography.js.map +1 -1
  113. package/build/components/global-styles/style-variations-container.js +4 -25
  114. package/build/components/global-styles/style-variations-container.js.map +1 -1
  115. package/build/components/global-styles/subtitle.js +1 -4
  116. package/build/components/global-styles/subtitle.js.map +1 -1
  117. package/build/components/global-styles/typography-panel.js +1 -7
  118. package/build/components/global-styles/typography-panel.js.map +1 -1
  119. package/build/components/global-styles/typography-preview.js +1 -7
  120. package/build/components/global-styles/typography-preview.js.map +1 -1
  121. package/build/components/global-styles/ui.js +14 -62
  122. package/build/components/global-styles/ui.js.map +1 -1
  123. package/build/components/global-styles/utils.js +0 -2
  124. package/build/components/global-styles/utils.js.map +1 -1
  125. package/build/components/global-styles/variations-panel.js +1 -9
  126. package/build/components/global-styles/variations-panel.js.map +1 -1
  127. package/build/components/global-styles-renderer/index.js +3 -11
  128. package/build/components/global-styles-renderer/index.js.map +1 -1
  129. package/build/components/header-edit-mode/document-actions/index.js +10 -51
  130. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  131. package/build/components/header-edit-mode/index.js +8 -36
  132. package/build/components/header-edit-mode/index.js.map +1 -1
  133. package/build/components/header-edit-mode/mode-switcher/index.js +2 -11
  134. package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
  135. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -14
  136. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  137. package/build/components/header-edit-mode/more-menu/index.js +2 -24
  138. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  139. package/build/components/header-edit-mode/more-menu/site-export.js +1 -14
  140. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  141. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +1 -6
  142. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  143. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -8
  144. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  145. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -4
  146. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  147. package/build/components/header-edit-mode/tools-more-menu-group/index.js +1 -5
  148. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  149. package/build/components/header-edit-mode/undo-redo/redo.js +5 -12
  150. package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  151. package/build/components/header-edit-mode/undo-redo/undo.js +5 -12
  152. package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  153. package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
  154. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  155. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -8
  156. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  157. package/build/components/keyboard-shortcut-help-modal/index.js +4 -24
  158. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  159. package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -5
  160. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  161. package/build/components/keyboard-shortcuts/edit-mode.js +3 -24
  162. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  163. package/build/components/keyboard-shortcuts/global.js +1 -9
  164. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  165. package/build/components/keyboard-shortcuts/register.js +1 -7
  166. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  167. package/build/components/layout/hooks.js +2 -9
  168. package/build/components/layout/hooks.js.map +1 -1
  169. package/build/components/layout/index.js +17 -50
  170. package/build/components/layout/index.js.map +1 -1
  171. package/build/components/list/added-by.js +10 -23
  172. package/build/components/list/added-by.js.map +1 -1
  173. package/build/components/list/header.js +1 -10
  174. package/build/components/list/header.js.map +1 -1
  175. package/build/components/list/index.js +8 -20
  176. package/build/components/list/index.js.map +1 -1
  177. package/build/components/list/table.js +5 -16
  178. package/build/components/list/table.js.map +1 -1
  179. package/build/components/list/use-register-shortcuts.js +1 -5
  180. package/build/components/list/use-register-shortcuts.js.map +1 -1
  181. package/build/components/page/header.js +1 -3
  182. package/build/components/page/header.js.map +1 -1
  183. package/build/components/page/index.js +1 -7
  184. package/build/components/page/index.js.map +1 -1
  185. package/build/components/page-actions/index.js +1 -7
  186. package/build/components/page-actions/index.js.map +1 -1
  187. package/build/components/page-actions/trash-page-menu-item.js +4 -13
  188. package/build/components/page-actions/trash-page-menu-item.js.map +1 -1
  189. package/build/components/page-content-focus-manager/back-to-page-notification.js +1 -9
  190. package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
  191. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +7 -17
  192. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  193. package/build/components/page-content-focus-manager/edit-template-notification.js +0 -16
  194. package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
  195. package/build/components/page-content-focus-manager/index.js +1 -8
  196. package/build/components/page-content-focus-manager/index.js.map +1 -1
  197. package/build/components/page-main/index.js +1 -11
  198. package/build/components/page-main/index.js.map +1 -1
  199. package/build/components/page-patterns/duplicate-menu-item.js +22 -49
  200. package/build/components/page-patterns/duplicate-menu-item.js.map +1 -1
  201. package/build/components/page-patterns/grid-item.js +12 -32
  202. package/build/components/page-patterns/grid-item.js.map +1 -1
  203. package/build/components/page-patterns/grid.js +1 -5
  204. package/build/components/page-patterns/grid.js.map +1 -1
  205. package/build/components/page-patterns/header.js +1 -11
  206. package/build/components/page-patterns/header.js.map +1 -1
  207. package/build/components/page-patterns/index.js +6 -15
  208. package/build/components/page-patterns/index.js.map +1 -1
  209. package/build/components/page-patterns/no-patterns.js +1 -3
  210. package/build/components/page-patterns/no-patterns.js.map +1 -1
  211. package/build/components/page-patterns/pagination.js +7 -7
  212. package/build/components/page-patterns/pagination.js.map +1 -1
  213. package/build/components/page-patterns/patterns-list.js +1 -23
  214. package/build/components/page-patterns/patterns-list.js.map +1 -1
  215. package/build/components/page-patterns/rename-menu-item.js +5 -14
  216. package/build/components/page-patterns/rename-menu-item.js.map +1 -1
  217. package/build/components/page-patterns/search-items.js +27 -38
  218. package/build/components/page-patterns/search-items.js.map +1 -1
  219. package/build/components/page-patterns/use-pattern-settings.js +5 -10
  220. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  221. package/build/components/page-patterns/use-patterns.js +15 -34
  222. package/build/components/page-patterns/use-patterns.js.map +1 -1
  223. package/build/components/page-patterns/utils.js +0 -2
  224. package/build/components/page-patterns/utils.js.map +1 -1
  225. package/build/components/page-template-parts/add-new-template-part.js +1 -13
  226. package/build/components/page-template-parts/add-new-template-part.js.map +1 -1
  227. package/build/components/page-template-parts/index.js +1 -13
  228. package/build/components/page-template-parts/index.js.map +1 -1
  229. package/build/components/page-templates/index.js +1 -13
  230. package/build/components/page-templates/index.js.map +1 -1
  231. package/build/components/plugin-template-setting-panel/index.js +2 -3
  232. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  233. package/build/components/preferences-modal/enable-feature.js +1 -7
  234. package/build/components/preferences-modal/enable-feature.js.map +1 -1
  235. package/build/components/preferences-modal/index.js +1 -16
  236. package/build/components/preferences-modal/index.js.map +1 -1
  237. package/build/components/resizable-frame/index.js +24 -44
  238. package/build/components/resizable-frame/index.js.map +1 -1
  239. package/build/components/revisions/index.js +5 -17
  240. package/build/components/revisions/index.js.map +1 -1
  241. package/build/components/routes/link.js +3 -14
  242. package/build/components/routes/link.js.map +1 -1
  243. package/build/components/routes/use-title.js +5 -16
  244. package/build/components/routes/use-title.js.map +1 -1
  245. package/build/components/save-button/index.js +3 -20
  246. package/build/components/save-button/index.js.map +1 -1
  247. package/build/components/save-hub/index.js +7 -29
  248. package/build/components/save-hub/index.js.map +1 -1
  249. package/build/components/save-panel/index.js +6 -28
  250. package/build/components/save-panel/index.js.map +1 -1
  251. package/build/components/secondary-sidebar/inserter-sidebar.js +1 -9
  252. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  253. package/build/components/secondary-sidebar/list-view-sidebar.js +21 -32
  254. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  255. package/build/components/sidebar/index.js +1 -25
  256. package/build/components/sidebar/index.js.map +1 -1
  257. package/build/components/sidebar-button/index.js +3 -6
  258. package/build/components/sidebar-button/index.js.map +1 -1
  259. package/build/components/sidebar-edit-mode/constants.js.map +1 -1
  260. package/build/components/sidebar-edit-mode/default-sidebar.js +2 -5
  261. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  262. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +1 -18
  263. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  264. package/build/components/sidebar-edit-mode/index.js +1 -24
  265. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  266. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +11 -20
  267. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  268. package/build/components/sidebar-edit-mode/page-panels/index.js +3 -18
  269. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  270. package/build/components/sidebar-edit-mode/page-panels/page-content.js +1 -6
  271. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  272. package/build/components/sidebar-edit-mode/page-panels/page-status.js +3 -20
  273. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  274. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +1 -6
  275. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  276. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +3 -15
  277. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
  278. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -5
  279. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  280. package/build/components/sidebar-edit-mode/settings-header/index.js +14 -25
  281. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  282. package/build/components/sidebar-edit-mode/sidebar-card/index.js +1 -5
  283. package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
  284. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -5
  285. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  286. package/build/components/sidebar-edit-mode/template-panel/index.js +1 -21
  287. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  288. package/build/components/sidebar-edit-mode/template-panel/last-revision.js +2 -17
  289. package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
  290. package/build/components/sidebar-edit-mode/template-panel/template-actions.js +1 -11
  291. package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  292. package/build/components/sidebar-edit-mode/template-panel/template-areas.js +1 -15
  293. package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
  294. package/build/components/sidebar-navigation-item/index.js +1 -7
  295. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  296. package/build/components/sidebar-navigation-screen/index.js +2 -19
  297. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  298. package/build/components/sidebar-navigation-screen-details-footer/index.js +2 -7
  299. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  300. package/build/components/sidebar-navigation-screen-details-panel/index.js +1 -7
  301. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  302. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +1 -3
  303. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  304. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -5
  305. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  306. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +1 -3
  307. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  308. package/build/components/sidebar-navigation-screen-global-styles/index.js +19 -48
  309. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  310. package/build/components/sidebar-navigation-screen-main/index.js +3 -14
  311. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  312. package/build/components/sidebar-navigation-screen-main/template-part-hint.js +1 -10
  313. package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
  314. package/build/components/sidebar-navigation-screen-navigation-item/index.js +1 -13
  315. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  316. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +3 -5
  317. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  318. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +3 -8
  319. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
  320. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +5 -25
  321. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  322. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -16
  323. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  324. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -13
  325. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  326. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -8
  327. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  328. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -10
  329. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  330. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +12 -33
  331. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  332. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +3 -6
  333. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  334. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  335. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +14 -35
  336. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  337. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -19
  338. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  339. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -14
  340. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  341. package/build/components/sidebar-navigation-screen-page/index.js +6 -23
  342. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  343. package/build/components/sidebar-navigation-screen-page/page-details.js +9 -32
  344. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  345. package/build/components/sidebar-navigation-screen-page/status-label.js +3 -17
  346. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  347. package/build/components/sidebar-navigation-screen-pages/index.js +6 -31
  348. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  349. package/build/components/sidebar-navigation-screen-pattern/index.js +11 -25
  350. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  351. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -7
  352. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  353. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +1 -5
  354. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  355. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -7
  356. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  357. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +5 -10
  358. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  359. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +5 -22
  360. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  361. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +7 -29
  362. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  363. package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -8
  364. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  365. package/build/components/sidebar-navigation-screen-patterns/index.js +4 -22
  366. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  367. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -6
  368. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  369. package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js +1 -5
  370. package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
  371. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -12
  372. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  373. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +6 -8
  374. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  375. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -8
  376. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  377. package/build/components/sidebar-navigation-screen-template/home-template-details.js +7 -31
  378. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  379. package/build/components/sidebar-navigation-screen-template/index.js +1 -20
  380. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  381. package/build/components/sidebar-navigation-screen-templates/index.js +4 -16
  382. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  383. package/build/components/sidebar-navigation-screen-templates-browse/index.js +1 -9
  384. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  385. package/build/components/site-hub/index.js +4 -21
  386. package/build/components/site-hub/index.js.map +1 -1
  387. package/build/components/site-icon/index.js +1 -12
  388. package/build/components/site-icon/index.js.map +1 -1
  389. package/build/components/start-template-options/index.js +3 -26
  390. package/build/components/start-template-options/index.js.map +1 -1
  391. package/build/components/style-book/index.js +23 -34
  392. package/build/components/style-book/index.js.map +1 -1
  393. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -25
  394. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  395. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +5 -13
  396. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  397. package/build/components/sync-state-with-url/use-sync-path-with-url.js +9 -19
  398. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  399. package/build/components/table/index.js +0 -2
  400. package/build/components/table/index.js.map +1 -1
  401. package/build/components/template-actions/index.js +2 -21
  402. package/build/components/template-actions/index.js.map +1 -1
  403. package/build/components/template-actions/rename-menu-item.js +7 -15
  404. package/build/components/template-actions/rename-menu-item.js.map +1 -1
  405. package/build/components/template-part-converter/convert-to-regular.js +1 -8
  406. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  407. package/build/components/template-part-converter/convert-to-template-part.js +7 -16
  408. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  409. package/build/components/template-part-converter/index.js +3 -10
  410. package/build/components/template-part-converter/index.js.map +1 -1
  411. package/build/components/use-edited-entity-record/index.js +2 -15
  412. package/build/components/use-edited-entity-record/index.js.map +1 -1
  413. package/build/components/welcome-guide/editor.js +1 -10
  414. package/build/components/welcome-guide/editor.js.map +1 -1
  415. package/build/components/welcome-guide/image.js +0 -2
  416. package/build/components/welcome-guide/image.js.map +1 -1
  417. package/build/components/welcome-guide/index.js +1 -7
  418. package/build/components/welcome-guide/index.js.map +1 -1
  419. package/build/components/welcome-guide/page.js +1 -9
  420. package/build/components/welcome-guide/page.js.map +1 -1
  421. package/build/components/welcome-guide/styles.js +1 -12
  422. package/build/components/welcome-guide/styles.js.map +1 -1
  423. package/build/components/welcome-guide/template.js +1 -9
  424. package/build/components/welcome-guide/template.js.map +1 -1
  425. package/build/hooks/commands/use-common-commands.js +132 -122
  426. package/build/hooks/commands/use-common-commands.js.map +1 -1
  427. package/build/hooks/commands/use-edit-mode-commands.js +68 -65
  428. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  429. package/build/hooks/components.js +1 -2
  430. package/build/hooks/components.js.map +1 -1
  431. package/build/hooks/index.js +0 -3
  432. package/build/hooks/index.js.map +1 -1
  433. package/build/hooks/navigation-menu-edit.js +11 -24
  434. package/build/hooks/navigation-menu-edit.js.map +1 -1
  435. package/build/hooks/push-changes-to-global-styles/index.js +161 -69
  436. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  437. package/build/hooks/template-part-edit.js +7 -19
  438. package/build/hooks/template-part-edit.js.map +1 -1
  439. package/build/index.js +8 -31
  440. package/build/index.js.map +1 -1
  441. package/build/lock-unlock.js +1 -2
  442. package/build/lock-unlock.js.map +1 -1
  443. package/build/store/actions.js +33 -98
  444. package/build/store/actions.js.map +1 -1
  445. package/build/store/constants.js +0 -1
  446. package/build/store/constants.js.map +1 -1
  447. package/build/store/index.js +1 -12
  448. package/build/store/index.js.map +1 -1
  449. package/build/store/private-actions.js +5 -13
  450. package/build/store/private-actions.js.map +1 -1
  451. package/build/store/private-selectors.js +1 -3
  452. package/build/store/private-selectors.js.map +1 -1
  453. package/build/store/reducer.js +12 -38
  454. package/build/store/reducer.js.map +1 -1
  455. package/build/store/selectors.js +23 -60
  456. package/build/store/selectors.js.map +1 -1
  457. package/build/store/utils.js +13 -16
  458. package/build/store/utils.js.map +1 -1
  459. package/build/utils/get-is-list-page.js +2 -2
  460. package/build/utils/get-is-list-page.js.map +1 -1
  461. package/build/utils/is-previewing-theme.js +1 -4
  462. package/build/utils/is-previewing-theme.js.map +1 -1
  463. package/build/utils/is-template-removable.js +0 -2
  464. package/build/utils/is-template-removable.js.map +1 -1
  465. package/build/utils/is-template-revertable.js +0 -3
  466. package/build/utils/is-template-revertable.js.map +1 -1
  467. package/build/utils/template-part-create.js +3 -15
  468. package/build/utils/template-part-create.js.map +1 -1
  469. package/build/utils/use-activate-theme.js +2 -5
  470. package/build/utils/use-activate-theme.js.map +1 -1
  471. package/build/utils/use-debounced-input.js +1 -3
  472. package/build/utils/use-debounced-input.js.map +1 -1
  473. package/build-module/components/add-new-page/index.js +2 -7
  474. package/build-module/components/add-new-page/index.js.map +1 -1
  475. package/build-module/components/add-new-pattern/index.js +12 -13
  476. package/build-module/components/add-new-pattern/index.js.map +1 -1
  477. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
  478. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  479. package/build-module/components/add-new-template/add-custom-template-modal-content.js +9 -21
  480. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  481. package/build-module/components/add-new-template/index.js +3 -6
  482. package/build-module/components/add-new-template/index.js.map +1 -1
  483. package/build-module/components/add-new-template/new-template.js +20 -34
  484. package/build-module/components/add-new-template/new-template.js.map +1 -1
  485. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -1
  486. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +1 -1
  487. package/build-module/components/add-new-template/utils.js +52 -82
  488. package/build-module/components/add-new-template/utils.js.map +1 -1
  489. package/build-module/components/app/index.js +2 -6
  490. package/build-module/components/app/index.js.map +1 -1
  491. package/build-module/components/block-editor/back-button.js +1 -6
  492. package/build-module/components/block-editor/back-button.js.map +1 -1
  493. package/build-module/components/block-editor/block-inspector-button.js +3 -5
  494. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  495. package/build-module/components/block-editor/constants.js.map +1 -1
  496. package/build-module/components/block-editor/editor-canvas.js +6 -8
  497. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  498. package/build-module/components/block-editor/get-block-editor-provider.js +1 -4
  499. package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -1
  500. package/build-module/components/block-editor/index.js +10 -6
  501. package/build-module/components/block-editor/index.js.map +1 -1
  502. package/build-module/components/block-editor/inserter-media-categories.js +31 -41
  503. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  504. package/build-module/components/block-editor/providers/default-block-editor-provider.js +1 -2
  505. package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
  506. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +10 -11
  507. package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
  508. package/build-module/components/block-editor/resizable-editor.js +5 -6
  509. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  510. package/build-module/components/block-editor/resize-handle.js +0 -3
  511. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  512. package/build-module/components/block-editor/site-editor-canvas.js +5 -8
  513. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  514. package/build-module/components/block-editor/use-site-editor-settings.js +10 -23
  515. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  516. package/build-module/components/canvas-spinner/index.js +31 -4
  517. package/build-module/components/canvas-spinner/index.js.map +1 -1
  518. package/build-module/components/code-editor/index.js +4 -9
  519. package/build-module/components/code-editor/index.js.map +1 -1
  520. package/build-module/components/create-template-part-modal/index.js +4 -8
  521. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  522. package/build-module/components/editor/index.js +31 -21
  523. package/build-module/components/editor/index.js.map +1 -1
  524. package/build-module/components/editor-canvas-container/index.js +4 -18
  525. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  526. package/build-module/components/error-boundary/index.js +1 -7
  527. package/build-module/components/error-boundary/index.js.map +1 -1
  528. package/build-module/components/error-boundary/warning.js +0 -3
  529. package/build-module/components/error-boundary/warning.js.map +1 -1
  530. package/build-module/components/global-styles/block-preview-panel.js +22 -10
  531. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  532. package/build-module/components/global-styles/color-indicator-wrapper.js +1 -4
  533. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  534. package/build-module/components/global-styles/color-palette-panel.js +1 -2
  535. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  536. package/build-module/components/global-styles/dimensions-panel.js +14 -13
  537. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  538. package/build-module/components/global-styles/global-styles-provider.js +2 -15
  539. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  540. package/build-module/components/global-styles/gradients-palette-panel.js +1 -4
  541. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  542. package/build-module/components/global-styles/header.js +2 -4
  543. package/build-module/components/global-styles/header.js.map +1 -1
  544. package/build-module/components/global-styles/hooks.js +26 -7
  545. package/build-module/components/global-styles/hooks.js.map +1 -1
  546. package/build-module/components/global-styles/icon-with-current-color.js +1 -2
  547. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  548. package/build-module/components/global-styles/index.js.map +1 -1
  549. package/build-module/components/global-styles/navigation-button.js +3 -7
  550. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  551. package/build-module/components/global-styles/palette.js +3 -5
  552. package/build-module/components/global-styles/palette.js.map +1 -1
  553. package/build-module/components/global-styles/preview.js +7 -14
  554. package/build-module/components/global-styles/preview.js.map +1 -1
  555. package/build-module/components/global-styles/root-menu.js +1 -4
  556. package/build-module/components/global-styles/root-menu.js.map +1 -1
  557. package/build-module/components/global-styles/screen-block-list.js +10 -20
  558. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  559. package/build-module/components/global-styles/screen-block.js +28 -38
  560. package/build-module/components/global-styles/screen-block.js.map +1 -1
  561. package/build-module/components/global-styles/screen-color-palette.js +1 -4
  562. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  563. package/build-module/components/global-styles/screen-colors.js +2 -6
  564. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  565. package/build-module/components/global-styles/screen-css.js +1 -5
  566. package/build-module/components/global-styles/screen-css.js.map +1 -1
  567. package/build-module/components/global-styles/screen-layout.js +2 -6
  568. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  569. package/build-module/components/global-styles/screen-revisions/index.js +7 -13
  570. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  571. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +22 -22
  572. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  573. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +12 -16
  574. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  575. package/build-module/components/global-styles/screen-root.js +2 -9
  576. package/build-module/components/global-styles/screen-root.js.map +1 -1
  577. package/build-module/components/global-styles/screen-style-variations.js +6 -9
  578. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  579. package/build-module/components/global-styles/screen-typography-element.js +2 -6
  580. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  581. package/build-module/components/global-styles/screen-typography.js +4 -8
  582. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  583. package/build-module/components/global-styles/style-variations-container.js +5 -15
  584. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  585. package/build-module/components/global-styles/subtitle.js +0 -3
  586. package/build-module/components/global-styles/subtitle.js.map +1 -1
  587. package/build-module/components/global-styles/typography-panel.js +1 -4
  588. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  589. package/build-module/components/global-styles/typography-preview.js +1 -4
  590. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  591. package/build-module/components/global-styles/ui.js +15 -37
  592. package/build-module/components/global-styles/ui.js.map +1 -1
  593. package/build-module/components/global-styles/utils.js +0 -1
  594. package/build-module/components/global-styles/utils.js.map +1 -1
  595. package/build-module/components/global-styles/variations-panel.js +0 -4
  596. package/build-module/components/global-styles/variations-panel.js.map +1 -1
  597. package/build-module/components/global-styles-renderer/index.js +3 -6
  598. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  599. package/build-module/components/header-edit-mode/document-actions/index.js +12 -41
  600. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  601. package/build-module/components/header-edit-mode/index.js +9 -18
  602. package/build-module/components/header-edit-mode/index.js.map +1 -1
  603. package/build-module/components/header-edit-mode/mode-switcher/index.js +4 -7
  604. package/build-module/components/header-edit-mode/mode-switcher/index.js.map +1 -1
  605. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -6
  606. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  607. package/build-module/components/header-edit-mode/more-menu/index.js +2 -6
  608. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  609. package/build-module/components/header-edit-mode/more-menu/site-export.js +1 -6
  610. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  611. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +0 -1
  612. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  613. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +1 -2
  614. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  615. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -2
  616. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  617. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -3
  618. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  619. package/build-module/components/header-edit-mode/undo-redo/redo.js +4 -5
  620. package/build-module/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  621. package/build-module/components/header-edit-mode/undo-redo/undo.js +4 -5
  622. package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  623. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  624. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -4
  625. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  626. package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -15
  627. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  628. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -4
  629. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  630. package/build-module/components/keyboard-shortcuts/edit-mode.js +3 -13
  631. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  632. package/build-module/components/keyboard-shortcuts/global.js +1 -6
  633. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  634. package/build-module/components/keyboard-shortcuts/register.js +0 -2
  635. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  636. package/build-module/components/layout/hooks.js +2 -4
  637. package/build-module/components/layout/hooks.js.map +1 -1
  638. package/build-module/components/layout/index.js +19 -20
  639. package/build-module/components/layout/index.js.map +1 -1
  640. package/build-module/components/list/added-by.js +12 -15
  641. package/build-module/components/list/added-by.js.map +1 -1
  642. package/build-module/components/list/header.js +1 -4
  643. package/build-module/components/list/header.js.map +1 -1
  644. package/build-module/components/list/index.js +8 -6
  645. package/build-module/components/list/index.js.map +1 -1
  646. package/build-module/components/list/table.js +5 -7
  647. package/build-module/components/list/table.js.map +1 -1
  648. package/build-module/components/list/use-register-shortcuts.js +1 -0
  649. package/build-module/components/list/use-register-shortcuts.js.map +1 -1
  650. package/build-module/components/page/header.js +1 -1
  651. package/build-module/components/page/header.js.map +1 -1
  652. package/build-module/components/page/index.js +2 -3
  653. package/build-module/components/page/index.js.map +1 -1
  654. package/build-module/components/page-actions/index.js +1 -2
  655. package/build-module/components/page-actions/index.js.map +1 -1
  656. package/build-module/components/page-actions/trash-page-menu-item.js +3 -6
  657. package/build-module/components/page-actions/trash-page-menu-item.js.map +1 -1
  658. package/build-module/components/page-content-focus-manager/back-to-page-notification.js +3 -4
  659. package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
  660. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +6 -9
  661. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  662. package/build-module/components/page-content-focus-manager/edit-template-notification.js +2 -12
  663. package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
  664. package/build-module/components/page-content-focus-manager/index.js +1 -2
  665. package/build-module/components/page-content-focus-manager/index.js.map +1 -1
  666. package/build-module/components/page-main/index.js +1 -4
  667. package/build-module/components/page-main/index.js.map +1 -1
  668. package/build-module/components/page-patterns/duplicate-menu-item.js +22 -40
  669. package/build-module/components/page-patterns/duplicate-menu-item.js.map +1 -1
  670. package/build-module/components/page-patterns/grid-item.js +13 -18
  671. package/build-module/components/page-patterns/grid-item.js.map +1 -1
  672. package/build-module/components/page-patterns/grid.js +0 -2
  673. package/build-module/components/page-patterns/grid.js.map +1 -1
  674. package/build-module/components/page-patterns/header.js +1 -4
  675. package/build-module/components/page-patterns/header.js.map +1 -1
  676. package/build-module/components/page-patterns/index.js +6 -5
  677. package/build-module/components/page-patterns/index.js.map +1 -1
  678. package/build-module/components/page-patterns/no-patterns.js +0 -1
  679. package/build-module/components/page-patterns/no-patterns.js.map +1 -1
  680. package/build-module/components/page-patterns/pagination.js +6 -4
  681. package/build-module/components/page-patterns/pagination.js.map +1 -1
  682. package/build-module/components/page-patterns/patterns-list.js +1 -7
  683. package/build-module/components/page-patterns/patterns-list.js.map +1 -1
  684. package/build-module/components/page-patterns/rename-menu-item.js +5 -8
  685. package/build-module/components/page-patterns/rename-menu-item.js.map +1 -1
  686. package/build-module/components/page-patterns/search-items.js +28 -32
  687. package/build-module/components/page-patterns/search-items.js.map +1 -1
  688. package/build-module/components/page-patterns/use-pattern-settings.js +5 -4
  689. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  690. package/build-module/components/page-patterns/use-patterns.js +15 -24
  691. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  692. package/build-module/components/page-patterns/utils.js.map +1 -1
  693. package/build-module/components/page-template-parts/add-new-template-part.js +1 -4
  694. package/build-module/components/page-template-parts/add-new-template-part.js.map +1 -1
  695. package/build-module/components/page-template-parts/index.js +1 -2
  696. package/build-module/components/page-template-parts/index.js.map +1 -1
  697. package/build-module/components/page-templates/index.js +1 -2
  698. package/build-module/components/page-templates/index.js.map +1 -1
  699. package/build-module/components/plugin-template-setting-panel/index.js +1 -1
  700. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  701. package/build-module/components/preferences-modal/enable-feature.js +0 -3
  702. package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
  703. package/build-module/components/preferences-modal/index.js +1 -8
  704. package/build-module/components/preferences-modal/index.js.map +1 -1
  705. package/build-module/components/resizable-frame/index.js +27 -38
  706. package/build-module/components/resizable-frame/index.js.map +1 -1
  707. package/build-module/components/revisions/index.js +5 -7
  708. package/build-module/components/revisions/index.js.map +1 -1
  709. package/build-module/components/routes/link.js +3 -8
  710. package/build-module/components/routes/link.js.map +1 -1
  711. package/build-module/components/routes/use-title.js +5 -7
  712. package/build-module/components/routes/use-title.js.map +1 -1
  713. package/build-module/components/save-button/index.js +3 -13
  714. package/build-module/components/save-button/index.js.map +1 -1
  715. package/build-module/components/save-hub/index.js +7 -16
  716. package/build-module/components/save-hub/index.js.map +1 -1
  717. package/build-module/components/save-panel/index.js +7 -17
  718. package/build-module/components/save-panel/index.js.map +1 -1
  719. package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
  720. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  721. package/build-module/components/secondary-sidebar/list-view-sidebar.js +21 -19
  722. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  723. package/build-module/components/sidebar/index.js +1 -5
  724. package/build-module/components/sidebar/index.js.map +1 -1
  725. package/build-module/components/sidebar-button/index.js +3 -3
  726. package/build-module/components/sidebar-button/index.js.map +1 -1
  727. package/build-module/components/sidebar-edit-mode/constants.js.map +1 -1
  728. package/build-module/components/sidebar-edit-mode/default-sidebar.js +2 -2
  729. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  730. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +1 -6
  731. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  732. package/build-module/components/sidebar-edit-mode/index.js +1 -7
  733. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  734. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +11 -13
  735. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  736. package/build-module/components/sidebar-edit-mode/page-panels/index.js +3 -5
  737. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  738. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +1 -2
  739. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  740. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +2 -11
  741. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  742. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +0 -2
  743. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  744. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +2 -7
  745. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
  746. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -3
  747. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  748. package/build-module/components/sidebar-edit-mode/settings-header/index.js +15 -17
  749. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  750. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +1 -2
  751. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
  752. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -2
  753. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  754. package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -7
  755. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  756. package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js +2 -11
  757. package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
  758. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +1 -4
  759. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  760. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +1 -10
  761. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
  762. package/build-module/components/sidebar-navigation-item/index.js +1 -2
  763. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  764. package/build-module/components/sidebar-navigation-screen/index.js +3 -7
  765. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  766. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -4
  767. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  768. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -4
  769. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  770. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -1
  771. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  772. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -2
  773. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  774. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -1
  775. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  776. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +19 -30
  777. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  778. package/build-module/components/sidebar-navigation-screen-main/index.js +3 -3
  779. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  780. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +0 -4
  781. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
  782. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -2
  783. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  784. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +2 -2
  785. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  786. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +2 -3
  787. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
  788. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +5 -13
  789. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  790. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -9
  791. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  792. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -7
  793. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  794. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +2 -6
  795. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  796. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -2
  797. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  798. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +11 -28
  799. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  800. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
  801. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  802. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  803. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +16 -20
  804. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  805. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -9
  806. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  807. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -6
  808. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  809. package/build-module/components/sidebar-navigation-screen-page/index.js +6 -6
  810. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  811. package/build-module/components/sidebar-navigation-screen-page/page-details.js +11 -22
  812. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  813. package/build-module/components/sidebar-navigation-screen-page/status-label.js +3 -13
  814. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  815. package/build-module/components/sidebar-navigation-screen-pages/index.js +6 -17
  816. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  817. package/build-module/components/sidebar-navigation-screen-pattern/index.js +11 -12
  818. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  819. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -2
  820. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  821. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -2
  822. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  823. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -2
  824. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  825. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +4 -5
  826. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  827. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +7 -19
  828. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  829. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +8 -18
  830. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  831. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -4
  832. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  833. package/build-module/components/sidebar-navigation-screen-patterns/index.js +4 -7
  834. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  835. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -2
  836. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  837. package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js +0 -1
  838. package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
  839. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -7
  840. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  841. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +5 -5
  842. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  843. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -2
  844. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  845. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +7 -18
  846. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  847. package/build-module/components/sidebar-navigation-screen-template/index.js +0 -6
  848. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  849. package/build-module/components/sidebar-navigation-screen-templates/index.js +4 -6
  850. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  851. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +1 -2
  852. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  853. package/build-module/components/site-hub/index.js +5 -7
  854. package/build-module/components/site-hub/index.js.map +1 -1
  855. package/build-module/components/site-icon/index.js +1 -6
  856. package/build-module/components/site-icon/index.js.map +1 -1
  857. package/build-module/components/start-template-options/index.js +3 -14
  858. package/build-module/components/start-template-options/index.js.map +1 -1
  859. package/build-module/components/style-book/index.js +24 -24
  860. package/build-module/components/style-book/index.js.map +1 -1
  861. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -15
  862. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  863. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +5 -7
  864. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  865. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +9 -14
  866. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  867. package/build-module/components/table/index.js.map +1 -1
  868. package/build-module/components/template-actions/index.js +2 -9
  869. package/build-module/components/template-actions/index.js.map +1 -1
  870. package/build-module/components/template-actions/rename-menu-item.js +6 -8
  871. package/build-module/components/template-actions/rename-menu-item.js.map +1 -1
  872. package/build-module/components/template-part-converter/convert-to-regular.js +0 -3
  873. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  874. package/build-module/components/template-part-converter/convert-to-template-part.js +7 -6
  875. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  876. package/build-module/components/template-part-converter/index.js +3 -5
  877. package/build-module/components/template-part-converter/index.js.map +1 -1
  878. package/build-module/components/use-edited-entity-record/index.js +2 -7
  879. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  880. package/build-module/components/welcome-guide/editor.js +1 -4
  881. package/build-module/components/welcome-guide/editor.js.map +1 -1
  882. package/build-module/components/welcome-guide/image.js.map +1 -1
  883. package/build-module/components/welcome-guide/index.js +0 -1
  884. package/build-module/components/welcome-guide/index.js.map +1 -1
  885. package/build-module/components/welcome-guide/page.js +1 -5
  886. package/build-module/components/welcome-guide/page.js.map +1 -1
  887. package/build-module/components/welcome-guide/styles.js +1 -5
  888. package/build-module/components/welcome-guide/styles.js.map +1 -1
  889. package/build-module/components/welcome-guide/template.js +1 -5
  890. package/build-module/components/welcome-guide/template.js.map +1 -1
  891. package/build-module/hooks/commands/use-common-commands.js +133 -108
  892. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  893. package/build-module/hooks/commands/use-edit-mode-commands.js +69 -49
  894. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  895. package/build-module/hooks/components.js.map +1 -1
  896. package/build-module/hooks/index.js.map +1 -1
  897. package/build-module/hooks/navigation-menu-edit.js +11 -14
  898. package/build-module/hooks/navigation-menu-edit.js.map +1 -1
  899. package/build-module/hooks/push-changes-to-global-styles/index.js +162 -61
  900. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  901. package/build-module/hooks/template-part-edit.js +7 -9
  902. package/build-module/hooks/template-part-edit.js.map +1 -1
  903. package/build-module/index.js +10 -15
  904. package/build-module/index.js.map +1 -1
  905. package/build-module/lock-unlock.js.map +1 -1
  906. package/build-module/store/actions.js +35 -53
  907. package/build-module/store/actions.js.map +1 -1
  908. package/build-module/store/constants.js.map +1 -1
  909. package/build-module/store/index.js +1 -1
  910. package/build-module/store/index.js.map +1 -1
  911. package/build-module/store/private-actions.js +6 -8
  912. package/build-module/store/private-actions.js.map +1 -1
  913. package/build-module/store/private-selectors.js +1 -1
  914. package/build-module/store/private-selectors.js.map +1 -1
  915. package/build-module/store/reducer.js +13 -29
  916. package/build-module/store/reducer.js.map +1 -1
  917. package/build-module/store/selectors.js +26 -31
  918. package/build-module/store/selectors.js.map +1 -1
  919. package/build-module/store/utils.js +13 -13
  920. package/build-module/store/utils.js.map +1 -1
  921. package/build-module/utils/get-is-list-page.js +2 -1
  922. package/build-module/utils/get-is-list-page.js.map +1 -1
  923. package/build-module/utils/is-previewing-theme.js +0 -1
  924. package/build-module/utils/is-previewing-theme.js.map +1 -1
  925. package/build-module/utils/is-template-removable.js +0 -1
  926. package/build-module/utils/is-template-removable.js.map +1 -1
  927. package/build-module/utils/is-template-revertable.js +0 -2
  928. package/build-module/utils/is-template-revertable.js.map +1 -1
  929. package/build-module/utils/template-part-create.js +3 -7
  930. package/build-module/utils/template-part-create.js.map +1 -1
  931. package/build-module/utils/use-activate-theme.js +2 -2
  932. package/build-module/utils/use-activate-theme.js.map +1 -1
  933. package/build-module/utils/use-debounced-input.js.map +1 -1
  934. package/build-style/style-rtl.css +37 -27
  935. package/build-style/style.css +37 -27
  936. package/package.json +41 -40
  937. package/src/components/add-new-pattern/index.js +4 -3
  938. package/src/components/block-editor/index.js +4 -3
  939. package/src/components/block-editor/providers/navigation-block-editor-provider.js +2 -3
  940. package/src/components/canvas-spinner/index.js +21 -3
  941. package/src/components/canvas-spinner/style.scss +5 -2
  942. package/src/components/editor/index.js +15 -1
  943. package/src/components/global-styles/block-preview-panel.js +26 -15
  944. package/src/components/global-styles/hooks.js +27 -1
  945. package/src/components/global-styles/preview.js +3 -13
  946. package/src/components/global-styles/screen-colors.js +0 -4
  947. package/src/components/global-styles/screen-layout.js +0 -2
  948. package/src/components/global-styles/screen-revisions/index.js +6 -4
  949. package/src/components/global-styles/screen-revisions/revisions-buttons.js +46 -21
  950. package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +10 -0
  951. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +6 -0
  952. package/src/components/global-styles/screen-typography.js +0 -4
  953. package/src/components/global-styles/ui.js +1 -1
  954. package/src/components/header-edit-mode/document-actions/index.js +13 -26
  955. package/src/components/header-edit-mode/document-actions/style.scss +17 -4
  956. package/src/components/header-edit-mode/index.js +1 -1
  957. package/src/components/header-edit-mode/style.scss +0 -9
  958. package/src/components/layout/index.js +5 -2
  959. package/src/components/page-actions/trash-page-menu-item.js +5 -1
  960. package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -4
  961. package/src/components/page-patterns/duplicate-menu-item.js +18 -39
  962. package/src/components/page-patterns/use-patterns.js +9 -3
  963. package/src/components/sidebar-edit-mode/default-sidebar.js +1 -0
  964. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +13 -5
  965. package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  966. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +3 -4
  967. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -1
  968. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +11 -10
  969. package/src/components/sidebar-navigation-screen-page/index.js +3 -3
  970. package/src/components/sidebar-navigation-screen-pages/index.js +1 -1
  971. package/src/components/sidebar-navigation-screen-pattern/index.js +2 -5
  972. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -3
  973. package/src/components/sidebar-navigation-screen-patterns/index.js +1 -1
  974. package/src/components/sidebar-navigation-screen-template/home-template-details.js +4 -2
  975. package/src/components/sidebar-navigation-screen-templates/index.js +1 -1
  976. package/src/components/site-hub/index.js +1 -1
  977. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -8
  978. package/src/components/template-actions/index.js +1 -5
  979. package/src/components/template-part-converter/convert-to-template-part.js +2 -0
  980. package/src/components/use-edited-entity-record/index.js +1 -6
  981. package/src/hooks/commands/use-common-commands.js +153 -72
  982. package/src/hooks/commands/use-edit-mode-commands.js +61 -19
  983. package/src/hooks/navigation-menu-edit.js +1 -5
  984. package/src/hooks/push-changes-to-global-styles/index.js +163 -28
  985. package/src/style.scss +0 -1
  986. package/build/components/create-pattern-modal/index.js +0 -129
  987. package/build/components/create-pattern-modal/index.js.map +0 -1
  988. package/build/utils/normalize-record-key.js +0 -19
  989. package/build/utils/normalize-record-key.js.map +0 -1
  990. package/build-module/components/create-pattern-modal/index.js +0 -116
  991. package/build-module/components/create-pattern-modal/index.js.map +0 -1
  992. package/build-module/utils/normalize-record-key.js +0 -12
  993. package/build-module/utils/normalize-record-key.js.map +0 -1
  994. package/src/components/create-pattern-modal/index.js +0 -136
  995. package/src/components/create-pattern-modal/style.scss +0 -3
  996. package/src/utils/normalize-record-key.js +0 -11
  997. /package/src/components/global-styles/stories/{index.js → index.story.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/list/index.js"],"names":["useLocation","routerPrivateApis","List","params","path","templateType","previousShortcut","nextShortcut","select","keyboardShortcutsStore","getAllShortcutKeyCombinations","postType","coreStore","getPostType","labels","name","itemsListLabel","items_list","detailedRegionLabels","header","body","undefined","previous","next"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAlBA;AACA;AACA;;AASA;AACA;AACA;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAkB,wBAAQC,mBAAR,CAAxB;;AAEe,SAASC,IAAT,GAAgB;AAC9B,QAAM;AACLC,IAAAA,MAAM,EAAE;AAAEC,MAAAA;AAAF;AADH,MAEFJ,WAAW,EAFf;AAGA,QAAMK,YAAY,GACjBD,IAAI,KAAK,kBAAT,GAA8B,aAA9B,GAA8C,kBAD/C;AAGA;AAEA,QAAM;AAAEE,IAAAA,gBAAF;AAAoBC,IAAAA;AAApB,MAAqC,qBAAaC,MAAF,IAAc;AACnE,WAAO;AACNF,MAAAA,gBAAgB,EAAEE,MAAM,CACvBC,wBADuB,CAAN,CAEhBC,6BAFgB,CAEe,gCAFf,CADZ;AAINH,MAAAA,YAAY,EAAEC,MAAM,CACnBC,wBADmB,CAAN,CAEZC,6BAFY,CAEmB,4BAFnB;AAJR,KAAP;AAQA,GAT0C,EASxC,EATwC,CAA3C;AAWA,QAAMC,QAAQ,GAAG,qBACdH,MAAF,IAAcA,MAAM,CAAEI,eAAF,CAAN,CAAoBC,WAApB,CAAiCR,YAAjC,CADE,EAEhB,CAAEA,YAAF,CAFgB,CAAjB;AAKA,yBAAUM,QAAQ,EAAEG,MAAV,EAAkBC,IAA5B,EAzB8B,CA2B9B;AACA;;AACA,QAAMC,cAAc,GAAGL,QAAQ,EAAEG,MAAV,EAAkBG,UAAzC;AACA,QAAMC,oBAAoB,GAAGP,QAAQ,GAClC;AACAQ,IAAAA,MAAM,EAAE,oBACP;AACA,kBAAI,aAAJ,CAFO,EAGPH,cAHO,CADR;AAMAI,IAAAA,IAAI,EAAE,oBACL;AACA,kBAAI,cAAJ,CAFK,EAGLJ,cAHK;AANN,GADkC,GAalCK,SAbH;AAeA,SACC,4BAAC,4BAAD;AACC,IAAA,SAAS,EAAC,gBADX;AAEC,IAAA,MAAM,EAAGH,oBAFV;AAGC,IAAA,MAAM,EAAG,4BAAC,eAAD;AAAQ,MAAA,YAAY,EAAGb;AAAvB,MAHV;AAIC,IAAA,OAAO,EAAG,4BAAC,uBAAD,OAJX;AAKC,IAAA,OAAO,EAAG,4BAAC,cAAD;AAAO,MAAA,YAAY,EAAGA;AAAtB,MALX;AAMC,IAAA,SAAS,EAAG;AACXiB,MAAAA,QAAQ,EAAEhB,gBADC;AAEXiB,MAAAA,IAAI,EAAEhB;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"]}
1
+ {"version":3,"names":["_coreData","require","_data","_interface","_i18n","_keyboardShortcuts","_editor","_router","_useRegisterShortcuts","_interopRequireDefault","_header","_table","_useTitle","_lockUnlock","useLocation","unlock","routerPrivateApis","List","params","path","templateType","useRegisterShortcuts","previousShortcut","nextShortcut","useSelect","select","keyboardShortcutsStore","getAllShortcutKeyCombinations","postType","coreStore","getPostType","useTitle","labels","name","itemsListLabel","items_list","detailedRegionLabels","header","sprintf","__","body","undefined","_element","createElement","InterfaceSkeleton","className","default","notices","EditorSnackbars","content","shortcuts","previous","next"],"sources":["@wordpress/edit-site/src/components/list/index.js"],"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"],"mappings":";;;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAKA,IAAAO,qBAAA,GAAAC,sBAA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;IACDM,IAAI,EAAE,IAAAF,aAAO;IACZ;IACA,IAAAC,QAAE,EAAE,cAAe,CAAC,EACpBL,cACD;EACA,CAAC,GACDO,SAAS;EAEZ,OACC,IAAAC,QAAA,CAAAC,aAAA,EAACxC,UAAA,CAAAyC,iBAAiB;IACjBC,SAAS,EAAC,gBAAgB;IAC1Bb,MAAM,EAAGI,oBAAsB;IAC/BC,MAAM,EAAG,IAAAK,QAAA,CAAAC,aAAA,EAACjC,OAAA,CAAAoC,OAAM;MAAC1B,YAAY,EAAGA;IAAc,CAAE,CAAG;IACnD2B,OAAO,EAAG,IAAAL,QAAA,CAAAC,aAAA,EAACrC,OAAA,CAAA0C,eAAe,MAAE,CAAG;IAC/BC,OAAO,EAAG,IAAAP,QAAA,CAAAC,aAAA,EAAChC,MAAA,CAAAmC,OAAK;MAAC1B,YAAY,EAAGA;IAAc,CAAE,CAAG;IACnD8B,SAAS,EAAG;MACXC,QAAQ,EAAE7B,gBAAgB;MAC1B8B,IAAI,EAAE7B;IACP;EAAG,CACH,CAAC;AAEJ"}
@@ -1,30 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = Table;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _data = require("@wordpress/data");
13
-
14
10
  var _coreData = require("@wordpress/core-data");
15
-
16
11
  var _i18n = require("@wordpress/i18n");
17
-
18
12
  var _components = require("@wordpress/components");
19
-
20
13
  var _htmlEntities = require("@wordpress/html-entities");
21
-
22
14
  var _templateActions = _interopRequireDefault(require("../template-actions"));
23
-
24
15
  var _link = _interopRequireDefault(require("../routes/link"));
25
-
26
16
  var _addedBy = _interopRequireDefault(require("./added-by"));
27
-
28
17
  /**
29
18
  * WordPress dependencies
30
19
  */
@@ -32,6 +21,7 @@ var _addedBy = _interopRequireDefault(require("./added-by"));
32
21
  /**
33
22
  * Internal dependencies
34
23
  */
24
+
35
25
  function Table({
36
26
  templateType
37
27
  }) {
@@ -42,19 +32,18 @@ function Table({
42
32
  });
43
33
  const templates = (0, _data.useSelect)(select => allTemplates?.filter(template => !select(_coreData.store).isDeletingEntityRecord('postType', templateType, template.id)), [allTemplates]);
44
34
  const postType = (0, _data.useSelect)(select => select(_coreData.store).getPostType(templateType), [templateType]);
45
-
46
35
  if (!templates) {
47
36
  return null;
48
37
  }
49
-
50
38
  if (!templates.length) {
51
- return (0, _element.createElement)("div", null, (0, _i18n.sprintf)( // translators: The template type name, should be either "templates" or "template parts".
39
+ return (0, _element.createElement)("div", null, (0, _i18n.sprintf)(
40
+ // translators: The template type name, should be either "templates" or "template parts".
52
41
  (0, _i18n.__)('No %s found.'), postType?.labels?.name?.toLowerCase()));
53
42
  }
54
-
55
43
  const sortedTemplates = [...templates];
56
44
  sortedTemplates.sort((a, b) => a.title.rendered.localeCompare(b.title.rendered));
57
- return (// These explicit aria roles are needed for Safari.
45
+ return (
46
+ // These explicit aria roles are needed for Safari.
58
47
  // See https://developer.mozilla.org/en-US/docs/Web/CSS/display#tables
59
48
  (0, _element.createElement)("table", {
60
49
  className: "edit-site-list-table",
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/list/table.js"],"names":["Table","templateType","records","allTemplates","per_page","templates","select","filter","template","coreStore","isDeletingEntityRecord","id","postType","getPostType","length","labels","name","toLowerCase","sortedTemplates","sort","a","b","title","rendered","localeCompare","map","postId","type","canvas","slug","description"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AAIA;;AAKA;;AACA;;AACA;;AAjBA;AACA;AACA;;AAUA;AACA;AACA;AAKe,SAASA,KAAT,CAAgB;AAAEC,EAAAA;AAAF,CAAhB,EAAmC;AACjD,QAAM;AAAEC,IAAAA,OAAO,EAAEC;AAAX,MAA4B,gCACjC,UADiC,EAEjCF,YAFiC,EAGjC;AACCG,IAAAA,QAAQ,EAAE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useEntityRecords } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tVisuallyHidden,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport TemplateActions from '../template-actions';\nimport Link from '../routes/link';\nimport AddedBy from './added-by';\n\nexport default function Table( { templateType } ) {\n\tconst { records: allTemplates } = useEntityRecords(\n\t\t'postType',\n\t\ttemplateType,\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\n\tconst templates = useSelect(\n\t\t( select ) =>\n\t\t\tallTemplates?.filter(\n\t\t\t\t( template ) =>\n\t\t\t\t\t! select( coreStore ).isDeletingEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\ttemplateType,\n\t\t\t\t\t\ttemplate.id\n\t\t\t\t\t)\n\t\t\t),\n\t\t[ allTemplates ]\n\t);\n\n\tconst postType = useSelect(\n\t\t( select ) => select( coreStore ).getPostType( templateType ),\n\t\t[ templateType ]\n\t);\n\n\tif ( ! templates ) {\n\t\treturn null;\n\t}\n\n\tif ( ! templates.length ) {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: The template type name, should be either \"templates\" or \"template parts\".\n\t\t\t\t\t__( 'No %s found.' ),\n\t\t\t\t\tpostType?.labels?.name?.toLowerCase()\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst sortedTemplates = [ ...templates ];\n\tsortedTemplates.sort( ( a, b ) =>\n\t\ta.title.rendered.localeCompare( b.title.rendered )\n\t);\n\n\treturn (\n\t\t// These explicit aria roles are needed for Safari.\n\t\t// See https://developer.mozilla.org/en-US/docs/Web/CSS/display#tables\n\t\t<table className=\"edit-site-list-table\" role=\"table\">\n\t\t\t<thead>\n\t\t\t\t<tr className=\"edit-site-list-table-head\" role=\"row\">\n\t\t\t\t\t<th\n\t\t\t\t\t\tclassName=\"edit-site-list-table-column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Template' ) }\n\t\t\t\t\t</th>\n\t\t\t\t\t<th\n\t\t\t\t\t\tclassName=\"edit-site-list-table-column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Added by' ) }\n\t\t\t\t\t</th>\n\t\t\t\t\t<th\n\t\t\t\t\t\tclassName=\"edit-site-list-table-column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<VisuallyHidden>{ __( 'Actions' ) }</VisuallyHidden>\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{ sortedTemplates.map( ( template ) => (\n\t\t\t\t\t<tr\n\t\t\t\t\t\tkey={ template.id }\n\t\t\t\t\t\tclassName=\"edit-site-list-table-row\"\n\t\t\t\t\t\trole=\"row\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<td className=\"edit-site-list-table-column\" role=\"cell\">\n\t\t\t\t\t\t\t<Heading level={ 4 }>\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\t\t\tpostId: template.id,\n\t\t\t\t\t\t\t\t\t\tpostType: template.type,\n\t\t\t\t\t\t\t\t\t\tcanvas: 'edit',\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{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\ttemplate.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\ttemplate.slug\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t{ decodeEntities( template.description ) }\n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t<td className=\"edit-site-list-table-column\" role=\"cell\">\n\t\t\t\t\t\t\t{ template ? (\n\t\t\t\t\t\t\t\t<AddedBy\n\t\t\t\t\t\t\t\t\tpostType={ template.type }\n\t\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : null }\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td className=\"edit-site-list-table-column\" role=\"cell\">\n\t\t\t\t\t\t\t<TemplateActions\n\t\t\t\t\t\t\t\tpostType={ template.type }\n\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-list-table__actions\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t) ) }\n\t\t\t</tbody>\n\t\t</table>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_data","require","_coreData","_i18n","_components","_htmlEntities","_templateActions","_interopRequireDefault","_link","_addedBy","Table","templateType","records","allTemplates","useEntityRecords","per_page","templates","useSelect","select","filter","template","coreStore","isDeletingEntityRecord","id","postType","getPostType","length","_element","createElement","sprintf","__","labels","name","toLowerCase","sortedTemplates","sort","a","b","title","rendered","localeCompare","className","role","VisuallyHidden","map","key","__experimentalHeading","level","default","params","postId","type","canvas","decodeEntities","slug","description"],"sources":["@wordpress/edit-site/src/components/list/table.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore, useEntityRecords } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tVisuallyHidden,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport TemplateActions from '../template-actions';\nimport Link from '../routes/link';\nimport AddedBy from './added-by';\n\nexport default function Table( { templateType } ) {\n\tconst { records: allTemplates } = useEntityRecords(\n\t\t'postType',\n\t\ttemplateType,\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\n\tconst templates = useSelect(\n\t\t( select ) =>\n\t\t\tallTemplates?.filter(\n\t\t\t\t( template ) =>\n\t\t\t\t\t! select( coreStore ).isDeletingEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\ttemplateType,\n\t\t\t\t\t\ttemplate.id\n\t\t\t\t\t)\n\t\t\t),\n\t\t[ allTemplates ]\n\t);\n\n\tconst postType = useSelect(\n\t\t( select ) => select( coreStore ).getPostType( templateType ),\n\t\t[ templateType ]\n\t);\n\n\tif ( ! templates ) {\n\t\treturn null;\n\t}\n\n\tif ( ! templates.length ) {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: The template type name, should be either \"templates\" or \"template parts\".\n\t\t\t\t\t__( 'No %s found.' ),\n\t\t\t\t\tpostType?.labels?.name?.toLowerCase()\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst sortedTemplates = [ ...templates ];\n\tsortedTemplates.sort( ( a, b ) =>\n\t\ta.title.rendered.localeCompare( b.title.rendered )\n\t);\n\n\treturn (\n\t\t// These explicit aria roles are needed for Safari.\n\t\t// See https://developer.mozilla.org/en-US/docs/Web/CSS/display#tables\n\t\t<table className=\"edit-site-list-table\" role=\"table\">\n\t\t\t<thead>\n\t\t\t\t<tr className=\"edit-site-list-table-head\" role=\"row\">\n\t\t\t\t\t<th\n\t\t\t\t\t\tclassName=\"edit-site-list-table-column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Template' ) }\n\t\t\t\t\t</th>\n\t\t\t\t\t<th\n\t\t\t\t\t\tclassName=\"edit-site-list-table-column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Added by' ) }\n\t\t\t\t\t</th>\n\t\t\t\t\t<th\n\t\t\t\t\t\tclassName=\"edit-site-list-table-column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<VisuallyHidden>{ __( 'Actions' ) }</VisuallyHidden>\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{ sortedTemplates.map( ( template ) => (\n\t\t\t\t\t<tr\n\t\t\t\t\t\tkey={ template.id }\n\t\t\t\t\t\tclassName=\"edit-site-list-table-row\"\n\t\t\t\t\t\trole=\"row\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<td className=\"edit-site-list-table-column\" role=\"cell\">\n\t\t\t\t\t\t\t<Heading level={ 4 }>\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\t\t\tpostId: template.id,\n\t\t\t\t\t\t\t\t\t\tpostType: template.type,\n\t\t\t\t\t\t\t\t\t\tcanvas: 'edit',\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{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\ttemplate.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\ttemplate.slug\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t{ decodeEntities( template.description ) }\n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t<td className=\"edit-site-list-table-column\" role=\"cell\">\n\t\t\t\t\t\t\t{ template ? (\n\t\t\t\t\t\t\t\t<AddedBy\n\t\t\t\t\t\t\t\t\tpostType={ template.type }\n\t\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : null }\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td className=\"edit-site-list-table-column\" role=\"cell\">\n\t\t\t\t\t\t\t<TemplateActions\n\t\t\t\t\t\t\t\tpostType={ template.type }\n\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\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AAA;MAAIa,SAAS,EAAC,6BAA6B;MAACC,IAAI,EAAC;IAAM,GACtD,IAAAf,QAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA0C,qBAAO;MAACC,KAAK,EAAG;IAAG,GACnB,IAAApB,QAAA,CAAAC,aAAA,EAACpB,KAAA,CAAAwC,OAAI;MACJC,MAAM,EAAG;QACRC,MAAM,EAAE9B,QAAQ,CAACG,EAAE;QACnBC,QAAQ,EAAEJ,QAAQ,CAAC+B,IAAI;QACvBC,MAAM,EAAE;MACT;IAAG,GAED,IAAAC,4BAAc,EACfjC,QAAQ,CAACkB,KAAK,EAAEC,QAAQ,IACvBnB,QAAQ,CAACkC,IACX,CACK,CACE,CAAC,EACR,IAAAD,4BAAc,EAAEjC,QAAQ,CAACmC,WAAY,CACpC,CAAC,EAEL,IAAA5B,QAAA,CAAAC,aAAA;MAAIa,SAAS,EAAC,6BAA6B;MAACC,IAAI,EAAC;IAAM,GACpDtB,QAAQ,GACT,IAAAO,QAAA,CAAAC,aAAA,EAACnB,QAAA,CAAAuC,OAAO;MACPxB,QAAQ,EAAGJ,QAAQ,CAAC+B,IAAM;MAC1BD,MAAM,EAAG9B,QAAQ,CAACG;IAAI,CACtB,CAAC,GACC,IACD,CAAC,EACL,IAAAI,QAAA,CAAAC,aAAA;MAAIa,SAAS,EAAC,6BAA6B;MAACC,IAAI,EAAC;IAAM,GACtD,IAAAf,QAAA,CAAAC,aAAA,EAACtB,gBAAA,CAAA0C,OAAe;MACfxB,QAAQ,EAAGJ,QAAQ,CAAC+B,IAAM;MAC1BD,MAAM,EAAG9B,QAAQ,CAACG,EAAI;MACtBkB,SAAS,EAAC;IAA+B,CACzC,CACE,CACD,CACH,CACI,CACD;EAAC;AAEV"}
@@ -4,18 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = useRegisterShortcuts;
7
-
8
7
  var _data = require("@wordpress/data");
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _i18n = require("@wordpress/i18n");
13
-
14
10
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
15
-
16
11
  /**
17
12
  * WordPress dependencies
18
13
  */
14
+
19
15
  function useRegisterShortcuts() {
20
16
  const {
21
17
  registerShortcut
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/list/use-register-shortcuts.js"],"names":["useRegisterShortcuts","registerShortcut","keyboardShortcutsStore","name","category","description","keyCombination","modifier","character","aliases"],"mappings":";;;;;;;AAIA;;AACA;;AACA;;AACA;;AAPA;AACA;AACA;AAOe,SAASA,oBAAT,GAAgC;AAC9C,QAAM;AAAEC,IAAAA;AAAF,MAAuB,uBAAaC,wBAAb,CAA7B;AACA,0BAAW,MAAM;AAChBD,IAAAA,gBAAgB,CAAE;AACjBE,MAAAA,IAAI,EAAE,4BADW;AAEjBC,MAAAA,QAAQ,EAAE,QAFO;AAGjBC,MAAAA,WAAW,EAAE,cAAI,0CAAJ,CAHI;AAIjBC,MAAAA,cAAc,EAAE;AACfC,QAAAA,QAAQ,EAAE,MADK;AAEfC,QAAAA,SAAS,EAAE;AAFI,OAJC;AAQjBC,MAAAA,OAAO,EAAE,CACR;AACCF,QAAAA,QAAQ,EAAE,QADX;AAECC,QAAAA,SAAS,EAAE;AAFZ,OADQ;AARQ,KAAF,CAAhB;AAgBAP,IAAAA,gBAAgB,CAAE;AACjBE,MAAAA,IAAI,EAAE,gCADW;AAEjBC,MAAAA,QAAQ,EAAE,QAFO;AAGjBC,MAAAA,WAAW,EAAE,cAAI,8CAAJ,CAHI;AAIjBC,MAAAA,cAAc,EAAE;AACfC,QAAAA,QAAQ,EAAE,WADK;AAEfC,QAAAA,SAAS,EAAE;AAFI,OAJC;AAQjBC,MAAAA,OAAO,EAAE,CACR;AACCF,QAAAA,QAAQ,EAAE,QADX;AAECC,QAAAA,SAAS,EAAE;AAFZ,OADQ,EAKR;AACCD,QAAAA,QAAQ,EAAE,WADX;AAECC,QAAAA,SAAS,EAAE;AAFZ,OALQ;AARQ,KAAF,CAAhB;AAmBA,GApCD,EAoCG,EApCH;AAqCA","sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\nexport default function useRegisterShortcuts() {\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [] );\n}\n"]}
1
+ {"version":3,"names":["_data","require","_element","_i18n","_keyboardShortcuts","useRegisterShortcuts","registerShortcut","useDispatch","keyboardShortcutsStore","useEffect","name","category","description","__","keyCombination","modifier","character","aliases"],"sources":["@wordpress/edit-site/src/components/list/use-register-shortcuts.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\nexport default function useRegisterShortcuts() {\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [] );\n}\n"],"mappings":";;;;;;AAIA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAPA;AACA;AACA;;AAOe,SAASI,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,wBAAuB,CAAC;EAClE,IAAAC,kBAAS,EAAE,MAAM;IAChBH,gBAAgB,CAAE;MACjBI,IAAI,EAAE,4BAA4B;MAClCC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAE,IAAAC,QAAE,EAAE,0CAA2C,CAAC;MAC7DC,cAAc,EAAE;QACfC,QAAQ,EAAE,MAAM;QAChBC,SAAS,EAAE;MACZ,CAAC;MACDC,OAAO,EAAE,CACR;QACCF,QAAQ,EAAE,QAAQ;QAClBC,SAAS,EAAE;MACZ,CAAC;IAEH,CAAE,CAAC;IAEHV,gBAAgB,CAAE;MACjBI,IAAI,EAAE,gCAAgC;MACtCC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAE,IAAAC,QAAE,EAAE,8CAA+C,CAAC;MACjEC,cAAc,EAAE;QACfC,QAAQ,EAAE,WAAW;QACrBC,SAAS,EAAE;MACZ,CAAC;MACDC,OAAO,EAAE,CACR;QACCF,QAAQ,EAAE,QAAQ;QAClBC,SAAS,EAAE;MACZ,CAAC,EACD;QACCD,QAAQ,EAAE,WAAW;QACrBC,SAAS,EAAE;MACZ,CAAC;IAEH,CAAE,CAAC;EACJ,CAAC,EAAE,EAAG,CAAC;AACR"}
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = Header;
7
-
8
7
  var _element = require("@wordpress/element");
9
-
10
8
  var _components = require("@wordpress/components");
11
-
12
9
  /**
13
10
  * WordPress dependencies
14
11
  */
@@ -16,6 +13,7 @@ var _components = require("@wordpress/components");
16
13
  /**
17
14
  * Internal dependencies
18
15
  */
16
+
19
17
  function Header({
20
18
  title,
21
19
  subTitle,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/page/header.js"],"names":["Header","title","subTitle","actions"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;;AASA;AACA;AACA;AAEe,SAASA,MAAT,CAAiB;AAAEC,EAAAA,KAAF;AAASC,EAAAA,QAAT;AAAmBC,EAAAA;AAAnB,CAAjB,EAAgD;AAC9D,SACC,4BAAC,gCAAD;AAAQ,IAAA,EAAE,EAAC,QAAX;AAAoB,IAAA,SAAS,EAAC,MAA9B;AAAqC,IAAA,SAAS,EAAC;AAA/C,KACC,4BAAC,qBAAD;AAAW,IAAA,SAAS,EAAC;AAArB,KACC,4BAAC,iCAAD;AACC,IAAA,EAAE,EAAC,IADJ;AAEC,IAAA,KAAK,EAAG,CAFT;AAGC,IAAA,SAAS,EAAC;AAHX,KAKGF,KALH,CADD,EAQGC,QAAQ,IACT,4BAAC,8BAAD;AAAM,IAAA,EAAE,EAAC,GAAT;AAAa,IAAA,SAAS,EAAC;AAAvB,KACGA,QADH,CATF,CADD,EAeC,4BAAC,oBAAD;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=\"h2\"\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"]}
1
+ {"version":3,"names":["_components","require","Header","title","subTitle","actions","_element","createElement","__experimentalHStack","as","alignment","className","FlexBlock","__experimentalHeading","level","__experimentalText","FlexItem"],"sources":["@wordpress/edit-site/src/components/page/header.js"],"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=\"h2\"\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"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AASA;AACA;AACA;;AAEe,SAASC,MAAMA,CAAE;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAQ,CAAC,EAAG;EAC9D,OACC,IAAAC,QAAA,CAAAC,aAAA,EAACP,WAAA,CAAAQ,oBAAM;IAACC,EAAE,EAAC,QAAQ;IAACC,SAAS,EAAC,MAAM;IAACC,SAAS,EAAC;EAAuB,GACrE,IAAAL,QAAA,CAAAC,aAAA,EAACP,WAAA,CAAAY,SAAS;IAACD,SAAS,EAAC;EAAmC,GACvD,IAAAL,QAAA,CAAAC,aAAA,EAACP,WAAA,CAAAa,qBAAO;IACPJ,EAAE,EAAC,IAAI;IACPK,KAAK,EAAG,CAAG;IACXH,SAAS,EAAC;EAA8B,GAEtCR,KACM,CAAC,EACRC,QAAQ,IACT,IAAAE,QAAA,CAAAC,aAAA,EAACP,WAAA,CAAAe,kBAAI;IAACN,EAAE,EAAC,GAAG;IAACE,SAAS,EAAC;EAAkC,GACtDP,QACG,CAEG,CAAC,EACZ,IAAAE,QAAA,CAAAC,aAAA,EAACP,WAAA,CAAAgB,QAAQ;IAACL,SAAS,EAAC;EAAgC,GACjDN,OACO,CACH,CAAC;AAEX"}
@@ -1,22 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = Page;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  var _interface = require("@wordpress/interface");
15
-
16
11
  var _editor = require("@wordpress/editor");
17
-
18
12
  var _header = _interopRequireDefault(require("./header"));
19
-
20
13
  /**
21
14
  * External dependencies
22
15
  */
@@ -28,6 +21,7 @@ var _header = _interopRequireDefault(require("./header"));
28
21
  /**
29
22
  * Internal dependencies
30
23
  */
24
+
31
25
  function Page({
32
26
  title,
33
27
  subTitle,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/page/index.js"],"names":["Page","title","subTitle","actions","children","className","hideTitleFromUI","classes"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AAKA;;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AAGe,SAASA,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,GAAG,yBAAY,gBAAZ,EAA8BF,SAA9B,CAAhB;AAEA,SACC,4BAAC,0BAAD;AAAiB,IAAA,SAAS,EAAGE,OAA7B;AAAuC,IAAA,SAAS,EAAGN;AAAnD,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACG,CAAEK,eAAF,IAAqBL,KAArB,IACD,4BAAC,eAAD;AACC,IAAA,KAAK,EAAGA,KADT;AAEC,IAAA,QAAQ,EAAGC,QAFZ;AAGC,IAAA,OAAO,EAAGC;AAHX,IAFF,EAQGC,QARH,CADD,EAWC,4BAAC,uBAAD,OAXD,CADD;AAeA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { NavigableRegion } from '@wordpress/interface';\nimport { EditorSnackbars } from '@wordpress/editor';\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<div className=\"edit-site-page-content\">\n\t\t\t\t{ ! hideTitleFromUI && title && (\n\t\t\t\t\t<Header\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tsubTitle={ subTitle }\n\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t\t<EditorSnackbars />\n\t\t</NavigableRegion>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_interface","_editor","_header","Page","title","subTitle","actions","children","className","hideTitleFromUI","classes","classnames","_element","createElement","NavigableRegion","ariaLabel","default","EditorSnackbars"],"sources":["@wordpress/edit-site/src/components/page/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { NavigableRegion } from '@wordpress/interface';\nimport { EditorSnackbars } from '@wordpress/editor';\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<div className=\"edit-site-page-content\">\n\t\t\t\t{ ! hideTitleFromUI && title && (\n\t\t\t\t\t<Header\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tsubTitle={ subTitle }\n\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t\t<EditorSnackbars />\n\t\t</NavigableRegion>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGe,SAASI,IAAIA,CAAE;EAC7BC,KAAK;EACLC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,SAAS;EACTC,eAAe,GAAG;AACnB,CAAC,EAAG;EACH,MAAMC,OAAO,GAAG,IAAAC,mBAAU,EAAE,gBAAgB,EAAEH,SAAU,CAAC;EAEzD,OACC,IAAAI,QAAA,CAAAC,aAAA,EAACb,UAAA,CAAAc,eAAe;IAACN,SAAS,EAAGE,OAAS;IAACK,SAAS,EAAGX;EAAO,GACzD,IAAAQ,QAAA,CAAAC,aAAA;IAAKL,SAAS,EAAC;EAAwB,GACpC,CAAEC,eAAe,IAAIL,KAAK,IAC3B,IAAAQ,QAAA,CAAAC,aAAA,EAACX,OAAA,CAAAc,OAAM;IACNZ,KAAK,EAAGA,KAAO;IACfC,QAAQ,EAAGA,QAAU;IACrBC,OAAO,EAAGA;EAAS,CACnB,CACD,EACCC,QACE,CAAC,EACN,IAAAK,QAAA,CAAAC,aAAA,EAACZ,OAAA,CAAAgB,eAAe,MAAE,CACF,CAAC;AAEpB"}
@@ -1,22 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = PageActions;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _i18n = require("@wordpress/i18n");
13
-
14
10
  var _components = require("@wordpress/components");
15
-
16
11
  var _icons = require("@wordpress/icons");
17
-
18
12
  var _trashPageMenuItem = _interopRequireDefault(require("./trash-page-menu-item"));
19
-
20
13
  /**
21
14
  * WordPress dependencies
22
15
  */
@@ -24,6 +17,7 @@ var _trashPageMenuItem = _interopRequireDefault(require("./trash-page-menu-item"
24
17
  /**
25
18
  * Internal dependencies
26
19
  */
20
+
27
21
  function PageActions({
28
22
  postId,
29
23
  className,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/page-actions/index.js"],"names":["PageActions","postId","className","toggleProps","onRemove","moreVertical"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;AAGe,SAASA,WAAT,CAAsB;AACpCC,EAAAA,MADoC;AAEpCC,EAAAA,SAFoC;AAGpCC,EAAAA,WAHoC;AAIpCC,EAAAA;AAJoC,CAAtB,EAKX;AACH,SACC,4BAAC,wBAAD;AACC,IAAA,IAAI,EAAGC,mBADR;AAEC,IAAA,KAAK,EAAG,cAAI,SAAJ,CAFT;AAGC,IAAA,SAAS,EAAGH,SAHb;AAIC,IAAA,WAAW,EAAGC;AAJf,KAMG,MACD,4BAAC,qBAAD,QACC,4BAAC,0BAAD;AACC,IAAA,MAAM,EAAGF,MADV;AAEC,IAAA,QAAQ,EAAGG;AAFZ,IADD,CAPF,CADD;AAiBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { DropdownMenu, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport TrashPageMenuItem from './trash-page-menu-item';\n\nexport default function PageActions( {\n\tpostId,\n\tclassName,\n\ttoggleProps,\n\tonRemove,\n} ) {\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Actions' ) }\n\t\t\tclassName={ className }\n\t\t\ttoggleProps={ toggleProps }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<MenuGroup>\n\t\t\t\t\t<TrashPageMenuItem\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\tonRemove={ onRemove }\n\t\t\t\t\t/>\n\t\t\t\t</MenuGroup>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_i18n","require","_components","_icons","_trashPageMenuItem","_interopRequireDefault","PageActions","postId","className","toggleProps","onRemove","_element","createElement","DropdownMenu","icon","moreVertical","label","__","MenuGroup","default"],"sources":["@wordpress/edit-site/src/components/page-actions/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { DropdownMenu, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport TrashPageMenuItem from './trash-page-menu-item';\n\nexport default function PageActions( {\n\tpostId,\n\tclassName,\n\ttoggleProps,\n\tonRemove,\n} ) {\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Actions' ) }\n\t\t\tclassName={ className }\n\t\t\ttoggleProps={ toggleProps }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<MenuGroup>\n\t\t\t\t\t<TrashPageMenuItem\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\tonRemove={ onRemove }\n\t\t\t\t\t/>\n\t\t\t\t</MenuGroup>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAKA,IAAAG,kBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGe,SAASK,WAAWA,CAAE;EACpCC,MAAM;EACNC,SAAS;EACTC,WAAW;EACXC;AACD,CAAC,EAAG;EACH,OACC,IAAAC,QAAA,CAAAC,aAAA,EAACV,WAAA,CAAAW,YAAY;IACZC,IAAI,EAAGC,mBAAc;IACrBC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;IACzBT,SAAS,EAAGA,SAAW;IACvBC,WAAW,EAAGA;EAAa,GAEzB,MACD,IAAAE,QAAA,CAAAC,aAAA,EAACV,WAAA,CAAAgB,SAAS,QACT,IAAAP,QAAA,CAAAC,aAAA,EAACR,kBAAA,CAAAe,OAAiB;IACjBZ,MAAM,EAAGA,MAAQ;IACjBG,QAAQ,EAAGA;EAAU,CACrB,CACS,CAEC,CAAC;AAEjB"}
@@ -4,24 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = TrashPageMenuItem;
7
-
8
7
  var _element = require("@wordpress/element");
9
-
10
8
  var _data = require("@wordpress/data");
11
-
12
9
  var _htmlEntities = require("@wordpress/html-entities");
13
-
14
10
  var _coreData = require("@wordpress/core-data");
15
-
16
11
  var _i18n = require("@wordpress/i18n");
17
-
18
12
  var _components = require("@wordpress/components");
19
-
20
13
  var _notices = require("@wordpress/notices");
21
-
22
14
  /**
23
15
  * WordPress dependencies
24
16
  */
17
+
25
18
  function TrashPageMenuItem({
26
19
  postId,
27
20
  onRemove
@@ -34,14 +27,12 @@ function TrashPageMenuItem({
34
27
  deleteEntityRecord
35
28
  } = (0, _data.useDispatch)(_coreData.store);
36
29
  const page = (0, _data.useSelect)(select => select(_coreData.store).getEntityRecord('postType', 'page', postId), [postId]);
37
-
38
30
  async function removePage() {
39
31
  try {
40
32
  await deleteEntityRecord('postType', 'page', postId, {}, {
41
33
  throwOnError: true
42
34
  });
43
- createSuccessNotice((0, _i18n.sprintf)(
44
- /* translators: The page's title. */
35
+ createSuccessNotice((0, _i18n.sprintf)( /* translators: The page's title. */
45
36
  (0, _i18n.__)('"%s" moved to the Trash.'), (0, _htmlEntities.decodeEntities)(page.title.rendered)), {
46
37
  type: 'snackbar',
47
38
  id: 'edit-site-page-trashed'
@@ -54,10 +45,10 @@ function TrashPageMenuItem({
54
45
  });
55
46
  }
56
47
  }
57
-
58
48
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.MenuItem, {
59
49
  onClick: () => removePage(),
60
- isDestructive: true
50
+ isDestructive: true,
51
+ variant: "secondary"
61
52
  }, (0, _i18n.__)('Move to Trash')));
62
53
  }
63
54
  //# sourceMappingURL=trash-page-menu-item.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/page-actions/trash-page-menu-item.js"],"names":["TrashPageMenuItem","postId","onRemove","createSuccessNotice","createErrorNotice","noticesStore","deleteEntityRecord","coreStore","page","select","getEntityRecord","removePage","throwOnError","title","rendered","type","id","error","errorMessage","message","code"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AARA;AACA;AACA;AAQe,SAASA,iBAAT,CAA4B;AAAEC,EAAAA,MAAF;AAAUC,EAAAA;AAAV,CAA5B,EAAmD;AACjE,QAAM;AAAEC,IAAAA,mBAAF;AAAuBC,IAAAA;AAAvB,MACL,uBAAaC,cAAb,CADD;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAyB,uBAAaC,eAAb,CAA/B;AACA,QAAMC,IAAI,GAAG,qBACVC,MAAF,IACCA,MAAM,CAAEF,eAAF,CAAN,CAAoBG,eAApB,CAAqC,UAArC,EAAiD,MAAjD,EAAyDT,MAAzD,CAFW,EAGZ,CAAEA,MAAF,CAHY,CAAb;;AAKA,iBAAeU,UAAf,GAA4B;AAC3B,QAAI;AACH,YAAML,kBAAkB,CACvB,UADuB,EAEvB,MAFuB,EAGvBL,MAHuB,EAIvB,EAJuB,EAKvB;AAAEW,QAAAA,YAAY,EAAE;AAAhB,OALuB,CAAxB;AAOAT,MAAAA,mBAAmB,CAClB;AACC;AACA,oBAAI,0BAAJ,CAFD,EAGC,kCAAgBK,IAAI,CAACK,KAAL,CAAWC,QAA3B,CAHD,CADkB,EAMlB;AACCC,QAAAA,IAAI,EAAE,UADP;AAECC,QAAAA,EAAE,EAAE;AAFL,OANkB,CAAnB;AAWAd,MAAAA,QAAQ;AACR,KApBD,CAoBE,OAAQe,KAAR,EAAgB;AACjB,YAAMC,YAAY,GACjBD,KAAK,CAACE,OAAN,IAAiBF,KAAK,CAACG,IAAN,KAAe,eAAhC,GACGH,KAAK,CAACE,OADT,GAEG,cACA,uDADA,CAHJ;AAOAf,MAAAA,iBAAiB,CAAEc,YAAF,EAAgB;AAAEH,QAAAA,IAAI,EAAE;AAAR,OAAhB,CAAjB;AACA;AACD;;AACD,SACC,qDACC,4BAAC,oBAAD;AAAU,IAAA,OAAO,EAAG,MAAMJ,UAAU,EAApC;AAAyC,IAAA,aAAa;AAAtD,KACG,cAAI,eAAJ,CADH,CADD,CADD;AAOA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function TrashPageMenuItem( { postId, onRemove } ) {\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\tconst page = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord( 'postType', 'page', postId ),\n\t\t[ postId ]\n\t);\n\tasync function removePage() {\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\tpostId,\n\t\t\t\t{},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: The page's title. */\n\t\t\t\t\t__( '\"%s\" moved to the Trash.' ),\n\t\t\t\t\tdecodeEntities( page.title.rendered )\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: 'edit-site-page-trashed',\n\t\t\t\t}\n\t\t\t);\n\t\t\tonRemove?.();\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'An error occurred while moving the page to the trash.'\n\t\t\t\t\t );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t}\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={ () => removePage() } isDestructive>\n\t\t\t\t{ __( 'Move to Trash' ) }\n\t\t\t</MenuItem>\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_data","require","_htmlEntities","_coreData","_i18n","_components","_notices","TrashPageMenuItem","postId","onRemove","createSuccessNotice","createErrorNotice","useDispatch","noticesStore","deleteEntityRecord","coreStore","page","useSelect","select","getEntityRecord","removePage","throwOnError","sprintf","__","decodeEntities","title","rendered","type","id","error","errorMessage","message","code","_element","createElement","Fragment","MenuItem","onClick","isDestructive","variant"],"sources":["@wordpress/edit-site/src/components/page-actions/trash-page-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function TrashPageMenuItem( { postId, onRemove } ) {\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\tconst page = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord( 'postType', 'page', postId ),\n\t\t[ postId ]\n\t);\n\tasync function removePage() {\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\tpostId,\n\t\t\t\t{},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: The page's title. */\n\t\t\t\t\t__( '\"%s\" moved to the Trash.' ),\n\t\t\t\t\tdecodeEntities( page.title.rendered )\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: 'edit-site-page-trashed',\n\t\t\t\t}\n\t\t\t);\n\t\t\tonRemove?.();\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'An error occurred while moving the page to the trash.'\n\t\t\t\t\t );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t}\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\tonClick={ () => removePage() }\n\t\t\t\tisDestructive\n\t\t\t\tvariant=\"secondary\"\n\t\t\t>\n\t\t\t\t{ __( 'Move to Trash' ) }\n\t\t\t</MenuItem>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAA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QACC,IAAAF,QAAA,CAAAC,aAAA,EAAC7B,WAAA,CAAA+B,QAAQ;IACRC,OAAO,EAAGA,CAAA,KAAMjB,UAAU,CAAC,CAAG;IAC9BkB,aAAa;IACbC,OAAO,EAAC;EAAW,GAEjB,IAAAhB,QAAE,EAAE,eAAgB,CACb,CACT,CAAC;AAEL"}
@@ -5,17 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = BackToPageNotification;
7
7
  exports.useBackToPageNotification = useBackToPageNotification;
8
-
9
8
  var _data = require("@wordpress/data");
10
-
11
9
  var _element = require("@wordpress/element");
12
-
13
10
  var _notices = require("@wordpress/notices");
14
-
15
11
  var _i18n = require("@wordpress/i18n");
16
-
17
12
  var _store = require("../../store");
18
-
19
13
  /**
20
14
  * WordPress dependencies
21
15
  */
@@ -32,12 +26,11 @@ function BackToPageNotification() {
32
26
  useBackToPageNotification();
33
27
  return null;
34
28
  }
29
+
35
30
  /**
36
31
  * Hook that displays a 'You are editing a template' notification when the user
37
32
  * switches from focusing on editing page content to editing a template.
38
33
  */
39
-
40
-
41
34
  function useBackToPageNotification() {
42
35
  const {
43
36
  isPage,
@@ -66,7 +59,6 @@ function useBackToPageNotification() {
66
59
  });
67
60
  alreadySeen.current = true;
68
61
  }
69
-
70
62
  prevHasPageContentFocus.current = hasPageContentFocus;
71
63
  }, [alreadySeen, isPage, prevHasPageContentFocus, hasPageContentFocus, createInfoNotice, setHasPageContentFocus]);
72
64
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/back-to-page-notification.js"],"names":["BackToPageNotification","useBackToPageNotification","isPage","hasPageContentFocus","select","editSiteStore","alreadySeen","prevHasPageContentFocus","createInfoNotice","noticesStore","setHasPageContentFocus","current","isDismissible","type","actions","label","onClick"],"mappings":";;;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACe,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["/**\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"]}
1
+ {"version":3,"names":["_data","require","_element","_notices","_i18n","_store","BackToPageNotification","useBackToPageNotification","isPage","hasPageContentFocus","useSelect","select","editSiteStore","alreadySeen","useRef","prevHasPageContentFocus","createInfoNotice","useDispatch","noticesStore","setHasPageContentFocus","useEffect","current","__","isDismissible","type","actions","label","onClick"],"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/back-to-page-notification.js"],"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"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACe,SAASK,sBAAsBA,CAAA,EAAG;EAChDC,yBAAyB,CAAC,CAAC;EAC3B,OAAO,IAAI;AACZ;;AAEA;AACA;AACA;AACA;AACO,SAASA,yBAAyBA,CAAA,EAAG;EAC3C,MAAM;IAAEC,MAAM;IAAEC;EAAoB,CAAC,GAAG,IAAAC,eAAS,EAC9CC,MAAM,KAAQ;IACfH,MAAM,EAAEG,MAAM,CAAEC,YAAc,CAAC,CAACJ,MAAM,CAAC,CAAC;IACxCC,mBAAmB,EAAEE,MAAM,CAAEC,YAAc,CAAC,CAACH,mBAAmB,CAAC;EAClE,CAAC,CAAE,EACH,EACD,CAAC;EAED,MAAMI,WAAW,GAAG,IAAAC,eAAM,EAAE,KAAM,CAAC;EACnC,MAAMC,uBAAuB,GAAG,IAAAD,eAAM,EAAE,KAAM,CAAC;EAE/C,MAAM;IAAEE;EAAiB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,cAAa,CAAC;EACxD,MAAM;IAAEC;EAAuB,CAAC,GAAG,IAAAF,iBAAW,EAAEL,YAAc,CAAC;EAE/D,IAAAQ,kBAAS,EAAE,MAAM;IAChB,IACC,CAAEP,WAAW,CAACQ,OAAO,IACrBb,MAAM,IACNO,uBAAuB,CAACM,OAAO,IAC/B,CAAEZ,mBAAmB,EACpB;MACDO,gBAAgB,CAAE,IAAAM,QAAE,EAAE,6BAA8B,CAAC,EAAE;QACtDC,aAAa,EAAE,IAAI;QACnBC,IAAI,EAAE,UAAU;QAChBC,OAAO,EAAE,CACR;UACCC,KAAK,EAAE,IAAAJ,QAAE,EAAE,cAAe,CAAC;UAC3BK,OAAO,EAAEA,CAAA,KAAMR,sBAAsB,CAAE,IAAK;QAC7C,CAAC;MAEH,CAAE,CAAC;MACHN,WAAW,CAACQ,OAAO,GAAG,IAAI;IAC3B;IACAN,uBAAuB,CAACM,OAAO,GAAGZ,mBAAmB;EACtD,CAAC,EAAE,CACFI,WAAW,EACXL,MAAM,EACNO,uBAAuB,EACvBN,mBAAmB,EACnBO,gBAAgB,EAChBG,sBAAsB,CACrB,CAAC;AACJ"}
@@ -5,17 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = DisableNonPageContentBlocks;
7
7
  exports.useDisableNonPageContentBlocks = useDisableNonPageContentBlocks;
8
-
9
8
  var _element = require("@wordpress/element");
10
-
11
9
  var _compose = require("@wordpress/compose");
12
-
13
10
  var _hooks = require("@wordpress/hooks");
14
-
15
11
  var _blockEditor = require("@wordpress/block-editor");
16
-
17
- var _lockUnlock = require("../../lock-unlock");
18
-
19
12
  /**
20
13
  * WordPress dependencies
21
14
  */
@@ -23,38 +16,35 @@ var _lockUnlock = require("../../lock-unlock");
23
16
  /**
24
17
  * Internal dependencies
25
18
  */
26
- const {
27
- useBlockEditingMode
28
- } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
19
+
29
20
  const PAGE_CONTENT_BLOCK_TYPES = ['core/post-title', 'core/post-featured-image', 'core/post-content'];
21
+
30
22
  /**
31
23
  * Component that when rendered, makes it so that the site editor allows only
32
24
  * page content to be edited.
33
25
  */
34
-
35
26
  function DisableNonPageContentBlocks() {
36
27
  useDisableNonPageContentBlocks();
37
28
  return null;
38
29
  }
30
+
39
31
  /**
40
32
  * Disables non-content blocks using the `useBlockEditingMode` hook.
41
33
  */
42
-
43
-
44
34
  function useDisableNonPageContentBlocks() {
45
- useBlockEditingMode('disabled');
35
+ (0, _blockEditor.useBlockEditingMode)('disabled');
46
36
  (0, _element.useEffect)(() => {
47
37
  (0, _hooks.addFilter)('editor.BlockEdit', 'core/edit-site/disable-non-content-blocks', withDisableNonPageContentBlocks);
48
38
  return () => (0, _hooks.removeFilter)('editor.BlockEdit', 'core/edit-site/disable-non-content-blocks');
49
39
  }, []);
50
40
  }
51
-
52
41
  const withDisableNonPageContentBlocks = (0, _compose.createHigherOrderComponent)(BlockEdit => props => {
53
42
  const isDescendentOfQueryLoop = props.context.queryId !== undefined;
54
43
  const isPageContent = PAGE_CONTENT_BLOCK_TYPES.includes(props.name) && !isDescendentOfQueryLoop;
55
44
  const mode = isPageContent ? 'contentOnly' : undefined;
56
- useBlockEditingMode(mode);
57
- return (0, _element.createElement)(BlockEdit, { ...props
45
+ (0, _blockEditor.useBlockEditingMode)(mode);
46
+ return (0, _element.createElement)(BlockEdit, {
47
+ ...props
58
48
  });
59
49
  }, 'withDisableNonPageContentBlocks');
60
50
  //# sourceMappingURL=disable-non-page-content-blocks.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/disable-non-page-content-blocks.js"],"names":["useBlockEditingMode","blockEditorPrivateApis","PAGE_CONTENT_BLOCK_TYPES","DisableNonPageContentBlocks","useDisableNonPageContentBlocks","withDisableNonPageContentBlocks","BlockEdit","props","isDescendentOfQueryLoop","context","queryId","undefined","isPageContent","includes","name","mode"],"mappings":";;;;;;;;AAMA;;AAHA;;AACA;;AACA;;AAMA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;AAGA,MAAM;AAAEA,EAAAA;AAAF,IAA0B,wBAAQC,wBAAR,CAAhC;AAEA,MAAMC,wBAAwB,GAAG,CAChC,iBADgC,EAEhC,0BAFgC,EAGhC,mBAHgC,CAAjC;AAMA;AACA;AACA;AACA;;AACe,SAASC,2BAAT,GAAuC;AACrDC,EAAAA,8BAA8B;AAC9B,SAAO,IAAP;AACA;AAED;AACA;AACA;;;AACO,SAASA,8BAAT,GAA0C;AAChDJ,EAAAA,mBAAmB,CAAE,UAAF,CAAnB;AACA,0BAAW,MAAM;AAChB,0BACC,kBADD,EAEC,2CAFD,EAGCK,+BAHD;AAKA,WAAO,MACN,yBACC,kBADD,EAEC,2CAFD,CADD;AAKA,GAXD,EAWG,EAXH;AAYA;;AAED,MAAMA,+BAA+B,GAAG,yCACrCC,SAAF,IAAmBC,KAAF,IAAa;AAC7B,QAAMC,uBAAuB,GAAGD,KAAK,CAACE,OAAN,CAAcC,OAAd,KAA0BC,SAA1D;AACA,QAAMC,aAAa,GAClBV,wBAAwB,CAACW,QAAzB,CAAmCN,KAAK,CAACO,IAAzC,KACA,CAAEN,uBAFH;AAGA,QAAMO,IAAI,GAAGH,aAAa,GAAG,aAAH,GAAmBD,SAA7C;AACAX,EAAAA,mBAAmB,CAAEe,IAAF,CAAnB;AACA,SAAO,4BAAC,SAAD,OAAgBR;AAAhB,IAAP;AACA,CATsC,EAUvC,iCAVuC,CAAxC","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';\n\nconst { useBlockEditingMode } = unlock( blockEditorPrivateApis );\n\nconst PAGE_CONTENT_BLOCK_TYPES = [\n\t'core/post-title',\n\t'core/post-featured-image',\n\t'core/post-content',\n];\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\treturn null;\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 isDescendentOfQueryLoop = props.context.queryId !== undefined;\n\t\tconst isPageContent =\n\t\t\tPAGE_CONTENT_BLOCK_TYPES.includes( props.name ) &&\n\t\t\t! isDescendentOfQueryLoop;\n\t\tconst mode = isPageContent ? 'contentOnly' : undefined;\n\t\tuseBlockEditingMode( mode );\n\t\treturn <BlockEdit { ...props } />;\n\t},\n\t'withDisableNonPageContentBlocks'\n);\n"]}
1
+ {"version":3,"names":["_element","require","_compose","_hooks","_blockEditor","PAGE_CONTENT_BLOCK_TYPES","DisableNonPageContentBlocks","useDisableNonPageContentBlocks","useBlockEditingMode","useEffect","addFilter","withDisableNonPageContentBlocks","removeFilter","createHigherOrderComponent","BlockEdit","props","isDescendentOfQueryLoop","context","queryId","undefined","isPageContent","includes","name","mode","createElement"],"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/disable-non-page-content-blocks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter, removeFilter } from '@wordpress/hooks';\nimport { useBlockEditingMode } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nconst PAGE_CONTENT_BLOCK_TYPES = [\n\t'core/post-title',\n\t'core/post-featured-image',\n\t'core/post-content',\n];\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\treturn null;\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 isDescendentOfQueryLoop = props.context.queryId !== undefined;\n\t\tconst isPageContent =\n\t\t\tPAGE_CONTENT_BLOCK_TYPES.includes( props.name ) &&\n\t\t\t! isDescendentOfQueryLoop;\n\t\tconst mode = isPageContent ? 'contentOnly' : undefined;\n\t\tuseBlockEditingMode( mode );\n\t\treturn <BlockEdit { ...props } />;\n\t},\n\t'withDisableNonPageContentBlocks'\n);\n"],"mappings":";;;;;;;AAMA,IAAAA,QAAA,GAAAC,OAAA;AAHA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AALA;AACA;AACA;;AAMA;AACA;AACA;;AAEA,MAAMI,wBAAwB,GAAG,CAChC,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,CACnB;;AAED;AACA;AACA;AACA;AACe,SAASC,2BAA2BA,CAAA,EAAG;EACrDC,8BAA8B,CAAC,CAAC;EAChC,OAAO,IAAI;AACZ;;AAEA;AACA;AACA;AACO,SAASA,8BAA8BA,CAAA,EAAG;EAChD,IAAAC,gCAAmB,EAAE,UAAW,CAAC;EACjC,IAAAC,kBAAS,EAAE,MAAM;IAChB,IAAAC,gBAAS,EACR,kBAAkB,EAClB,2CAA2C,EAC3CC,+BACD,CAAC;IACD,OAAO,MACN,IAAAC,mBAAY,EACX,kBAAkB,EAClB,2CACD,CAAC;EACH,CAAC,EAAE,EAAG,CAAC;AACR;AAEA,MAAMD,+BAA+B,GAAG,IAAAE,mCAA0B,EAC/DC,SAAS,IAAQC,KAAK,IAAM;EAC7B,MAAMC,uBAAuB,GAAGD,KAAK,CAACE,OAAO,CAACC,OAAO,KAAKC,SAAS;EACnE,MAAMC,aAAa,GAClBf,wBAAwB,CAACgB,QAAQ,CAAEN,KAAK,CAACO,IAAK,CAAC,IAC/C,CAAEN,uBAAuB;EAC1B,MAAMO,IAAI,GAAGH,aAAa,GAAG,aAAa,GAAGD,SAAS;EACtD,IAAAX,gCAAmB,EAAEe,IAAK,CAAC;EAC3B,OAAO,IAAAvB,QAAA,CAAAwB,aAAA,EAACV,SAAS;IAAA,GAAMC;EAAK,CAAI,CAAC;AAClC,CAAC,EACD,iCACD,CAAC"}
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = EditTemplateNotification;
7
-
8
7
  var _element = require("@wordpress/element");
9
-
10
8
  var _data = require("@wordpress/data");
11
-
12
9
  var _notices = require("@wordpress/notices");
13
-
14
10
  var _i18n = require("@wordpress/i18n");
15
-
16
11
  var _components = require("@wordpress/components");
17
-
18
12
  var _store = require("../../store");
19
-
20
13
  /**
21
14
  * WordPress dependencies
22
15
  */
@@ -60,17 +53,13 @@ function EditTemplateNotification({
60
53
  if (!hasPageContentFocus) {
61
54
  return;
62
55
  }
63
-
64
56
  if (!event.target.classList.contains('is-root-container')) {
65
57
  return;
66
58
  }
67
-
68
59
  const isNoticeAlreadyShowing = getNotices().some(notice => notice.id === lastNoticeId.current);
69
-
70
60
  if (isNoticeAlreadyShowing) {
71
61
  return;
72
62
  }
73
-
74
63
  const {
75
64
  notice
76
65
  } = await createInfoNotice((0, _i18n.__)('Edit your template to edit this block.'), {
@@ -83,23 +72,18 @@ function EditTemplateNotification({
83
72
  });
84
73
  lastNoticeId.current = notice.id;
85
74
  };
86
-
87
75
  const handleDblClick = event => {
88
76
  if (!hasPageContentFocus) {
89
77
  return;
90
78
  }
91
-
92
79
  if (!event.target.classList.contains('is-root-container')) {
93
80
  return;
94
81
  }
95
-
96
82
  if (lastNoticeId.current) {
97
83
  removeNotice(lastNoticeId.current);
98
84
  }
99
-
100
85
  setIsDialogOpen(true);
101
86
  };
102
-
103
87
  const canvas = contentRef.current;
104
88
  canvas?.addEventListener('click', handleClick);
105
89
  canvas?.addEventListener('dblclick', handleDblClick);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/edit-template-notification.js"],"names":["EditTemplateNotification","contentRef","hasPageContentFocus","select","editSiteStore","getNotices","noticesStore","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":";;;;;;;AAIA;;AADA;;AAEA;;AACA;;AACA;;AAKA;;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,wBAAT,CAAmC;AAAEC,EAAAA;AAAF,CAAnC,EAAoD;AAClE,QAAMC,mBAAmB,GAAG,qBACzBC,MAAF,IAAcA,MAAM,CAAEC,YAAF,CAAN,CAAwBF,mBAAxB,EADa,EAE3B,EAF2B,CAA5B;AAIA,QAAM;AAAEG,IAAAA;AAAF,MAAiB,qBAAWC,cAAX,CAAvB;AAEA,QAAM;AAAEC,IAAAA,gBAAF;AAAoBC,IAAAA;AAApB,MAAqC,uBAAaF,cAAb,CAA3C;AACA,QAAM;AAAEG,IAAAA;AAAF,MAA6B,uBAAaL,YAAb,CAAnC;AAEA,QAAM,CAAEM,YAAF,EAAgBC,eAAhB,IAAoC,uBAAU,KAAV,CAA1C;AAEA,QAAM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0B,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,GAlDD,EAkDG,CAAEhB,YAAF,EAAgBV,mBAAhB,EAAqCD,UAAU,CAACqB,OAAhD,CAlDH;AAoDA,SACC,4BAAC,uCAAD;AACC,IAAA,MAAM,EAAGZ,YADV;AAEC,IAAA,iBAAiB,EAAG,cAAI,eAAJ,CAFrB;AAGC,IAAA,SAAS,EAAG,MAAM;AACjBC,MAAAA,eAAe,CAAE,KAAF,CAAf;AACAF,MAAAA,sBAAsB,CAAE,KAAF,CAAtB;AACA,KANF;AAOC,IAAA,QAAQ,EAAG,MAAME,eAAe,CAAE,KAAF;AAPjC,KASG,cAAI,wCAAJ,CATH,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"]}
1
+ {"version":3,"names":["_element","require","_data","_notices","_i18n","_components","_store","EditTemplateNotification","contentRef","hasPageContentFocus","useSelect","select","editSiteStore","getNotices","noticesStore","createInfoNotice","removeNotice","useDispatch","setHasPageContentFocus","isDialogOpen","setIsDialogOpen","useState","lastNoticeId","useRef","useEffect","handleClick","event","target","classList","contains","isNoticeAlreadyShowing","some","notice","id","current","__","isDismissible","type","actions","label","onClick","handleDblClick","canvas","addEventListener","removeEventListener","createElement","__experimentalConfirmDialog","isOpen","confirmButtonText","onConfirm","onCancel"],"sources":["@wordpress/edit-site/src/components/page-content-focus-manager/edit-template-notification.js"],"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"],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AADA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASM,wBAAwBA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAClE,MAAMC,mBAAmB,GAAG,IAAAC,eAAS,EAClCC,MAAM,IAAMA,MAAM,CAAEC,YAAc,CAAC,CAACH,mBAAmB,CAAC,CAAC,EAC3D,EACD,CAAC;EACD,MAAM;IAAEI;EAAW,CAAC,GAAG,IAAAH,eAAS,EAAEI,cAAa,CAAC;EAEhD,MAAM;IAAEC,gBAAgB;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEH,cAAa,CAAC;EACtE,MAAM;IAAEI;EAAuB,CAAC,GAAG,IAAAD,iBAAW,EAAEL,YAAc,CAAC;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