@wordpress/edit-site 5.22.0 → 5.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (524) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/actions/index.js +115 -15
  3. package/build/components/actions/index.js.map +1 -1
  4. package/build/components/add-new-template/new-template.js +0 -7
  5. package/build/components/add-new-template/new-template.js.map +1 -1
  6. package/build/components/block-editor/site-editor-canvas.js +7 -2
  7. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  8. package/build/components/block-editor/use-site-editor-settings.js +54 -63
  9. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  10. package/build/components/dataviews/add-filter.js +91 -0
  11. package/build/components/dataviews/add-filter.js.map +1 -0
  12. package/build/components/dataviews/constants.js +14 -0
  13. package/build/components/dataviews/constants.js.map +1 -0
  14. package/build/components/dataviews/dataviews.js +30 -9
  15. package/build/components/dataviews/dataviews.js.map +1 -1
  16. package/build/components/dataviews/filter-summary.js +62 -0
  17. package/build/components/dataviews/filter-summary.js.map +1 -0
  18. package/build/components/dataviews/filters.js +37 -48
  19. package/build/components/dataviews/filters.js.map +1 -1
  20. package/build/components/dataviews/index.js +9 -2
  21. package/build/components/dataviews/index.js.map +1 -1
  22. package/build/components/dataviews/item-actions.js +139 -17
  23. package/build/components/dataviews/item-actions.js.map +1 -1
  24. package/build/components/dataviews/pagination.js +7 -2
  25. package/build/components/dataviews/pagination.js.map +1 -1
  26. package/build/components/dataviews/reset-filters.js +33 -0
  27. package/build/components/dataviews/reset-filters.js.map +1 -0
  28. package/build/components/dataviews/search.js +1 -0
  29. package/build/components/dataviews/search.js.map +1 -1
  30. package/build/components/dataviews/view-actions.js +49 -32
  31. package/build/components/dataviews/view-actions.js.map +1 -1
  32. package/build/components/dataviews/view-grid.js +48 -25
  33. package/build/components/dataviews/view-grid.js.map +1 -1
  34. package/build/components/dataviews/view-list.js +130 -14
  35. package/build/components/dataviews/view-list.js.map +1 -1
  36. package/build/components/dataviews/view-side-by-side.js +20 -0
  37. package/build/components/dataviews/view-side-by-side.js.map +1 -0
  38. package/build/components/editor/index.js +52 -56
  39. package/build/components/editor/index.js.map +1 -1
  40. package/build/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js +1 -1
  41. package/build/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js.map +1 -1
  42. package/build/components/global-styles/font-library-modal/utils/index.js +15 -2
  43. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  44. package/build/components/global-styles/header.js +4 -2
  45. package/build/components/global-styles/header.js.map +1 -1
  46. package/build/components/global-styles/screen-block-list.js +22 -16
  47. package/build/components/global-styles/screen-block-list.js.map +1 -1
  48. package/build/components/global-styles/screen-revisions/index.js +66 -24
  49. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  50. package/build/components/global-styles/screen-revisions/revisions-buttons.js +52 -24
  51. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  52. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +9 -3
  53. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  54. package/build/components/global-styles/screen-root.js +3 -3
  55. package/build/components/global-styles/screen-root.js.map +1 -1
  56. package/build/components/global-styles/ui.js +31 -39
  57. package/build/components/global-styles/ui.js.map +1 -1
  58. package/build/components/global-styles-renderer/index.js +1 -1
  59. package/build/components/global-styles-renderer/index.js.map +1 -1
  60. package/build/components/header-edit-mode/document-actions/index.js +21 -16
  61. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  62. package/build/components/header-edit-mode/document-tools/index.js +160 -0
  63. package/build/components/header-edit-mode/document-tools/index.js.map +1 -0
  64. package/build/components/header-edit-mode/index.js +50 -117
  65. package/build/components/header-edit-mode/index.js.map +1 -1
  66. package/build/components/header-edit-mode/more-menu/index.js +1 -1
  67. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  68. package/build/components/header-edit-mode/more-menu/site-export.js +2 -6
  69. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  70. package/build/components/layout/index.js +4 -19
  71. package/build/components/layout/index.js.map +1 -1
  72. package/build/components/list/added-by.js +44 -54
  73. package/build/components/list/added-by.js.map +1 -1
  74. package/build/components/{page-content-focus-manager → page-content-focus-notifications}/back-to-page-notification.js +11 -15
  75. package/build/components/page-content-focus-notifications/back-to-page-notification.js.map +1 -0
  76. package/build/components/{page-content-focus-manager → page-content-focus-notifications}/edit-template-notification.js +9 -13
  77. package/build/components/page-content-focus-notifications/edit-template-notification.js.map +1 -0
  78. package/build/components/page-content-focus-notifications/index.js +22 -0
  79. package/build/components/page-content-focus-notifications/index.js.map +1 -0
  80. package/build/components/page-main/index.js +2 -1
  81. package/build/components/page-main/index.js.map +1 -1
  82. package/build/components/page-pages/index.js +137 -88
  83. package/build/components/page-pages/index.js.map +1 -1
  84. package/build/components/page-pages/side-editor.js +25 -0
  85. package/build/components/page-pages/side-editor.js.map +1 -0
  86. package/build/components/page-patterns/grid-item.js +2 -2
  87. package/build/components/page-patterns/grid-item.js.map +1 -1
  88. package/build/components/page-patterns/patterns-list.js +3 -3
  89. package/build/components/page-patterns/patterns-list.js.map +1 -1
  90. package/build/components/page-patterns/use-patterns.js +2 -2
  91. package/build/components/page-patterns/use-patterns.js.map +1 -1
  92. package/build/components/page-templates/dataviews-templates.js +316 -0
  93. package/build/components/page-templates/dataviews-templates.js.map +1 -0
  94. package/build/components/page-templates/template-actions.js +168 -0
  95. package/build/components/page-templates/template-actions.js.map +1 -0
  96. package/build/components/preferences-modal/index.js +1 -1
  97. package/build/components/preferences-modal/index.js.map +1 -1
  98. package/build/components/save-button/index.js +9 -6
  99. package/build/components/save-button/index.js.map +1 -1
  100. package/build/components/save-hub/index.js +14 -0
  101. package/build/components/save-hub/index.js.map +1 -1
  102. package/build/components/sidebar/index.js +1 -2
  103. package/build/components/sidebar/index.js.map +1 -1
  104. package/build/components/sidebar-dataviews/add-new-view.js +124 -0
  105. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -0
  106. package/build/components/sidebar-dataviews/custom-dataviews-list.js +191 -0
  107. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -0
  108. package/build/components/sidebar-dataviews/dataview-item.js +71 -0
  109. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -0
  110. package/build/components/sidebar-dataviews/default-views.js +65 -0
  111. package/build/components/sidebar-dataviews/default-views.js.map +1 -0
  112. package/build/components/sidebar-dataviews/index.js +21 -38
  113. package/build/components/sidebar-dataviews/index.js.map +1 -1
  114. package/build/components/sidebar-edit-mode/default-sidebar.js +2 -6
  115. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  116. package/build/components/sidebar-edit-mode/index.js +6 -5
  117. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  118. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +18 -29
  119. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  120. package/build/components/sidebar-edit-mode/page-panels/hooks.js +22 -8
  121. package/build/components/sidebar-edit-mode/page-panels/hooks.js.map +1 -1
  122. package/build/components/sidebar-edit-mode/page-panels/page-status.js +8 -5
  123. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  124. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +5 -8
  125. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  126. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js +6 -14
  127. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +1 -1
  128. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js +4 -12
  129. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +1 -1
  130. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -6
  131. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  132. package/build/components/sidebar-edit-mode/settings-header/index.js +10 -6
  133. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  134. package/build/components/sidebar-edit-mode/template-panel/hooks.js +3 -3
  135. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  136. package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  137. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  138. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  139. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  140. package/build/components/sidebar-navigation-screen-page/index.js +23 -4
  141. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  142. package/build/components/sidebar-navigation-screen-page/page-details.js +3 -11
  143. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  144. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -1
  145. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  146. package/build/components/site-hub/index.js +18 -6
  147. package/build/components/site-hub/index.js.map +1 -1
  148. package/build/components/start-template-options/index.js +12 -16
  149. package/build/components/start-template-options/index.js.map +1 -1
  150. package/build/components/style-book/index.js +22 -12
  151. package/build/components/style-book/index.js.map +1 -1
  152. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +150 -55
  153. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  154. package/build/components/template-part-converter/convert-to-regular.js +1 -1
  155. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  156. package/build/components/welcome-guide/page.js +2 -2
  157. package/build/components/welcome-guide/page.js.map +1 -1
  158. package/build/components/welcome-guide/template.js +6 -3
  159. package/build/components/welcome-guide/template.js.map +1 -1
  160. package/build/hooks/commands/use-edit-mode-commands.js +24 -14
  161. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  162. package/build/hooks/push-changes-to-global-styles/index.js +3 -1
  163. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  164. package/build/hooks/template-part-edit.js +6 -2
  165. package/build/hooks/template-part-edit.js.map +1 -1
  166. package/build/index.js +0 -3
  167. package/build/index.js.map +1 -1
  168. package/build/store/actions.js +39 -83
  169. package/build/store/actions.js.map +1 -1
  170. package/build/store/private-actions.js +2 -27
  171. package/build/store/private-actions.js.map +1 -1
  172. package/build/store/private-selectors.js +0 -23
  173. package/build/store/private-selectors.js.map +1 -1
  174. package/build/store/reducer.js +1 -40
  175. package/build/store/reducer.js.map +1 -1
  176. package/build/store/selectors.js +33 -67
  177. package/build/store/selectors.js.map +1 -1
  178. package/build/utils/constants.js +3 -14
  179. package/build/utils/constants.js.map +1 -1
  180. package/build-module/components/actions/index.js +113 -14
  181. package/build-module/components/actions/index.js.map +1 -1
  182. package/build-module/components/add-new-template/new-template.js +0 -7
  183. package/build-module/components/add-new-template/new-template.js.map +1 -1
  184. package/build-module/components/block-editor/site-editor-canvas.js +7 -2
  185. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  186. package/build-module/components/block-editor/use-site-editor-settings.js +54 -62
  187. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  188. package/build-module/components/dataviews/add-filter.js +84 -0
  189. package/build-module/components/dataviews/add-filter.js.map +1 -0
  190. package/build-module/components/dataviews/constants.js +6 -0
  191. package/build-module/components/dataviews/constants.js.map +1 -0
  192. package/build-module/components/dataviews/dataviews.js +29 -9
  193. package/build-module/components/dataviews/dataviews.js.map +1 -1
  194. package/build-module/components/dataviews/filter-summary.js +55 -0
  195. package/build-module/components/dataviews/filter-summary.js.map +1 -0
  196. package/build-module/components/dataviews/filters.js +37 -48
  197. package/build-module/components/dataviews/filters.js.map +1 -1
  198. package/build-module/components/dataviews/index.js +1 -1
  199. package/build-module/components/dataviews/index.js.map +1 -1
  200. package/build-module/components/dataviews/item-actions.js +142 -20
  201. package/build-module/components/dataviews/item-actions.js.map +1 -1
  202. package/build-module/components/dataviews/pagination.js +7 -2
  203. package/build-module/components/dataviews/pagination.js.map +1 -1
  204. package/build-module/components/dataviews/reset-filters.js +26 -0
  205. package/build-module/components/dataviews/reset-filters.js.map +1 -0
  206. package/build-module/components/dataviews/search.js +1 -0
  207. package/build-module/components/dataviews/search.js.map +1 -1
  208. package/build-module/components/dataviews/view-actions.js +50 -33
  209. package/build-module/components/dataviews/view-actions.js.map +1 -1
  210. package/build-module/components/dataviews/view-grid.js +49 -26
  211. package/build-module/components/dataviews/view-grid.js.map +1 -1
  212. package/build-module/components/dataviews/view-list.js +132 -16
  213. package/build-module/components/dataviews/view-list.js.map +1 -1
  214. package/build-module/components/dataviews/view-side-by-side.js +12 -0
  215. package/build-module/components/dataviews/view-side-by-side.js.map +1 -0
  216. package/build-module/components/editor/index.js +55 -59
  217. package/build-module/components/editor/index.js.map +1 -1
  218. package/build-module/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js +1 -1
  219. package/build-module/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js.map +1 -1
  220. package/build-module/components/global-styles/font-library-modal/utils/index.js +14 -2
  221. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  222. package/build-module/components/global-styles/header.js +4 -2
  223. package/build-module/components/global-styles/header.js.map +1 -1
  224. package/build-module/components/global-styles/screen-block-list.js +23 -17
  225. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  226. package/build-module/components/global-styles/screen-revisions/index.js +67 -25
  227. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  228. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +51 -24
  229. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  230. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +9 -3
  231. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  232. package/build-module/components/global-styles/screen-root.js +3 -3
  233. package/build-module/components/global-styles/screen-root.js.map +1 -1
  234. package/build-module/components/global-styles/ui.js +31 -39
  235. package/build-module/components/global-styles/ui.js.map +1 -1
  236. package/build-module/components/global-styles-renderer/index.js +1 -1
  237. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  238. package/build-module/components/header-edit-mode/document-actions/index.js +21 -16
  239. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  240. package/build-module/components/header-edit-mode/document-tools/index.js +152 -0
  241. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -0
  242. package/build-module/components/header-edit-mode/index.js +54 -121
  243. package/build-module/components/header-edit-mode/index.js.map +1 -1
  244. package/build-module/components/header-edit-mode/more-menu/index.js +1 -1
  245. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  246. package/build-module/components/header-edit-mode/more-menu/site-export.js +2 -6
  247. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  248. package/build-module/components/layout/index.js +5 -20
  249. package/build-module/components/layout/index.js.map +1 -1
  250. package/build-module/components/list/added-by.js +45 -56
  251. package/build-module/components/list/added-by.js.map +1 -1
  252. package/build-module/components/{page-content-focus-manager → page-content-focus-notifications}/back-to-page-notification.js +11 -15
  253. package/build-module/components/page-content-focus-notifications/back-to-page-notification.js.map +1 -0
  254. package/build-module/components/{page-content-focus-manager → page-content-focus-notifications}/edit-template-notification.js +9 -13
  255. package/build-module/components/page-content-focus-notifications/edit-template-notification.js.map +1 -0
  256. package/build-module/components/page-content-focus-notifications/index.js +14 -0
  257. package/build-module/components/page-content-focus-notifications/index.js.map +1 -0
  258. package/build-module/components/page-main/index.js +2 -1
  259. package/build-module/components/page-main/index.js.map +1 -1
  260. package/build-module/components/page-pages/index.js +141 -90
  261. package/build-module/components/page-pages/index.js.map +1 -1
  262. package/build-module/components/page-pages/side-editor.js +17 -0
  263. package/build-module/components/page-pages/side-editor.js.map +1 -0
  264. package/build-module/components/page-patterns/grid-item.js +2 -2
  265. package/build-module/components/page-patterns/grid-item.js.map +1 -1
  266. package/build-module/components/page-patterns/patterns-list.js +4 -4
  267. package/build-module/components/page-patterns/patterns-list.js.map +1 -1
  268. package/build-module/components/page-patterns/use-patterns.js +3 -3
  269. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  270. package/build-module/components/page-templates/dataviews-templates.js +308 -0
  271. package/build-module/components/page-templates/dataviews-templates.js.map +1 -0
  272. package/build-module/components/page-templates/template-actions.js +157 -0
  273. package/build-module/components/page-templates/template-actions.js.map +1 -0
  274. package/build-module/components/preferences-modal/index.js +1 -1
  275. package/build-module/components/preferences-modal/index.js.map +1 -1
  276. package/build-module/components/save-button/index.js +11 -8
  277. package/build-module/components/save-button/index.js.map +1 -1
  278. package/build-module/components/save-hub/index.js +14 -0
  279. package/build-module/components/save-hub/index.js.map +1 -1
  280. package/build-module/components/sidebar/index.js +1 -2
  281. package/build-module/components/sidebar/index.js.map +1 -1
  282. package/build-module/components/sidebar-dataviews/add-new-view.js +116 -0
  283. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -0
  284. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +182 -0
  285. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -0
  286. package/build-module/components/sidebar-dataviews/dataview-item.js +63 -0
  287. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -0
  288. package/build-module/components/sidebar-dataviews/default-views.js +57 -0
  289. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -0
  290. package/build-module/components/sidebar-dataviews/index.js +22 -39
  291. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  292. package/build-module/components/sidebar-edit-mode/default-sidebar.js +2 -6
  293. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  294. package/build-module/components/sidebar-edit-mode/index.js +6 -5
  295. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  296. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +20 -31
  297. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  298. package/build-module/components/sidebar-edit-mode/page-panels/hooks.js +21 -7
  299. package/build-module/components/sidebar-edit-mode/page-panels/hooks.js.map +1 -1
  300. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +9 -6
  301. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  302. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +6 -8
  303. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  304. package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js +8 -16
  305. package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +1 -1
  306. package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js +5 -13
  307. package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +1 -1
  308. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -6
  309. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  310. package/build-module/components/sidebar-edit-mode/settings-header/index.js +10 -6
  311. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  312. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js +4 -4
  313. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  314. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  315. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  316. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  317. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  318. package/build-module/components/sidebar-navigation-screen-page/index.js +23 -4
  319. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  320. package/build-module/components/sidebar-navigation-screen-page/page-details.js +3 -11
  321. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  322. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +2 -2
  323. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  324. package/build-module/components/site-hub/index.js +19 -7
  325. package/build-module/components/site-hub/index.js.map +1 -1
  326. package/build-module/components/start-template-options/index.js +13 -16
  327. package/build-module/components/start-template-options/index.js.map +1 -1
  328. package/build-module/components/style-book/index.js +22 -12
  329. package/build-module/components/style-book/index.js.map +1 -1
  330. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +150 -56
  331. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  332. package/build-module/components/template-part-converter/convert-to-regular.js +1 -1
  333. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  334. package/build-module/components/welcome-guide/page.js +2 -2
  335. package/build-module/components/welcome-guide/page.js.map +1 -1
  336. package/build-module/components/welcome-guide/template.js +6 -3
  337. package/build-module/components/welcome-guide/template.js.map +1 -1
  338. package/build-module/hooks/commands/use-edit-mode-commands.js +24 -14
  339. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  340. package/build-module/hooks/push-changes-to-global-styles/index.js +4 -2
  341. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  342. package/build-module/hooks/template-part-edit.js +6 -2
  343. package/build-module/hooks/template-part-edit.js.map +1 -1
  344. package/build-module/index.js +0 -3
  345. package/build-module/index.js.map +1 -1
  346. package/build-module/store/actions.js +37 -80
  347. package/build-module/store/actions.js.map +1 -1
  348. package/build-module/store/private-actions.js +1 -25
  349. package/build-module/store/private-actions.js.map +1 -1
  350. package/build-module/store/private-selectors.js +0 -22
  351. package/build-module/store/private-selectors.js.map +1 -1
  352. package/build-module/store/reducer.js +1 -38
  353. package/build-module/store/reducer.js.map +1 -1
  354. package/build-module/store/selectors.js +27 -62
  355. package/build-module/store/selectors.js.map +1 -1
  356. package/build-module/utils/constants.js +1 -11
  357. package/build-module/utils/constants.js.map +1 -1
  358. package/build-style/style-rtl.css +221 -181
  359. package/build-style/style.css +221 -181
  360. package/package.json +41 -41
  361. package/src/components/actions/index.js +150 -14
  362. package/src/components/add-new-template/new-template.js +0 -5
  363. package/src/components/block-editor/site-editor-canvas.js +8 -2
  364. package/src/components/block-editor/style.scss +0 -87
  365. package/src/components/block-editor/use-site-editor-settings.js +68 -89
  366. package/src/components/dataviews/README.md +80 -83
  367. package/src/components/dataviews/add-filter.js +108 -0
  368. package/src/components/dataviews/constants.js +5 -0
  369. package/src/components/dataviews/dataviews.js +28 -10
  370. package/src/components/dataviews/filter-summary.js +79 -0
  371. package/src/components/dataviews/filters.js +48 -58
  372. package/src/components/dataviews/index.js +1 -1
  373. package/src/components/dataviews/item-actions.js +169 -30
  374. package/src/components/dataviews/pagination.js +9 -4
  375. package/src/components/dataviews/reset-filters.js +26 -0
  376. package/src/components/dataviews/search.js +1 -0
  377. package/src/components/dataviews/style.scss +89 -9
  378. package/src/components/dataviews/view-actions.js +77 -49
  379. package/src/components/dataviews/view-grid.js +63 -38
  380. package/src/components/dataviews/view-list.js +182 -18
  381. package/src/components/dataviews/view-side-by-side.js +9 -0
  382. package/src/components/editor/index.js +135 -123
  383. package/src/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js +1 -1
  384. package/src/components/global-styles/font-library-modal/utils/index.js +20 -9
  385. package/src/components/global-styles/font-library-modal/utils/test/getIntersectingFontFaces.spec.js +46 -15
  386. package/src/components/global-styles/font-library-modal/utils/test/wpKebabCase.spec.js +28 -0
  387. package/src/components/global-styles/header.js +2 -1
  388. package/src/components/global-styles/screen-block-list.js +37 -26
  389. package/src/components/global-styles/screen-revisions/index.js +91 -35
  390. package/src/components/global-styles/screen-revisions/revisions-buttons.js +65 -45
  391. package/src/components/global-styles/screen-revisions/style.scss +52 -28
  392. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +15 -6
  393. package/src/components/global-styles/screen-root.js +2 -1
  394. package/src/components/global-styles/style.scss +0 -11
  395. package/src/components/global-styles/ui.js +60 -75
  396. package/src/components/global-styles-renderer/index.js +1 -1
  397. package/src/components/header-edit-mode/document-actions/index.js +20 -18
  398. package/src/components/header-edit-mode/document-tools/index.js +201 -0
  399. package/src/components/header-edit-mode/index.js +87 -184
  400. package/src/components/header-edit-mode/more-menu/index.js +1 -1
  401. package/src/components/header-edit-mode/more-menu/site-export.js +2 -6
  402. package/src/components/header-edit-mode/style.scss +35 -2
  403. package/src/components/layout/index.js +4 -11
  404. package/src/components/layout/style.scss +6 -18
  405. package/src/components/list/added-by.js +24 -64
  406. package/src/components/list/style.scss +11 -13
  407. package/src/components/{page-content-focus-manager → page-content-focus-notifications}/back-to-page-notification.js +10 -22
  408. package/src/components/{page-content-focus-manager → page-content-focus-notifications}/edit-template-notification.js +9 -13
  409. package/src/components/page-content-focus-notifications/index.js +14 -0
  410. package/src/components/page-main/index.js +6 -1
  411. package/src/components/page-pages/index.js +167 -91
  412. package/src/components/page-pages/side-editor.js +14 -0
  413. package/src/components/page-patterns/grid-item.js +3 -3
  414. package/src/components/page-patterns/patterns-list.js +10 -4
  415. package/src/components/page-patterns/use-patterns.js +4 -3
  416. package/src/components/page-templates/dataviews-templates.js +345 -0
  417. package/src/components/page-templates/style.scss +13 -0
  418. package/src/components/page-templates/template-actions.js +209 -0
  419. package/src/components/preferences-modal/index.js +1 -1
  420. package/src/components/save-button/index.js +37 -24
  421. package/src/components/save-hub/index.js +15 -0
  422. package/src/components/save-hub/style.scss +7 -0
  423. package/src/components/sidebar/index.js +1 -2
  424. package/src/components/sidebar-dataviews/add-new-view.js +141 -0
  425. package/src/components/sidebar-dataviews/custom-dataviews-list.js +229 -0
  426. package/src/components/sidebar-dataviews/dataview-item.js +67 -0
  427. package/src/components/sidebar-dataviews/default-views.js +59 -0
  428. package/src/components/sidebar-dataviews/index.js +36 -45
  429. package/src/components/sidebar-dataviews/style.scss +29 -0
  430. package/src/components/sidebar-edit-mode/default-sidebar.js +6 -6
  431. package/src/components/sidebar-edit-mode/index.js +13 -9
  432. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +31 -57
  433. package/src/components/sidebar-edit-mode/page-panels/hooks.js +20 -9
  434. package/src/components/sidebar-edit-mode/page-panels/page-status.js +6 -6
  435. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +10 -8
  436. package/src/components/sidebar-edit-mode/page-panels/reset-default-template.js +13 -12
  437. package/src/components/sidebar-edit-mode/page-panels/style.scss +14 -19
  438. package/src/components/sidebar-edit-mode/page-panels/swap-template-button.js +10 -9
  439. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +6 -6
  440. package/src/components/sidebar-edit-mode/settings-header/index.js +8 -9
  441. package/src/components/sidebar-edit-mode/template-panel/hooks.js +11 -7
  442. package/src/components/sidebar-navigation-screen/style.scss +1 -0
  443. package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  444. package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  445. package/src/components/sidebar-navigation-screen-page/index.js +24 -3
  446. package/src/components/sidebar-navigation-screen-page/page-details.js +4 -17
  447. package/src/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +2 -2
  448. package/src/components/sidebar-navigation-screen-template/style.scss +6 -1
  449. package/src/components/site-hub/index.js +9 -8
  450. package/src/components/start-template-options/index.js +14 -12
  451. package/src/components/style-book/index.js +48 -35
  452. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +182 -63
  453. package/src/components/template-part-converter/convert-to-regular.js +1 -1
  454. package/src/components/welcome-guide/page.js +2 -2
  455. package/src/components/welcome-guide/template.js +4 -2
  456. package/src/hooks/commands/use-edit-mode-commands.js +22 -16
  457. package/src/hooks/push-changes-to-global-styles/index.js +13 -6
  458. package/src/hooks/template-part-edit.js +4 -2
  459. package/src/index.js +0 -8
  460. package/src/store/actions.js +42 -96
  461. package/src/store/private-actions.js +1 -24
  462. package/src/store/private-selectors.js +0 -22
  463. package/src/store/reducer.js +0 -39
  464. package/src/store/selectors.js +43 -95
  465. package/src/store/test/actions.js +14 -169
  466. package/src/store/test/reducer.js +0 -62
  467. package/src/store/test/selectors.js +0 -117
  468. package/src/style.scss +2 -0
  469. package/src/utils/constants.js +1 -11
  470. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js +0 -77
  471. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +0 -1
  472. package/build/components/block-editor/block-editor-provider/index.js +0 -31
  473. package/build/components/block-editor/block-editor-provider/index.js.map +0 -1
  474. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +0 -110
  475. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js.map +0 -1
  476. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js +0 -84
  477. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +0 -1
  478. package/build/components/block-editor/index.js +0 -30
  479. package/build/components/block-editor/index.js.map +0 -1
  480. package/build/components/dataviews/in-filter.js +0 -49
  481. package/build/components/dataviews/in-filter.js.map +0 -1
  482. package/build/components/page-content-focus-manager/back-to-page-notification.js.map +0 -1
  483. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +0 -50
  484. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +0 -1
  485. package/build/components/page-content-focus-manager/edit-template-notification.js.map +0 -1
  486. package/build/components/page-content-focus-manager/index.js +0 -61
  487. package/build/components/page-content-focus-manager/index.js.map +0 -1
  488. package/build/components/page-pages/default-views.js +0 -62
  489. package/build/components/page-pages/default-views.js.map +0 -1
  490. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +0 -87
  491. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +0 -1
  492. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js +0 -69
  493. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +0 -1
  494. package/build-module/components/block-editor/block-editor-provider/index.js +0 -23
  495. package/build-module/components/block-editor/block-editor-provider/index.js.map +0 -1
  496. package/build-module/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +0 -102
  497. package/build-module/components/block-editor/block-editor-provider/navigation-block-editor-provider.js.map +0 -1
  498. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js +0 -78
  499. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +0 -1
  500. package/build-module/components/block-editor/index.js +0 -22
  501. package/build-module/components/block-editor/index.js.map +0 -1
  502. package/build-module/components/dataviews/in-filter.js +0 -41
  503. package/build-module/components/dataviews/in-filter.js.map +0 -1
  504. package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +0 -1
  505. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +0 -43
  506. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +0 -1
  507. package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +0 -1
  508. package/build-module/components/page-content-focus-manager/index.js +0 -52
  509. package/build-module/components/page-content-focus-manager/index.js.map +0 -1
  510. package/build-module/components/page-pages/default-views.js +0 -55
  511. package/build-module/components/page-pages/default-views.js.map +0 -1
  512. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +0 -80
  513. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +0 -1
  514. package/src/components/block-editor/block-editor-provider/default-block-editor-provider.js +0 -75
  515. package/src/components/block-editor/block-editor-provider/index.js +0 -29
  516. package/src/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +0 -114
  517. package/src/components/block-editor/block-editor-provider/test/use-page-content-blocks.js +0 -116
  518. package/src/components/block-editor/block-editor-provider/use-page-content-blocks.js +0 -90
  519. package/src/components/block-editor/index.js +0 -28
  520. package/src/components/dataviews/in-filter.js +0 -45
  521. package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +0 -52
  522. package/src/components/page-content-focus-manager/index.js +0 -51
  523. package/src/components/page-pages/default-views.js +0 -60
  524. package/src/components/sidebar-edit-mode/page-panels/publish-date.js +0 -94
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalFetchUrlData","fetchUrlData","editorStore","interfaceStore","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","App","initializeEditor","id","settings","target","document","getElementById","root","search","searchOptions","__experimentalFetchRichUrlData","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","setDefaults","editorMode","fixedToolbar","focusMode","distractionFree","keepCaretInsideBlock","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","showListViewByDefault","showBlockBreadcrumbs","setDefaultComplementaryArea","updateSettings","updateEditorSettings","defaultTemplateTypes","defaultTemplatePartAreas","window","addEventListener","e","preventDefault","render","createElement","reinitializeEditor","since","version","default","PluginSidebar","PluginSidebarMoreMenuItem","PluginMoreMenuItem","PluginTemplateSettingPanel"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot } from '@wordpress/element';\nimport {\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n} from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport App from './components/app';\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tsettings.__experimentalFetchLinkSuggestions = ( search, searchOptions ) =>\n\t\tfetchLinkSuggestions( search, searchOptions, settings );\n\tsettings.__experimentalFetchRichUrlData = fetchUrlData;\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tdistractionFree: false,\n\t\tkeepCaretInsideBlock: false,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t\tshowListViewByDefault: false,\n\t\tshowBlockBreadcrumbs: true,\n\t} );\n\n\tdispatch( interfaceStore ).setDefaultComplementaryArea(\n\t\t'core/edit-site',\n\t\t'edit-site/template'\n\t);\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Keep the defaultTemplateTypes in the core/editor settings too,\n\t// so that they can be selected with core/editor selectors in any editor.\n\t// This is needed because edit-site doesn't initialize with EditorProvider,\n\t// which internally uses updateEditorSettings as well.\n\tdispatch( editorStore ).updateEditorSettings( {\n\t\tdefaultTemplateTypes: settings.defaultTemplateTypes,\n\t\tdefaultTemplatePartAreas: settings.defaultTemplatePartAreas,\n\t} );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render( <App /> );\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginSidebar } from './components/sidebar-edit-mode/plugin-sidebar';\nexport { default as PluginSidebarMoreMenuItem } from './components/header-edit-mode/plugin-sidebar-more-menu-item';\nexport { default as PluginMoreMenuItem } from './components/header-edit-mode/plugin-more-menu-item';\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,2BAA2B,EAC3BC,4CAA4C,QACtC,0BAA0B;AACjC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SACCC,kCAAkC,IAAIC,oBAAoB,EAC1DC,0BAA0B,IAAIC,YAAY,QACpC,sBAAsB;AAC7B,SAASX,KAAK,IAAIY,WAAW,QAAQ,mBAAmB;AACxD,SAASZ,KAAK,IAAIa,cAAc,QAAQ,sBAAsB;AAC9D,SAASb,KAAK,IAAIc,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAO,SAAS;AAChB,SAAShB,KAAK,IAAIiB,aAAa,QAAQ,SAAS;AAChD,OAAOC,GAAG,MAAM,kBAAkB;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAEC,EAAE,EAAEC,QAAQ,EAAG;EAChD,MAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAc,CAAEJ,EAAG,CAAC;EAC5C,MAAMK,IAAI,GAAGlB,UAAU,CAAEe,MAAO,CAAC;EAEjCD,QAAQ,CAACb,kCAAkC,GAAG,CAAEkB,MAAM,EAAEC,a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,CAAEO,WAAY,CAAC,CAACyC,oBAAoB,CAAE;IAC7CC,oBAAoB,EAAEjC,QAAQ,CAACiC,oBAAoB;IACnDC,wBAAwB,EAAElC,QAAQ,CAACkC;EACpC,CAAE,CAAC;;EAEH;EACAC,MAAM,CAACC,gBAAgB,CAAE,UAAU,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzEH,MAAM,CAACC,gBAAgB,CAAE,MAAM,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErElC,IAAI,CAACmC,MAAM,CAAEC,aAAA,CAAC3C,GAAG,MAAE,CAAE,CAAC;EAEtB,OAAOO,IAAI;AACZ;AAEA,OAAO,SAASqC,kBAAkBA,CAAA,EAAG;EACpCxD,UAAU,CAAE,gCAAgC,EAAE;IAC7CyD,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,aAAa,QAAQ,+CAA+C;AACxF,SAASD,OAAO,IAAIE,yBAAyB,QAAQ,6DAA6D;AAClH,SAASF,OAAO,IAAIG,kBAAkB,QAAQ,qDAAqD;AACnG,SAASH,OAAO,IAAII,0BAA0B,QAAQ,4CAA4C;AAClG,SAASrE,KAAK,QAAQ,SAAS"}
1
+ {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","editorStore","interfaceStore","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","App","initializeEditor","id","settings","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","setDefaults","editorMode","fixedToolbar","focusMode","distractionFree","keepCaretInsideBlock","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","showListViewByDefault","showBlockBreadcrumbs","setDefaultComplementaryArea","updateSettings","updateEditorSettings","defaultTemplateTypes","defaultTemplatePartAreas","window","addEventListener","e","preventDefault","render","createElement","reinitializeEditor","since","version","default","PluginSidebar","PluginSidebarMoreMenuItem","PluginMoreMenuItem","PluginTemplateSettingPanel"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport App from './components/app';\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tdistractionFree: false,\n\t\tkeepCaretInsideBlock: false,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t\tshowListViewByDefault: false,\n\t\tshowBlockBreadcrumbs: true,\n\t} );\n\n\tdispatch( interfaceStore ).setDefaultComplementaryArea(\n\t\t'core/edit-site',\n\t\t'edit-site/template'\n\t);\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Keep the defaultTemplateTypes in the core/editor settings too,\n\t// so that they can be selected with core/editor selectors in any editor.\n\t// This is needed because edit-site doesn't initialize with EditorProvider,\n\t// which internally uses updateEditorSettings as well.\n\tdispatch( editorStore ).updateEditorSettings( {\n\t\tdefaultTemplateTypes: settings.defaultTemplateTypes,\n\t\tdefaultTemplatePartAreas: settings.defaultTemplatePartAreas,\n\t} );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render( <App /> );\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginSidebar } from './components/sidebar-edit-mode/plugin-sidebar';\nexport { default as PluginSidebarMoreMenuItem } from './components/header-edit-mode/plugin-sidebar-more-menu-item';\nexport { default as PluginMoreMenuItem } from './components/header-edit-mode/plugin-more-menu-item';\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,2BAA2B,EAC3BC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QAAQ,6DAA6D;AAClH,SAASF,OAAO,IAAIG,kBAAkB,QAAQ,qDAAqD;AACnG,SAASH,OAAO,IAAII,0BAA0B,QAAQ,4CAA4C;AAClG,SAAS9D,KAAK,QAAQ,SAAS"}
@@ -29,9 +29,9 @@ export function toggleFeature(featureName) {
29
29
  return function ({
30
30
  registry
31
31
  }) {
32
- deprecated("select( 'core/edit-site' ).toggleFeature( featureName )", {
32
+ deprecated("dispatch( 'core/edit-site' ).toggleFeature( featureName )", {
33
33
  since: '6.0',
34
- alternative: "select( 'core/preferences').toggle( 'core/edit-site', featureName )"
34
+ alternative: "dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"
35
35
  });
36
36
  registry.dispatch(preferencesStore).toggle('core/edit-site', featureName);
37
37
  };
@@ -54,41 +54,37 @@ export function __experimentalSetPreviewDeviceType(deviceType) {
54
54
  /**
55
55
  * Action that sets a template, optionally fetching it from REST API.
56
56
  *
57
- * @param {number} templateId The template ID.
58
- * @param {string} templateSlug The template slug.
59
57
  * @return {Object} Action object.
60
58
  */
61
- export const setTemplate = (templateId, templateSlug) => async ({
62
- dispatch,
63
- registry
64
- }) => {
65
- if (!templateSlug) {
66
- try {
67
- const template = await registry.resolveSelect(coreStore).getEntityRecord('postType', TEMPLATE_POST_TYPE, templateId);
68
- templateSlug = template?.slug;
69
- } catch (error) {}
70
- }
71
- dispatch({
72
- type: 'SET_EDITED_POST',
73
- postType: TEMPLATE_POST_TYPE,
74
- id: templateId,
75
- context: {
76
- templateSlug
77
- }
59
+ export function setTemplate() {
60
+ deprecated("dispatch( 'core/edit-site' ).setTemplate", {
61
+ since: '6.5',
62
+ version: '6.8',
63
+ hint: 'The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically.'
78
64
  });
79
- };
65
+ return {
66
+ type: 'NOTHING'
67
+ };
68
+ }
80
69
 
81
70
  /**
82
71
  * Action that adds a new template and sets it as the current template.
83
72
  *
84
73
  * @param {Object} template The template.
85
74
  *
75
+ * @deprecated
76
+ *
86
77
  * @return {Object} Action object used to set the current template.
87
78
  */
88
79
  export const addTemplate = template => async ({
89
80
  dispatch,
90
81
  registry
91
82
  }) => {
83
+ deprecated("dispatch( 'core/edit-site' ).addTemplate", {
84
+ since: '6.5',
85
+ version: '6.8',
86
+ hint: 'use saveEntityRecord directly'
87
+ });
92
88
  const newTemplate = await registry.dispatch(coreStore).saveEntityRecord('postType', TEMPLATE_POST_TYPE, template);
93
89
  if (template.content) {
94
90
  registry.dispatch(coreStore).editEntityRecord('postType', TEMPLATE_POST_TYPE, newTemplate.id, {
@@ -100,10 +96,7 @@ export const addTemplate = template => async ({
100
96
  dispatch({
101
97
  type: 'SET_EDITED_POST',
102
98
  postType: TEMPLATE_POST_TYPE,
103
- id: newTemplate.id,
104
- context: {
105
- templateSlug: newTemplate.slug
106
- }
99
+ id: newTemplate.id
107
100
  });
108
101
  };
109
102
 
@@ -175,14 +168,16 @@ export function setNavigationMenu(navigationMenuId) {
175
168
  *
176
169
  * @param {string} postType The entity's post type.
177
170
  * @param {string} postId The entity's ID.
171
+ * @param {Object} context The entity's context.
178
172
  *
179
173
  * @return {Object} Action object.
180
174
  */
181
- export function setEditedEntity(postType, postId) {
175
+ export function setEditedEntity(postType, postId, context) {
182
176
  return {
183
177
  type: 'SET_EDITED_POST',
184
178
  postType,
185
- id: postId
179
+ id: postId,
180
+ context
186
181
  };
187
182
  }
188
183
 
@@ -217,61 +212,20 @@ export function setEditedPostContext(context) {
217
212
  * Resolves the template for a page and displays both. If no path is given, attempts
218
213
  * to use the postId to generate a path like `?p=${ postId }`.
219
214
  *
220
- * @param {Object} page The page object.
221
- * @param {string} page.type The page type.
222
- * @param {string} page.slug The page slug.
223
- * @param {string} page.path The page path.
224
- * @param {Object} page.context The page context.
215
+ * @deprecated
225
216
  *
226
217
  * @return {number} The resolved template ID for the page route.
227
218
  */
228
- export const setPage = page => async ({
229
- dispatch,
230
- registry
231
- }) => {
232
- let template;
233
- const getDefaultTemplate = async slug => apiFetch({
234
- path: addQueryArgs('/wp/v2/templates/lookup', {
235
- slug: `page-${slug}`
236
- })
237
- });
238
- if (page.path) {
239
- template = await registry.resolveSelect(coreStore).__experimentalGetTemplateForLink(page.path);
240
- } else {
241
- const editedEntity = await registry.resolveSelect(coreStore).getEditedEntityRecord('postType', page.context?.postType || 'post', page.context?.postId);
242
- const currentTemplateSlug = editedEntity?.template;
243
- if (currentTemplateSlug) {
244
- const currentTemplate = (await registry.resolveSelect(coreStore).getEntityRecords('postType', TEMPLATE_POST_TYPE, {
245
- per_page: -1
246
- }))?.find(({
247
- slug
248
- }) => slug === currentTemplateSlug);
249
- if (currentTemplate) {
250
- template = currentTemplate;
251
- } else {
252
- // If a page has a `template` set and is not included in the list
253
- // of the current theme's templates, query for current theme's default template.
254
- template = await getDefaultTemplate(editedEntity?.slug);
255
- }
256
- } else {
257
- // Page's `template` is empty, that indicates we need to use the default template for the page.
258
- template = await getDefaultTemplate(editedEntity?.slug);
259
- }
260
- }
261
- if (!template) {
262
- return;
263
- }
264
- dispatch({
265
- type: 'SET_EDITED_POST',
266
- postType: TEMPLATE_POST_TYPE,
267
- id: template.id,
268
- context: {
269
- ...page.context,
270
- templateSlug: template.slug
271
- }
219
+ export function setPage() {
220
+ deprecated("dispatch( 'core/edit-site' ).setPage", {
221
+ since: '6.5',
222
+ version: '6.8',
223
+ hint: 'The setPage is not needed anymore, the correct entity is resolved from the URL automatically.'
272
224
  });
273
- return template.id;
274
- };
225
+ return {
226
+ type: 'NOTHING'
227
+ };
228
+ }
275
229
 
276
230
  /**
277
231
  * Action that sets the active navigation panel menu.
@@ -531,6 +485,9 @@ export const setHasPageContentFocus = hasPageContentFocus => ({
531
485
  dispatch,
532
486
  registry
533
487
  }) => {
488
+ deprecated(`dispatch( 'core/edit-site' ).setHasPageContentFocus`, {
489
+ since: '6.5'
490
+ });
534
491
  if (hasPageContentFocus) {
535
492
  registry.dispatch(blockEditorStore).clearSelectedBlock();
536
493
  }
@@ -552,7 +509,7 @@ export const toggleDistractionFree = () => ({
552
509
  const isDistractionFree = registry.select(preferencesStore).get('core/edit-site', 'distractionFree');
553
510
  if (!isDistractionFree) {
554
511
  registry.batch(() => {
555
- registry.dispatch(preferencesStore).set('core/edit-site', 'fixedToolbar', false);
512
+ registry.dispatch(preferencesStore).set('core/edit-site', 'fixedToolbar', true);
556
513
  dispatch.setIsInserterOpened(false);
557
514
  dispatch.setIsListViewOpened(false);
558
515
  dispatch.closeGeneralSidebar();
@@ -1 +1 @@
1
- {"version":3,"names":["apiFetch","parse","__unstableSerializeAndClean","deprecated","addQueryArgs","__","sprintf","store","noticesStore","coreStore","interfaceStore","blockEditorStore","speak","preferencesStore","decodeEntities","STORE_NAME","editSiteStoreName","isTemplateRevertable","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","NAVIGATION_POST_TYPE","toggleFeature","featureName","registry","since","alternative","dispatch","toggle","__experimentalSetPreviewDeviceType","deviceType","type","setTemplate","templateId","templateSlug","template","resolveSelect","getEntityRecord","slug","error","postType","id","context","addTemplate","newTemplate","saveEntityRecord","content","editEntityRecord","blocks","undoIgnore","removeTemplate","deleteEntityRecord","force","lastError","select","getLastEntityDeleteError","templateTitle","title","rendered","createSuccessNotice","errorMessage","message","code","createErrorNotice","setTemplatePart","templatePartId","setNavigationMenu","navigationMenuId","setEditedEntity","postId","setHomeTemplateId","version","setEditedPostContext","setPage","page","getDefaultTemplate","path","__experimentalGetTemplateForLink","editedEntity","getEditedEntityRecord","currentTemplateSlug","currentTemplate","getEntityRecords","per_page","find","setNavigationPanelActiveMenu","openNavigationPanelToMenu","setIsNavigationPanelOpened","setIsInserterOpened","value","updateSettings","settings","setIsListViewOpened","isOpen","isDistractionFree","get","toggleDistractionFree","setIsSaveViewOpened","revertTemplate","allowUndo","noticeId","removeNotice","templateEntityConfig","getEntityConfig","fileTemplatePath","baseURL","source","fileTemplate","serializeBlocks","blocksForSerialization","edited","raw","undoRevert","actions","label","onClick","openGeneralSidebar","name","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","switchEditorMode","mode","set","clearSelectedBlock","setHasPageContentFocus","hasPageContentFocus","batch","createInfoNotice"],"sources":["@wordpress/edit-site/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\nimport { addQueryArgs } from '@wordpress/url';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { speak } from '@wordpress/a11y';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME as editSiteStoreName } from './constants';\nimport isTemplateRevertable from '../utils/is-template-revertable';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../utils/constants';\n/**\n * Dispatches an action that toggles a feature flag.\n *\n * @param {string} featureName Feature name.\n */\nexport function toggleFeature( featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( \"select( 'core/edit-site' ).toggleFeature( featureName )\", {\n\t\t\tsince: '6.0',\n\t\t\talternative:\n\t\t\t\t\"select( 'core/preferences').toggle( 'core/edit-site', featureName )\",\n\t\t} );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-site', featureName );\n\t};\n}\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function __experimentalSetPreviewDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_PREVIEW_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Action that sets a template, optionally fetching it from REST API.\n *\n * @param {number} templateId The template ID.\n * @param {string} templateSlug The template slug.\n * @return {Object} Action object.\n */\nexport const setTemplate =\n\t( templateId, templateSlug ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tif ( ! templateSlug ) {\n\t\t\ttry {\n\t\t\t\tconst template = await registry\n\t\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t\t.getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\ttemplateId\n\t\t\t\t\t);\n\t\t\t\ttemplateSlug = template?.slug;\n\t\t\t} catch ( error ) {}\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\tid: templateId,\n\t\t\tcontext: { templateSlug },\n\t\t} );\n\t};\n\n/**\n * Action that adds a new template and sets it as the current template.\n *\n * @param {Object} template The template.\n *\n * @return {Object} Action object used to set the current template.\n */\nexport const addTemplate =\n\t( template ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tconst newTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', TEMPLATE_POST_TYPE, template );\n\n\t\tif ( template.content ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tnewTemplate.id,\n\t\t\t\t\t{ blocks: parse( template.content ) },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\tid: newTemplate.id,\n\t\t\tcontext: { templateSlug: newTemplate.slug },\n\t\t} );\n\t};\n\n/**\n * Action that removes a template.\n *\n * @param {Object} template The template object.\n */\nexport const removeTemplate =\n\t( template ) =>\n\tasync ( { registry } ) => {\n\t\ttry {\n\t\t\tawait registry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.deleteEntityRecord( 'postType', template.type, template.id, {\n\t\t\t\t\tforce: true,\n\t\t\t\t} );\n\n\t\t\tconst lastError = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntityDeleteError(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\ttemplate.id\n\t\t\t\t);\n\n\t\t\tif ( lastError ) {\n\t\t\t\tthrow lastError;\n\t\t\t}\n\n\t\t\t// Depending on how the entity was retrieved it's title might be\n\t\t\t// an object or simple string.\n\t\t\tconst templateTitle =\n\t\t\t\ttypeof template.title === 'string'\n\t\t\t\t\t? template.title\n\t\t\t\t\t: template.title?.rendered;\n\n\t\t\tregistry.dispatch( noticesStore ).createSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t__( '\"%s\" deleted.' ),\n\t\t\t\t\tdecodeEntities( templateTitle )\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar', id: 'site-editor-template-deleted-success' }\n\t\t\t);\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while deleting the template.' );\n\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n\n/**\n * Action that sets a template part.\n *\n * @param {string} templatePartId The template part ID.\n *\n * @return {Object} Action object.\n */\nexport function setTemplatePart( templatePartId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\tid: templatePartId,\n\t};\n}\n\n/**\n * Action that sets a navigation menu.\n *\n * @param {string} navigationMenuId The Navigation Menu Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setNavigationMenu( navigationMenuId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: NAVIGATION_POST_TYPE,\n\t\tid: navigationMenuId,\n\t};\n}\n\n/**\n * Action that sets an edited entity.\n *\n * @param {string} postType The entity's post type.\n * @param {string} postId The entity's ID.\n *\n * @return {Object} Action object.\n */\nexport function setEditedEntity( postType, postId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tid: postId,\n\t};\n}\n\n/**\n * @deprecated\n */\nexport function setHomeTemplateId() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Set's the current block editor context.\n *\n * @param {Object} context The context object.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPostContext( context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST_CONTEXT',\n\t\tcontext,\n\t};\n}\n\n/**\n * Resolves the template for a page and displays both. If no path is given, attempts\n * to use the postId to generate a path like `?p=${ postId }`.\n *\n * @param {Object} page The page object.\n * @param {string} page.type The page type.\n * @param {string} page.slug The page slug.\n * @param {string} page.path The page path.\n * @param {Object} page.context The page context.\n *\n * @return {number} The resolved template ID for the page route.\n */\nexport const setPage =\n\t( page ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tlet template;\n\t\tconst getDefaultTemplate = async ( slug ) =>\n\t\t\tapiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/templates/lookup', {\n\t\t\t\t\tslug: `page-${ slug }`,\n\t\t\t\t} ),\n\t\t\t} );\n\n\t\tif ( page.path ) {\n\t\t\ttemplate = await registry\n\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t.__experimentalGetTemplateForLink( page.path );\n\t\t} else {\n\t\t\tconst editedEntity = await registry\n\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t.getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpage.context?.postType || 'post',\n\t\t\t\t\tpage.context?.postId\n\t\t\t\t);\n\t\t\tconst currentTemplateSlug = editedEntity?.template;\n\t\t\tif ( currentTemplateSlug ) {\n\t\t\t\tconst currentTemplate = (\n\t\t\t\t\tawait registry\n\t\t\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t\t\t.getEntityRecords( 'postType', TEMPLATE_POST_TYPE, {\n\t\t\t\t\t\t\tper_page: -1,\n\t\t\t\t\t\t} )\n\t\t\t\t)?.find( ( { slug } ) => slug === currentTemplateSlug );\n\t\t\t\tif ( currentTemplate ) {\n\t\t\t\t\ttemplate = currentTemplate;\n\t\t\t\t} else {\n\t\t\t\t\t// If a page has a `template` set and is not included in the list\n\t\t\t\t\t// of the current theme's templates, query for current theme's default template.\n\t\t\t\t\ttemplate = await getDefaultTemplate( editedEntity?.slug );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Page's `template` is empty, that indicates we need to use the default template for the page.\n\t\t\t\ttemplate = await getDefaultTemplate( editedEntity?.slug );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! template ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\tid: template.id,\n\t\t\tcontext: {\n\t\t\t\t...page.context,\n\t\t\t\ttemplateSlug: template.slug,\n\t\t\t},\n\t\t} );\n\n\t\treturn template.id;\n\t};\n\n/**\n * Action that sets the active navigation panel menu.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens the navigation panel and sets its active menu at the same time.\n *\n * @deprecated\n */\nexport function openNavigationPanelToMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).openNavigationPanelToMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Sets whether the navigation panel should be open.\n *\n * @deprecated\n */\nexport function setIsNavigationPanelOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setIsNavigationPanelOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens or closes the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n *\n * @return {Object} Action object.\n */\nexport function setIsInserterOpened( value ) {\n\treturn {\n\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\tvalue,\n\t};\n}\n\n/**\n * Returns an action object used to update the settings.\n *\n * @param {Object} settings New settings.\n *\n * @return {Object} Action object.\n */\nexport function updateSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Sets whether the list view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the list view. If false, closes it.\n * It does not toggle the state, but sets it directly.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-site', 'distractionFree' );\n\t\tif ( isDistractionFree && isOpen ) {\n\t\t\tdispatch.toggleDistractionFree();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\t\tisOpen,\n\t\t} );\n\t};\n\n/**\n * Sets whether the save view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the save view. If false, closes it.\n * It does not toggle the state, but sets it directly.\n */\nexport function setIsSaveViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_SAVE_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, { allowUndo = true } = {} ) =>\n\tasync ( { registry } ) => {\n\t\tconst noticeId = 'edit-site-template-reverted';\n\t\tregistry.dispatch( noticesStore ).removeNotice( noticeId );\n\t\tif ( ! isTemplateRevertable( template ) ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( __( 'This template is not revertable.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst templateEntityConfig = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityConfig( 'postType', template.type );\n\n\t\t\tif ( ! templateEntityConfig ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fileTemplatePath = addQueryArgs(\n\t\t\t\t`${ templateEntityConfig.baseURL }/${ template.id }`,\n\t\t\t\t{ context: 'edit', source: 'theme' }\n\t\t\t);\n\n\t\t\tconst fileTemplate = await apiFetch( { path: fileTemplatePath } );\n\t\t\tif ( ! fileTemplate ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst serializeBlocks = ( {\n\t\t\t\tblocks: blocksForSerialization = [],\n\t\t\t} ) => __unstableSerializeAndClean( blocksForSerialization );\n\n\t\t\tconst edited = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\ttemplate.id\n\t\t\t\t);\n\n\t\t\t// We are fixing up the undo level here to make sure we can undo\n\t\t\t// the revert in the header toolbar correctly.\n\t\t\tregistry.dispatch( coreStore ).editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\ttemplate.type,\n\t\t\t\ttemplate.id,\n\t\t\t\t{\n\t\t\t\t\tcontent: serializeBlocks, // Required to make the `undo` behave correctly.\n\t\t\t\t\tblocks: edited.blocks, // Required to revert the blocks in the editor.\n\t\t\t\t\tsource: 'custom', // required to avoid turning the editor into a dirty state\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tundoIgnore: true, // Required to merge this edit with the last undo level.\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst blocks = parse( fileTemplate?.content?.raw );\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord( 'postType', template.type, fileTemplate.id, {\n\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\tblocks,\n\t\t\t\t\tsource: 'theme',\n\t\t\t\t} );\n\n\t\t\tif ( allowUndo ) {\n\t\t\t\tconst undoRevert = () => {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\t\tedited.id,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\t\t\t\tblocks: edited.blocks,\n\t\t\t\t\t\t\t\tsource: 'custom',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( __( 'Template reverted.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: noticeId,\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\tonClick: undoRevert,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t} );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'Template revert failed. Please reload.' );\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n/**\n * Action that opens an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-site', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tdispatch.toggleDistractionFree();\n\t\t}\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( editSiteStoreName, name );\n\t};\n\n/**\n * Action that closes the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.disableComplementaryArea( editSiteStoreName );\n\t};\n\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { dispatch, registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( 'core/preferences' )\n\t\t\t.set( 'core/edit-site', 'editorMode', mode );\n\n\t\t// Unselect blocks when we switch to a non visual mode.\n\t\tif ( mode !== 'visual' ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\n\t\tif ( mode === 'visual' ) {\n\t\t\tspeak( __( 'Visual editor selected' ), 'assertive' );\n\t\t} else if ( mode === 'text' ) {\n\t\t\tconst isDistractionFree = registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-site', 'distractionFree' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\tdispatch.toggleDistractionFree();\n\t\t\t}\n\t\t\tspeak( __( 'Code editor selected' ), 'assertive' );\n\t\t}\n\t};\n\n/**\n * Sets whether or not the editor allows only page content to be edited.\n *\n * @param {boolean} hasPageContentFocus True to allow only page content to be\n * edited, false to allow template to be\n * edited.\n */\nexport const setHasPageContentFocus =\n\t( hasPageContentFocus ) =>\n\t( { dispatch, registry } ) => {\n\t\tif ( hasPageContentFocus ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_HAS_PAGE_CONTENT_FOCUS',\n\t\t\thasPageContentFocus,\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-site', 'distractionFree' );\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core/edit-site', 'fixedToolbar', false );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t\tdispatch.closeGeneralSidebar();\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set(\n\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t'distractionFree',\n\t\t\t\t\t! isDistractionFree\n\t\t\t\t);\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createInfoNotice(\n\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t? __( 'Distraction free off.' )\n\t\t\t\t\t\t: __( 'Distraction free on.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/edit-site/distraction-free-mode/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t} );\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,KAAK,EAAEC,2BAA2B,QAAQ,mBAAmB;AACtE,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;AAC1D,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;AACzD,SAASF,KAAK,IAAIG,cAAc,QAAQ,sBAAsB;AAC9D,SAASH,KAAK,IAAII,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA,SAASC,UAAU,IAAIC,iBAAiB,QAAQ,aAAa;AAC7D,OAAOC,oBAAoB,MAAM,iCAAiC;AAClE,SACCC,kBAAkB,EAClBC,uBAAuB,EACvBC,oBAAoB,QACd,oBAAoB;AAC3B;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAEC,WAAW,EAAG;EAC5C,OAAO,UAAW;IAAEC;EAAS,CAAC,EAAG;IAChCpB,UAAU,CAAE,yDAAyD,EAAE;MACtEqB,KAAK,EAAE,KAAK;MACZC,WAAW,EACV;IACF,CAAE,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AC;MACrCjE,QAAQ,CAAC4F,mBAAmB,CAAC,CAAC;IAC/B,CAAE,CAAC;EACJ;EACA/F,QAAQ,CAACuG,KAAK,CAAE,MAAM;IACrBvG,QAAQ,CACNG,QAAQ,CAAEb,gBAAiB,CAAC,CAC5B6G,GAAG,CACH,gBAAgB,EAChB,iBAAiB,EACjB,CAAE7B,iBACH,CAAC;IACFtE,QAAQ,CACNG,QAAQ,CAAElB,YAAa,CAAC,CACxBuH,gBAAgB,CAChBlC,iBAAiB,GACdxF,EAAE,CAAE,uBAAwB,CAAC,GAC7BA,EAAE,CAAE,sBAAuB,CAAC,EAC/B;MACCmC,EAAE,EAAE,6CAA6C;MACjDV,IAAI,EAAE;IACP,CACD,CAAC;EACH,CAAE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"names":["apiFetch","parse","__unstableSerializeAndClean","deprecated","addQueryArgs","__","sprintf","store","noticesStore","coreStore","interfaceStore","blockEditorStore","speak","preferencesStore","decodeEntities","STORE_NAME","editSiteStoreName","isTemplateRevertable","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","NAVIGATION_POST_TYPE","toggleFeature","featureName","registry","since","alternative","dispatch","toggle","__experimentalSetPreviewDeviceType","deviceType","type","setTemplate","version","hint","addTemplate","template","newTemplate","saveEntityRecord","content","editEntityRecord","id","blocks","undoIgnore","postType","removeTemplate","deleteEntityRecord","force","lastError","select","getLastEntityDeleteError","templateTitle","title","rendered","createSuccessNotice","error","errorMessage","message","code","createErrorNotice","setTemplatePart","templatePartId","setNavigationMenu","navigationMenuId","setEditedEntity","postId","context","setHomeTemplateId","setEditedPostContext","setPage","setNavigationPanelActiveMenu","openNavigationPanelToMenu","setIsNavigationPanelOpened","setIsInserterOpened","value","updateSettings","settings","setIsListViewOpened","isOpen","isDistractionFree","get","toggleDistractionFree","setIsSaveViewOpened","revertTemplate","allowUndo","noticeId","removeNotice","templateEntityConfig","getEntityConfig","fileTemplatePath","baseURL","source","fileTemplate","path","serializeBlocks","blocksForSerialization","edited","getEditedEntityRecord","raw","undoRevert","actions","label","onClick","openGeneralSidebar","name","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","switchEditorMode","mode","set","clearSelectedBlock","setHasPageContentFocus","hasPageContentFocus","batch","createInfoNotice"],"sources":["@wordpress/edit-site/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\nimport { addQueryArgs } from '@wordpress/url';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { speak } from '@wordpress/a11y';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME as editSiteStoreName } from './constants';\nimport isTemplateRevertable from '../utils/is-template-revertable';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../utils/constants';\n/**\n * Dispatches an action that toggles a feature flag.\n *\n * @param {string} featureName Feature name.\n */\nexport function toggleFeature( featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).toggleFeature( featureName )\",\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative:\n\t\t\t\t\t\"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )\",\n\t\t\t}\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-site', featureName );\n\t};\n}\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function __experimentalSetPreviewDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_PREVIEW_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Action that sets a template, optionally fetching it from REST API.\n *\n * @return {Object} Action object.\n */\nexport function setTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setTemplate\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Action that adds a new template and sets it as the current template.\n *\n * @param {Object} template The template.\n *\n * @deprecated\n *\n * @return {Object} Action object used to set the current template.\n */\nexport const addTemplate =\n\t( template ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).addTemplate\", {\n\t\t\tsince: '6.5',\n\t\t\tversion: '6.8',\n\t\t\thint: 'use saveEntityRecord directly',\n\t\t} );\n\n\t\tconst newTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', TEMPLATE_POST_TYPE, template );\n\n\t\tif ( template.content ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tnewTemplate.id,\n\t\t\t\t\t{ blocks: parse( template.content ) },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\tid: newTemplate.id,\n\t\t} );\n\t};\n\n/**\n * Action that removes a template.\n *\n * @param {Object} template The template object.\n */\nexport const removeTemplate =\n\t( template ) =>\n\tasync ( { registry } ) => {\n\t\ttry {\n\t\t\tawait registry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.deleteEntityRecord( 'postType', template.type, template.id, {\n\t\t\t\t\tforce: true,\n\t\t\t\t} );\n\n\t\t\tconst lastError = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntityDeleteError(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\ttemplate.id\n\t\t\t\t);\n\n\t\t\tif ( lastError ) {\n\t\t\t\tthrow lastError;\n\t\t\t}\n\n\t\t\t// Depending on how the entity was retrieved it's title might be\n\t\t\t// an object or simple string.\n\t\t\tconst templateTitle =\n\t\t\t\ttypeof template.title === 'string'\n\t\t\t\t\t? template.title\n\t\t\t\t\t: template.title?.rendered;\n\n\t\t\tregistry.dispatch( noticesStore ).createSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t__( '\"%s\" deleted.' ),\n\t\t\t\t\tdecodeEntities( templateTitle )\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar', id: 'site-editor-template-deleted-success' }\n\t\t\t);\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while deleting the template.' );\n\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n\n/**\n * Action that sets a template part.\n *\n * @param {string} templatePartId The template part ID.\n *\n * @return {Object} Action object.\n */\nexport function setTemplatePart( templatePartId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\tid: templatePartId,\n\t};\n}\n\n/**\n * Action that sets a navigation menu.\n *\n * @param {string} navigationMenuId The Navigation Menu Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setNavigationMenu( navigationMenuId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: NAVIGATION_POST_TYPE,\n\t\tid: navigationMenuId,\n\t};\n}\n\n/**\n * Action that sets an edited entity.\n *\n * @param {string} postType The entity's post type.\n * @param {string} postId The entity's ID.\n * @param {Object} context The entity's context.\n *\n * @return {Object} Action object.\n */\nexport function setEditedEntity( postType, postId, context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tid: postId,\n\t\tcontext,\n\t};\n}\n\n/**\n * @deprecated\n */\nexport function setHomeTemplateId() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Set's the current block editor context.\n *\n * @param {Object} context The context object.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPostContext( context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST_CONTEXT',\n\t\tcontext,\n\t};\n}\n\n/**\n * Resolves the template for a page and displays both. If no path is given, attempts\n * to use the postId to generate a path like `?p=${ postId }`.\n *\n * @deprecated\n *\n * @return {number} The resolved template ID for the page route.\n */\nexport function setPage() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setPage\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setPage is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Action that sets the active navigation panel menu.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens the navigation panel and sets its active menu at the same time.\n *\n * @deprecated\n */\nexport function openNavigationPanelToMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).openNavigationPanelToMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Sets whether the navigation panel should be open.\n *\n * @deprecated\n */\nexport function setIsNavigationPanelOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setIsNavigationPanelOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens or closes the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n *\n * @return {Object} Action object.\n */\nexport function setIsInserterOpened( value ) {\n\treturn {\n\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\tvalue,\n\t};\n}\n\n/**\n * Returns an action object used to update the settings.\n *\n * @param {Object} settings New settings.\n *\n * @return {Object} Action object.\n */\nexport function updateSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Sets whether the list view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the list view. If false, closes it.\n * It does not toggle the state, but sets it directly.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-site', 'distractionFree' );\n\t\tif ( isDistractionFree && isOpen ) {\n\t\t\tdispatch.toggleDistractionFree();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\t\tisOpen,\n\t\t} );\n\t};\n\n/**\n * Sets whether the save view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the save view. If false, closes it.\n * It does not toggle the state, but sets it directly.\n */\nexport function setIsSaveViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_SAVE_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, { allowUndo = true } = {} ) =>\n\tasync ( { registry } ) => {\n\t\tconst noticeId = 'edit-site-template-reverted';\n\t\tregistry.dispatch( noticesStore ).removeNotice( noticeId );\n\t\tif ( ! isTemplateRevertable( template ) ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( __( 'This template is not revertable.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst templateEntityConfig = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityConfig( 'postType', template.type );\n\n\t\t\tif ( ! templateEntityConfig ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fileTemplatePath = addQueryArgs(\n\t\t\t\t`${ templateEntityConfig.baseURL }/${ template.id }`,\n\t\t\t\t{ context: 'edit', source: 'theme' }\n\t\t\t);\n\n\t\t\tconst fileTemplate = await apiFetch( { path: fileTemplatePath } );\n\t\t\tif ( ! fileTemplate ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst serializeBlocks = ( {\n\t\t\t\tblocks: blocksForSerialization = [],\n\t\t\t} ) => __unstableSerializeAndClean( blocksForSerialization );\n\n\t\t\tconst edited = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\ttemplate.id\n\t\t\t\t);\n\n\t\t\t// We are fixing up the undo level here to make sure we can undo\n\t\t\t// the revert in the header toolbar correctly.\n\t\t\tregistry.dispatch( coreStore ).editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\ttemplate.type,\n\t\t\t\ttemplate.id,\n\t\t\t\t{\n\t\t\t\t\tcontent: serializeBlocks, // Required to make the `undo` behave correctly.\n\t\t\t\t\tblocks: edited.blocks, // Required to revert the blocks in the editor.\n\t\t\t\t\tsource: 'custom', // required to avoid turning the editor into a dirty state\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tundoIgnore: true, // Required to merge this edit with the last undo level.\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst blocks = parse( fileTemplate?.content?.raw );\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord( 'postType', template.type, fileTemplate.id, {\n\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\tblocks,\n\t\t\t\t\tsource: 'theme',\n\t\t\t\t} );\n\n\t\t\tif ( allowUndo ) {\n\t\t\t\tconst undoRevert = () => {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\t\tedited.id,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\t\t\t\tblocks: edited.blocks,\n\t\t\t\t\t\t\t\tsource: 'custom',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( __( 'Template reverted.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: noticeId,\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\tonClick: undoRevert,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t} );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'Template revert failed. Please reload.' );\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n/**\n * Action that opens an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-site', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tdispatch.toggleDistractionFree();\n\t\t}\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( editSiteStoreName, name );\n\t};\n\n/**\n * Action that closes the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.disableComplementaryArea( editSiteStoreName );\n\t};\n\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { dispatch, registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( 'core/preferences' )\n\t\t\t.set( 'core/edit-site', 'editorMode', mode );\n\n\t\t// Unselect blocks when we switch to a non visual mode.\n\t\tif ( mode !== 'visual' ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\n\t\tif ( mode === 'visual' ) {\n\t\t\tspeak( __( 'Visual editor selected' ), 'assertive' );\n\t\t} else if ( mode === 'text' ) {\n\t\t\tconst isDistractionFree = registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-site', 'distractionFree' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\tdispatch.toggleDistractionFree();\n\t\t\t}\n\t\t\tspeak( __( 'Code editor selected' ), 'assertive' );\n\t\t}\n\t};\n\n/**\n * Sets whether or not the editor allows only page content to be edited.\n *\n * @param {boolean} hasPageContentFocus True to allow only page content to be\n * edited, false to allow template to be\n * edited.\n */\nexport const setHasPageContentFocus =\n\t( hasPageContentFocus ) =>\n\t( { dispatch, registry } ) => {\n\t\tdeprecated( `dispatch( 'core/edit-site' ).setHasPageContentFocus`, {\n\t\t\tsince: '6.5',\n\t\t} );\n\n\t\tif ( hasPageContentFocus ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_HAS_PAGE_CONTENT_FOCUS',\n\t\t\thasPageContentFocus,\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core/edit-site', 'distractionFree' );\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core/edit-site', 'fixedToolbar', true );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t\tdispatch.closeGeneralSidebar();\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set(\n\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t'distractionFree',\n\t\t\t\t\t! isDistractionFree\n\t\t\t\t);\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createInfoNotice(\n\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t? __( 'Distraction free off.' )\n\t\t\t\t\t\t: __( 'Distraction free on.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/edit-site/distraction-free-mode/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t} );\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,KAAK,EAAEC,2BAA2B,QAAQ,mBAAmB;AACtE,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;AAC1D,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;AACzD,SAASF,KAAK,IAAIG,cAAc,QAAQ,sBAAsB;AAC9D,SAASH,KAAK,IAAII,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASL,KAAK,IAAIM,gBAAgB,QAAQ,wBAAwB;AAClE,SAASC,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA,SAASC,UAAU,IAAIC,iBAAiB,QAAQ,aAAa;AAC7D,OAAOC,oBAAoB,MAAM,iCAAiC;AAClE,SACCC,kBAAkB,EAClBC,uBAAuB,EACvBC,oBAAoB,QACd,oBAAoB;AAC3B;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAEC,WAAW,EAAG;EAC5C,OAAO,UAAW;IAAEC;EAAS,CAAC,EAAG;IAChCpB,UAAU,CACT,2DAA2D,EAC3D;MACCqB,KAAK,EAAE,KAAK;MACZC,WAAW,EACV;IACF,C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AAE,CAAE,sBAAuB,CAAC,EAC/B;MACCmC,EAAE,EAAE,6CAA6C;MACjDV,IAAI,EAAE;IACP,CACD,CAAC;EACH,CAAE,CAAC;AACJ,CAAC"}
@@ -11,8 +11,7 @@ import { store as preferencesStore } from '@wordpress/preferences';
11
11
  */
12
12
  export const setCanvasMode = mode => ({
13
13
  registry,
14
- dispatch,
15
- select
14
+ dispatch
16
15
  }) => {
17
16
  registry.dispatch(blockEditorStore).__unstableSetEditorMode('edit');
18
17
  dispatch({
@@ -24,10 +23,6 @@ export const setCanvasMode = mode => ({
24
23
  if (mode === 'edit' && registry.select(preferencesStore).get('core/edit-site', 'showListViewByDefault') && !registry.select(preferencesStore).get('core/edit-site', 'distractionFree')) {
25
24
  dispatch.setIsListViewOpened(true);
26
25
  }
27
- // Switch focus away from editing the template when switching to view mode.
28
- if (mode === 'view' && select.isPage()) {
29
- dispatch.setHasPageContentFocus(true);
30
- }
31
26
  };
32
27
 
33
28
  /**
@@ -43,23 +38,4 @@ export const setEditorCanvasContainerView = view => ({
43
38
  view
44
39
  });
45
40
  };
46
-
47
- /**
48
- * Sets the type of page content focus. Can be one of:
49
- *
50
- * - `'disableTemplate'`: Disable the blocks belonging to the page's template.
51
- * - `'hideTemplate'`: Hide the blocks belonging to the page's template.
52
- *
53
- * @param {'disableTemplate'|'hideTemplate'} pageContentFocusType The type of page content focus.
54
- *
55
- * @return {Object} Action object.
56
- */
57
- export const setPageContentFocusType = pageContentFocusType => ({
58
- dispatch
59
- }) => {
60
- dispatch({
61
- type: 'SET_PAGE_CONTENT_FOCUS_TYPE',
62
- pageContentFocusType
63
- });
64
- };
65
41
  //# sourceMappingURL=private-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["store","blockEditorStore","preferencesStore","setCanvasMode","mode","registry","dispatch","select","__unstableSetEditorMode","type","get","setIsListViewOpened","isPage","setHasPageContentFocus","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_T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AAI,EAAE,6BAA6B;IACnCQ;EACD,CAAE,CAAC;AACJ,CAAC"}
1
+ {"version":3,"names":["store","blockEditorStore","preferencesStore","setCanvasMode","mode","registry","dispatch","__unstableSetEditorMode","type","select","get","setIsListViewOpened","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":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GACvBC,IAAI,IACN,CAAE;EAAEC,QAAQ;EAAEC;AAAS,CAAC,KAAM;EAC7BD,QAAQ,CAACC,QAAQ,CAAEL,gBAAiB,CAAC,CAACM,uBAAuB,CAAE,MAAO,CAAC;EACvED,QAAQ,CAAE;IACTE,IAAI,EAAE,iBAAiB;IACvBJ;EACD,CAAE,CAAC;EACH;EACA;EACA,IACCA,IAAI,KAAK,MAAM,IACfC,QAAQ,CACNI,MAAM,CAAEP,gBAAiB,CAAC,CAC1BQ,GAAG,CAAE,gBAAgB,EAAE,uBAAwB,CAAC,IAClD,CAAEL,QAAQ,CACRI,MAAM,CAAEP,gBAAiB,CAAC,CAC1BQ,GAAG,CAAE,gBAAgB,EAAE,iBAAkB,CAAC,EAC3C;IACDJ,QAAQ,CAACK,mBAAmB,CAAE,IAAK,CAAC;EACrC;AACD,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GACtCC,IAAI,IACN,CAAE;EAAEP;AAAS,CAAC,KAAM;EACnBA,QAAQ,CAAE;IACTE,IAAI,EAAE,kCAAkC;IACxCK;EACD,CAAE,CAAC;AACJ,CAAC"}
@@ -1,8 +1,3 @@
1
- /**
2
- * Internal dependencies
3
- */
4
- import { hasPageContentFocus } from './selectors';
5
-
6
1
  /**
7
2
  * Returns the current canvas mode.
8
3
  *
@@ -24,21 +19,4 @@ export function getCanvasMode(state) {
24
19
  export function getEditorCanvasContainerView(state) {
25
20
  return state.editorCanvasContainerView;
26
21
  }
27
-
28
- /**
29
- * Returns the type of the current page content focus, or null if there is no
30
- * page content focus.
31
- *
32
- * Possible values are:
33
- *
34
- * - `'disableTemplate'`: Disable the blocks belonging to the page's template.
35
- * - `'hideTemplate'`: Hide the blocks belonging to the page's template.
36
- *
37
- * @param {Object} state Global application state.
38
- *
39
- * @return {'disableTemplate'|'hideTemplate'|null} Type of the current page content focus.
40
- */
41
- export function getPageContentFocusType(state) {
42
- return hasPageContentFocus(state) ? state.pageContentFocusType : null;
43
- }
44
22
  //# sourceMappingURL=private-selectors.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["hasPageContentFocus","getCanvasMode","state","canvasMode","getEditorCanvasContainerView","editorCanvasContainerView","getPageContentFocusType","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":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,QAAQ,aAAa;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAEC,KAAK,EAAG;EACtC,OAAOA,KAAK,CAACC,UAAU;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAAEF,KAAK,EAAG;EACrD,OAAOA,KAAK,CAACG,yBAAyB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAAEJ,KAAK,EAAG;EAChD,OAAOF,mBAAmB,CAAEE,KAAM,CAAC,GAAGA,KAAK,CAACK,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;AACA,OAAO,SAASA,aAAaA,CAAEC,KAAK,EAAG;EACtC,OAAOA,KAAK,CAACC,UAAU;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAAEF,KAAK,EAAG;EACrD,OAAOA,KAAK,CAACG,yBAAyB;AACvC"}
@@ -151,41 +151,6 @@ function editorCanvasContainerView(state = undefined, action) {
151
151
  }
152
152
  return state;
153
153
  }
154
-
155
- /**
156
- * Reducer used to track whether the editor allows only page content to be
157
- * edited.
158
- *
159
- * @param {boolean} state Current state.
160
- * @param {Object} action Dispatched action.
161
- *
162
- * @return {boolean} Updated state.
163
- */
164
- export function hasPageContentFocus(state = false, action) {
165
- switch (action.type) {
166
- case 'SET_EDITED_POST':
167
- return !!action.context?.postId;
168
- case 'SET_HAS_PAGE_CONTENT_FOCUS':
169
- return action.hasPageContentFocus;
170
- }
171
- return state;
172
- }
173
-
174
- /**
175
- * Reducer used to track the type of page content focus.
176
- *
177
- * @param {string} state Current state.
178
- * @param {Object} action Dispatched action.
179
- *
180
- * @return {string} Updated state.
181
- */
182
- export function pageContentFocusType(state = 'disableTemplate', action) {
183
- switch (action.type) {
184
- case 'SET_PAGE_CONTENT_FOCUS_TYPE':
185
- return action.pageContentFocusType;
186
- }
187
- return state;
188
- }
189
154
  export default combineReducers({
190
155
  deviceType,
191
156
  settings,
@@ -194,8 +159,6 @@ export default combineReducers({
194
159
  listViewPanel,
195
160
  saveViewPanel,
196
161
  canvasMode,
197
- editorCanvasContainerView,
198
- hasPageContentFocus,
199
- pageContentFocusType
162
+ editorCanvasContainerView
200
163
  });
201
164
  //# sourceMappingURL=reducer.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["combineReducers","deviceType","state","action","type","settings","editedPost","postType","id","context","blockInserterPanel","isOpen","value","listViewPanel","saveViewPanel","canvasMode","mode","editorCanvasContainerView","undefined","view","hasPageContentFocus","postId","pageContentFocusType"],"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":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,iBAAiB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,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;A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C,MAAM,EAAG;EACzE,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,6BAA6B;MACjC,OAAOD,MAAM,CAACmB,oBAAoB;EACpC;EAEA,OAAOpB,KAAK;AACb;AAEA,eAAeF,eAAe,CAAE;EAC/BC,UAAU;EACVI,QAAQ;EACRC,UAAU;EACVI,kBAAkB;EAClBG,aAAa;EACbC,aAAa;EACbC,UAAU;EACVE,yBAAyB;EACzBG,mBAAmB;EACnBE;AACD,CAAE,CAAC"}
1
+ {"version":3,"names":["combineReducers","deviceType","state","action","type","settings","editedPost","postType","id","context","blockInserterPanel","isOpen","value","listViewPanel","saveViewPanel","canvasMode","mode","editorCanvasContainerView","undefined","view"],"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":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,iBAAiB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,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;AACA,OAAO,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;AACA,OAAO,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,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