@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
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.setPageContentFocusType = exports.setEditorCanvasContainerView = exports.setCanvasMode = void 0;
6
+ exports.setEditorCanvasContainerView = exports.setCanvasMode = void 0;
7
7
  var _blockEditor = require("@wordpress/block-editor");
8
8
  var _preferences = require("@wordpress/preferences");
9
9
  /**
@@ -17,8 +17,7 @@ var _preferences = require("@wordpress/preferences");
17
17
  */
18
18
  const setCanvasMode = mode => ({
19
19
  registry,
20
- dispatch,
21
- select
20
+ dispatch
22
21
  }) => {
23
22
  registry.dispatch(_blockEditor.store).__unstableSetEditorMode('edit');
24
23
  dispatch({
@@ -30,10 +29,6 @@ const setCanvasMode = mode => ({
30
29
  if (mode === 'edit' && registry.select(_preferences.store).get('core/edit-site', 'showListViewByDefault') && !registry.select(_preferences.store).get('core/edit-site', 'distractionFree')) {
31
30
  dispatch.setIsListViewOpened(true);
32
31
  }
33
- // Switch focus away from editing the template when switching to view mode.
34
- if (mode === 'view' && select.isPage()) {
35
- dispatch.setHasPageContentFocus(true);
36
- }
37
32
  };
38
33
 
39
34
  /**
@@ -50,25 +45,5 @@ const setEditorCanvasContainerView = view => ({
50
45
  view
51
46
  });
52
47
  };
53
-
54
- /**
55
- * Sets the type of page content focus. Can be one of:
56
- *
57
- * - `'disableTemplate'`: Disable the blocks belonging to the page's template.
58
- * - `'hideTemplate'`: Hide the blocks belonging to the page's template.
59
- *
60
- * @param {'disableTemplate'|'hideTemplate'} pageContentFocusType The type of page content focus.
61
- *
62
- * @return {Object} Action object.
63
- */
64
48
  exports.setEditorCanvasContainerView = setEditorCanvasContainerView;
65
- const setPageContentFocusType = pageContentFocusType => ({
66
- dispatch
67
- }) => {
68
- dispatch({
69
- type: 'SET_PAGE_CONTENT_FOCUS_TYPE',
70
- pageContentFocusType
71
- });
72
- };
73
- exports.setPageContentFocusType = setPageContentFocusType;
74
49
  //# sourceMappingURL=private-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_preferences","setCanvasMode","mode","registry","dispatch","select","blockEditorStore","__unstableSetEditorMode","type","preferencesStore","get","setIsListViewOpened","isPage","setHasPageContentFocus","exports","setEditorCanvasContainerView","view","setPageContentFocusType","pageContentFocusType"],"sources":["@wordpress/edit-site/src/store/private-actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Action that switches the canvas mode.\n *\n * @param {?string} mode Canvas mode.\n */\nexport const setCanvasMode =\n\t( mode ) =>\n\t( { registry, dispatch, select } ) => {\n\t\tregistry.dispatch( blockEditorStore ).__unstableSetEditorMode( 'edit' );\n\t\tdispatch( {\n\t\t\ttype: 'SET_CANVAS_MODE',\n\t\t\tmode,\n\t\t} );\n\t\t// Check if the block list view should be open by default.\n\t\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t\tif (\n\t\t\tmode === 'edit' &&\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-site', 'showListViewByDefault' ) &&\n\t\t\t! registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-site', 'distractionFree' )\n\t\t) {\n\t\t\tdispatch.setIsListViewOpened( true );\n\t\t}\n\t\t// Switch focus away from editing the template when switching to view mode.\n\t\tif ( mode === 'view' && select.isPage() ) {\n\t\t\tdispatch.setHasPageContentFocus( true );\n\t\t}\n\t};\n\n/**\n * Action that switches the editor canvas container view.\n *\n * @param {?string} view Editor canvas container view.\n */\nexport const setEditorCanvasContainerView =\n\t( view ) =>\n\t( { dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITOR_CANVAS_CONTAINER_VIEW',\n\t\t\tview,\n\t\t} );\n\t};\n\n/**\n * Sets the type of page content focus. Can be one of:\n *\n * - `'disableTemplate'`: Disable the blocks belonging to the page's template.\n * - `'hideTemplate'`: Hide the blocks belonging to the page's template.\n *\n * @param {'disableTemplate'|'hideTemplate'} pageContentFocusType The type of page content focus.\n *\n * @return {Object} Action object.\n */\nexport const setPageContentFocusType =\n\t( pageContentFocusType ) =>\n\t( { dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'SET_PAGE_CONTENT_FOCUS_TYPE',\n\t\t\tpageContentFocusType,\n\t\t} );\n\t};\n"],"mappings":";;;;;;AAGA,IAAAA,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CAAC;AACJ,CAAC;AAACJ,OAAA,CAAAG,uBAAA,GAAAA,uBAAA"}
1
+ {"version":3,"names":["_blockEditor","require","_preferences","setCanvasMode","mode","registry","dispatch","blockEditorStore","__unstableSetEditorMode","type","select","preferencesStore","get","setIsListViewOpened","exports","setEditorCanvasContainerView","view"],"sources":["@wordpress/edit-site/src/store/private-actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Action that switches the canvas mode.\n *\n * @param {?string} mode Canvas mode.\n */\nexport const setCanvasMode =\n\t( mode ) =>\n\t( { registry, dispatch } ) => {\n\t\tregistry.dispatch( blockEditorStore ).__unstableSetEditorMode( 'edit' );\n\t\tdispatch( {\n\t\t\ttype: 'SET_CANVAS_MODE',\n\t\t\tmode,\n\t\t} );\n\t\t// Check if the block list view should be open by default.\n\t\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t\tif (\n\t\t\tmode === 'edit' &&\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-site', 'showListViewByDefault' ) &&\n\t\t\t! registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-site', 'distractionFree' )\n\t\t) {\n\t\t\tdispatch.setIsListViewOpened( true );\n\t\t}\n\t};\n\n/**\n * Action that switches the editor canvas container view.\n *\n * @param {?string} view Editor canvas container view.\n */\nexport const setEditorCanvasContainerView =\n\t( view ) =>\n\t( { dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITOR_CANVAS_CONTAINER_VIEW',\n\t\t\tview,\n\t\t} );\n\t};\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACO,MAAME,aAAa,GACvBC,IAAI,IACN,CAAE;EAAEC,QAAQ;EAAEC;AAAS,CAAC,KAAM;EAC7BD,QAAQ,CAACC,QAAQ,CAAEC,kBAAiB,CAAC,CAACC,uBAAuB,CAAE,MAAO,CAAC;EACvEF,QAAQ,CAAE;IACTG,IAAI,EAAE,iBAAiB;IACvBL;EACD,CAAE,CAAC;EACH;EACA;EACA,IACCA,IAAI,KAAK,MAAM,IACfC,QAAQ,CACNK,MAAM,CAAEC,kBAAiB,CAAC,CAC1BC,GAAG,CAAE,gBAAgB,EAAE,uBAAwB,CAAC,IAClD,CAAEP,QAAQ,CACRK,MAAM,CAAEC,kBAAiB,CAAC,CAC1BC,GAAG,CAAE,gBAAgB,EAAE,iBAAkB,CAAC,EAC3C;IACDN,QAAQ,CAACO,mBAAmB,CAAE,IAAK,CAAC;EACrC;AACD,CAAC;;AAEF;AACA;AACA;AACA;AACA;AAJAC,OAAA,CAAAX,aAAA,GAAAA,aAAA;AAKO,MAAMY,4BAA4B,GACtCC,IAAI,IACN,CAAE;EAAEV;AAAS,CAAC,KAAM;EACnBA,QAAQ,CAAE;IACTG,IAAI,EAAE,kCAAkC;IACxCO;EACD,CAAE,CAAC;AACJ,CAAC;AAACF,OAAA,CAAAC,4BAAA,GAAAA,4BAAA"}
@@ -5,12 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getCanvasMode = getCanvasMode;
7
7
  exports.getEditorCanvasContainerView = getEditorCanvasContainerView;
8
- exports.getPageContentFocusType = getPageContentFocusType;
9
- var _selectors = require("./selectors");
10
- /**
11
- * Internal dependencies
12
- */
13
-
14
8
  /**
15
9
  * Returns the current canvas mode.
16
10
  *
@@ -32,21 +26,4 @@ function getCanvasMode(state) {
32
26
  function getEditorCanvasContainerView(state) {
33
27
  return state.editorCanvasContainerView;
34
28
  }
35
-
36
- /**
37
- * Returns the type of the current page content focus, or null if there is no
38
- * page content focus.
39
- *
40
- * Possible values are:
41
- *
42
- * - `'disableTemplate'`: Disable the blocks belonging to the page's template.
43
- * - `'hideTemplate'`: Hide the blocks belonging to the page's template.
44
- *
45
- * @param {Object} state Global application state.
46
- *
47
- * @return {'disableTemplate'|'hideTemplate'|null} Type of the current page content focus.
48
- */
49
- function getPageContentFocusType(state) {
50
- return (0, _selectors.hasPageContentFocus)(state) ? state.pageContentFocusType : null;
51
- }
52
29
  //# sourceMappingURL=private-selectors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_selectors","require","getCanvasMode","state","canvasMode","getEditorCanvasContainerView","editorCanvasContainerView","getPageContentFocusType","hasPageContentFocus","pageContentFocusType"],"sources":["@wordpress/edit-site/src/store/private-selectors.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { hasPageContentFocus } from './selectors';\n\n/**\n * Returns the current canvas mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Canvas mode.\n */\nexport function getCanvasMode( state ) {\n\treturn state.canvasMode;\n}\n\n/**\n * Returns the editor canvas container view.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editor canvas container view.\n */\nexport function getEditorCanvasContainerView( state ) {\n\treturn state.editorCanvasContainerView;\n}\n\n/**\n * Returns the type of the current page content focus, or null if there is no\n * page content focus.\n *\n * Possible values are:\n *\n * - `'disableTemplate'`: Disable the blocks belonging to the page's template.\n * - `'hideTemplate'`: Hide the blocks belonging to the page's template.\n *\n * @param {Object} state Global application state.\n *\n * @return {'disableTemplate'|'hideTemplate'|null} Type of the current page content focus.\n */\nexport function getPageContentFocusType( state ) {\n\treturn hasPageContentFocus( state ) ? state.pageContentFocusType : null;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,aAAaA,CAAEC,KAAK,EAAG;EACtC,OAAOA,KAAK,CAACC,UAAU;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,4BAA4BA,CAAEF,KAAK,EAAG;EACrD,OAAOA,KAAK,CAACG,yBAAyB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,uBAAuBA,CAAEJ,KAAK,EAAG;EAChD,OAAO,IAAAK,8BAAmB,EAAEL,KAAM,CAAC,GAAGA,KAAK,CAACM,oBAAoB,GAAG,IAAI;AACxE"}
1
+ {"version":3,"names":["getCanvasMode","state","canvasMode","getEditorCanvasContainerView","editorCanvasContainerView"],"sources":["@wordpress/edit-site/src/store/private-selectors.js"],"sourcesContent":["/**\n * Returns the current canvas mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Canvas mode.\n */\nexport function getCanvasMode( state ) {\n\treturn state.canvasMode;\n}\n\n/**\n * Returns the editor canvas container view.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editor canvas container view.\n */\nexport function getEditorCanvasContainerView( state ) {\n\treturn state.editorCanvasContainerView;\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,aAAaA,CAAEC,KAAK,EAAG;EACtC,OAAOA,KAAK,CAACC,UAAU;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,4BAA4BA,CAAEF,KAAK,EAAG;EACrD,OAAOA,KAAK,CAACG,yBAAyB;AACvC"}
@@ -7,9 +7,7 @@ exports.blockInserterPanel = blockInserterPanel;
7
7
  exports.default = void 0;
8
8
  exports.deviceType = deviceType;
9
9
  exports.editedPost = editedPost;
10
- exports.hasPageContentFocus = hasPageContentFocus;
11
10
  exports.listViewPanel = listViewPanel;
12
- exports.pageContentFocusType = pageContentFocusType;
13
11
  exports.saveViewPanel = saveViewPanel;
14
12
  exports.settings = settings;
15
13
  var _data = require("@wordpress/data");
@@ -165,41 +163,6 @@ function editorCanvasContainerView(state = undefined, action) {
165
163
  }
166
164
  return state;
167
165
  }
168
-
169
- /**
170
- * Reducer used to track whether the editor allows only page content to be
171
- * edited.
172
- *
173
- * @param {boolean} state Current state.
174
- * @param {Object} action Dispatched action.
175
- *
176
- * @return {boolean} Updated state.
177
- */
178
- function hasPageContentFocus(state = false, action) {
179
- switch (action.type) {
180
- case 'SET_EDITED_POST':
181
- return !!action.context?.postId;
182
- case 'SET_HAS_PAGE_CONTENT_FOCUS':
183
- return action.hasPageContentFocus;
184
- }
185
- return state;
186
- }
187
-
188
- /**
189
- * Reducer used to track the type of page content focus.
190
- *
191
- * @param {string} state Current state.
192
- * @param {Object} action Dispatched action.
193
- *
194
- * @return {string} Updated state.
195
- */
196
- function pageContentFocusType(state = 'disableTemplate', action) {
197
- switch (action.type) {
198
- case 'SET_PAGE_CONTENT_FOCUS_TYPE':
199
- return action.pageContentFocusType;
200
- }
201
- return state;
202
- }
203
166
  var _default = (0, _data.combineReducers)({
204
167
  deviceType,
205
168
  settings,
@@ -208,9 +171,7 @@ var _default = (0, _data.combineReducers)({
208
171
  listViewPanel,
209
172
  saveViewPanel,
210
173
  canvasMode,
211
- editorCanvasContainerView,
212
- hasPageContentFocus,
213
- pageContentFocusType
174
+ editorCanvasContainerView
214
175
  });
215
176
  exports.default = _default;
216
177
  //# sourceMappingURL=reducer.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","deviceType","state","action","type","settings","editedPost","postType","id","context","blockInserterPanel","isOpen","value","listViewPanel","saveViewPanel","canvasMode","mode","editorCanvasContainerView","undefined","view","hasPageContentFocus","postId","pageContentFocusType","_default","combineReducers","exports","default"],"sources":["@wordpress/edit-site/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer returning the editing canvas device type.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deviceType( state = 'Desktop', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_PREVIEW_DEVICE_TYPE':\n\t\t\treturn action.deviceType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the settings.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer keeping track of the currently edited Post Type,\n * Post Id and the context provided to fill the content of the block editor.\n *\n * @param {Object} state Current edited post.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editedPost( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn {\n\t\t\t\tpostType: action.postType,\n\t\t\t\tid: action.id,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t\tcase 'SET_EDITED_POST_CONTEXT':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the block inserter panel open or closed.\n *\n * Note: this reducer interacts with the navigation and list view panels reducers\n * to make sure that only one of the three panels is open at the same time.\n *\n * @param {boolean|Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen ? false : state;\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the list view panel open or closed.\n *\n * Note: this reducer interacts with the navigation and inserter panels reducers\n * to make sure that only one of the three panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function listViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value ? false : state;\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the save view panel open or closed.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function saveViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_SAVE_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas mode (edit or view).\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nfunction canvasMode( state = 'init', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas container view.\n * Default is `undefined`, denoting the default, visual block editor.\n * This could be, for example, `'style-book'` (the style book).\n *\n * @param {string|undefined} state Current state.\n * @param {Object} action Dispatched action.\n */\nfunction editorCanvasContainerView( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITOR_CANVAS_CONTAINER_VIEW':\n\t\t\treturn action.view;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer used to track whether the editor allows only page content to be\n * edited.\n *\n * @param {boolean} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function hasPageContentFocus( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn !! action.context?.postId;\n\t\tcase 'SET_HAS_PAGE_CONTENT_FOCUS':\n\t\t\treturn action.hasPageContentFocus;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer used to track the type of page content focus.\n *\n * @param {string} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {string} Updated state.\n */\nexport function pageContentFocusType( state = 'disableTemplate', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_PAGE_CONTENT_FOCUS_TYPE':\n\t\t\treturn action.pageContentFocusType;\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tdeviceType,\n\tsettings,\n\teditedPost,\n\tblockInserterPanel,\n\tlistViewPanel,\n\tsaveViewPanel,\n\tcanvasMode,\n\teditorCanvasContainerView,\n\thasPageContentFocus,\n\tpageContentFocusType,\n} );\n"],"mappings":";;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAEC,KAAK,GAAG,SAAS,EAAEC,MAAM,EAAG;EACvD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,yBAAyB;MAC7B,OAAOD,MAAM,CAACF,UAAU;EAC1B;EAEA,OAAOC,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,QAAQA,CAAEH,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,EAAG;EAC9C,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,iBAAiB;MACrB,OAAO;QACN,GAAGF,KAAK;QACR,GAAGC,MAAM,CAACE;MACX,CAAC;EACH;EAEA,OAAOH,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,UAAUA,CAAEJ,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,EAAG;EAChD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,iBAAiB;MACrB,OAAO;QACNG,QAAQ,EAAEJ,MAAM,CAACI,QAAQ;QACzBC,EAAE,EAAEL,MAAM,CAACK,EAAE;QACbC,OAAO,EAAEN,MAAM,CAACM;MACjB,CAAC;IACF,KAAK,yBAAyB;MAC7B,OAAO;QACN,GAAGP,KAAK;QACRO,OAAO,EAAEN,MAAM,CAACM;MACjB,CAAC;EACH;EAEA,OAAOP,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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ACnB,KAAK,kCAAkC;MACtC,OAAOD,MAAM,CAACgB,IAAI;EACpB;EAEA,OAAOjB,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASkB,mBAAmBA,CAAElB,KAAK,GAAG,KAAK,EAAEC,MAAM,EAAG;EAC5D,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,iBAAiB;MACrB,OAAO,CAAC,CAAED,MAAM,CAACM,OAAO,EAAEY,MAAM;IACjC,KAAK,4BAA4B;MAChC,OAAOlB,MAAM,CAACiB,mBAAmB;EACnC;EAEA,OAAOlB,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASoB,oBAAoBA,CAAEpB,KAAK,GAAG,iBAAiB,EAAEC,MAAM,EAAG;EACzE,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,6BAA6B;MACjC,OAAOD,MAAM,CAACmB,oBAAoB;EACpC;EAEA,OAAOpB,KAAK;AACb;AAAC,IAAAqB,QAAA,GAEc,IAAAC,qBAAe,EAAE;EAC/BvB,UAAU;EACVI,QAAQ;EACRC,UAAU;EACVI,kBAAkB;EAClBG,aAAa;EACbC,aAAa;EACbC,UAAU;EACVE,yBAAyB;EACzBG,mBAAmB;EACnBE;AACD,CAAE,CAAC;AAAAG,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
1
+ {"version":3,"names":["_data","require","deviceType","state","action","type","settings","editedPost","postType","id","context","blockInserterPanel","isOpen","value","listViewPanel","saveViewPanel","canvasMode","mode","editorCanvasContainerView","undefined","view","_default","combineReducers","exports","default"],"sources":["@wordpress/edit-site/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer returning the editing canvas device type.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deviceType( state = 'Desktop', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_PREVIEW_DEVICE_TYPE':\n\t\t\treturn action.deviceType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the settings.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer keeping track of the currently edited Post Type,\n * Post Id and the context provided to fill the content of the block editor.\n *\n * @param {Object} state Current edited post.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editedPost( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn {\n\t\t\t\tpostType: action.postType,\n\t\t\t\tid: action.id,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t\tcase 'SET_EDITED_POST_CONTEXT':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the block inserter panel open or closed.\n *\n * Note: this reducer interacts with the navigation and list view panels reducers\n * to make sure that only one of the three panels is open at the same time.\n *\n * @param {boolean|Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen ? false : state;\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the list view panel open or closed.\n *\n * Note: this reducer interacts with the navigation and inserter panels reducers\n * to make sure that only one of the three panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function listViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value ? false : state;\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the save view panel open or closed.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function saveViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_SAVE_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas mode (edit or view).\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nfunction canvasMode( state = 'init', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas container view.\n * Default is `undefined`, denoting the default, visual block editor.\n * This could be, for example, `'style-book'` (the style book).\n *\n * @param {string|undefined} state Current state.\n * @param {Object} action Dispatched action.\n */\nfunction editorCanvasContainerView( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITOR_CANVAS_CONTAINER_VIEW':\n\t\t\treturn action.view;\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tdeviceType,\n\tsettings,\n\teditedPost,\n\tblockInserterPanel,\n\tlistViewPanel,\n\tsaveViewPanel,\n\tcanvasMode,\n\teditorCanvasContainerView,\n} );\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAEC,KAAK,GAAG,SAAS,EAAEC,MAAM,EAAG;EACvD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,y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B,KAAK,wBAAwB;MAC5B,OAAOD,MAAM,CAACS,KAAK,GAAG,KAAK,GAAGV,KAAK;IACpC,KAAK,yBAAyB;MAC7B,OAAOC,MAAM,CAACQ,MAAM;IACrB,KAAK,iBAAiB;MACrB,OAAO,KAAK;EACd;EACA,OAAOT,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASY,aAAaA,CAAEZ,KAAK,GAAG,KAAK,EAAEC,MAAM,EAAG;EACtD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,yBAAyB;MAC7B,OAAOD,MAAM,CAACQ,MAAM;IACrB,KAAK,iBAAiB;MACrB,OAAO,KAAK;EACd;EACA,OAAOT,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASa,UAAUA,CAAEb,KAAK,GAAG,MAAM,EAAEC,MAAM,EAAG;EAC7C,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,iBAAiB;MACrB,OAAOD,MAAM,CAACa,IAAI;EACpB;EAEA,OAAOd,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASe,yBAAyBA,CAAEf,KAAK,GAAGgB,SAAS,EAAEf,MAAM,EAAG;EAC/D,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,kCAAkC;MACtC,OAAOD,MAAM,CAACgB,IAAI;EACpB;EAEA,OAAOjB,KAAK;AACb;AAAC,IAAAkB,QAAA,GAEc,IAAAC,qBAAe,EAAE;EAC/BpB,UAAU;EACVI,QAAQ;EACRC,UAAU;EACVI,kBAAkB;EAClBG,aAAa;EACbC,aAAa;EACbC,UAAU;EACVE;AACD,CAAE,CAAC;AAAAK,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
@@ -6,38 +6,34 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.__experimentalGetInsertionPoint = void 0;
8
8
  exports.__experimentalGetPreviewDeviceType = __experimentalGetPreviewDeviceType;
9
- exports.getCanUserCreateMedia = exports.__unstableGetPreference = void 0;
9
+ exports.getCanUserCreateMedia = void 0;
10
10
  exports.getCurrentTemplateNavigationPanelSubMenu = getCurrentTemplateNavigationPanelSubMenu;
11
11
  exports.getCurrentTemplateTemplateParts = void 0;
12
12
  exports.getEditedPostContext = getEditedPostContext;
13
13
  exports.getEditedPostId = getEditedPostId;
14
14
  exports.getEditedPostType = getEditedPostType;
15
- exports.getEditorMode = getEditorMode;
15
+ exports.getEditorMode = void 0;
16
16
  exports.getHomeTemplateId = getHomeTemplateId;
17
17
  exports.getNavigationPanelActiveMenu = getNavigationPanelActiveMenu;
18
18
  exports.getPage = getPage;
19
- exports.getSettings = exports.getReusableBlocks = void 0;
19
+ exports.getReusableBlocks = void 0;
20
+ exports.getSettings = getSettings;
20
21
  exports.hasPageContentFocus = hasPageContentFocus;
21
- exports.isFeatureActive = isFeatureActive;
22
+ exports.isFeatureActive = void 0;
22
23
  exports.isInserterOpened = isInserterOpened;
23
24
  exports.isListViewOpened = isListViewOpened;
24
25
  exports.isNavigationOpened = isNavigationOpened;
25
26
  exports.isPage = isPage;
26
27
  exports.isSaveViewOpened = isSaveViewOpened;
27
- var _rememo = _interopRequireDefault(require("rememo"));
28
28
  var _coreData = require("@wordpress/core-data");
29
29
  var _data = require("@wordpress/data");
30
30
  var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
31
- var _mediaUtils = require("@wordpress/media-utils");
32
31
  var _element = require("@wordpress/element");
33
32
  var _preferences = require("@wordpress/preferences");
34
33
  var _blockEditor = require("@wordpress/block-editor");
34
+ var _editor = require("@wordpress/editor");
35
35
  var _utils = require("./utils");
36
36
  var _constants = require("../utils/constants");
37
- /**
38
- * External dependencies
39
- */
40
-
41
37
  /**
42
38
  * WordPress dependencies
43
39
  */
@@ -50,17 +46,6 @@ var _constants = require("../utils/constants");
50
46
  * @typedef {'template'|'template_type'} TemplateType Template type.
51
47
  */
52
48
 
53
- /**
54
- * Helper for getting a preference from the preferences store.
55
- *
56
- * This is only present so that `getSettings` doesn't need to be made a
57
- * registry selector.
58
- *
59
- * It's unstable because the selector needs to be exported and so part of the
60
- * public API to work.
61
- */
62
- const __unstableGetPreference = (0, _data.createRegistrySelector)(select => (state, name) => select(_preferences.store).get('core/edit-site', name));
63
-
64
49
  /**
65
50
  * Returns whether the given feature is enabled or not.
66
51
  *
@@ -70,14 +55,13 @@ const __unstableGetPreference = (0, _data.createRegistrySelector)(select => (sta
70
55
  *
71
56
  * @return {boolean} Is active.
72
57
  */
73
- exports.__unstableGetPreference = __unstableGetPreference;
74
- function isFeatureActive(state, featureName) {
58
+ const isFeatureActive = (0, _data.createRegistrySelector)(select => (_, featureName) => {
75
59
  (0, _deprecated.default)(`select( 'core/edit-site' ).isFeatureActive`, {
76
60
  since: '6.0',
77
61
  alternative: `select( 'core/preferences' ).get`
78
62
  });
79
- return !!__unstableGetPreference(state, featureName);
80
- }
63
+ return !!select(_preferences.store).get('core/edit-site', featureName);
64
+ });
81
65
 
82
66
  /**
83
67
  * Returns the current editing canvas device type.
@@ -86,6 +70,7 @@ function isFeatureActive(state, featureName) {
86
70
  *
87
71
  * @return {string} Device type.
88
72
  */
73
+ exports.isFeatureActive = isFeatureActive;
89
74
  function __experimentalGetPreviewDeviceType(state) {
90
75
  return state.deviceType;
91
76
  }
@@ -108,6 +93,10 @@ const getCanUserCreateMedia = (0, _data.createRegistrySelector)(select => () =>
108
93
  */
109
94
  exports.getCanUserCreateMedia = getCanUserCreateMedia;
110
95
  const getReusableBlocks = (0, _data.createRegistrySelector)(select => () => {
96
+ (0, _deprecated.default)("select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )", {
97
+ since: '6.5',
98
+ version: '6.8'
99
+ });
111
100
  const isWeb = _element.Platform.OS === 'web';
112
101
  return isWeb ? select(_coreData.store).getEntityRecords('postType', 'wp_block', {
113
102
  per_page: -1
@@ -115,50 +104,23 @@ const getReusableBlocks = (0, _data.createRegistrySelector)(select => () => {
115
104
  });
116
105
 
117
106
  /**
118
- * Returns the settings, taking into account active features and permissions.
107
+ * Returns the site editor settings.
119
108
  *
120
- * @param {Object} state Global application state.
121
- * @param {Function} setIsInserterOpen Setter for the open state of the global inserter.
109
+ * @param {Object} state Global application state.
122
110
  *
123
111
  * @return {Object} Settings.
124
112
  */
125
113
  exports.getReusableBlocks = getReusableBlocks;
126
- const getSettings = (0, _rememo.default)((state, setIsInserterOpen) => {
127
- const settings = {
128
- ...state.settings,
129
- outlineMode: true,
130
- focusMode: !!__unstableGetPreference(state, 'focusMode'),
131
- isDistractionFree: !!__unstableGetPreference(state, 'distractionFree'),
132
- hasFixedToolbar: !!__unstableGetPreference(state, 'fixedToolbar'),
133
- keepCaretInsideBlock: !!__unstableGetPreference(state, 'keepCaretInsideBlock'),
134
- showIconLabels: !!__unstableGetPreference(state, 'showIconLabels'),
135
- __experimentalSetIsInserterOpened: setIsInserterOpen,
136
- __experimentalReusableBlocks: getReusableBlocks(state),
137
- __experimentalPreferPatternsOnRoot: _constants.TEMPLATE_POST_TYPE === getEditedPostType(state)
138
- };
139
- const canUserCreateMedia = getCanUserCreateMedia(state);
140
- if (!canUserCreateMedia) {
141
- return settings;
142
- }
143
- settings.mediaUpload = ({
144
- onError,
145
- ...rest
146
- }) => {
147
- (0, _mediaUtils.uploadMedia)({
148
- wpAllowedMimeTypes: state.settings.allowedMimeTypes,
149
- onError: ({
150
- message
151
- }) => onError(message),
152
- ...rest
153
- });
154
- };
155
- return settings;
156
- }, state => [getCanUserCreateMedia(state), state.settings, __unstableGetPreference(state, 'focusMode'), __unstableGetPreference(state, 'distractionFree'), __unstableGetPreference(state, 'fixedToolbar'), __unstableGetPreference(state, 'keepCaretInsideBlock'), __unstableGetPreference(state, 'showIconLabels'), getReusableBlocks(state), getEditedPostType(state)]);
114
+ function getSettings(state) {
115
+ // It is important that we don't inject anything into these settings locally.
116
+ // The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.
117
+ // If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.
118
+ return state.settings;
119
+ }
157
120
 
158
121
  /**
159
122
  * @deprecated
160
123
  */
161
- exports.getSettings = getSettings;
162
124
  function getHomeTemplateId() {
163
125
  (0, _deprecated.default)("select( 'core/edit-site' ).getHomeTemplateId", {
164
126
  since: '6.2',
@@ -245,7 +207,7 @@ const __experimentalGetInsertionPoint = (0, _data.createRegistrySelector)(select
245
207
  filterValue
246
208
  };
247
209
  }
248
- if (hasPageContentFocus(state)) {
210
+ if (isPage(state) && select(_editor.store).getRenderingMode() !== 'template-only') {
249
211
  const [postContentClientId] = select(_blockEditor.store).__experimentalGetGlobalBlocksByName('core/post-content');
250
212
  if (postContentClientId) {
251
213
  return {
@@ -308,13 +270,14 @@ const getCurrentTemplateTemplateParts = (0, _data.createRegistrySelector)(select
308
270
  * @return {string} Editing mode.
309
271
  */
310
272
  exports.getCurrentTemplateTemplateParts = getCurrentTemplateTemplateParts;
311
- function getEditorMode(state) {
312
- return __unstableGetPreference(state, 'editorMode');
313
- }
273
+ const getEditorMode = (0, _data.createRegistrySelector)(select => () => {
274
+ return select(_preferences.store).get('core/edit-site', 'editorMode');
275
+ });
314
276
 
315
277
  /**
316
278
  * @deprecated
317
279
  */
280
+ exports.getEditorMode = getEditorMode;
318
281
  function getCurrentTemplateNavigationPanelSubMenu() {
319
282
  (0, _deprecated.default)("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu", {
320
283
  since: '6.2',
@@ -358,11 +321,14 @@ function isPage(state) {
358
321
  /**
359
322
  * Whether or not the editor allows only page content to be edited.
360
323
  *
361
- * @param {Object} state Global application state.
324
+ * @deprecated
362
325
  *
363
326
  * @return {boolean} Whether or not focus is on editing page content.
364
327
  */
365
- function hasPageContentFocus(state) {
366
- return isPage(state) ? state.hasPageContentFocus : false;
328
+ function hasPageContentFocus() {
329
+ (0, _deprecated.default)(`select( 'core/edit-site' ).hasPageContentFocus`, {
330
+ since: '6.5'
331
+ });
332
+ return false;
367
333
  }
368
334
  //# sourceMappingURL=selectors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_rememo","_interopRequireDefault","require","_coreData","_data","_deprecated","_mediaUtils","_element","_preferences","_blockEditor","_utils","_constants","__unstableGetPreference","createRegistrySelector","select","state","name","preferencesStore","get","exports","isFeatureActive","featureName","deprecated","since","alternative","__experimentalGetPreviewDeviceType","deviceType","getCanUserCreateMedia","coreDataStore","canUser","getReusableBlocks","isWeb","Platform","OS","getEntityRecords","per_page","getSettings","createSelector","setIsInserterOpen","settings","outlineMode","focusMode","isDistractionFree","hasFixedToolbar","keepCaretInsideBlock","showIconLabels","__experimentalSetIsInserterOpened","__experimentalReusableBlocks","__experimentalPreferPatternsOnRoot","TEMPLATE_POST_TYPE","getEditedPostType","canUserCreateMedia","mediaUpload","onError","rest","uploadMedia","wpAllowedMimeTypes","allowedMimeTypes","message","getHomeTemplateId","version","editedPost","postType","getEditedPostId","id","getEditedPostContext","context","getPage","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","hasPageContentFocus","postContentClientId","blockEditorStore","__experimentalGetGlobalBlocksByName","undefined","isListViewOpened","listViewPanel","isSaveViewOpened","saveViewPanel","getCurrentTemplateTemplateParts","templateParts","TEMPLATE_PART_POST_TYPE","clientIds","blocks","getBlocksByClientId","getFilteredTemplatePartBlocks","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":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AApBA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAMA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMU,uBAAuB,GAAG,IAAAC,4BAAsB,EAC1DC,MAAM,IAAM,CAAEC,KAAK,EAAEC,IAAI,KAC1BF,MAAM,CAAEG,kBAAiB,CAAC,CAACC,GAAG,CAAE,gBAAgB,EAAEF,IAAK,CACz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EF,SAAU,CAAC;EAE5D,OAAO,IAAAG,oCAA6B,EAAEF,MAAM,EAAEH,aAAc,CAAC;AAC9D,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANAjE,OAAA,CAAAgE,+BAAA,GAAAA,+BAAA;AAOO,SAASO,aAAaA,CAAE3E,KAAK,EAAG;EACtC,OAAOH,uBAAuB,CAAEG,KAAK,EAAE,YAAa,CAAC;AACtD;;AAEA;AACA;AACA;AACO,SAAS4E,wCAAwCA,CAAA,EAAG;EAC1D,IAAArE,mBAAU,EACT,uEAAuE,EACvE;IACCC,KAAK,EAAE,KAAK;IACZqC,OAAO,EAAE;EACV,CACD,CAAC;AACF;;AAEA;AACA;AACA;AACO,SAASgC,4BAA4BA,CAAA,EAAG;EAC9C,IAAAtE,mBAAU,EAAE,2DAA2D,EAAE;IACxEC,KAAK,EAAE,KAAK;IACZqC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACO,SAASiC,kBAAkBA,CAAA,EAAG;EACpC,IAAAvE,mBAAU,EAAE,iDAAiD,EAAE;IAC9DC,KAAK,EAAE,KAAK;IACZqC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASkC,MAAMA,CAAE/E,KAAK,EAAG;EAC/B,OAAO,CAAC,CAAEA,KAAK,CAAC8C,UAAU,CAACK,OAAO,EAAE6B,MAAM;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASrB,mBAAmBA,CAAE3D,KAAK,EAAG;EAC5C,OAAO+E,MAAM,CAAE/E,KAAM,CAAC,GAAGA,KAAK,CAAC2D,mBAAmB,GAAG,KAAK;AAC3D"}
1
+ {"version":3,"names":["_coreData","require","_data","_deprecated","_interopRequireDefault","_element","_preferences","_blockEditor","_editor","_utils","_constants","isFeatureActive","createRegistrySelector","select","_","featureName","deprecated","since","alternative","preferencesStore","get","exports","__experimentalGetPreviewDeviceType","state","deviceType","getCanUserCreateMedia","coreDataStore","canUser","getReusableBlocks","version","isWeb","Platform","OS","getEntityRecords","per_page","getSettings","settings","getHomeTemplateId","getEditedPostType","editedPost","postType","getEditedPostId","id","getEditedPostContext","context","getPage","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","isPage","editorStore","getRenderingMode","postContentClientId","blockEditorStore","__experimentalGetGlobalBlocksByName","undefined","isListViewOpened","listViewPanel","isSaveViewOpened","saveViewPanel","getCurrentTemplateTemplateParts","templateParts","TEMPLATE_PART_POST_TYPE","clientIds","blocks","getBlocksByClientId","getFilteredTemplatePartBlocks","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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AAfA;AACA;AACA;;AASA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMU,eAAe,GAAG,IAAAC,4BAAsB,EAClDC,MAAM,IAAM,CAAEC,CAAC,EAAEC,WAAW,KAAM;EACnC,IAAAC,mBAAU,EAAG,4CAA2C,EAAE;IACzDC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG;EACf,CAAE,CAAC;EAEH,OAAO,CAAC,CAAEL,MAAM,CAAEM,kBAAiB,CAAC,CAACC,GAAG,CACvC,gBAAgB,EAChBL,WACD,CAAC;AACF,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANAM,OAAA,CAAAV,eAAA,GAAAA,eAAA;AAOO,SAASW,kCAAkCA,CAAEC,KAAK,EAAG;EAC3D,OAAOA,KAAK,CAACC,UAAU;AACxB;;A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C,4BAA4BA,CAAA,EAAG;EAC9C,IAAAxD,mBAAU,EAAE,2DAA2D,EAAE;IACxEC,KAAK,EAAE,KAAK;IACZY,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACO,SAAS4C,kBAAkBA,CAAA,EAAG;EACpC,IAAAzD,mBAAU,EAAE,iDAAiD,EAAE;IAC9DC,KAAK,EAAE,KAAK;IACZY,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASuB,MAAMA,CAAE7B,KAAK,EAAG;EAC/B,OAAO,CAAC,CAAEA,KAAK,CAACgB,UAAU,CAACK,OAAO,EAAE8B,MAAM;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,mBAAmBA,CAAA,EAAG;EACrC,IAAA3D,mBAAU,EAAG,gDAA+C,EAAE;IAC7DC,KAAK,EAAE;EACR,CAAE,CAAC;EAEH,OAAO,KAAK;AACb"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TEMPLATE_POST_TYPE = exports.TEMPLATE_PART_POST_TYPE = exports.TEMPLATE_PART_AREA_DEFAULT_CATEGORY = exports.TEMPLATE_ORIGINS = exports.POST_TYPE_LABELS = exports.PATTERN_USER_CATEGORY = exports.PATTERN_TYPES = exports.PATTERN_SYNC_TYPES = exports.PATTERN_DEFAULT_CATEGORY = exports.PATTERN_CORE_SOURCES = exports.PAGE_CONTENT_BLOCK_TYPES = exports.NAVIGATION_POST_TYPE = exports.FOCUSABLE_ENTITIES = void 0;
6
+ exports.TEMPLATE_POST_TYPE = exports.TEMPLATE_PART_POST_TYPE = exports.TEMPLATE_PART_AREA_DEFAULT_CATEGORY = exports.TEMPLATE_ORIGINS = exports.POST_TYPE_LABELS = exports.PATTERN_USER_CATEGORY = exports.PATTERN_TYPES = exports.PATTERN_SYNC_TYPES = exports.PATTERN_DEFAULT_CATEGORY = exports.NAVIGATION_POST_TYPE = exports.FOCUSABLE_ENTITIES = exports.EXCLUDED_PATTERN_SOURCES = void 0;
7
7
  var _i18n = require("@wordpress/i18n");
8
8
  var _patterns = require("@wordpress/patterns");
9
9
  var _lockUnlock = require("../lock-unlock");
@@ -38,29 +38,18 @@ const {
38
38
  PATTERN_TYPES,
39
39
  PATTERN_DEFAULT_CATEGORY,
40
40
  PATTERN_USER_CATEGORY,
41
- PATTERN_CORE_SOURCES,
41
+ EXCLUDED_PATTERN_SOURCES,
42
42
  PATTERN_SYNC_TYPES
43
43
  } = (0, _lockUnlock.unlock)(_patterns.privateApis);
44
44
 
45
45
  // Entities that are editable in focus mode.
46
46
  exports.PATTERN_SYNC_TYPES = PATTERN_SYNC_TYPES;
47
- exports.PATTERN_CORE_SOURCES = PATTERN_CORE_SOURCES;
47
+ exports.EXCLUDED_PATTERN_SOURCES = EXCLUDED_PATTERN_SOURCES;
48
48
  exports.PATTERN_USER_CATEGORY = PATTERN_USER_CATEGORY;
49
49
  exports.PATTERN_DEFAULT_CATEGORY = PATTERN_DEFAULT_CATEGORY;
50
50
  exports.PATTERN_TYPES = PATTERN_TYPES;
51
51
  const FOCUSABLE_ENTITIES = [TEMPLATE_PART_POST_TYPE, NAVIGATION_POST_TYPE, PATTERN_TYPES.user];
52
-
53
- /**
54
- * Block types that are considered to be page content. These are the only blocks
55
- * editable when hasPageContentFocus() is true.
56
- */
57
52
  exports.FOCUSABLE_ENTITIES = FOCUSABLE_ENTITIES;
58
- const PAGE_CONTENT_BLOCK_TYPES = {
59
- 'core/post-title': true,
60
- 'core/post-featured-image': true,
61
- 'core/post-content': true
62
- };
63
- exports.PAGE_CONTENT_BLOCK_TYPES = PAGE_CONTENT_BLOCK_TYPES;
64
53
  const POST_TYPE_LABELS = {
65
54
  [TEMPLATE_POST_TYPE]: (0, _i18n.__)('Template'),
66
55
  [TEMPLATE_PART_POST_TYPE]: (0, _i18n.__)('Template part'),
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_patterns","_lockUnlock","NAVIGATION_POST_TYPE","exports","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","unlock","patternPrivateApis","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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;AAED;AACA;AACA;AACA;AAHAhB,OAAA,CAAAe,kBAAA,GAAAA,kBAAA;AAIO,MAAME,wBAAwB,GAAG;EACvC,iBAAiB,EAAE,IAAI;EACvB,0BAA0B,EAAE,IAAI;EAChC,mBAAmB,EAAE;AACtB,CAAC;AAACjB,OAAA,CAAAiB,wBAAA,GAAAA,wBAAA;AAEK,MAAMC,gBAAgB,GAAG;EAC/B,CAAEjB,kBAAkB,GAAI,IAAAkB,QAAE,EAAE,UAAW,CAAC;EACxC,CAAEjB,uBAAuB,GAAI,IAAAiB,QAAE,EAAE,eAAgB,CAAC;EAClD,CAAEX,aAAa,CAACQ,IAAI,GAAI,IAAAG,QAAE,EAAE,SAAU,CAAC;EACvC,CAAEpB,oBAAoB,GAAI,IAAAoB,QAAE,EAAE,YAAa;AAC5C,CAAC;AAACnB,OAAA,CAAAkB,gBAAA,GAAAA,gBAAA"}
1
+ {"version":3,"names":["_i18n","require","_patterns","_lockUnlock","NAVIGATION_POST_TYPE","exports","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","unlock","patternPrivateApis","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":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACO,MAAMG,oBAAoB,GAAG,eAAe;;AAEnD;AAAAC,OAAA,CAAAD,oBAAA,GAAAA,oBAAA;AACO,MAAME,kBAAkB,GAAG,aAAa;AAACD,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AACzC,MAAMC,uBAAuB,GAAG,kBAAkB;AAACF,OAAA,CAAAE,uBAAA,GAAAA,uBAAA;AACnD,MAAMC,gBAAgB,GAAG;EAC/BC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,MAAM,EAAE;AACT,CAAC;AAACN,OAAA,CAAAG,gBAAA,GAAAA,gBAAA;AACK,MAAMI,mCAAmC,GAAG,eAAe;;AAElE;AAAAP,OAAA,CAAAO,mCAAA,GAAAA,mCAAA;AACO,MAAM;EACZC,aAAa;EACbC,wBAAwB;EACxBC,qBAAqB;E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