@wordpress/edit-site 5.32.0 → 5.34.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 (872) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-page/index.js +3 -0
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +8 -7
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +3 -1
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +282 -13
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/utils.js +22 -11
  13. package/build/components/add-new-template/utils.js.map +1 -1
  14. package/build/components/app/index.js.map +1 -1
  15. package/build/components/async/index.js +51 -0
  16. package/build/components/async/index.js.map +1 -0
  17. package/build/components/block-editor/block-inspector-button.js +10 -9
  18. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  19. package/build/components/block-editor/editor-canvas.js +15 -6
  20. package/build/components/block-editor/editor-canvas.js.map +1 -1
  21. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  22. package/build/components/block-editor/resizable-editor.js.map +1 -1
  23. package/build/components/block-editor/resize-handle.js +20 -5
  24. package/build/components/block-editor/resize-handle.js.map +1 -1
  25. package/build/components/block-editor/site-editor-canvas.js +5 -1
  26. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  27. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  28. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  29. package/build/components/canvas-loader/index.js.map +1 -1
  30. package/build/components/code-editor/index.js.map +1 -1
  31. package/build/components/create-template-part-modal/index.js +3 -0
  32. package/build/components/create-template-part-modal/index.js.map +1 -1
  33. package/build/components/editor/index.js +61 -11
  34. package/build/components/editor/index.js.map +1 -1
  35. package/build/components/editor-canvas-container/index.js.map +1 -1
  36. package/build/components/error-boundary/index.js.map +1 -1
  37. package/build/components/error-boundary/warning.js.map +1 -1
  38. package/build/components/global-styles/background-panel.js +13 -1
  39. package/build/components/global-styles/background-panel.js.map +1 -1
  40. package/build/components/global-styles/block-preview-panel.js +6 -1
  41. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  42. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  43. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  44. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  45. package/build/components/global-styles/font-families.js +1 -1
  46. package/build/components/global-styles/font-families.js.map +1 -1
  47. package/build/components/global-styles/font-family-item.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  49. package/build/components/global-styles/font-library-modal/context.js +69 -35
  50. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  51. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/font-collection.js +18 -6
  53. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  55. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/index.js +1 -1
  57. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/installed-fonts.js +31 -28
  59. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  61. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  63. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  65. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  67. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  68. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  69. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  70. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
  71. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  72. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  73. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  74. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  75. package/build/components/global-styles/header.js.map +1 -1
  76. package/build/components/global-styles/highlighted-colors.js +1 -1
  77. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  78. package/build/components/global-styles/hooks.js +11 -3
  79. package/build/components/global-styles/hooks.js.map +1 -1
  80. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  81. package/build/components/global-styles/index.js.map +1 -1
  82. package/build/components/global-styles/navigation-button.js.map +1 -1
  83. package/build/components/global-styles/palette.js.map +1 -1
  84. package/build/components/global-styles/preview-colors.js.map +1 -1
  85. package/build/components/global-styles/preview-iframe.js.map +1 -1
  86. package/build/components/global-styles/preview-styles.js.map +1 -1
  87. package/build/components/global-styles/root-menu.js +2 -2
  88. package/build/components/global-styles/root-menu.js.map +1 -1
  89. package/build/components/global-styles/screen-background.js +1 -1
  90. package/build/components/global-styles/screen-background.js.map +1 -1
  91. package/build/components/global-styles/screen-block-list.js.map +1 -1
  92. package/build/components/global-styles/screen-block.js.map +1 -1
  93. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  94. package/build/components/global-styles/screen-colors.js.map +1 -1
  95. package/build/components/global-styles/screen-css.js.map +1 -1
  96. package/build/components/global-styles/screen-layout.js.map +1 -1
  97. package/build/components/global-styles/screen-revisions/index.js +1 -1
  98. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  99. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  100. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  101. package/build/components/global-styles/screen-root.js.map +1 -1
  102. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  103. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  104. package/build/components/global-styles/screen-typography.js.map +1 -1
  105. package/build/components/global-styles/style-variations-container.js +8 -2
  106. package/build/components/global-styles/style-variations-container.js.map +1 -1
  107. package/build/components/global-styles/subtitle.js.map +1 -1
  108. package/build/components/global-styles/typography-elements.js.map +1 -1
  109. package/build/components/global-styles/typography-example.js.map +1 -1
  110. package/build/components/global-styles/typography-panel.js.map +1 -1
  111. package/build/components/global-styles/typography-preview.js.map +1 -1
  112. package/build/components/global-styles/ui.js +1 -1
  113. package/build/components/global-styles/ui.js.map +1 -1
  114. package/build/components/global-styles/utils.js.map +1 -1
  115. package/build/components/global-styles/variations/variation.js.map +1 -1
  116. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  117. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  118. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  119. package/build/components/global-styles-renderer/index.js.map +1 -1
  120. package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
  121. package/build/components/header-edit-mode/index.js +36 -52
  122. package/build/components/header-edit-mode/index.js.map +1 -1
  123. package/build/components/header-edit-mode/more-menu/index.js +4 -100
  124. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  125. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  126. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  127. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  128. package/build/components/keyboard-shortcuts/register.js +0 -67
  129. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  130. package/build/components/layout/animation.js +3 -2
  131. package/build/components/layout/animation.js.map +1 -1
  132. package/build/components/layout/hooks.js.map +1 -1
  133. package/build/components/layout/index.js +20 -52
  134. package/build/components/layout/index.js.map +1 -1
  135. package/build/components/layout/router.js +70 -33
  136. package/build/components/layout/router.js.map +1 -1
  137. package/build/components/media/index.js.map +1 -1
  138. package/build/components/page/header.js.map +1 -1
  139. package/build/components/page/index.js +5 -2
  140. package/build/components/page/index.js.map +1 -1
  141. package/build/components/page-pages/index.js +18 -19
  142. package/build/components/page-pages/index.js.map +1 -1
  143. package/build/components/page-patterns/dataviews-pattern-actions.js +16 -11
  144. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  145. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  146. package/build/components/page-patterns/header.js +5 -3
  147. package/build/components/page-patterns/header.js.map +1 -1
  148. package/build/components/page-patterns/index.js +140 -62
  149. package/build/components/page-patterns/index.js.map +1 -1
  150. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  151. package/build/components/page-patterns/search-items.js +2 -1
  152. package/build/components/page-patterns/search-items.js.map +1 -1
  153. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  154. package/build/components/page-patterns/use-patterns.js +6 -10
  155. package/build/components/page-patterns/use-patterns.js.map +1 -1
  156. package/build/components/page-patterns/utils.js.map +1 -1
  157. package/build/components/page-templates/hooks.js.map +1 -0
  158. package/build/components/{page-templates-template-parts → page-templates}/index.js +78 -103
  159. package/build/components/page-templates/index.js.map +1 -0
  160. package/build/components/pagination/index.js.map +1 -1
  161. package/build/components/pattern-modal/duplicate.js +13 -8
  162. package/build/components/pattern-modal/duplicate.js.map +1 -1
  163. package/build/components/pattern-modal/index.js.map +1 -1
  164. package/build/components/pattern-modal/rename.js +6 -3
  165. package/build/components/pattern-modal/rename.js.map +1 -1
  166. package/build/components/plugin-template-setting-panel/index.js +9 -0
  167. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  168. package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
  169. package/build/components/rename-post-menu-item/index.js.map +1 -0
  170. package/build/components/resizable-frame/index.js +10 -11
  171. package/build/components/resizable-frame/index.js.map +1 -1
  172. package/build/components/revisions/index.js.map +1 -1
  173. package/build/components/routes/link.js.map +1 -1
  174. package/build/components/routes/use-title.js.map +1 -1
  175. package/build/components/save-button/index.js.map +1 -1
  176. package/build/components/save-hub/index.js.map +1 -1
  177. package/build/components/save-panel/index.js +3 -3
  178. package/build/components/save-panel/index.js.map +1 -1
  179. package/build/components/sidebar/index.js +41 -75
  180. package/build/components/sidebar/index.js.map +1 -1
  181. package/build/components/sidebar-button/index.js.map +1 -1
  182. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  183. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  184. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  185. package/build/components/sidebar-dataviews/default-views.js +1 -1
  186. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  187. package/build/components/sidebar-dataviews/index.js +1 -1
  188. package/build/components/sidebar-dataviews/index.js.map +1 -1
  189. package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
  190. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  191. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  192. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  193. package/build/components/sidebar-edit-mode/index.js +31 -55
  194. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  195. package/build/components/sidebar-edit-mode/page-panels/index.js +55 -3
  196. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  197. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  198. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +23 -16
  199. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
  201. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  202. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  203. package/build/components/sidebar-edit-mode/template-panel/index.js +3 -6
  204. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  205. package/build/components/sidebar-navigation-item/index.js +31 -0
  206. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  207. package/build/components/sidebar-navigation-screen/index.js +36 -9
  208. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  209. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  210. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  211. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  212. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  213. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  214. package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -2
  215. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  216. package/build/components/sidebar-navigation-screen-main/index.js +6 -15
  217. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  218. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  219. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  220. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
  221. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  223. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  224. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  225. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  226. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  227. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  228. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  229. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  231. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  232. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  233. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  234. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  235. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-page/index.js +53 -12
  237. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  239. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-pattern/index.js +17 -15
  241. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  243. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  245. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
  246. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  247. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  249. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  250. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  251. package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
  252. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  253. package/build/components/sidebar-navigation-screen-patterns/index.js +64 -52
  254. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  255. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  257. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  259. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-template/index.js +11 -8
  261. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  263. package/build/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  264. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  265. package/build/components/sidebar-navigation-screen-templates-browse/index.js +4 -36
  266. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  267. package/build/components/site-hub/index.js +22 -21
  268. package/build/components/site-hub/index.js.map +1 -1
  269. package/build/components/site-icon/index.js.map +1 -1
  270. package/build/components/start-template-options/index.js.map +1 -1
  271. package/build/components/style-book/index.js.map +1 -1
  272. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -13
  273. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  274. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  275. package/build/components/table/index.js.map +1 -1
  276. package/build/components/template-actions/index.js +7 -8
  277. package/build/components/template-actions/index.js.map +1 -1
  278. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  279. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  280. package/build/components/template-part-converter/index.js.map +1 -1
  281. package/build/components/use-edited-entity-record/index.js.map +1 -1
  282. package/build/components/welcome-guide/editor.js.map +1 -1
  283. package/build/components/welcome-guide/image.js.map +1 -1
  284. package/build/components/welcome-guide/index.js.map +1 -1
  285. package/build/components/welcome-guide/page.js.map +1 -1
  286. package/build/components/welcome-guide/styles.js +6 -3
  287. package/build/components/welcome-guide/styles.js.map +1 -1
  288. package/build/components/welcome-guide/template.js.map +1 -1
  289. package/build/deprecated.js +55 -0
  290. package/build/deprecated.js.map +1 -0
  291. package/build/hooks/commands/use-common-commands.js.map +1 -1
  292. package/build/hooks/commands/use-edit-mode-commands.js +10 -28
  293. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  294. package/build/hooks/components.js.map +1 -1
  295. package/build/hooks/index.js.map +1 -1
  296. package/build/hooks/push-changes-to-global-styles/index.js +3 -40
  297. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  298. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +36 -5
  299. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  300. package/build/index.js +18 -23
  301. package/build/index.js.map +1 -1
  302. package/build/lock-unlock.js.map +1 -1
  303. package/build/store/actions.js +21 -96
  304. package/build/store/actions.js.map +1 -1
  305. package/build/store/constants.js.map +1 -1
  306. package/build/store/index.js +1 -1
  307. package/build/store/index.js.map +1 -1
  308. package/build/store/private-actions.js +1 -85
  309. package/build/store/private-actions.js.map +1 -1
  310. package/build/store/private-selectors.js.map +1 -1
  311. package/build/store/reducer.js.map +1 -1
  312. package/build/store/selectors.js.map +1 -1
  313. package/build/utils/clone-deep.js.map +1 -1
  314. package/build/utils/constants.js +2 -2
  315. package/build/utils/constants.js.map +1 -1
  316. package/build/utils/get-is-list-page.js.map +1 -1
  317. package/build/utils/is-previewing-theme.js.map +1 -1
  318. package/build/utils/is-template-removable.js.map +1 -1
  319. package/build/utils/is-template-revertable.js.map +1 -1
  320. package/build/utils/math.js.map +1 -1
  321. package/build/utils/set-nested-value.js +44 -0
  322. package/build/utils/set-nested-value.js.map +1 -0
  323. package/build/utils/template-part-create.js.map +1 -1
  324. package/build/utils/use-activate-theme.js.map +1 -1
  325. package/build/utils/use-actual-current-theme.js.map +1 -1
  326. package/build-module/components/add-new-page/index.js +3 -0
  327. package/build-module/components/add-new-page/index.js.map +1 -1
  328. package/build-module/components/add-new-pattern/index.js +8 -7
  329. package/build-module/components/add-new-pattern/index.js.map +1 -1
  330. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
  331. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  332. package/build-module/components/add-new-template/add-custom-template-modal-content.js +3 -1
  333. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  334. package/build-module/components/add-new-template/index.js +283 -14
  335. package/build-module/components/add-new-template/index.js.map +1 -1
  336. package/build-module/components/add-new-template/utils.js +21 -11
  337. package/build-module/components/add-new-template/utils.js.map +1 -1
  338. package/build-module/components/app/index.js.map +1 -1
  339. package/build-module/components/async/index.js +44 -0
  340. package/build-module/components/async/index.js.map +1 -0
  341. package/build-module/components/block-editor/block-inspector-button.js +9 -8
  342. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  343. package/build-module/components/block-editor/editor-canvas.js +16 -7
  344. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  345. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  346. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  347. package/build-module/components/block-editor/resize-handle.js +21 -6
  348. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  349. package/build-module/components/block-editor/site-editor-canvas.js +5 -1
  350. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  351. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  352. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  353. package/build-module/components/canvas-loader/index.js.map +1 -1
  354. package/build-module/components/code-editor/index.js.map +1 -1
  355. package/build-module/components/create-template-part-modal/index.js +3 -0
  356. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  357. package/build-module/components/editor/index.js +61 -11
  358. package/build-module/components/editor/index.js.map +1 -1
  359. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  360. package/build-module/components/error-boundary/index.js.map +1 -1
  361. package/build-module/components/error-boundary/warning.js.map +1 -1
  362. package/build-module/components/global-styles/background-panel.js +14 -1
  363. package/build-module/components/global-styles/background-panel.js.map +1 -1
  364. package/build-module/components/global-styles/block-preview-panel.js +6 -1
  365. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  366. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  367. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  368. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  369. package/build-module/components/global-styles/font-families.js.map +1 -1
  370. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  371. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/context.js +68 -35
  373. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  375. package/build-module/components/global-styles/font-library-modal/font-collection.js +19 -7
  376. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  377. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  379. package/build-module/components/global-styles/font-library-modal/index.js +2 -2
  380. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  381. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +32 -29
  382. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  383. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  384. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  385. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  386. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  387. package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  388. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  389. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  390. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  391. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  392. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  393. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
  394. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  395. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  396. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  397. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  398. package/build-module/components/global-styles/header.js.map +1 -1
  399. package/build-module/components/global-styles/highlighted-colors.js +1 -1
  400. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  401. package/build-module/components/global-styles/hooks.js +11 -3
  402. package/build-module/components/global-styles/hooks.js.map +1 -1
  403. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  404. package/build-module/components/global-styles/index.js.map +1 -1
  405. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  406. package/build-module/components/global-styles/palette.js.map +1 -1
  407. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  408. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  409. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  410. package/build-module/components/global-styles/root-menu.js +2 -2
  411. package/build-module/components/global-styles/root-menu.js.map +1 -1
  412. package/build-module/components/global-styles/screen-background.js +1 -1
  413. package/build-module/components/global-styles/screen-background.js.map +1 -1
  414. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  415. package/build-module/components/global-styles/screen-block.js.map +1 -1
  416. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  417. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  418. package/build-module/components/global-styles/screen-css.js.map +1 -1
  419. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  420. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  421. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  422. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  423. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  424. package/build-module/components/global-styles/screen-root.js.map +1 -1
  425. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  426. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  427. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  428. package/build-module/components/global-styles/style-variations-container.js +8 -2
  429. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  430. package/build-module/components/global-styles/subtitle.js.map +1 -1
  431. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  432. package/build-module/components/global-styles/typography-example.js.map +1 -1
  433. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  434. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  435. package/build-module/components/global-styles/ui.js.map +1 -1
  436. package/build-module/components/global-styles/utils.js.map +1 -1
  437. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  438. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  439. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  440. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  441. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  442. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
  443. package/build-module/components/header-edit-mode/index.js +41 -57
  444. package/build-module/components/header-edit-mode/index.js.map +1 -1
  445. package/build-module/components/header-edit-mode/more-menu/index.js +6 -100
  446. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  447. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  448. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  449. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  450. package/build-module/components/keyboard-shortcuts/register.js +0 -67
  451. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  452. package/build-module/components/layout/animation.js +4 -3
  453. package/build-module/components/layout/animation.js.map +1 -1
  454. package/build-module/components/layout/hooks.js.map +1 -1
  455. package/build-module/components/layout/index.js +20 -52
  456. package/build-module/components/layout/index.js.map +1 -1
  457. package/build-module/components/layout/router.js +70 -33
  458. package/build-module/components/layout/router.js.map +1 -1
  459. package/build-module/components/media/index.js.map +1 -1
  460. package/build-module/components/page/header.js.map +1 -1
  461. package/build-module/components/page/index.js +5 -2
  462. package/build-module/components/page/index.js.map +1 -1
  463. package/build-module/components/page-pages/index.js +18 -19
  464. package/build-module/components/page-pages/index.js.map +1 -1
  465. package/build-module/components/page-patterns/dataviews-pattern-actions.js +16 -11
  466. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  467. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  468. package/build-module/components/page-patterns/header.js +5 -3
  469. package/build-module/components/page-patterns/header.js.map +1 -1
  470. package/build-module/components/page-patterns/index.js +143 -65
  471. package/build-module/components/page-patterns/index.js.map +1 -1
  472. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  473. package/build-module/components/page-patterns/search-items.js +3 -2
  474. package/build-module/components/page-patterns/search-items.js.map +1 -1
  475. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  476. package/build-module/components/page-patterns/use-patterns.js +3 -6
  477. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  478. package/build-module/components/page-patterns/utils.js.map +1 -1
  479. package/build-module/components/page-templates/hooks.js.map +1 -0
  480. package/build-module/components/{page-templates-template-parts → page-templates}/index.js +77 -102
  481. package/build-module/components/page-templates/index.js.map +1 -0
  482. package/build-module/components/pagination/index.js.map +1 -1
  483. package/build-module/components/pattern-modal/duplicate.js +11 -6
  484. package/build-module/components/pattern-modal/duplicate.js.map +1 -1
  485. package/build-module/components/pattern-modal/index.js.map +1 -1
  486. package/build-module/components/pattern-modal/rename.js +4 -1
  487. package/build-module/components/pattern-modal/rename.js.map +1 -1
  488. package/build-module/components/plugin-template-setting-panel/index.js +8 -0
  489. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  490. package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
  491. package/build-module/components/rename-post-menu-item/index.js.map +1 -0
  492. package/build-module/components/resizable-frame/index.js +10 -11
  493. package/build-module/components/resizable-frame/index.js.map +1 -1
  494. package/build-module/components/revisions/index.js.map +1 -1
  495. package/build-module/components/routes/link.js.map +1 -1
  496. package/build-module/components/routes/use-title.js.map +1 -1
  497. package/build-module/components/save-button/index.js.map +1 -1
  498. package/build-module/components/save-hub/index.js.map +1 -1
  499. package/build-module/components/save-panel/index.js +2 -2
  500. package/build-module/components/save-panel/index.js.map +1 -1
  501. package/build-module/components/sidebar/index.js +42 -75
  502. package/build-module/components/sidebar/index.js.map +1 -1
  503. package/build-module/components/sidebar-button/index.js.map +1 -1
  504. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  505. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  506. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  507. package/build-module/components/sidebar-dataviews/default-views.js +1 -1
  508. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  509. package/build-module/components/sidebar-dataviews/index.js +1 -1
  510. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  511. package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
  512. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  513. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  514. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  515. package/build-module/components/sidebar-edit-mode/index.js +30 -54
  516. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  517. package/build-module/components/sidebar-edit-mode/page-panels/index.js +58 -6
  518. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  519. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  520. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +25 -17
  521. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  522. package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
  523. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  524. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  525. package/build-module/components/sidebar-edit-mode/template-panel/index.js +4 -7
  526. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  527. package/build-module/components/sidebar-navigation-item/index.js +31 -0
  528. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  529. package/build-module/components/sidebar-navigation-screen/index.js +37 -10
  530. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  531. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  532. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  533. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  534. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  535. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -3
  537. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  538. package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
  539. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  540. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  541. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
  543. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  544. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  545. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  546. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  547. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  548. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  549. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  550. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  551. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  553. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  554. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  555. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  556. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  557. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-page/index.js +56 -15
  559. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  561. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-pattern/index.js +17 -15
  563. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  565. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  567. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
  568. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  569. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  570. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  571. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  572. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  573. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
  574. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  575. package/build-module/components/sidebar-navigation-screen-patterns/index.js +66 -54
  576. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  577. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  579. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  580. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  581. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  582. package/build-module/components/sidebar-navigation-screen-template/index.js +13 -9
  583. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  584. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  585. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  586. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  587. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +4 -36
  588. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  589. package/build-module/components/site-hub/index.js +22 -21
  590. package/build-module/components/site-hub/index.js.map +1 -1
  591. package/build-module/components/site-icon/index.js.map +1 -1
  592. package/build-module/components/start-template-options/index.js.map +1 -1
  593. package/build-module/components/style-book/index.js.map +1 -1
  594. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -13
  595. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  596. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  597. package/build-module/components/table/index.js.map +1 -1
  598. package/build-module/components/template-actions/index.js +7 -8
  599. package/build-module/components/template-actions/index.js.map +1 -1
  600. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  601. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  602. package/build-module/components/template-part-converter/index.js.map +1 -1
  603. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  604. package/build-module/components/welcome-guide/editor.js.map +1 -1
  605. package/build-module/components/welcome-guide/image.js.map +1 -1
  606. package/build-module/components/welcome-guide/index.js.map +1 -1
  607. package/build-module/components/welcome-guide/page.js.map +1 -1
  608. package/build-module/components/welcome-guide/styles.js +6 -3
  609. package/build-module/components/welcome-guide/styles.js.map +1 -1
  610. package/build-module/components/welcome-guide/template.js.map +1 -1
  611. package/build-module/deprecated.js +45 -0
  612. package/build-module/deprecated.js.map +1 -0
  613. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  614. package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
  615. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  616. package/build-module/hooks/components.js.map +1 -1
  617. package/build-module/hooks/index.js.map +1 -1
  618. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
  619. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  620. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +35 -5
  621. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  622. package/build-module/index.js +1 -5
  623. package/build-module/index.js.map +1 -1
  624. package/build-module/lock-unlock.js.map +1 -1
  625. package/build-module/store/actions.js +16 -92
  626. package/build-module/store/actions.js.map +1 -1
  627. package/build-module/store/constants.js.map +1 -1
  628. package/build-module/store/index.js.map +1 -1
  629. package/build-module/store/private-actions.js +0 -83
  630. package/build-module/store/private-actions.js.map +1 -1
  631. package/build-module/store/private-selectors.js.map +1 -1
  632. package/build-module/store/reducer.js.map +1 -1
  633. package/build-module/store/selectors.js.map +1 -1
  634. package/build-module/utils/clone-deep.js.map +1 -1
  635. package/build-module/utils/constants.js +1 -1
  636. package/build-module/utils/constants.js.map +1 -1
  637. package/build-module/utils/get-is-list-page.js.map +1 -1
  638. package/build-module/utils/is-previewing-theme.js.map +1 -1
  639. package/build-module/utils/is-template-removable.js.map +1 -1
  640. package/build-module/utils/is-template-revertable.js.map +1 -1
  641. package/build-module/utils/math.js.map +1 -1
  642. package/build-module/utils/set-nested-value.js +38 -0
  643. package/build-module/utils/set-nested-value.js.map +1 -0
  644. package/build-module/utils/template-part-create.js.map +1 -1
  645. package/build-module/utils/use-activate-theme.js.map +1 -1
  646. package/build-module/utils/use-actual-current-theme.js.map +1 -1
  647. package/build-style/style-rtl.css +261 -720
  648. package/build-style/style.css +261 -720
  649. package/package.json +43 -44
  650. package/src/components/add-new-page/index.js +7 -1
  651. package/src/components/add-new-pattern/index.js +15 -12
  652. package/src/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
  653. package/src/components/add-new-template/add-custom-template-modal-content.js +3 -1
  654. package/src/components/add-new-template/index.js +412 -12
  655. package/src/components/add-new-template/style.scss +0 -22
  656. package/src/components/add-new-template/utils.js +44 -24
  657. package/src/components/async/index.js +43 -0
  658. package/src/components/block-editor/block-inspector-button.js +9 -11
  659. package/src/components/block-editor/editor-canvas.js +45 -21
  660. package/src/components/block-editor/resize-handle.js +30 -11
  661. package/src/components/block-editor/site-editor-canvas.js +6 -1
  662. package/src/components/block-editor/style.scss +10 -15
  663. package/src/components/create-template-part-modal/index.js +3 -0
  664. package/src/components/editor/index.js +91 -15
  665. package/src/components/editor/style.scss +6 -1
  666. package/src/components/global-styles/background-panel.js +16 -0
  667. package/src/components/global-styles/block-preview-panel.js +6 -1
  668. package/src/components/global-styles/font-library-modal/context.js +85 -54
  669. package/src/components/global-styles/font-library-modal/font-collection.js +265 -222
  670. package/src/components/global-styles/font-library-modal/index.js +2 -2
  671. package/src/components/global-styles/font-library-modal/installed-fonts.js +184 -147
  672. package/src/components/global-styles/font-library-modal/style.scss +48 -13
  673. package/src/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
  674. package/src/components/global-styles/highlighted-colors.js +1 -1
  675. package/src/components/global-styles/hooks.js +20 -3
  676. package/src/components/global-styles/root-menu.js +2 -2
  677. package/src/components/global-styles/screen-background.js +1 -1
  678. package/src/components/global-styles/screen-revisions/index.js +1 -1
  679. package/src/components/global-styles/style-variations-container.js +11 -2
  680. package/src/components/header-edit-mode/index.js +56 -78
  681. package/src/components/header-edit-mode/more-menu/index.js +9 -157
  682. package/src/components/header-edit-mode/style.scss +14 -86
  683. package/src/components/keyboard-shortcuts/register.js +0 -78
  684. package/src/components/layout/animation.js +6 -3
  685. package/src/components/layout/index.js +23 -52
  686. package/src/components/layout/router.js +73 -50
  687. package/src/components/layout/style.scss +15 -37
  688. package/src/components/page/index.js +7 -2
  689. package/src/components/page-pages/index.js +46 -26
  690. package/src/components/page-pages/style.scss +40 -22
  691. package/src/components/page-patterns/dataviews-pattern-actions.js +13 -15
  692. package/src/components/page-patterns/header.js +7 -3
  693. package/src/components/page-patterns/index.js +162 -109
  694. package/src/components/page-patterns/search-items.js +3 -0
  695. package/src/components/page-patterns/style.scss +21 -7
  696. package/src/components/page-patterns/use-patterns.js +3 -6
  697. package/src/components/{page-templates-template-parts → page-templates}/index.js +46 -84
  698. package/src/components/{page-templates-template-parts → page-templates}/style.scss +2 -2
  699. package/src/components/pattern-modal/duplicate.js +6 -4
  700. package/src/components/pattern-modal/rename.js +2 -1
  701. package/src/components/plugin-template-setting-panel/index.js +8 -0
  702. package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
  703. package/src/components/resizable-frame/index.js +6 -9
  704. package/src/components/save-panel/index.js +2 -2
  705. package/src/components/sidebar/index.js +52 -100
  706. package/src/components/sidebar/style.scss +41 -6
  707. package/src/components/sidebar-dataviews/default-views.js +1 -1
  708. package/src/components/sidebar-dataviews/index.js +1 -1
  709. package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
  710. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
  711. package/src/components/sidebar-edit-mode/index.js +50 -75
  712. package/src/components/sidebar-edit-mode/page-panels/index.js +65 -14
  713. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +40 -20
  714. package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
  715. package/src/components/sidebar-edit-mode/style.scss +1 -1
  716. package/src/components/sidebar-edit-mode/template-panel/index.js +3 -13
  717. package/src/components/sidebar-navigation-item/index.js +29 -0
  718. package/src/components/sidebar-navigation-screen/index.js +29 -12
  719. package/src/components/sidebar-navigation-screen/style.scss +1 -21
  720. package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -11
  721. package/src/components/sidebar-navigation-screen-main/index.js +11 -23
  722. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  723. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
  724. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  725. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
  726. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  727. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
  728. package/src/components/sidebar-navigation-screen-page/index.js +63 -14
  729. package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
  730. package/src/components/sidebar-navigation-screen-pattern/index.js +13 -15
  731. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
  732. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  733. package/src/components/sidebar-navigation-screen-patterns/category-item.js +2 -1
  734. package/src/components/sidebar-navigation-screen-patterns/index.js +97 -95
  735. package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
  736. package/src/components/sidebar-navigation-screen-template/index.js +9 -13
  737. package/src/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  738. package/src/components/sidebar-navigation-screen-templates-browse/index.js +6 -43
  739. package/src/components/site-hub/index.js +80 -90
  740. package/src/components/site-hub/style.scss +14 -34
  741. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +50 -39
  742. package/src/components/template-actions/index.js +8 -11
  743. package/src/components/welcome-guide/style.scss +1 -1
  744. package/src/components/welcome-guide/styles.js +6 -5
  745. package/src/deprecated.js +42 -0
  746. package/src/hooks/commands/use-edit-mode-commands.js +12 -33
  747. package/src/hooks/push-changes-to-global-styles/index.js +1 -40
  748. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
  749. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +74 -17
  750. package/src/index.js +1 -9
  751. package/src/store/actions.js +25 -141
  752. package/src/store/private-actions.js +0 -133
  753. package/src/store/test/actions.js +7 -2
  754. package/src/style.scss +1 -7
  755. package/src/utils/constants.js +2 -1
  756. package/src/utils/set-nested-value.js +39 -0
  757. package/build/components/add-new-template/new-template.js +0 -298
  758. package/build/components/add-new-template/new-template.js.map +0 -1
  759. package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
  760. package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  761. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -59
  762. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
  763. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
  764. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  765. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
  766. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  767. package/build/components/header-edit-mode/tools-more-menu-group/index.js +0 -23
  768. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
  769. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  770. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  771. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
  772. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  773. package/build/components/keyboard-shortcut-help-modal/index.js +0 -119
  774. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  775. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
  776. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  777. package/build/components/keyboard-shortcuts/edit-mode.js +0 -79
  778. package/build/components/keyboard-shortcuts/edit-mode.js.map +0 -1
  779. package/build/components/page-actions/index.js +0 -35
  780. package/build/components/page-actions/index.js.map +0 -1
  781. package/build/components/page-actions/trash-page-menu-item.js +0 -54
  782. package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
  783. package/build/components/page-templates-template-parts/actions.js +0 -207
  784. package/build/components/page-templates-template-parts/actions.js.map +0 -1
  785. package/build/components/page-templates-template-parts/add-new-template-part.js +0 -64
  786. package/build/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
  787. package/build/components/page-templates-template-parts/hooks.js.map +0 -1
  788. package/build/components/page-templates-template-parts/index.js.map +0 -1
  789. package/build/components/preferences-modal/index.js +0 -38
  790. package/build/components/preferences-modal/index.js.map +0 -1
  791. package/build/components/sidebar-edit-mode/constants.js +0 -9
  792. package/build/components/sidebar-edit-mode/constants.js.map +0 -1
  793. package/build/components/sidebar-edit-mode/page-panels/page-status.js +0 -188
  794. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
  795. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
  796. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  797. package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
  798. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  799. package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
  800. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  801. package/build/components/template-actions/rename-menu-item.js.map +0 -1
  802. package/build-module/components/add-new-template/new-template.js +0 -290
  803. package/build-module/components/add-new-template/new-template.js.map +0 -1
  804. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
  805. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  806. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -52
  807. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
  808. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  809. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  810. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
  811. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  812. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
  813. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
  814. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  815. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  816. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
  817. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  818. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -110
  819. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  820. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
  821. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  822. package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -72
  823. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +0 -1
  824. package/build-module/components/page-actions/index.js +0 -27
  825. package/build-module/components/page-actions/index.js.map +0 -1
  826. package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
  827. package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
  828. package/build-module/components/page-templates-template-parts/actions.js +0 -199
  829. package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
  830. package/build-module/components/page-templates-template-parts/add-new-template-part.js +0 -56
  831. package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
  832. package/build-module/components/page-templates-template-parts/hooks.js.map +0 -1
  833. package/build-module/components/page-templates-template-parts/index.js.map +0 -1
  834. package/build-module/components/preferences-modal/index.js +0 -30
  835. package/build-module/components/preferences-modal/index.js.map +0 -1
  836. package/build-module/components/sidebar-edit-mode/constants.js +0 -3
  837. package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
  838. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +0 -180
  839. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
  840. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
  841. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  842. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
  843. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  844. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
  845. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  846. package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
  847. package/src/components/add-new-template/new-template.js +0 -429
  848. package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
  849. package/src/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -51
  850. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  851. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
  852. package/src/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
  853. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  854. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  855. package/src/components/keyboard-shortcut-help-modal/index.js +0 -151
  856. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
  857. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  858. package/src/components/keyboard-shortcuts/edit-mode.js +0 -88
  859. package/src/components/page-actions/index.js +0 -30
  860. package/src/components/page-actions/trash-page-menu-item.js +0 -63
  861. package/src/components/page-templates-template-parts/actions.js +0 -277
  862. package/src/components/page-templates-template-parts/add-new-template-part.js +0 -60
  863. package/src/components/preferences-modal/index.js +0 -29
  864. package/src/components/sidebar-edit-mode/constants.js +0 -2
  865. package/src/components/sidebar-edit-mode/page-panels/page-status.js +0 -249
  866. package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -40
  867. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
  868. package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
  869. package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
  870. /package/build/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
  871. /package/build-module/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
  872. /package/src/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_coreData","_element","_blockEditor","_i18n","_globalStylesProvider","_cloneDeep","_interopRequireDefault","_lockUnlock","GlobalStylesContext","unlock","blockEditorPrivateApis","removePropertyFromObject","object","property","Object","keys","length","key","useCurrentMergeThemeStyleVariationsWithUserConfig","filter","variationsFromTheme","useSelect","select","_variationsFromTheme","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","user","baseVariation","useContext","variations","useMemo","title","__","settings","styles","useThemeStyleVariationsByProperty","cloneDeep","filterObjectByProperty","newObject","forEach","newFilter","exports","clonedBaseVariation","processedStyleVariations","map","variation","result","description","mergeBaseAndUserConfigs"],"sources":["@wordpress/edit-site/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../../components/global-styles/global-styles-provider';\nimport cloneDeep from '../../utils/clone-deep';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\n/**\n * Removes all instances of a property from an object.\n *\n * @param {Object} object The object to remove the property from.\n * @param {string} property The property to remove.\n * @return {Object} The modified object.\n */\nexport function removePropertyFromObject( object, property ) {\n\tif ( ! property || typeof property !== 'string' ) {\n\t\treturn object;\n\t}\n\n\tif ( typeof object !== 'object' || ! Object.keys( object ).length ) {\n\t\treturn object;\n\t}\n\n\tfor ( const key in object ) {\n\t\tif ( key === property ) {\n\t\t\tdelete object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tremovePropertyFromObject( object[ key ], property );\n\t\t}\n\t}\n\treturn object;\n}\n\n/**\n * A convenience wrapper for `useThemeStyleVariationsByProperty()` that fetches the current theme style variations,\n * and user-defined global style/settings object.\n *\n * @param {Object} props Object of hook args.\n * @param {string} props.property The property to filter by.\n * @param {Function} props.filter Optional. The filter function to apply to the variations.\n * @return {Object[]|*} The merged object.\n */\nexport function useCurrentMergeThemeStyleVariationsWithUserConfig( {\n\tproperty,\n\tfilter,\n} ) {\n\tconst { variationsFromTheme } = useSelect( ( select ) => {\n\t\tconst _variationsFromTheme =\n\t\t\tselect(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\n\t\treturn {\n\t\t\tvariationsFromTheme: _variationsFromTheme || [],\n\t\t};\n\t}, [] );\n\tconst { user: baseVariation } = useContext( GlobalStylesContext );\n\n\tconst variations = useMemo( () => {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...variationsFromTheme,\n\t\t];\n\t}, [ variationsFromTheme ] );\n\n\treturn useThemeStyleVariationsByProperty( {\n\t\tvariations,\n\t\tproperty,\n\t\tfilter,\n\t\tbaseVariation: removePropertyFromObject(\n\t\t\tcloneDeep( baseVariation ),\n\t\t\tproperty\n\t\t),\n\t} );\n}\n\n/**\n * Returns a new object, with properties specified in `property`,\n * maintain the original object tree structure.\n * The function is recursive, so it will perform a deep search for the given property.\n * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the property is `test`.\n *\n * @param {Object} object The object to filter\n * @param {Object} property The property to filter by\n * @return {Object} The merged object.\n */\nexport const filterObjectByProperty = ( object, property ) => {\n\tif ( ! object ) {\n\t\treturn {};\n\t}\n\n\tconst newObject = {};\n\tObject.keys( object ).forEach( ( key ) => {\n\t\tif ( key === property ) {\n\t\t\tnewObject[ key ] = object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tconst newFilter = filterObjectByProperty( object[ key ], property );\n\t\t\tif ( Object.keys( newFilter ).length ) {\n\t\t\t\tnewObject[ key ] = newFilter;\n\t\t\t}\n\t\t}\n\t} );\n\treturn newObject;\n};\n\n/**\n * Returns a new object with only the properties specified in `property`.\n * Optional merges the baseVariation object with the variation object.\n * Note: this function will only overwrite the specified property in baseVariation if it exists.\n * The baseVariation will not be otherwise modified. To strip a property from the baseVariation object, use `removePropertyFromObject`.\n * See useCurrentMergeThemeStyleVariationsWithUserConfig for an example of how to use this function.\n *\n * @param {Object} props Object of hook args.\n * @param {Object[]} props.variations The theme style variations to filter.\n * @param {string} props.property The property to filter by.\n * @param {Function} props.filter Optional. The filter function to apply to the variations.\n * @param {Object} props.baseVariation Optional. Base or user settings to be updated with variation properties.\n * @return {Object[]|*} The merged object.\n */\nexport default function useThemeStyleVariationsByProperty( {\n\tvariations,\n\tproperty,\n\tfilter,\n\tbaseVariation,\n} ) {\n\treturn useMemo( () => {\n\t\tif ( ! property || ! variations || variations?.length === 0 ) {\n\t\t\treturn variations;\n\t\t}\n\n\t\tconst clonedBaseVariation =\n\t\t\ttypeof baseVariation === 'object' &&\n\t\t\tObject.keys( baseVariation ).length > 0\n\t\t\t\t? cloneDeep( baseVariation )\n\t\t\t\t: null;\n\n\t\tlet processedStyleVariations = variations.map( ( variation ) => {\n\t\t\tlet result = {\n\t\t\t\t...filterObjectByProperty( cloneDeep( variation ), property ),\n\t\t\t\ttitle: variation?.title,\n\t\t\t\tdescription: variation?.description,\n\t\t\t};\n\n\t\t\tif ( clonedBaseVariation ) {\n\t\t\t\t/*\n\t\t\t\t * Overwrites all baseVariation object `styleProperty` properties\n\t\t\t\t * with the theme variation `styleProperty` properties.\n\t\t\t\t */\n\t\t\t\tresult = mergeBaseAndUserConfigs( clonedBaseVariation, result );\n\t\t\t}\n\t\t\treturn result;\n\t\t} );\n\n\t\tif ( 'function' === typeof filter ) {\n\t\t\tprocessedStyleVariations =\n\t\t\t\tprocessedStyleVariations.filter( filter );\n\t\t}\n\n\t\treturn processedStyleVariations;\n\t}, [ variations, property, baseVariation, filter ] );\n}\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAdA;AACA;AACA;;AAOA;AACA;AACA;;AAKA,MAAM;EAAES;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,wBAAwBA,CAAE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UAAU,EAAEb,MAAM,KAAK,CAAC,EAAG;MAC7D,OAAOa,UAAU;IAClB;IAEA,MAAMa,mBAAmB,GACxB,OAAOf,aAAa,KAAK,QAAQ,IACjCb,MAAM,CAACC,IAAI,CAAEY,aAAc,CAAC,CAACX,MAAM,GAAG,CAAC,GACpC,IAAAoB,kBAAS,EAAET,aAAc,CAAC,GAC1B,IAAI;IAER,IAAIgB,wBAAwB,GAAGd,UAAU,CAACe,GAAG,CAAIC,SAAS,IAAM;MAC/D,IAAIC,MAAM,GAAG;QACZ,GAAGT,sBAAsB,CAAE,IAAAD,kBAAS,EAAES,SAAU,CAAC,EAAEhC,QAAS,CAAC;QAC7DkB,KAAK,EAAEc,SAAS,EAAEd,KAAK;QACvBgB,WAAW,EAAEF,SAAS,EAAEE;MACzB,CAAC;MAED,IAAKL,mBAAmB,EAAG;QAC1B;AACJ;AACA;AACA;QACII,MAAM,GAAG,IAAAE,6CAAuB,EAAEN,mBAAmB,EAAEI,MAAO,CAAC;MAChE;MACA,OAAOA,MAAM;IACd,CAAE,CAAC;IAEH,IAAK,UAAU,KAAK,OAAO3B,MAAM,EAAG;MACnCwB,wBAAwB,GACvBA,wBAAwB,CAACxB,MAAM,CAAEA,MAAO,CAAC;IAC3C;IAEA,OAAOwB,wBAAwB;EAChC,CAAC,EAAE,CAAEd,UAAU,EAAEhB,QAAQ,EAAEc,aAAa,EAAER,MAAM,CAAG,CAAC;AACrD"}
1
+ {"version":3,"names":["_data","require","_coreData","_element","_blockEditor","_i18n","_globalStylesProvider","_cloneDeep","_interopRequireDefault","_lockUnlock","GlobalStylesContext","unlock","blockEditorPrivateApis","removePropertyFromObject","object","property","Object","keys","length","key","useCurrentMergeThemeStyleVariationsWithUserConfig","filter","variationsFromTheme","useSelect","select","_variationsFromTheme","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","user","baseVariation","useContext","variations","useMemo","title","__","settings","styles","useThemeStyleVariationsByProperty","cloneDeep","filterObjectByProperty","newObject","forEach","newFilter","exports","clonedBaseVariation","processedStyleVariations","reduce","accumulator","variation","variationFilteredByProperty","result","description","mergeBaseAndUserConfigs","isDuplicate","some","item","JSON","stringify","push","isVariationWithSingleProperty","variationWithProperty"],"sources":["@wordpress/edit-site/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../../components/global-styles/global-styles-provider';\nimport cloneDeep from '../../utils/clone-deep';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\n/**\n * Removes all instances of a property from an object.\n *\n * @param {Object} object The object to remove the property from.\n * @param {string} property The property to remove.\n * @return {Object} The modified object.\n */\nexport function removePropertyFromObject( object, property ) {\n\tif ( ! property || typeof property !== 'string' ) {\n\t\treturn object;\n\t}\n\n\tif (\n\t\ttypeof object !== 'object' ||\n\t\t! object ||\n\t\t! Object.keys( object ).length\n\t) {\n\t\treturn object;\n\t}\n\n\tfor ( const key in object ) {\n\t\tif ( key === property ) {\n\t\t\tdelete object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tremovePropertyFromObject( object[ key ], property );\n\t\t}\n\t}\n\treturn object;\n}\n\n/**\n * A convenience wrapper for `useThemeStyleVariationsByProperty()` that fetches the current theme style variations,\n * and user-defined global style/settings object.\n *\n * @param {Object} props Object of hook args.\n * @param {string} props.property The property to filter by.\n * @param {Function} props.filter Optional. The filter function to apply to the variations.\n * @return {Object[]|*} The merged object.\n */\nexport function useCurrentMergeThemeStyleVariationsWithUserConfig( {\n\tproperty,\n\tfilter,\n} ) {\n\tconst { variationsFromTheme } = useSelect( ( select ) => {\n\t\tconst _variationsFromTheme =\n\t\t\tselect(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\n\t\treturn {\n\t\t\tvariationsFromTheme: _variationsFromTheme || [],\n\t\t};\n\t}, [] );\n\tconst { user: baseVariation } = useContext( GlobalStylesContext );\n\n\tconst variations = useMemo( () => {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...variationsFromTheme,\n\t\t];\n\t}, [ variationsFromTheme ] );\n\n\treturn useThemeStyleVariationsByProperty( {\n\t\tvariations,\n\t\tproperty,\n\t\tfilter,\n\t\tbaseVariation: removePropertyFromObject(\n\t\t\tcloneDeep( baseVariation ),\n\t\t\tproperty\n\t\t),\n\t} );\n}\n\n/**\n * Returns a new object, with properties specified in `property`,\n * maintain the original object tree structure.\n * The function is recursive, so it will perform a deep search for the given property.\n * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the property is `test`.\n *\n * @param {Object} object The object to filter\n * @param {Object} property The property to filter by\n * @return {Object} The merged object.\n */\nexport const filterObjectByProperty = ( object, property ) => {\n\tif ( ! object ) {\n\t\treturn {};\n\t}\n\n\tconst newObject = {};\n\tObject.keys( object ).forEach( ( key ) => {\n\t\tif ( key === property ) {\n\t\t\tnewObject[ key ] = object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tconst newFilter = filterObjectByProperty( object[ key ], property );\n\t\t\tif ( Object.keys( newFilter ).length ) {\n\t\t\t\tnewObject[ key ] = newFilter;\n\t\t\t}\n\t\t}\n\t} );\n\treturn newObject;\n};\n\n/**\n * Returns a new object with only the properties specified in `property`.\n * Optional merges the baseVariation object with the variation object.\n * Note: this function will only overwrite the specified property in baseVariation if it exists.\n * The baseVariation will not be otherwise modified. To strip a property from the baseVariation object, use `removePropertyFromObject`.\n * See useCurrentMergeThemeStyleVariationsWithUserConfig for an example of how to use this function.\n *\n * @param {Object} props Object of hook args.\n * @param {Object[]} props.variations The theme style variations to filter.\n * @param {string} props.property The property to filter by.\n * @param {Function} props.filter Optional. The filter function to apply to the variations.\n * @param {Object} props.baseVariation Optional. Base or user settings to be updated with variation properties.\n * @return {Object[]|*} The merged object.\n */\nexport default function useThemeStyleVariationsByProperty( {\n\tvariations,\n\tproperty,\n\tfilter,\n\tbaseVariation,\n} ) {\n\treturn useMemo( () => {\n\t\tif ( ! property || ! variations || variations?.length === 0 ) {\n\t\t\treturn variations;\n\t\t}\n\n\t\tconst clonedBaseVariation =\n\t\t\ttypeof baseVariation === 'object' &&\n\t\t\tObject.keys( baseVariation ).length > 0\n\t\t\t\t? cloneDeep( baseVariation )\n\t\t\t\t: null;\n\n\t\tlet processedStyleVariations = variations.reduce(\n\t\t\t( accumulator, variation ) => {\n\t\t\t\tconst variationFilteredByProperty = filterObjectByProperty(\n\t\t\t\t\tcloneDeep( variation ),\n\t\t\t\t\tproperty\n\t\t\t\t);\n\t\t\t\t// Remove variations that are empty once the property is filtered out.\n\t\t\t\tif ( Object.keys( variationFilteredByProperty ).length === 0 ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\tlet result = {\n\t\t\t\t\t...variationFilteredByProperty,\n\t\t\t\t\ttitle: variation?.title,\n\t\t\t\t\tdescription: variation?.description,\n\t\t\t\t};\n\n\t\t\t\tif ( clonedBaseVariation ) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Overwrites all baseVariation object `styleProperty` properties\n\t\t\t\t\t * with the theme variation `styleProperty` properties.\n\t\t\t\t\t */\n\t\t\t\t\tresult = mergeBaseAndUserConfigs(\n\t\t\t\t\t\tclonedBaseVariation,\n\t\t\t\t\t\tresult\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Detect if this is a duplicate variation.\n\t\t\t\tconst isDuplicate = accumulator.some( ( item ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tJSON.stringify( item.styles ) ===\n\t\t\t\t\t\t\tJSON.stringify( result?.styles ) &&\n\t\t\t\t\t\tJSON.stringify( item.settings ) ===\n\t\t\t\t\t\t\tJSON.stringify( result?.settings )\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t\tif ( isDuplicate ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\t// If the variation is not a duplicate, add it to the accumulator.\n\t\t\t\taccumulator.push( result );\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t[] // Initial accumulator value.\n\t\t);\n\n\t\tif ( 'function' === typeof filter ) {\n\t\t\tprocessedStyleVariations =\n\t\t\t\tprocessedStyleVariations.filter( filter );\n\t\t}\n\n\t\treturn processedStyleVariations;\n\t}, [ variations, property, baseVariation, filter ] );\n}\n\n/**\n * Compares a style variation to the same variation filtered by a single property.\n * Returns true if the variation contains only the property specified.\n *\n * @param {Object} variation The variation to compare.\n * @param {string} property The property to compare.\n * @return {boolean} Whether the variation contains only a single property.\n */\nexport function isVariationWithSingleProperty( variation, property ) {\n\tconst variationWithProperty = filterObjectByProperty(\n\t\tcloneDeep( variation ),\n\t\tproperty\n\t);\n\n\treturn (\n\t\tJSON.stringify( variationWithProperty?.styles ) ===\n\t\t\tJSON.stringify( variation?.styles ) &&\n\t\tJSON.stringify( variationWithProperty?.settings ) ===\n\t\t\tJSON.stringify( variation?.settings )\n\t);\n}\n"],"mappings":";;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAdA;AACA;AACA;;AAOA;AACA;AACA;;AAKA,MAAM;EAAES;AAAoB,CAAC,GAAG,IAAAC,kBAAM,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ACH,IAAKkB,WAAW,EAAG;QAClB,OAAON,WAAW;MACnB;;MAEA;MACAA,WAAW,CAACW,IAAI,CAAER,MAAO,CAAC;MAC1B,OAAOH,WAAW;IACnB,CAAC,EACD,EAAE,CAAC;IACJ,CAAC;IAED,IAAK,UAAU,KAAK,OAAO1B,MAAM,EAAG;MACnCwB,wBAAwB,GACvBA,wBAAwB,CAACxB,MAAM,CAAEA,MAAO,CAAC;IAC3C;IAEA,OAAOwB,wBAAwB;EAChC,CAAC,EAAE,CAAEd,UAAU,EAAEhB,QAAQ,EAAEc,aAAa,EAAER,MAAM,CAAG,CAAC;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASsC,6BAA6BA,CAAEX,SAAS,EAAEjC,QAAQ,EAAG;EACpE,MAAM6C,qBAAqB,GAAGrB,sBAAsB,CACnD,IAAAD,kBAAS,EAAEU,SAAU,CAAC,EACtBjC,QACD,CAAC;EAED,OACCyC,IAAI,CAACC,SAAS,CAAEG,qBAAqB,EAAExB,MAAO,CAAC,KAC9CoB,IAAI,CAACC,SAAS,CAAET,SAAS,EAAEZ,MAAO,CAAC,IACpCoB,IAAI,CAACC,SAAS,CAAEG,qBAAqB,EAAEzB,QAAS,CAAC,KAChDqB,IAAI,CAACC,SAAS,CAAET,SAAS,EAAEb,QAAS,CAAC;AAExC","ignoreList":[]}
package/build/index.js CHANGED
@@ -4,24 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "PluginMoreMenuItem", {
8
- enumerable: true,
9
- get: function () {
10
- return _pluginMoreMenuItem.default;
11
- }
12
- });
13
- Object.defineProperty(exports, "PluginSidebar", {
14
- enumerable: true,
15
- get: function () {
16
- return _pluginSidebar.default;
17
- }
18
- });
19
- Object.defineProperty(exports, "PluginSidebarMoreMenuItem", {
20
- enumerable: true,
21
- get: function () {
22
- return _pluginSidebarMoreMenuItem.default;
23
- }
24
- });
7
+ var _exportNames = {
8
+ initializeEditor: true,
9
+ reinitializeEditor: true,
10
+ store: true,
11
+ PluginTemplateSettingPanel: true
12
+ };
25
13
  Object.defineProperty(exports, "PluginTemplateSettingPanel", {
26
14
  enumerable: true,
27
15
  get: function () {
@@ -43,16 +31,24 @@ var _data = require("@wordpress/data");
43
31
  var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
44
32
  var _element = require("@wordpress/element");
45
33
  var _editor = require("@wordpress/editor");
46
- var _interface = require("@wordpress/interface");
47
34
  var _preferences = require("@wordpress/preferences");
48
35
  var _widgets = require("@wordpress/widgets");
49
36
  require("./hooks");
50
37
  var _store = require("./store");
51
38
  var _app = _interopRequireDefault(require("./components/app"));
52
- var _pluginSidebar = _interopRequireDefault(require("./components/sidebar-edit-mode/plugin-sidebar"));
53
- var _pluginSidebarMoreMenuItem = _interopRequireDefault(require("./components/header-edit-mode/plugin-sidebar-more-menu-item"));
54
- var _pluginMoreMenuItem = _interopRequireDefault(require("./components/header-edit-mode/plugin-more-menu-item"));
55
39
  var _pluginTemplateSettingPanel = _interopRequireDefault(require("./components/plugin-template-setting-panel"));
40
+ var _deprecated2 = require("./deprecated");
41
+ Object.keys(_deprecated2).forEach(function (key) {
42
+ if (key === "default" || key === "__esModule") return;
43
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
44
+ if (key in exports && exports[key] === _deprecated2[key]) return;
45
+ Object.defineProperty(exports, key, {
46
+ enumerable: true,
47
+ get: function () {
48
+ return _deprecated2[key];
49
+ }
50
+ });
51
+ });
56
52
  /**
57
53
  * WordPress dependencies
58
54
  */
@@ -108,7 +104,6 @@ function initializeEditor(id, settings) {
108
104
  showBlockBreadcrumbs: true,
109
105
  showListViewByDefault: false
110
106
  });
111
- (0, _data.dispatch)(_interface.store).setDefaultComplementaryArea('core/edit-site', 'edit-site/template');
112
107
  (0, _data.dispatch)(_store.store).updateSettings(settings);
113
108
 
114
109
  // Keep the defaultTemplateTypes in the core/editor settings too,
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_blockLibrary","_data","_deprecated","_interopRequireDefault","_element","_editor","_interface","_preferences","_widgets","_store","_app","_pluginSidebar","_pluginSidebarMoreMenuItem","_pluginMoreMenuItem","_pluginTemplateSettingPanel","initializeEditor","id","settings","target","document","getElementById","root","createRoot","dispatch","blocksStore","reapplyBlockTypeFilters","coreBlocks","__experimentalGetCoreBlocks","filter","name","registerCoreBlocks","setFreeformFallbackBlockName","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","process","env","IS_GUTENBERG_PLUGIN","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","preferencesStore","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","interfaceStore","setDefaultComplementaryArea","editSiteStore","updateSettings","editorStore","updateEditorSettings","defaultTemplateTypes","defaultTemplatePartAreas","window","addEventListener","e","preventDefault","render","_react","createElement","default","reinitializeEditor","deprecated","since","version"],"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\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAQAA,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,IAAA,GAAAP,sBAAA,CAAAJ,OAAA;AAgFA,IAAAY,cAAA,GAAAR,sBAAA,CAAAJ,OAAA;AACA,IAAAa,0BAAA,GAAAT,sBAAA,CAAAJ,OAAA;AACA,IAAAc,mBAAA,GAAAV,sBAAA,CAAAJ,OAAA;AACA,IAAAe,2BAAA,GAAAX,sBAAA,CAAAJ,OAAA;AA5GA;AACA;AACA;;AAkBA;AACA;AACA;;AAKA;AACA;AACA;AACA;A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,UAAU,EAAE,CAAE,aAAa,CAAE;IAC7BC,oBAAoB,EAAE,IAAI;IAC1BC,qBAAqB,EAAE;EACxB,CAAE,CAAC;EAEH,IAAAhC,cAAQ,EAAEiC,gBAAe,CAAC,CAACC,2BAA2B,CACrD,gBAAgB,EAChB,oBACD,CAAC;EAED,IAAAlC,cAAQ,EAAEmC,YAAc,CAAC,CAACC,cAAc,CAAE1C,QAAS,CAAC;;EAEpD;EACA;EACA;EACA;EACA,IAAAM,cAAQ,EAAEqC,aAAY,CAAC,CAACC,oBAAoB,CAAE;IAC7CC,oBAAoB,EAAE7C,QAAQ,CAAC6C,oBAAoB;IACnDC,wBAAwB,EAAE9C,QAAQ,CAAC8C;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;EAErE9C,IAAI,CAAC+C,MAAM,CAAE,IAAAC,MAAA,CAAAC,aAAA,EAAC5D,IAAA,CAAA6D,OAAG,MAAE,CAAE,CAAC;EAEtB,OAAOlD,IAAI;AACZ;AAEO,SAASmD,kBAAkBA,CAAA,EAAG;EACpC,IAAAC,mBAAU,EAAE,gCAAgC,EAAE;IAC7CC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ"}
1
+ {"version":3,"names":["_blocks","require","_blockLibrary","_data","_deprecated","_interopRequireDefault","_element","_editor","_preferences","_widgets","_store","_app","_pluginTemplateSettingPanel","_deprecated2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","initializeEditor","id","settings","target","document","getElementById","root","createRoot","dispatch","blocksStore","reapplyBlockTypeFilters","coreBlocks","__experimentalGetCoreBlocks","filter","name","registerCoreBlocks","setFreeformFallbackBlockName","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","process","env","IS_GUTENBERG_PLUGIN","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","preferencesStore","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","editSiteStore","updateSettings","editorStore","updateEditorSettings","defaultTemplateTypes","defaultTemplatePartAreas","window","addEventListener","e","preventDefault","render","_react","createElement","default","reinitializeEditor","deprecated","since","version"],"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 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\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\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 PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;A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BAAwB,EAAE5C,QAAQ,CAAC4C;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;EAErE5C,IAAI,CAAC6C,MAAM,CAAE,IAAAC,MAAA,CAAAC,aAAA,EAACpE,IAAA,CAAAqE,OAAG,MAAE,CAAE,CAAC;EAEtB,OAAOhD,IAAI;AACZ;AAEO,SAASiD,kBAAkBA,CAAA,EAAG;EACpC,IAAAC,mBAAU,EAAE,gCAAgC,EAAE;IAC7CC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/edit-site/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/edit-site'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,iHAAiH,EACjH,sBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA"}
1
+ {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/edit-site/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/edit-site'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,iHAAiH,EACjH,sBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -22,21 +22,14 @@ exports.setTemplatePart = setTemplatePart;
22
22
  exports.toggleDistractionFree = exports.switchEditorMode = void 0;
23
23
  exports.toggleFeature = toggleFeature;
24
24
  exports.updateSettings = updateSettings;
25
- var _apiFetch = _interopRequireDefault(require("@wordpress/api-fetch"));
26
25
  var _blocks = require("@wordpress/blocks");
27
26
  var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
28
- var _url = require("@wordpress/url");
29
- var _i18n = require("@wordpress/i18n");
30
- var _notices = require("@wordpress/notices");
31
27
  var _coreData = require("@wordpress/core-data");
32
- var _interface = require("@wordpress/interface");
33
28
  var _blockEditor = require("@wordpress/block-editor");
34
29
  var _editor = require("@wordpress/editor");
35
30
  var _preferences = require("@wordpress/preferences");
36
- var _constants = require("./constants");
37
- var _isTemplateRevertable = _interopRequireDefault(require("../utils/is-template-revertable"));
38
- var _constants2 = require("../utils/constants");
39
- var _privateActions = require("./private-actions");
31
+ var _constants = require("../utils/constants");
32
+ var _lockUnlock = require("../lock-unlock");
40
33
  /**
41
34
  * WordPress dependencies
42
35
  */
@@ -45,6 +38,10 @@ var _privateActions = require("./private-actions");
45
38
  * Internal dependencies
46
39
  */
47
40
 
41
+ const {
42
+ interfaceStore
43
+ } = (0, _lockUnlock.unlock)(_editor.privateApis);
44
+
48
45
  /**
49
46
  * Dispatches an action that toggles a feature flag.
50
47
  *
@@ -117,9 +114,9 @@ const addTemplate = template => async ({
117
114
  version: '6.8',
118
115
  hint: 'use saveEntityRecord directly'
119
116
  });
120
- const newTemplate = await registry.dispatch(_coreData.store).saveEntityRecord('postType', _constants2.TEMPLATE_POST_TYPE, template);
117
+ const newTemplate = await registry.dispatch(_coreData.store).saveEntityRecord('postType', _constants.TEMPLATE_POST_TYPE, template);
121
118
  if (template.content) {
122
- registry.dispatch(_coreData.store).editEntityRecord('postType', _constants2.TEMPLATE_POST_TYPE, newTemplate.id, {
119
+ registry.dispatch(_coreData.store).editEntityRecord('postType', _constants.TEMPLATE_POST_TYPE, newTemplate.id, {
123
120
  blocks: (0, _blocks.parse)(template.content)
124
121
  }, {
125
122
  undoIgnore: true
@@ -127,7 +124,7 @@ const addTemplate = template => async ({
127
124
  }
128
125
  dispatch({
129
126
  type: 'SET_EDITED_POST',
130
- postType: _constants2.TEMPLATE_POST_TYPE,
127
+ postType: _constants.TEMPLATE_POST_TYPE,
131
128
  id: newTemplate.id
132
129
  });
133
130
  };
@@ -138,8 +135,10 @@ const addTemplate = template => async ({
138
135
  * @param {Object} template The template object.
139
136
  */
140
137
  exports.addTemplate = addTemplate;
141
- const removeTemplate = template => {
142
- return (0, _privateActions.removeTemplates)([template]);
138
+ const removeTemplate = template => ({
139
+ registry
140
+ }) => {
141
+ return (0, _lockUnlock.unlock)(registry.dispatch(_editor.store)).removeTemplates([template]);
143
142
  };
144
143
 
145
144
  /**
@@ -153,7 +152,7 @@ exports.removeTemplate = removeTemplate;
153
152
  function setTemplatePart(templatePartId) {
154
153
  return {
155
154
  type: 'SET_EDITED_POST',
156
- postType: _constants2.TEMPLATE_PART_POST_TYPE,
155
+ postType: _constants.TEMPLATE_PART_POST_TYPE,
157
156
  id: templatePartId
158
157
  };
159
158
  }
@@ -168,7 +167,7 @@ function setTemplatePart(templatePartId) {
168
167
  function setNavigationMenu(navigationMenuId) {
169
168
  return {
170
169
  type: 'SET_EDITED_POST',
171
- postType: _constants2.NAVIGATION_POST_TYPE,
170
+ postType: _constants.NAVIGATION_POST_TYPE,
172
171
  id: navigationMenuId
173
172
  };
174
173
  }
@@ -224,7 +223,7 @@ function setEditedPostContext(context) {
224
223
  *
225
224
  * @deprecated
226
225
  *
227
- * @return {number} The resolved template ID for the page route.
226
+ * @return {Object} Action object.
228
227
  */
229
228
  function setPage() {
230
229
  (0, _deprecated.default)("dispatch( 'core/edit-site' ).setPage", {
@@ -355,86 +354,12 @@ function setIsSaveViewOpened(isOpen) {
355
354
  * @param {boolean} [options.allowUndo] Whether to allow the user to undo
356
355
  * reverting the template. Default true.
357
356
  */
358
- const revertTemplate = (template, {
359
- allowUndo = true
360
- } = {}) => async ({
357
+ const revertTemplate = (template, options) => ({
361
358
  registry
362
359
  }) => {
363
- const noticeId = 'edit-site-template-reverted';
364
- registry.dispatch(_notices.store).removeNotice(noticeId);
365
- if (!(0, _isTemplateRevertable.default)(template)) {
366
- registry.dispatch(_notices.store).createErrorNotice((0, _i18n.__)('This template is not revertable.'), {
367
- type: 'snackbar'
368
- });
369
- return;
370
- }
371
- try {
372
- const templateEntityConfig = registry.select(_coreData.store).getEntityConfig('postType', template.type);
373
- if (!templateEntityConfig) {
374
- registry.dispatch(_notices.store).createErrorNotice((0, _i18n.__)('The editor has encountered an unexpected error. Please reload.'), {
375
- type: 'snackbar'
376
- });
377
- return;
378
- }
379
- const fileTemplatePath = (0, _url.addQueryArgs)(`${templateEntityConfig.baseURL}/${template.id}`, {
380
- context: 'edit',
381
- source: 'theme'
382
- });
383
- const fileTemplate = await (0, _apiFetch.default)({
384
- path: fileTemplatePath
385
- });
386
- if (!fileTemplate) {
387
- registry.dispatch(_notices.store).createErrorNotice((0, _i18n.__)('The editor has encountered an unexpected error. Please reload.'), {
388
- type: 'snackbar'
389
- });
390
- return;
391
- }
392
- const serializeBlocks = ({
393
- blocks: blocksForSerialization = []
394
- }) => (0, _blocks.__unstableSerializeAndClean)(blocksForSerialization);
395
- const edited = registry.select(_coreData.store).getEditedEntityRecord('postType', template.type, template.id);
396
-
397
- // We are fixing up the undo level here to make sure we can undo
398
- // the revert in the header toolbar correctly.
399
- registry.dispatch(_coreData.store).editEntityRecord('postType', template.type, template.id, {
400
- content: serializeBlocks,
401
- // Required to make the `undo` behave correctly.
402
- blocks: edited.blocks,
403
- // Required to revert the blocks in the editor.
404
- source: 'custom' // required to avoid turning the editor into a dirty state
405
- }, {
406
- undoIgnore: true // Required to merge this edit with the last undo level.
407
- });
408
- const blocks = (0, _blocks.parse)(fileTemplate?.content?.raw);
409
- registry.dispatch(_coreData.store).editEntityRecord('postType', template.type, fileTemplate.id, {
410
- content: serializeBlocks,
411
- blocks,
412
- source: 'theme'
413
- });
414
- if (allowUndo) {
415
- const undoRevert = () => {
416
- registry.dispatch(_coreData.store).editEntityRecord('postType', template.type, edited.id, {
417
- content: serializeBlocks,
418
- blocks: edited.blocks,
419
- source: 'custom'
420
- });
421
- };
422
- registry.dispatch(_notices.store).createSuccessNotice((0, _i18n.__)('Template reverted.'), {
423
- type: 'snackbar',
424
- id: noticeId,
425
- actions: [{
426
- label: (0, _i18n.__)('Undo'),
427
- onClick: undoRevert
428
- }]
429
- });
430
- }
431
- } catch (error) {
432
- const errorMessage = error.message && error.code !== 'unknown_error' ? error.message : (0, _i18n.__)('Template revert failed. Please reload.');
433
- registry.dispatch(_notices.store).createErrorNotice(errorMessage, {
434
- type: 'snackbar'
435
- });
436
- }
360
+ return (0, _lockUnlock.unlock)(registry.dispatch(_editor.store)).revertTemplate(template, options);
437
361
  };
362
+
438
363
  /**
439
364
  * Action that opens an editor sidebar.
440
365
  *
@@ -444,7 +369,7 @@ exports.revertTemplate = revertTemplate;
444
369
  const openGeneralSidebar = name => ({
445
370
  registry
446
371
  }) => {
447
- registry.dispatch(_interface.store).enableComplementaryArea(_constants.STORE_NAME, name);
372
+ registry.dispatch(interfaceStore).enableComplementaryArea('core', name);
448
373
  };
449
374
 
450
375
  /**
@@ -454,7 +379,7 @@ exports.openGeneralSidebar = openGeneralSidebar;
454
379
  const closeGeneralSidebar = () => ({
455
380
  registry
456
381
  }) => {
457
- registry.dispatch(_interface.store).disableComplementaryArea(_constants.STORE_NAME);
382
+ registry.dispatch(interfaceStore).disableComplementaryArea('core');
458
383
  };
459
384
 
460
385
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["_apiFetch","_interopRequireDefault","require","_blocks","_deprecated","_url","_i18n","_notices","_coreData","_interface","_blockEditor","_editor","_preferences","_constants","_isTemplateRevertable","_constants2","_privateActions","toggleFeature","featureName","registry","deprecated","since","alternative","dispatch","preferencesStore","toggle","__experimentalSetPreviewDeviceType","deviceType","version","hint","editorStore","setDeviceType","exports","setTemplate","type","addTemplate","template","newTemplate","coreStore","saveEntityRecord","TEMPLATE_POST_TYPE","content","editEntityRecord","id","blocks","parse","undoIgnore","postType","removeTemplate","removeTemplates","setTemplatePart","templatePartId","TEMPLATE_PART_POST_TYPE","setNavigationMenu","navigationMenuId","NAVIGATION_POST_TYPE","setEditedEntity","postId","context","setHomeTemplateId","setEditedPostContext","setPage","setNavigationPanelActiveMenu","openNavigationPanelToMenu","setIsNavigationPanelOpened","setIsInserterOpened","value","setIsListViewOpened","isOpen","updateSettings","settings","setIsSaveViewOpened","revertTemplate","allowUndo","noticeId","noticesStore","removeNotice","isTemplateRevertable","createErrorNotice","__","templateEntityConfig","select","getEntityConfig","fileTemplatePath","addQueryArgs","baseURL","source","fileTemplate","apiFetch","path","serializeBlocks","blocksForSerialization","__unstableSerializeAndClean","edited","getEditedEntityRecord","raw","undoRevert","createSuccessNotice","actions","label","onClick","error","errorMessage","message","code","openGeneralSidebar","name","interfaceStore","enableComplementaryArea","editSiteStoreName","closeGeneralSidebar","disableComplementaryArea","switchEditorMode","mode","setHasPageContentFocus","hasPageContentFocus","blockEditorStore","clearSelectedBlock","toggleDistractionFree"],"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 { __ } 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 { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\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';\nimport { removeTemplates } from './private-actions';\n\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 * @deprecated\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport const __experimentalSetPreviewDeviceType =\n\t( deviceType ) =>\n\t( { registry } ) => {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType\",\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\thint: 'registry.dispatch( editorStore ).setDeviceType',\n\t\t\t}\n\t\t);\n\t\tregistry.dispatch( editorStore ).setDeviceType( deviceType );\n\t};\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 = ( template ) => {\n\treturn removeTemplates( [ template ] );\n};\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 * Returns an action object used to open/close the inserter.\n *\n * @deprecated\n *\n * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsInserterOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsInserterOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsInserterOpened( value );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @deprecated\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsListViewOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsListViewOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsListViewOpened( isOpen );\n\t};\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 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( { registry } ) => {\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\n/**\n * Triggers an action used to switch editor mode.\n *\n * @deprecated\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).switchEditorMode\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').switchEditorMode\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).switchEditorMode( mode );\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 *\n * @deprecated\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).toggleDistractionFree\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').toggleDistractionFree\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleDistractionFree();\n\t};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAA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precated","_interopRequireDefault","_coreData","_blockEditor","_editor","_preferences","_constants","_lockUnlock","interfaceStore","unlock","editorPrivateApis","toggleFeature","featureName","registry","deprecated","since","alternative","dispatch","preferencesStore","toggle","__experimentalSetPreviewDeviceType","deviceType","version","hint","editorStore","setDeviceType","exports","setTemplate","type","addTemplate","template","newTemplate","coreStore","saveEntityRecord","TEMPLATE_POST_TYPE","content","editEntityRecord","id","blocks","parse","undoIgnore","postType","removeTemplate","removeTemplates","setTemplatePart","templatePartId","TEMPLATE_PART_POST_TYPE","setNavigationMenu","navigationMenuId","NAVIGATION_POST_TYPE","setEditedEntity","postId","context","setHomeTemplateId","setEditedPostContext","setPage","setNavigationPanelActiveMenu","openNavigationPanelToMenu","setIsNavigationPanelOpened","setIsInserterOpened","value","setIsListViewOpened","isOpen","updateSettings","settings","setIsSaveViewOpened","revertTemplate","options","openGeneralSidebar","name","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","switchEditorMode","mode","setHasPageContentFocus","hasPageContentFocus","blockEditorStore","clearSelectedBlock","toggleDistractionFree"],"sources":["@wordpress/edit-site/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../utils/constants';\nimport { unlock } from '../lock-unlock';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\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 * @deprecated\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport const __experimentalSetPreviewDeviceType =\n\t( deviceType ) =>\n\t( { registry } ) => {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType\",\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\thint: 'registry.dispatch( editorStore ).setDeviceType',\n\t\t\t}\n\t\t);\n\t\tregistry.dispatch( editorStore ).setDeviceType( deviceType );\n\t};\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\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).removeTemplates( [\n\t\t\ttemplate,\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 {Object} Action object.\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 * Returns an action object used to open/close the inserter.\n *\n * @deprecated\n *\n * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsInserterOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsInserterOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsInserterOpened( value );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @deprecated\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsListViewOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsListViewOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsListViewOpened( isOpen );\n\t};\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 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, options ) =>\n\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).revertTemplate(\n\t\t\ttemplate,\n\t\t\toptions\n\t\t);\n\t};\n\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( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( 'core', name );\n\t};\n\n/**\n * Action that closes the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( interfaceStore ).disableComplementaryArea( 'core' );\n\t};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @deprecated\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).switchEditorMode\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').switchEditorMode\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).switchEditorMode( mode );\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 *\n * @deprecated\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).toggleDistractionFree\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').toggleDistractionFree\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleDistractionFree();\n\t};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CA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d,CAAE,CAAC;EACHH,QAAQ,CAACI,QAAQ,CAAEO,aAAY,CAAC,CAACiD,gBAAgB,CAAEC,IAAK,CAAC;AAC1D,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AANAhD,OAAA,CAAA+C,gBAAA,GAAAA,gBAAA;AAOO,MAAME,sBAAsB,GAChCC,mBAAmB,IACrB,CAAE;EAAE3D,QAAQ;EAAEJ;AAAS,CAAC,KAAM;EAC7B,IAAAC,mBAAU,EAAG,qDAAoD,EAAE;IAClEC,KAAK,EAAE;EACR,CAAE,CAAC;EAEH,IAAK6D,mBAAmB,EAAG;IAC1B/D,QAAQ,CAACI,QAAQ,CAAE4D,kBAAiB,CAAC,CAACC,kBAAkB,CAAC,CAAC;EAC3D;EACA7D,QAAQ,CAAE;IACTW,IAAI,EAAE,4BAA4B;IAClCgD;EACD,CAAE,CAAC;AACJ,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AANAlD,OAAA,CAAAiD,sBAAA,GAAAA,sBAAA;AAOO,MAAMI,qBAAqB,GACjCA,CAAA,KACA,CAAE;EAAElE;AAAS,CAAC,KAAM;EACnB,IAAAC,mBAAU,EAAE,oDAAoD,EAAE;IACjEC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EACHH,QAAQ,CAACI,QAAQ,CAAEO,aAAY,CAAC,CAACuD,qBAAqB,CAAC,CAAC;AACzD,CAAC;AAACrD,OAAA,CAAAqD,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["STORE_NAME","exports"],"sources":["@wordpress/edit-site/src/store/constants.js"],"sourcesContent":["/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/edit-site';\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,gBAAgB"}
1
+ {"version":3,"names":["STORE_NAME","exports"],"sources":["@wordpress/edit-site/src/store/constants.js"],"sourcesContent":["/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/edit-site';\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACO,MAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,gBAAgB","ignoreList":[]}
@@ -14,7 +14,7 @@ var privateSelectors = _interopRequireWildcard(require("./private-selectors"));
14
14
  var _constants = require("./constants");
15
15
  var _lockUnlock = require("../lock-unlock");
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  /**
19
19
  * WordPress dependencies
20
20
  */
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_reducer","_interopRequireDefault","actions","_interopRequireWildcard","privateActions","selectors","privateSelectors","_constants","_lockUnlock","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","storeConfig","exports","reducer","store","createReduxStore","STORE_NAME","register","unlock","registerPrivateSelectors","registerPrivateActions"],"sources":["@wordpress/edit-site/src/store/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as selectors from './selectors';\nimport * as privateSelectors from './private-selectors';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\nexport const storeConfig = {\n\treducer,\n\tactions,\n\tselectors,\n};\n\nexport const store = createReduxStore( STORE_NAME, storeConfig );\nregister( store );\nunlock( store ).registerPrivateSelectors( privateSelectors );\nunlock( store ).registerPrivateActions( privateActions );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,SAAA,GAAAF,uBAAA,CAAAJ,OAAA;AACA,IAAAO,gBAAA,GAAAH,uBAAA,CAAAJ,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAAwC,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,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,CAAC"}
1
+ {"version":3,"names":["_data","require","_reducer","_interopRequireDefault","actions","_interopRequireWildcard","privateActions","selectors","privateSelectors","_constants","_lockUnlock","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","storeConfig","exports","reducer","store","createReduxStore","STORE_NAME","register","unlock","registerPrivateSelectors","registerPrivateActions"],"sources":["@wordpress/edit-site/src/store/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as selectors from './selectors';\nimport * as privateSelectors from './private-selectors';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\nexport const storeConfig = {\n\treducer,\n\tactions,\n\tselectors,\n};\n\nexport const store = createReduxStore( STORE_NAME, storeConfig );\nregister( store );\nunlock( store ).registerPrivateSelectors( privateSelectors );\nunlock( store ).registerPrivateActions( privateActions );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,SAAA,GAAAF,uBAAA,CAAAJ,OAAA;AACA,IAAAO,gBAAA,GAAAH,uBAAA,CAAAJ,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAAwC,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,C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