@wordpress/edit-site 5.22.0 → 5.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (524) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/actions/index.js +115 -15
  3. package/build/components/actions/index.js.map +1 -1
  4. package/build/components/add-new-template/new-template.js +0 -7
  5. package/build/components/add-new-template/new-template.js.map +1 -1
  6. package/build/components/block-editor/site-editor-canvas.js +7 -2
  7. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  8. package/build/components/block-editor/use-site-editor-settings.js +54 -63
  9. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  10. package/build/components/dataviews/add-filter.js +91 -0
  11. package/build/components/dataviews/add-filter.js.map +1 -0
  12. package/build/components/dataviews/constants.js +14 -0
  13. package/build/components/dataviews/constants.js.map +1 -0
  14. package/build/components/dataviews/dataviews.js +30 -9
  15. package/build/components/dataviews/dataviews.js.map +1 -1
  16. package/build/components/dataviews/filter-summary.js +62 -0
  17. package/build/components/dataviews/filter-summary.js.map +1 -0
  18. package/build/components/dataviews/filters.js +37 -48
  19. package/build/components/dataviews/filters.js.map +1 -1
  20. package/build/components/dataviews/index.js +9 -2
  21. package/build/components/dataviews/index.js.map +1 -1
  22. package/build/components/dataviews/item-actions.js +139 -17
  23. package/build/components/dataviews/item-actions.js.map +1 -1
  24. package/build/components/dataviews/pagination.js +7 -2
  25. package/build/components/dataviews/pagination.js.map +1 -1
  26. package/build/components/dataviews/reset-filters.js +33 -0
  27. package/build/components/dataviews/reset-filters.js.map +1 -0
  28. package/build/components/dataviews/search.js +1 -0
  29. package/build/components/dataviews/search.js.map +1 -1
  30. package/build/components/dataviews/view-actions.js +49 -32
  31. package/build/components/dataviews/view-actions.js.map +1 -1
  32. package/build/components/dataviews/view-grid.js +48 -25
  33. package/build/components/dataviews/view-grid.js.map +1 -1
  34. package/build/components/dataviews/view-list.js +130 -14
  35. package/build/components/dataviews/view-list.js.map +1 -1
  36. package/build/components/dataviews/view-side-by-side.js +20 -0
  37. package/build/components/dataviews/view-side-by-side.js.map +1 -0
  38. package/build/components/editor/index.js +52 -56
  39. package/build/components/editor/index.js.map +1 -1
  40. package/build/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js +1 -1
  41. package/build/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js.map +1 -1
  42. package/build/components/global-styles/font-library-modal/utils/index.js +15 -2
  43. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  44. package/build/components/global-styles/header.js +4 -2
  45. package/build/components/global-styles/header.js.map +1 -1
  46. package/build/components/global-styles/screen-block-list.js +22 -16
  47. package/build/components/global-styles/screen-block-list.js.map +1 -1
  48. package/build/components/global-styles/screen-revisions/index.js +66 -24
  49. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  50. package/build/components/global-styles/screen-revisions/revisions-buttons.js +52 -24
  51. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  52. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +9 -3
  53. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  54. package/build/components/global-styles/screen-root.js +3 -3
  55. package/build/components/global-styles/screen-root.js.map +1 -1
  56. package/build/components/global-styles/ui.js +31 -39
  57. package/build/components/global-styles/ui.js.map +1 -1
  58. package/build/components/global-styles-renderer/index.js +1 -1
  59. package/build/components/global-styles-renderer/index.js.map +1 -1
  60. package/build/components/header-edit-mode/document-actions/index.js +21 -16
  61. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  62. package/build/components/header-edit-mode/document-tools/index.js +160 -0
  63. package/build/components/header-edit-mode/document-tools/index.js.map +1 -0
  64. package/build/components/header-edit-mode/index.js +50 -117
  65. package/build/components/header-edit-mode/index.js.map +1 -1
  66. package/build/components/header-edit-mode/more-menu/index.js +1 -1
  67. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  68. package/build/components/header-edit-mode/more-menu/site-export.js +2 -6
  69. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  70. package/build/components/layout/index.js +4 -19
  71. package/build/components/layout/index.js.map +1 -1
  72. package/build/components/list/added-by.js +44 -54
  73. package/build/components/list/added-by.js.map +1 -1
  74. package/build/components/{page-content-focus-manager → page-content-focus-notifications}/back-to-page-notification.js +11 -15
  75. package/build/components/page-content-focus-notifications/back-to-page-notification.js.map +1 -0
  76. package/build/components/{page-content-focus-manager → page-content-focus-notifications}/edit-template-notification.js +9 -13
  77. package/build/components/page-content-focus-notifications/edit-template-notification.js.map +1 -0
  78. package/build/components/page-content-focus-notifications/index.js +22 -0
  79. package/build/components/page-content-focus-notifications/index.js.map +1 -0
  80. package/build/components/page-main/index.js +2 -1
  81. package/build/components/page-main/index.js.map +1 -1
  82. package/build/components/page-pages/index.js +137 -88
  83. package/build/components/page-pages/index.js.map +1 -1
  84. package/build/components/page-pages/side-editor.js +25 -0
  85. package/build/components/page-pages/side-editor.js.map +1 -0
  86. package/build/components/page-patterns/grid-item.js +2 -2
  87. package/build/components/page-patterns/grid-item.js.map +1 -1
  88. package/build/components/page-patterns/patterns-list.js +3 -3
  89. package/build/components/page-patterns/patterns-list.js.map +1 -1
  90. package/build/components/page-patterns/use-patterns.js +2 -2
  91. package/build/components/page-patterns/use-patterns.js.map +1 -1
  92. package/build/components/page-templates/dataviews-templates.js +316 -0
  93. package/build/components/page-templates/dataviews-templates.js.map +1 -0
  94. package/build/components/page-templates/template-actions.js +168 -0
  95. package/build/components/page-templates/template-actions.js.map +1 -0
  96. package/build/components/preferences-modal/index.js +1 -1
  97. package/build/components/preferences-modal/index.js.map +1 -1
  98. package/build/components/save-button/index.js +9 -6
  99. package/build/components/save-button/index.js.map +1 -1
  100. package/build/components/save-hub/index.js +14 -0
  101. package/build/components/save-hub/index.js.map +1 -1
  102. package/build/components/sidebar/index.js +1 -2
  103. package/build/components/sidebar/index.js.map +1 -1
  104. package/build/components/sidebar-dataviews/add-new-view.js +124 -0
  105. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -0
  106. package/build/components/sidebar-dataviews/custom-dataviews-list.js +191 -0
  107. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -0
  108. package/build/components/sidebar-dataviews/dataview-item.js +71 -0
  109. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -0
  110. package/build/components/sidebar-dataviews/default-views.js +65 -0
  111. package/build/components/sidebar-dataviews/default-views.js.map +1 -0
  112. package/build/components/sidebar-dataviews/index.js +21 -38
  113. package/build/components/sidebar-dataviews/index.js.map +1 -1
  114. package/build/components/sidebar-edit-mode/default-sidebar.js +2 -6
  115. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  116. package/build/components/sidebar-edit-mode/index.js +6 -5
  117. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  118. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +18 -29
  119. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  120. package/build/components/sidebar-edit-mode/page-panels/hooks.js +22 -8
  121. package/build/components/sidebar-edit-mode/page-panels/hooks.js.map +1 -1
  122. package/build/components/sidebar-edit-mode/page-panels/page-status.js +8 -5
  123. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  124. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +5 -8
  125. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  126. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js +6 -14
  127. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +1 -1
  128. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js +4 -12
  129. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +1 -1
  130. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -6
  131. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  132. package/build/components/sidebar-edit-mode/settings-header/index.js +10 -6
  133. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  134. package/build/components/sidebar-edit-mode/template-panel/hooks.js +3 -3
  135. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  136. package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  137. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  138. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  139. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  140. package/build/components/sidebar-navigation-screen-page/index.js +23 -4
  141. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  142. package/build/components/sidebar-navigation-screen-page/page-details.js +3 -11
  143. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  144. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -1
  145. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  146. package/build/components/site-hub/index.js +18 -6
  147. package/build/components/site-hub/index.js.map +1 -1
  148. package/build/components/start-template-options/index.js +12 -16
  149. package/build/components/start-template-options/index.js.map +1 -1
  150. package/build/components/style-book/index.js +22 -12
  151. package/build/components/style-book/index.js.map +1 -1
  152. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +150 -55
  153. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  154. package/build/components/template-part-converter/convert-to-regular.js +1 -1
  155. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  156. package/build/components/welcome-guide/page.js +2 -2
  157. package/build/components/welcome-guide/page.js.map +1 -1
  158. package/build/components/welcome-guide/template.js +6 -3
  159. package/build/components/welcome-guide/template.js.map +1 -1
  160. package/build/hooks/commands/use-edit-mode-commands.js +24 -14
  161. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  162. package/build/hooks/push-changes-to-global-styles/index.js +3 -1
  163. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  164. package/build/hooks/template-part-edit.js +6 -2
  165. package/build/hooks/template-part-edit.js.map +1 -1
  166. package/build/index.js +0 -3
  167. package/build/index.js.map +1 -1
  168. package/build/store/actions.js +39 -83
  169. package/build/store/actions.js.map +1 -1
  170. package/build/store/private-actions.js +2 -27
  171. package/build/store/private-actions.js.map +1 -1
  172. package/build/store/private-selectors.js +0 -23
  173. package/build/store/private-selectors.js.map +1 -1
  174. package/build/store/reducer.js +1 -40
  175. package/build/store/reducer.js.map +1 -1
  176. package/build/store/selectors.js +33 -67
  177. package/build/store/selectors.js.map +1 -1
  178. package/build/utils/constants.js +3 -14
  179. package/build/utils/constants.js.map +1 -1
  180. package/build-module/components/actions/index.js +113 -14
  181. package/build-module/components/actions/index.js.map +1 -1
  182. package/build-module/components/add-new-template/new-template.js +0 -7
  183. package/build-module/components/add-new-template/new-template.js.map +1 -1
  184. package/build-module/components/block-editor/site-editor-canvas.js +7 -2
  185. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  186. package/build-module/components/block-editor/use-site-editor-settings.js +54 -62
  187. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  188. package/build-module/components/dataviews/add-filter.js +84 -0
  189. package/build-module/components/dataviews/add-filter.js.map +1 -0
  190. package/build-module/components/dataviews/constants.js +6 -0
  191. package/build-module/components/dataviews/constants.js.map +1 -0
  192. package/build-module/components/dataviews/dataviews.js +29 -9
  193. package/build-module/components/dataviews/dataviews.js.map +1 -1
  194. package/build-module/components/dataviews/filter-summary.js +55 -0
  195. package/build-module/components/dataviews/filter-summary.js.map +1 -0
  196. package/build-module/components/dataviews/filters.js +37 -48
  197. package/build-module/components/dataviews/filters.js.map +1 -1
  198. package/build-module/components/dataviews/index.js +1 -1
  199. package/build-module/components/dataviews/index.js.map +1 -1
  200. package/build-module/components/dataviews/item-actions.js +142 -20
  201. package/build-module/components/dataviews/item-actions.js.map +1 -1
  202. package/build-module/components/dataviews/pagination.js +7 -2
  203. package/build-module/components/dataviews/pagination.js.map +1 -1
  204. package/build-module/components/dataviews/reset-filters.js +26 -0
  205. package/build-module/components/dataviews/reset-filters.js.map +1 -0
  206. package/build-module/components/dataviews/search.js +1 -0
  207. package/build-module/components/dataviews/search.js.map +1 -1
  208. package/build-module/components/dataviews/view-actions.js +50 -33
  209. package/build-module/components/dataviews/view-actions.js.map +1 -1
  210. package/build-module/components/dataviews/view-grid.js +49 -26
  211. package/build-module/components/dataviews/view-grid.js.map +1 -1
  212. package/build-module/components/dataviews/view-list.js +132 -16
  213. package/build-module/components/dataviews/view-list.js.map +1 -1
  214. package/build-module/components/dataviews/view-side-by-side.js +12 -0
  215. package/build-module/components/dataviews/view-side-by-side.js.map +1 -0
  216. package/build-module/components/editor/index.js +55 -59
  217. package/build-module/components/editor/index.js.map +1 -1
  218. package/build-module/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js +1 -1
  219. package/build-module/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js.map +1 -1
  220. package/build-module/components/global-styles/font-library-modal/utils/index.js +14 -2
  221. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  222. package/build-module/components/global-styles/header.js +4 -2
  223. package/build-module/components/global-styles/header.js.map +1 -1
  224. package/build-module/components/global-styles/screen-block-list.js +23 -17
  225. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  226. package/build-module/components/global-styles/screen-revisions/index.js +67 -25
  227. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  228. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +51 -24
  229. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  230. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +9 -3
  231. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  232. package/build-module/components/global-styles/screen-root.js +3 -3
  233. package/build-module/components/global-styles/screen-root.js.map +1 -1
  234. package/build-module/components/global-styles/ui.js +31 -39
  235. package/build-module/components/global-styles/ui.js.map +1 -1
  236. package/build-module/components/global-styles-renderer/index.js +1 -1
  237. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  238. package/build-module/components/header-edit-mode/document-actions/index.js +21 -16
  239. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  240. package/build-module/components/header-edit-mode/document-tools/index.js +152 -0
  241. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -0
  242. package/build-module/components/header-edit-mode/index.js +54 -121
  243. package/build-module/components/header-edit-mode/index.js.map +1 -1
  244. package/build-module/components/header-edit-mode/more-menu/index.js +1 -1
  245. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  246. package/build-module/components/header-edit-mode/more-menu/site-export.js +2 -6
  247. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  248. package/build-module/components/layout/index.js +5 -20
  249. package/build-module/components/layout/index.js.map +1 -1
  250. package/build-module/components/list/added-by.js +45 -56
  251. package/build-module/components/list/added-by.js.map +1 -1
  252. package/build-module/components/{page-content-focus-manager → page-content-focus-notifications}/back-to-page-notification.js +11 -15
  253. package/build-module/components/page-content-focus-notifications/back-to-page-notification.js.map +1 -0
  254. package/build-module/components/{page-content-focus-manager → page-content-focus-notifications}/edit-template-notification.js +9 -13
  255. package/build-module/components/page-content-focus-notifications/edit-template-notification.js.map +1 -0
  256. package/build-module/components/page-content-focus-notifications/index.js +14 -0
  257. package/build-module/components/page-content-focus-notifications/index.js.map +1 -0
  258. package/build-module/components/page-main/index.js +2 -1
  259. package/build-module/components/page-main/index.js.map +1 -1
  260. package/build-module/components/page-pages/index.js +141 -90
  261. package/build-module/components/page-pages/index.js.map +1 -1
  262. package/build-module/components/page-pages/side-editor.js +17 -0
  263. package/build-module/components/page-pages/side-editor.js.map +1 -0
  264. package/build-module/components/page-patterns/grid-item.js +2 -2
  265. package/build-module/components/page-patterns/grid-item.js.map +1 -1
  266. package/build-module/components/page-patterns/patterns-list.js +4 -4
  267. package/build-module/components/page-patterns/patterns-list.js.map +1 -1
  268. package/build-module/components/page-patterns/use-patterns.js +3 -3
  269. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  270. package/build-module/components/page-templates/dataviews-templates.js +308 -0
  271. package/build-module/components/page-templates/dataviews-templates.js.map +1 -0
  272. package/build-module/components/page-templates/template-actions.js +157 -0
  273. package/build-module/components/page-templates/template-actions.js.map +1 -0
  274. package/build-module/components/preferences-modal/index.js +1 -1
  275. package/build-module/components/preferences-modal/index.js.map +1 -1
  276. package/build-module/components/save-button/index.js +11 -8
  277. package/build-module/components/save-button/index.js.map +1 -1
  278. package/build-module/components/save-hub/index.js +14 -0
  279. package/build-module/components/save-hub/index.js.map +1 -1
  280. package/build-module/components/sidebar/index.js +1 -2
  281. package/build-module/components/sidebar/index.js.map +1 -1
  282. package/build-module/components/sidebar-dataviews/add-new-view.js +116 -0
  283. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -0
  284. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +182 -0
  285. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -0
  286. package/build-module/components/sidebar-dataviews/dataview-item.js +63 -0
  287. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -0
  288. package/build-module/components/sidebar-dataviews/default-views.js +57 -0
  289. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -0
  290. package/build-module/components/sidebar-dataviews/index.js +22 -39
  291. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  292. package/build-module/components/sidebar-edit-mode/default-sidebar.js +2 -6
  293. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  294. package/build-module/components/sidebar-edit-mode/index.js +6 -5
  295. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  296. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +20 -31
  297. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  298. package/build-module/components/sidebar-edit-mode/page-panels/hooks.js +21 -7
  299. package/build-module/components/sidebar-edit-mode/page-panels/hooks.js.map +1 -1
  300. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +9 -6
  301. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  302. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +6 -8
  303. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  304. package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js +8 -16
  305. package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +1 -1
  306. package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js +5 -13
  307. package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +1 -1
  308. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -6
  309. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  310. package/build-module/components/sidebar-edit-mode/settings-header/index.js +10 -6
  311. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  312. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js +4 -4
  313. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  314. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  315. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  316. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  317. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  318. package/build-module/components/sidebar-navigation-screen-page/index.js +23 -4
  319. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  320. package/build-module/components/sidebar-navigation-screen-page/page-details.js +3 -11
  321. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  322. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +2 -2
  323. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  324. package/build-module/components/site-hub/index.js +19 -7
  325. package/build-module/components/site-hub/index.js.map +1 -1
  326. package/build-module/components/start-template-options/index.js +13 -16
  327. package/build-module/components/start-template-options/index.js.map +1 -1
  328. package/build-module/components/style-book/index.js +22 -12
  329. package/build-module/components/style-book/index.js.map +1 -1
  330. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +150 -56
  331. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  332. package/build-module/components/template-part-converter/convert-to-regular.js +1 -1
  333. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  334. package/build-module/components/welcome-guide/page.js +2 -2
  335. package/build-module/components/welcome-guide/page.js.map +1 -1
  336. package/build-module/components/welcome-guide/template.js +6 -3
  337. package/build-module/components/welcome-guide/template.js.map +1 -1
  338. package/build-module/hooks/commands/use-edit-mode-commands.js +24 -14
  339. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  340. package/build-module/hooks/push-changes-to-global-styles/index.js +4 -2
  341. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  342. package/build-module/hooks/template-part-edit.js +6 -2
  343. package/build-module/hooks/template-part-edit.js.map +1 -1
  344. package/build-module/index.js +0 -3
  345. package/build-module/index.js.map +1 -1
  346. package/build-module/store/actions.js +37 -80
  347. package/build-module/store/actions.js.map +1 -1
  348. package/build-module/store/private-actions.js +1 -25
  349. package/build-module/store/private-actions.js.map +1 -1
  350. package/build-module/store/private-selectors.js +0 -22
  351. package/build-module/store/private-selectors.js.map +1 -1
  352. package/build-module/store/reducer.js +1 -38
  353. package/build-module/store/reducer.js.map +1 -1
  354. package/build-module/store/selectors.js +27 -62
  355. package/build-module/store/selectors.js.map +1 -1
  356. package/build-module/utils/constants.js +1 -11
  357. package/build-module/utils/constants.js.map +1 -1
  358. package/build-style/style-rtl.css +221 -181
  359. package/build-style/style.css +221 -181
  360. package/package.json +41 -41
  361. package/src/components/actions/index.js +150 -14
  362. package/src/components/add-new-template/new-template.js +0 -5
  363. package/src/components/block-editor/site-editor-canvas.js +8 -2
  364. package/src/components/block-editor/style.scss +0 -87
  365. package/src/components/block-editor/use-site-editor-settings.js +68 -89
  366. package/src/components/dataviews/README.md +80 -83
  367. package/src/components/dataviews/add-filter.js +108 -0
  368. package/src/components/dataviews/constants.js +5 -0
  369. package/src/components/dataviews/dataviews.js +28 -10
  370. package/src/components/dataviews/filter-summary.js +79 -0
  371. package/src/components/dataviews/filters.js +48 -58
  372. package/src/components/dataviews/index.js +1 -1
  373. package/src/components/dataviews/item-actions.js +169 -30
  374. package/src/components/dataviews/pagination.js +9 -4
  375. package/src/components/dataviews/reset-filters.js +26 -0
  376. package/src/components/dataviews/search.js +1 -0
  377. package/src/components/dataviews/style.scss +89 -9
  378. package/src/components/dataviews/view-actions.js +77 -49
  379. package/src/components/dataviews/view-grid.js +63 -38
  380. package/src/components/dataviews/view-list.js +182 -18
  381. package/src/components/dataviews/view-side-by-side.js +9 -0
  382. package/src/components/editor/index.js +135 -123
  383. package/src/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js +1 -1
  384. package/src/components/global-styles/font-library-modal/utils/index.js +20 -9
  385. package/src/components/global-styles/font-library-modal/utils/test/getIntersectingFontFaces.spec.js +46 -15
  386. package/src/components/global-styles/font-library-modal/utils/test/wpKebabCase.spec.js +28 -0
  387. package/src/components/global-styles/header.js +2 -1
  388. package/src/components/global-styles/screen-block-list.js +37 -26
  389. package/src/components/global-styles/screen-revisions/index.js +91 -35
  390. package/src/components/global-styles/screen-revisions/revisions-buttons.js +65 -45
  391. package/src/components/global-styles/screen-revisions/style.scss +52 -28
  392. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +15 -6
  393. package/src/components/global-styles/screen-root.js +2 -1
  394. package/src/components/global-styles/style.scss +0 -11
  395. package/src/components/global-styles/ui.js +60 -75
  396. package/src/components/global-styles-renderer/index.js +1 -1
  397. package/src/components/header-edit-mode/document-actions/index.js +20 -18
  398. package/src/components/header-edit-mode/document-tools/index.js +201 -0
  399. package/src/components/header-edit-mode/index.js +87 -184
  400. package/src/components/header-edit-mode/more-menu/index.js +1 -1
  401. package/src/components/header-edit-mode/more-menu/site-export.js +2 -6
  402. package/src/components/header-edit-mode/style.scss +35 -2
  403. package/src/components/layout/index.js +4 -11
  404. package/src/components/layout/style.scss +6 -18
  405. package/src/components/list/added-by.js +24 -64
  406. package/src/components/list/style.scss +11 -13
  407. package/src/components/{page-content-focus-manager → page-content-focus-notifications}/back-to-page-notification.js +10 -22
  408. package/src/components/{page-content-focus-manager → page-content-focus-notifications}/edit-template-notification.js +9 -13
  409. package/src/components/page-content-focus-notifications/index.js +14 -0
  410. package/src/components/page-main/index.js +6 -1
  411. package/src/components/page-pages/index.js +167 -91
  412. package/src/components/page-pages/side-editor.js +14 -0
  413. package/src/components/page-patterns/grid-item.js +3 -3
  414. package/src/components/page-patterns/patterns-list.js +10 -4
  415. package/src/components/page-patterns/use-patterns.js +4 -3
  416. package/src/components/page-templates/dataviews-templates.js +345 -0
  417. package/src/components/page-templates/style.scss +13 -0
  418. package/src/components/page-templates/template-actions.js +209 -0
  419. package/src/components/preferences-modal/index.js +1 -1
  420. package/src/components/save-button/index.js +37 -24
  421. package/src/components/save-hub/index.js +15 -0
  422. package/src/components/save-hub/style.scss +7 -0
  423. package/src/components/sidebar/index.js +1 -2
  424. package/src/components/sidebar-dataviews/add-new-view.js +141 -0
  425. package/src/components/sidebar-dataviews/custom-dataviews-list.js +229 -0
  426. package/src/components/sidebar-dataviews/dataview-item.js +67 -0
  427. package/src/components/sidebar-dataviews/default-views.js +59 -0
  428. package/src/components/sidebar-dataviews/index.js +36 -45
  429. package/src/components/sidebar-dataviews/style.scss +29 -0
  430. package/src/components/sidebar-edit-mode/default-sidebar.js +6 -6
  431. package/src/components/sidebar-edit-mode/index.js +13 -9
  432. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +31 -57
  433. package/src/components/sidebar-edit-mode/page-panels/hooks.js +20 -9
  434. package/src/components/sidebar-edit-mode/page-panels/page-status.js +6 -6
  435. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +10 -8
  436. package/src/components/sidebar-edit-mode/page-panels/reset-default-template.js +13 -12
  437. package/src/components/sidebar-edit-mode/page-panels/style.scss +14 -19
  438. package/src/components/sidebar-edit-mode/page-panels/swap-template-button.js +10 -9
  439. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +6 -6
  440. package/src/components/sidebar-edit-mode/settings-header/index.js +8 -9
  441. package/src/components/sidebar-edit-mode/template-panel/hooks.js +11 -7
  442. package/src/components/sidebar-navigation-screen/style.scss +1 -0
  443. package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  444. package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  445. package/src/components/sidebar-navigation-screen-page/index.js +24 -3
  446. package/src/components/sidebar-navigation-screen-page/page-details.js +4 -17
  447. package/src/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +2 -2
  448. package/src/components/sidebar-navigation-screen-template/style.scss +6 -1
  449. package/src/components/site-hub/index.js +9 -8
  450. package/src/components/start-template-options/index.js +14 -12
  451. package/src/components/style-book/index.js +48 -35
  452. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +182 -63
  453. package/src/components/template-part-converter/convert-to-regular.js +1 -1
  454. package/src/components/welcome-guide/page.js +2 -2
  455. package/src/components/welcome-guide/template.js +4 -2
  456. package/src/hooks/commands/use-edit-mode-commands.js +22 -16
  457. package/src/hooks/push-changes-to-global-styles/index.js +13 -6
  458. package/src/hooks/template-part-edit.js +4 -2
  459. package/src/index.js +0 -8
  460. package/src/store/actions.js +42 -96
  461. package/src/store/private-actions.js +1 -24
  462. package/src/store/private-selectors.js +0 -22
  463. package/src/store/reducer.js +0 -39
  464. package/src/store/selectors.js +43 -95
  465. package/src/store/test/actions.js +14 -169
  466. package/src/store/test/reducer.js +0 -62
  467. package/src/store/test/selectors.js +0 -117
  468. package/src/style.scss +2 -0
  469. package/src/utils/constants.js +1 -11
  470. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js +0 -77
  471. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +0 -1
  472. package/build/components/block-editor/block-editor-provider/index.js +0 -31
  473. package/build/components/block-editor/block-editor-provider/index.js.map +0 -1
  474. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +0 -110
  475. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js.map +0 -1
  476. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js +0 -84
  477. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +0 -1
  478. package/build/components/block-editor/index.js +0 -30
  479. package/build/components/block-editor/index.js.map +0 -1
  480. package/build/components/dataviews/in-filter.js +0 -49
  481. package/build/components/dataviews/in-filter.js.map +0 -1
  482. package/build/components/page-content-focus-manager/back-to-page-notification.js.map +0 -1
  483. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +0 -50
  484. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +0 -1
  485. package/build/components/page-content-focus-manager/edit-template-notification.js.map +0 -1
  486. package/build/components/page-content-focus-manager/index.js +0 -61
  487. package/build/components/page-content-focus-manager/index.js.map +0 -1
  488. package/build/components/page-pages/default-views.js +0 -62
  489. package/build/components/page-pages/default-views.js.map +0 -1
  490. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +0 -87
  491. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +0 -1
  492. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js +0 -69
  493. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +0 -1
  494. package/build-module/components/block-editor/block-editor-provider/index.js +0 -23
  495. package/build-module/components/block-editor/block-editor-provider/index.js.map +0 -1
  496. package/build-module/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +0 -102
  497. package/build-module/components/block-editor/block-editor-provider/navigation-block-editor-provider.js.map +0 -1
  498. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js +0 -78
  499. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +0 -1
  500. package/build-module/components/block-editor/index.js +0 -22
  501. package/build-module/components/block-editor/index.js.map +0 -1
  502. package/build-module/components/dataviews/in-filter.js +0 -41
  503. package/build-module/components/dataviews/in-filter.js.map +0 -1
  504. package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +0 -1
  505. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +0 -43
  506. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +0 -1
  507. package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +0 -1
  508. package/build-module/components/page-content-focus-manager/index.js +0 -52
  509. package/build-module/components/page-content-focus-manager/index.js.map +0 -1
  510. package/build-module/components/page-pages/default-views.js +0 -55
  511. package/build-module/components/page-pages/default-views.js.map +0 -1
  512. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +0 -80
  513. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +0 -1
  514. package/src/components/block-editor/block-editor-provider/default-block-editor-provider.js +0 -75
  515. package/src/components/block-editor/block-editor-provider/index.js +0 -29
  516. package/src/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +0 -114
  517. package/src/components/block-editor/block-editor-provider/test/use-page-content-blocks.js +0 -116
  518. package/src/components/block-editor/block-editor-provider/use-page-content-blocks.js +0 -90
  519. package/src/components/block-editor/index.js +0 -28
  520. package/src/components/dataviews/in-filter.js +0 -45
  521. package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +0 -52
  522. package/src/components/page-content-focus-manager/index.js +0 -51
  523. package/src/components/page-pages/default-views.js +0 -60
  524. package/src/components/sidebar-edit-mode/page-panels/publish-date.js +0 -94
@@ -1,39 +1,23 @@
1
- /**
2
- * External dependencies
3
- */
4
- import createSelector from 'rememo';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
9
4
  import { store as coreDataStore } from '@wordpress/core-data';
10
5
  import { createRegistrySelector } from '@wordpress/data';
11
6
  import deprecated from '@wordpress/deprecated';
12
- import { uploadMedia } from '@wordpress/media-utils';
13
7
  import { Platform } from '@wordpress/element';
14
8
  import { store as preferencesStore } from '@wordpress/preferences';
15
9
  import { store as blockEditorStore } from '@wordpress/block-editor';
10
+ import { store as editorStore } from '@wordpress/editor';
16
11
 
17
12
  /**
18
13
  * Internal dependencies
19
14
  */
20
15
  import { getFilteredTemplatePartBlocks } from './utils';
21
- import { TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE } from '../utils/constants';
16
+ import { TEMPLATE_PART_POST_TYPE } from '../utils/constants';
22
17
  /**
23
18
  * @typedef {'template'|'template_type'} TemplateType Template type.
24
19
  */
25
20
 
26
- /**
27
- * Helper for getting a preference from the preferences store.
28
- *
29
- * This is only present so that `getSettings` doesn't need to be made a
30
- * registry selector.
31
- *
32
- * It's unstable because the selector needs to be exported and so part of the
33
- * public API to work.
34
- */
35
- export const __unstableGetPreference = createRegistrySelector(select => (state, name) => select(preferencesStore).get('core/edit-site', name));
36
-
37
21
  /**
38
22
  * Returns whether the given feature is enabled or not.
39
23
  *
@@ -43,13 +27,13 @@ export const __unstableGetPreference = createRegistrySelector(select => (state,
43
27
  *
44
28
  * @return {boolean} Is active.
45
29
  */
46
- export function isFeatureActive(state, featureName) {
30
+ export const isFeatureActive = createRegistrySelector(select => (_, featureName) => {
47
31
  deprecated(`select( 'core/edit-site' ).isFeatureActive`, {
48
32
  since: '6.0',
49
33
  alternative: `select( 'core/preferences' ).get`
50
34
  });
51
- return !!__unstableGetPreference(state, featureName);
52
- }
35
+ return !!select(preferencesStore).get('core/edit-site', featureName);
36
+ });
53
37
 
54
38
  /**
55
39
  * Returns the current editing canvas device type.
@@ -79,6 +63,10 @@ export const getCanUserCreateMedia = createRegistrySelector(select => () => sele
79
63
  * @return {Array} The available reusable blocks.
80
64
  */
81
65
  export const getReusableBlocks = createRegistrySelector(select => () => {
66
+ deprecated("select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )", {
67
+ since: '6.5',
68
+ version: '6.8'
69
+ });
82
70
  const isWeb = Platform.OS === 'web';
83
71
  return isWeb ? select(coreDataStore).getEntityRecords('postType', 'wp_block', {
84
72
  per_page: -1
@@ -86,44 +74,18 @@ export const getReusableBlocks = createRegistrySelector(select => () => {
86
74
  });
87
75
 
88
76
  /**
89
- * Returns the settings, taking into account active features and permissions.
77
+ * Returns the site editor settings.
90
78
  *
91
- * @param {Object} state Global application state.
92
- * @param {Function} setIsInserterOpen Setter for the open state of the global inserter.
79
+ * @param {Object} state Global application state.
93
80
  *
94
81
  * @return {Object} Settings.
95
82
  */
96
- export const getSettings = createSelector((state, setIsInserterOpen) => {
97
- const settings = {
98
- ...state.settings,
99
- outlineMode: true,
100
- focusMode: !!__unstableGetPreference(state, 'focusMode'),
101
- isDistractionFree: !!__unstableGetPreference(state, 'distractionFree'),
102
- hasFixedToolbar: !!__unstableGetPreference(state, 'fixedToolbar'),
103
- keepCaretInsideBlock: !!__unstableGetPreference(state, 'keepCaretInsideBlock'),
104
- showIconLabels: !!__unstableGetPreference(state, 'showIconLabels'),
105
- __experimentalSetIsInserterOpened: setIsInserterOpen,
106
- __experimentalReusableBlocks: getReusableBlocks(state),
107
- __experimentalPreferPatternsOnRoot: TEMPLATE_POST_TYPE === getEditedPostType(state)
108
- };
109
- const canUserCreateMedia = getCanUserCreateMedia(state);
110
- if (!canUserCreateMedia) {
111
- return settings;
112
- }
113
- settings.mediaUpload = ({
114
- onError,
115
- ...rest
116
- }) => {
117
- uploadMedia({
118
- wpAllowedMimeTypes: state.settings.allowedMimeTypes,
119
- onError: ({
120
- message
121
- }) => onError(message),
122
- ...rest
123
- });
124
- };
125
- return settings;
126
- }, state => [getCanUserCreateMedia(state), state.settings, __unstableGetPreference(state, 'focusMode'), __unstableGetPreference(state, 'distractionFree'), __unstableGetPreference(state, 'fixedToolbar'), __unstableGetPreference(state, 'keepCaretInsideBlock'), __unstableGetPreference(state, 'showIconLabels'), getReusableBlocks(state), getEditedPostType(state)]);
83
+ export function getSettings(state) {
84
+ // It is important that we don't inject anything into these settings locally.
85
+ // The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.
86
+ // If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.
87
+ return state.settings;
88
+ }
127
89
 
128
90
  /**
129
91
  * @deprecated
@@ -214,7 +176,7 @@ export const __experimentalGetInsertionPoint = createRegistrySelector(select =>
214
176
  filterValue
215
177
  };
216
178
  }
217
- if (hasPageContentFocus(state)) {
179
+ if (isPage(state) && select(editorStore).getRenderingMode() !== 'template-only') {
218
180
  const [postContentClientId] = select(blockEditorStore).__experimentalGetGlobalBlocksByName('core/post-content');
219
181
  if (postContentClientId) {
220
182
  return {
@@ -275,9 +237,9 @@ export const getCurrentTemplateTemplateParts = createRegistrySelector(select =>
275
237
  *
276
238
  * @return {string} Editing mode.
277
239
  */
278
- export function getEditorMode(state) {
279
- return __unstableGetPreference(state, 'editorMode');
280
- }
240
+ export const getEditorMode = createRegistrySelector(select => () => {
241
+ return select(preferencesStore).get('core/edit-site', 'editorMode');
242
+ });
281
243
 
282
244
  /**
283
245
  * @deprecated
@@ -325,11 +287,14 @@ export function isPage(state) {
325
287
  /**
326
288
  * Whether or not the editor allows only page content to be edited.
327
289
  *
328
- * @param {Object} state Global application state.
290
+ * @deprecated
329
291
  *
330
292
  * @return {boolean} Whether or not focus is on editing page content.
331
293
  */
332
- export function hasPageContentFocus(state) {
333
- return isPage(state) ? state.hasPageContentFocus : false;
294
+ export function hasPageContentFocus() {
295
+ deprecated(`select( 'core/edit-site' ).hasPageContentFocus`, {
296
+ since: '6.5'
297
+ });
298
+ return false;
334
299
  }
335
300
  //# sourceMappingURL=selectors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createSelector","store","coreDataStore","createRegistrySelector","deprecated","uploadMedia","Platform","preferencesStore","blockEditorStore","getFilteredTemplatePartBlocks","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","__unstableGetPreference","select","state","name","get","isFeatureActive","featureName","since","alternative","__experimentalGetPreviewDeviceType","deviceType","getCanUserCreateMedia","canUser","getReusableBlocks","isWeb","OS","getEntityRecords","per_page","getSettings","setIsInserterOpen","settings","outlineMode","focusMode","isDistractionFree","hasFixedToolbar","keepCaretInsideBlock","showIconLabels","__experimentalSetIsInserterOpened","__experimentalReusableBlocks","__experimentalPreferPatternsOnRoot","getEditedPostType","canUserCreateMedia","mediaUpload","onError","rest","wpAllowedMimeTypes","allowedMimeTypes","message","getHomeTemplateId","version","editedPost","postType","getEditedPostId","id","getEditedPostContext","context","getPage","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","hasPageContentFocus","postContentClientId","__experimentalGetGlobalBlocksByName","undefined","isListViewOpened","listViewPanel","isSaveViewOpened","saveViewPanel","getCurrentTemplateTemplateParts","templateParts","clientIds","blocks","getBlocksByClientId","getEditorMode","getCurrentTemplateNavigationPanelSubMenu","getNavigationPanelActiveMenu","isNavigationOpened","isPage","postId"],"sources":["@wordpress/edit-site/src/store/selectors.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport createSelector from 'rememo';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { Platform } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { getFilteredTemplatePartBlocks } from './utils';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../utils/constants';\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Helper for getting a preference from the preferences store.\n *\n * This is only present so that `getSettings` doesn't need to be made a\n * registry selector.\n *\n * It's unstable because the selector needs to be exported and so part of the\n * public API to work.\n */\nexport const __unstableGetPreference = createRegistrySelector(\n\t( select ) => ( state, name ) =>\n\t\tselect( preferencesStore ).get( 'core/edit-site', name )\n);\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @param {string} featureName Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport function isFeatureActive( state, featureName ) {\n\tdeprecated( `select( 'core/edit-site' ).isFeatureActive`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\treturn !! __unstableGetPreference( state, featureName );\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport function __experimentalGetPreviewDeviceType( state ) {\n\treturn state.deviceType;\n}\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector(\n\t( select ) => () => select( coreDataStore ).canUser( 'create', 'media' )\n);\n\n/**\n * Returns any available Reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The available reusable blocks.\n */\nexport const getReusableBlocks = createRegistrySelector( ( select ) => () => {\n\tconst isWeb = Platform.OS === 'web';\n\treturn isWeb\n\t\t? select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\t\tper_page: -1,\n\t\t } )\n\t\t: [];\n} );\n\n/**\n * Returns the settings, taking into account active features and permissions.\n *\n * @param {Object} state Global application state.\n * @param {Function} setIsInserterOpen Setter for the open state of the global inserter.\n *\n * @return {Object} Settings.\n */\nexport const getSettings = createSelector(\n\t( state, setIsInserterOpen ) => {\n\t\tconst settings = {\n\t\t\t...state.settings,\n\t\t\toutlineMode: true,\n\t\t\tfocusMode: !! __unstableGetPreference( state, 'focusMode' ),\n\t\t\tisDistractionFree: !! __unstableGetPreference(\n\t\t\t\tstate,\n\t\t\t\t'distractionFree'\n\t\t\t),\n\t\t\thasFixedToolbar: !! __unstableGetPreference(\n\t\t\t\tstate,\n\t\t\t\t'fixedToolbar'\n\t\t\t),\n\t\t\tkeepCaretInsideBlock: !! __unstableGetPreference(\n\t\t\t\tstate,\n\t\t\t\t'keepCaretInsideBlock'\n\t\t\t),\n\t\t\tshowIconLabels: !! __unstableGetPreference(\n\t\t\t\tstate,\n\t\t\t\t'showIconLabels'\n\t\t\t),\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpen,\n\t\t\t__experimentalReusableBlocks: getReusableBlocks( state ),\n\t\t\t__experimentalPreferPatternsOnRoot:\n\t\t\t\tTEMPLATE_POST_TYPE === getEditedPostType( state ),\n\t\t};\n\n\t\tconst canUserCreateMedia = getCanUserCreateMedia( state );\n\t\tif ( ! canUserCreateMedia ) {\n\t\t\treturn settings;\n\t\t}\n\n\t\tsettings.mediaUpload = ( { onError, ...rest } ) => {\n\t\t\tuploadMedia( {\n\t\t\t\twpAllowedMimeTypes: state.settings.allowedMimeTypes,\n\t\t\t\tonError: ( { message } ) => onError( message ),\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t};\n\t\treturn settings;\n\t},\n\t( state ) => [\n\t\tgetCanUserCreateMedia( state ),\n\t\tstate.settings,\n\t\t__unstableGetPreference( state, 'focusMode' ),\n\t\t__unstableGetPreference( state, 'distractionFree' ),\n\t\t__unstableGetPreference( state, 'fixedToolbar' ),\n\t\t__unstableGetPreference( state, 'keepCaretInsideBlock' ),\n\t\t__unstableGetPreference( state, 'showIconLabels' ),\n\t\tgetReusableBlocks( state ),\n\t\tgetEditedPostType( state ),\n\t]\n);\n\n/**\n * @deprecated\n */\nexport function getHomeTemplateId() {\n\tdeprecated( \"select( 'core/edit-site' ).getHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @param {Object} state Global application state.\n *\n * @return {TemplateType?} Template type.\n */\nexport function getEditedPostType( state ) {\n\treturn state.editedPost.postType;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @param {Object} state Global application state.\n *\n * @return {string?} Post ID.\n */\nexport function getEditedPostId( state ) {\n\treturn state.editedPost.id;\n}\n\n/**\n * Returns the edited post's context object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getEditedPostContext( state ) {\n\treturn state.editedPost.context;\n}\n\n/**\n * Returns the current page object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\treturn { context: state.editedPost.context };\n}\n\n/**\n * Returns the current opened/closed state of the inserter panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the inserter panel should be open; false if closed.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\tconst { rootClientId, insertionIndex, filterValue } =\n\t\t\t\tstate.blockInserterPanel;\n\t\t\treturn { rootClientId, insertionIndex, filterValue };\n\t\t}\n\n\t\tif ( hasPageContentFocus( state ) ) {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).__experimentalGetGlobalBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\tif ( postContentClientId ) {\n\t\t\t\treturn {\n\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\trootClientId: undefined,\n\t\t\tinsertionIndex: undefined,\n\t\t\tfilterValue: undefined,\n\t\t};\n\t}\n);\n\n/**\n * Returns the current opened/closed state of the list view panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the list view panel should be open; false if closed.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns the current opened/closed state of the save panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the save panel should be open; false if closed.\n */\nexport function isSaveViewOpened( state ) {\n\treturn state.saveViewPanel;\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t{ per_page: -1 }\n\t\t);\n\n\t\tconst clientIds =\n\t\t\tselect( blockEditorStore ).__experimentalGetGlobalBlocksByName(\n\t\t\t\t'core/template-part'\n\t\t\t);\n\t\tconst blocks =\n\t\t\tselect( blockEditorStore ).getBlocksByClientId( clientIds );\n\n\t\treturn getFilteredTemplatePartBlocks( blocks, templateParts );\n\t}\n);\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport function getEditorMode( state ) {\n\treturn __unstableGetPreference( state, 'editorMode' );\n}\n\n/**\n * @deprecated\n */\nexport function getCurrentTemplateNavigationPanelSubMenu() {\n\tdeprecated(\n\t\t\"dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu\",\n\t\t{\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t}\n\t);\n}\n\n/**\n * @deprecated\n */\nexport function getNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * @deprecated\n */\nexport function isNavigationOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).isNavigationOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Whether or not the editor has a page loaded into it.\n *\n * @see setPage\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not the editor has a page loaded into it.\n */\nexport function isPage( state ) {\n\treturn !! state.editedPost.context?.postId;\n}\n\n/**\n * Whether or not the editor allows only page content to be edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not focus is on editing page content.\n */\nexport function hasPageContentFocus( state ) {\n\treturn isPage( state ) ? state.hasPageContentFocus : false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,cAAc,MAAM,QAAQ;;AAEnC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,aAAa,QAAQ,sBAAsB;AAC7D,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,wBAAwB;AAClE,SAASN,KAAK,IAAIO,gBAAgB,QAAQ,yBAAyB;;AAEnE;AACA;AACA;AACA,SAASC,6BAA6B,QAAQ,SAAS;AACvD,SACCC,kBAAkB,EAClBC,uBAAuB,QACjB,oBAAoB;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAGT,sBAAsB,CAC1DU,MAAM,IAAM,CAAEC,KAAK,EAAEC,IAAI,KAC1BF,MAAM,CAAEN,gBAAiB,CAAC,CAACS,GAAG,CAAE,gBAAgB,EAAED,IAAK,CACzD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,eAAeA,CAAEH,KAAK,EAAEI,WAAW,EAAG;EACrDd,UAAU,CAAG,4CAA2C,EAAE;IACzDe,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG;EACf,CAAE,CAAC;EAEH,OAAO,CAAC,CAAER,uBAAuB,CAAEE,KAAK,EAAEI,WAAY,CAAC;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,kCA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AAK;IACZgC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA,OAAO,SAAS8B,kBAAkBA,CAAA,EAAG;EACpC7E,UAAU,CAAE,iDAAiD,EAAE;IAC9De,KAAK,EAAE,KAAK;IACZgC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS+B,MAAMA,CAAEpE,KAAK,EAAG;EAC/B,OAAO,CAAC,CAAEA,KAAK,CAACsC,UAAU,CAACK,OAAO,EAAE0B,MAAM;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASlB,mBAAmBA,CAAEnD,KAAK,EAAG;EAC5C,OAAOoE,MAAM,CAAEpE,KAAM,CAAC,GAAGA,KAAK,CAACmD,mBAAmB,GAAG,KAAK;AAC3D"}
1
+ {"version":3,"names":["store","coreDataStore","createRegistrySelector","deprecated","Platform","preferencesStore","blockEditorStore","editorStore","getFilteredTemplatePartBlocks","TEMPLATE_PART_POST_TYPE","isFeatureActive","select","_","featureName","since","alternative","get","__experimentalGetPreviewDeviceType","state","deviceType","getCanUserCreateMedia","canUser","getReusableBlocks","version","isWeb","OS","getEntityRecords","per_page","getSettings","settings","getHomeTemplateId","getEditedPostType","editedPost","postType","getEditedPostId","id","getEditedPostContext","context","getPage","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","isPage","getRenderingMode","postContentClientId","__experimentalGetGlobalBlocksByName","undefined","isListViewOpened","listViewPanel","isSaveViewOpened","saveViewPanel","getCurrentTemplateTemplateParts","templateParts","clientIds","blocks","getBlocksByClientId","getEditorMode","getCurrentTemplateNavigationPanelSubMenu","getNavigationPanelActiveMenu","isNavigationOpened","postId","hasPageContentFocus"],"sources":["@wordpress/edit-site/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { getFilteredTemplatePartBlocks } from './utils';\nimport { TEMPLATE_PART_POST_TYPE } from '../utils/constants';\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @param {string} featureName Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( _, featureName ) => {\n\t\tdeprecated( `select( 'core/edit-site' ).isFeatureActive`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `select( 'core/preferences' ).get`,\n\t\t} );\n\n\t\treturn !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\tfeatureName\n\t\t);\n\t}\n);\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport function __experimentalGetPreviewDeviceType( state ) {\n\treturn state.deviceType;\n}\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector(\n\t( select ) => () => select( coreDataStore ).canUser( 'create', 'media' )\n);\n\n/**\n * Returns any available Reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The available reusable blocks.\n */\nexport const getReusableBlocks = createRegistrySelector( ( select ) => () => {\n\tdeprecated(\n\t\t\"select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )\",\n\t\t{\n\t\t\tsince: '6.5',\n\t\t\tversion: '6.8',\n\t\t}\n\t);\n\tconst isWeb = Platform.OS === 'web';\n\treturn isWeb\n\t\t? select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\t\tper_page: -1,\n\t\t } )\n\t\t: [];\n} );\n\n/**\n * Returns the site editor settings.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Settings.\n */\nexport function getSettings( state ) {\n\t// It is important that we don't inject anything into these settings locally.\n\t// The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.\n\t// If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.\n\treturn state.settings;\n}\n\n/**\n * @deprecated\n */\nexport function getHomeTemplateId() {\n\tdeprecated( \"select( 'core/edit-site' ).getHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @param {Object} state Global application state.\n *\n * @return {TemplateType?} Template type.\n */\nexport function getEditedPostType( state ) {\n\treturn state.editedPost.postType;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @param {Object} state Global application state.\n *\n * @return {string?} Post ID.\n */\nexport function getEditedPostId( state ) {\n\treturn state.editedPost.id;\n}\n\n/**\n * Returns the edited post's context object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getEditedPostContext( state ) {\n\treturn state.editedPost.context;\n}\n\n/**\n * Returns the current page object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\treturn { context: state.editedPost.context };\n}\n\n/**\n * Returns the current opened/closed state of the inserter panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the inserter panel should be open; false if closed.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\tconst { rootClientId, insertionIndex, filterValue } =\n\t\t\t\tstate.blockInserterPanel;\n\t\t\treturn { rootClientId, insertionIndex, filterValue };\n\t\t}\n\n\t\tif (\n\t\t\tisPage( state ) &&\n\t\t\tselect( editorStore ).getRenderingMode() !== 'template-only'\n\t\t) {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).__experimentalGetGlobalBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\tif ( postContentClientId ) {\n\t\t\t\treturn {\n\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\trootClientId: undefined,\n\t\t\tinsertionIndex: undefined,\n\t\t\tfilterValue: undefined,\n\t\t};\n\t}\n);\n\n/**\n * Returns the current opened/closed state of the list view panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the list view panel should be open; false if closed.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns the current opened/closed state of the save panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the save panel should be open; false if closed.\n */\nexport function isSaveViewOpened( state ) {\n\treturn state.saveViewPanel;\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t{ per_page: -1 }\n\t\t);\n\n\t\tconst clientIds =\n\t\t\tselect( blockEditorStore ).__experimentalGetGlobalBlocksByName(\n\t\t\t\t'core/template-part'\n\t\t\t);\n\t\tconst blocks =\n\t\t\tselect( blockEditorStore ).getBlocksByClientId( clientIds );\n\n\t\treturn getFilteredTemplatePartBlocks( blocks, templateParts );\n\t}\n);\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector( ( select ) => () => {\n\treturn select( preferencesStore ).get( 'core/edit-site', 'editorMode' );\n} );\n\n/**\n * @deprecated\n */\nexport function getCurrentTemplateNavigationPanelSubMenu() {\n\tdeprecated(\n\t\t\"dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu\",\n\t\t{\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t}\n\t);\n}\n\n/**\n * @deprecated\n */\nexport function getNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * @deprecated\n */\nexport function isNavigationOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).isNavigationOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Whether or not the editor has a page loaded into it.\n *\n * @see setPage\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not the editor has a page loaded into it.\n */\nexport function isPage( state ) {\n\treturn !! state.editedPost.context?.postId;\n}\n\n/**\n * Whether or not the editor allows only page content to be edited.\n *\n * @deprecated\n *\n * @return {boolean} Whether or not focus is on editing page content.\n */\nexport function hasPageContentFocus() {\n\tdeprecated( `select( 'core/edit-site' ).hasPageContentFocus`, {\n\t\tsince: '6.5',\n\t} );\n\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,aAAa,QAAQ,sBAAsB;AAC7D,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASJ,KAAK,IAAIK,gBAAgB,QAAQ,wBAAwB;AAClE,SAASL,KAAK,IAAIM,gBAAgB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D,OAAOhD,6BAA6B,CAAEiD,MAAM,EAAEF,aAAc,CAAC;AAC9D,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,aAAa,GAAGzD,sBAAsB,CAAIS,MAAM,IAAM,MAAM;EACxE,OAAOA,MAAM,CAAEN,gBAAiB,CAAC,CAACW,GAAG,CAAE,gBAAgB,EAAE,YAAa,CAAC;AACxE,CAAE,CAAC;;AAEH;AACA;AACA;AACA,OAAO,SAAS4C,wCAAwCA,CAAA,EAAG;EAC1DzD,UAAU,CACT,uEAAuE,EACvE;IACCW,KAAK,EAAE,KAAK;IACZS,OAAO,EAAE;EACV,CACD,CAAC;AACF;;AAEA;AACA;AACA;AACA,OAAO,SAASsC,4BAA4BA,CAAA,EAAG;EAC9C1D,UAAU,CAAE,2DAA2D,EAAE;IACxEW,KAAK,EAAE,KAAK;IACZS,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA,OAAO,SAASuC,kBAAkBA,CAAA,EAAG;EACpC3D,UAAU,CAAE,iDAAiD,EAAE;IAC9DW,KAAK,EAAE,KAAK;IACZS,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASsB,MAAMA,CAAE3B,KAAK,EAAG;EAC/B,OAAO,CAAC,CAAEA,KAAK,CAACc,UAAU,CAACK,OAAO,EAAE0B,MAAM;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAA,EAAG;EACrC7D,UAAU,CAAG,gDAA+C,EAAE;IAC7DW,KAAK,EAAE;EACR,CAAE,CAAC;EAEH,OAAO,KAAK;AACb"}
@@ -27,22 +27,12 @@ export const {
27
27
  PATTERN_TYPES,
28
28
  PATTERN_DEFAULT_CATEGORY,
29
29
  PATTERN_USER_CATEGORY,
30
- PATTERN_CORE_SOURCES,
30
+ EXCLUDED_PATTERN_SOURCES,
31
31
  PATTERN_SYNC_TYPES
32
32
  } = unlock(patternPrivateApis);
33
33
 
34
34
  // Entities that are editable in focus mode.
35
35
  export const FOCUSABLE_ENTITIES = [TEMPLATE_PART_POST_TYPE, NAVIGATION_POST_TYPE, PATTERN_TYPES.user];
36
-
37
- /**
38
- * Block types that are considered to be page content. These are the only blocks
39
- * editable when hasPageContentFocus() is true.
40
- */
41
- export const PAGE_CONTENT_BLOCK_TYPES = {
42
- 'core/post-title': true,
43
- 'core/post-featured-image': true,
44
- 'core/post-content': true
45
- };
46
36
  export const POST_TYPE_LABELS = {
47
37
  [TEMPLATE_POST_TYPE]: __('Template'),
48
38
  [TEMPLATE_PART_POST_TYPE]: __('Template part'),
@@ -1 +1 @@
1
- {"version":3,"names":["__","privateApis","patternPrivateApis","unlock","NAVIGATION_POST_TYPE","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","TEMPLATE_ORIGINS","custom","theme","plugin","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","PATTERN_TYPES","PATTERN_DEFAULT_CATEGORY","PATTERN_USER_CATEGORY","PATTERN_CORE_SOURCES","PATTERN_SYNC_TYPES","FOCUSABLE_ENTITIES","user","PAGE_CONTENT_BLOCK_TYPES","POST_TYPE_LABELS"],"sources":["@wordpress/edit-site/src/utils/constants.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as patternPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\n// Navigation\nexport const NAVIGATION_POST_TYPE = 'wp_navigation';\n\n// Templates.\nexport const TEMPLATE_POST_TYPE = 'wp_template';\nexport const TEMPLATE_PART_POST_TYPE = 'wp_template_part';\nexport const TEMPLATE_ORIGINS = {\n\tcustom: 'custom',\n\ttheme: 'theme',\n\tplugin: 'plugin',\n};\nexport const TEMPLATE_PART_AREA_DEFAULT_CATEGORY = 'uncategorized';\n\n// Patterns.\nexport const {\n\tPATTERN_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_USER_CATEGORY,\n\tPATTERN_CORE_SOURCES,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternPrivateApis );\n\n// Entities that are editable in focus mode.\nexport const FOCUSABLE_ENTITIES = [\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_TYPES.user,\n];\n\n/**\n * Block types that are considered to be page content. These are the only blocks\n * editable when hasPageContentFocus() is true.\n */\nexport const PAGE_CONTENT_BLOCK_TYPES = {\n\t'core/post-title': true,\n\t'core/post-featured-image': true,\n\t'core/post-content': true,\n};\n\nexport const POST_TYPE_LABELS = {\n\t[ TEMPLATE_POST_TYPE ]: __( 'Template' ),\n\t[ TEMPLATE_PART_POST_TYPE ]: __( 'Template part' ),\n\t[ PATTERN_TYPES.user ]: __( 'Pattern' ),\n\t[ NAVIGATION_POST_TYPE ]: __( 'Navigation' ),\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,kBAAkB,QAAQ,qBAAqB;;AAEvE;AACA;AACA;AACA,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AACA,OAAO,MAAMC,oBAAoB,GAAG,eAAe;;AAEnD;AACA,OAAO,MAAMC,kBAAkB,GAAG,aAAa;AAC/C,OAAO,MAAMC,uBAAuB,GAAG,kBAAkB;AACzD,OAAO,MAAMC,gBAAgB,GAAG;EAC/BC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,MAAM,EAAE;AACT,CAAC;AACD,OAAO,MAAMC,mCAAmC,GAAG,eAAe;;AAElE;AACA,OAAO,MAAM;EACZC,aAAa;EACbC,wBAAwB;EACxBC,qBAAqB;EACrBC,oBAAoB;EACpBC;AACD,CAAC,GAAGb,MAAM,CAAED,kBAAmB,CAAC;;AAEhC;AACA,OAAO,MAAMe,kBAAkB,GAAG,CACjCX,uBAAuB,EACvBF,oBAAoB,EACpBQ,aAAa,CAACM,IAAI,CAClB;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAG;EACvC,iBAAiB,EAAE,IAAI;EACvB,0BAA0B,EAAE,IAAI;EAChC,mBAAmB,EAAE;AACtB,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAG;EAC/B,CAAEf,kBAAkB,GAAIL,EAAE,CAAE,UAAW,CAAC;EACxC,CAAEM,uBAAuB,GAAIN,EAAE,CAAE,eAAgB,CAAC;EAClD,CAAEY,aAAa,CAACM,IAAI,GAAIlB,EAAE,CAAE,SAAU,CAAC;EACvC,CAAEI,oBAAoB,GAAIJ,EAAE,CAAE,YAAa;AAC5C,CAAC"}
1
+ {"version":3,"names":["__","privateApis","patternPrivateApis","unlock","NAVIGATION_POST_TYPE","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","TEMPLATE_ORIGINS","custom","theme","plugin","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","PATTERN_TYPES","PATTERN_DEFAULT_CATEGORY","PATTERN_USER_CATEGORY","EXCLUDED_PATTERN_SOURCES","PATTERN_SYNC_TYPES","FOCUSABLE_ENTITIES","user","POST_TYPE_LABELS"],"sources":["@wordpress/edit-site/src/utils/constants.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as patternPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\n// Navigation\nexport const NAVIGATION_POST_TYPE = 'wp_navigation';\n\n// Templates.\nexport const TEMPLATE_POST_TYPE = 'wp_template';\nexport const TEMPLATE_PART_POST_TYPE = 'wp_template_part';\nexport const TEMPLATE_ORIGINS = {\n\tcustom: 'custom',\n\ttheme: 'theme',\n\tplugin: 'plugin',\n};\nexport const TEMPLATE_PART_AREA_DEFAULT_CATEGORY = 'uncategorized';\n\n// Patterns.\nexport const {\n\tPATTERN_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_USER_CATEGORY,\n\tEXCLUDED_PATTERN_SOURCES,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternPrivateApis );\n\n// Entities that are editable in focus mode.\nexport const FOCUSABLE_ENTITIES = [\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_TYPES.user,\n];\n\nexport const POST_TYPE_LABELS = {\n\t[ TEMPLATE_POST_TYPE ]: __( 'Template' ),\n\t[ TEMPLATE_PART_POST_TYPE ]: __( 'Template part' ),\n\t[ PATTERN_TYPES.user ]: __( 'Pattern' ),\n\t[ NAVIGATION_POST_TYPE ]: __( 'Navigation' ),\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,kBAAkB,QAAQ,qBAAqB;;AAEvE;AACA;AACA;AACA,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AACA,OAAO,MAAMC,oBAAoB,GAAG,eAAe;;AAEnD;AACA,OAAO,MAAMC,kBAAkB,GAAG,aAAa;AAC/C,OAAO,MAAMC,uBAAuB,GAAG,kBAAkB;AACzD,OAAO,MAAMC,gBAAgB,GAAG;EAC/BC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,MAAM,EAAE;AACT,CAAC;AACD,OAAO,MAAMC,mCAAmC,GAAG,eAAe;;AAElE;AACA,OAAO,MAAM;EACZC,aAAa;EACbC,wBAAwB;EACxBC,qBAAqB;EACrBC,wBAAwB;EACxBC;AACD,CAAC,GAAGb,MAAM,CAAED,kBAAmB,CAAC;;AAEhC;AACA,OAAO,MAAMe,kBAAkB,GAAG,CACjCX,uBAAuB,EACvBF,oBAAoB,EACpBQ,aAAa,CAACM,IAAI,CAClB;AAED,OAAO,MAAMC,gBAAgB,GAAG;EAC/B,CAAEd,kBAAkB,GAAIL,EAAE,CAAE,UAAW,CAAC;EACxC,CAAEM,uBAAuB,GAAIN,EAAE,CAAE,eAAgB,CAAC;EAClD,CAAEY,aAAa,CAACM,IAAI,GAAIlB,EAAE,CAAE,SAAU,CAAC;EACvC,CAAEI,oBAAoB,GAAIJ,EAAE,CAAE,YAAa;AAC5C,CAAC"}