@wordpress/edit-site 4.19.0 → 5.1.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 (382) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/build/components/add-new-template/add-custom-template-modal.js +1 -0
  3. package/build/components/add-new-template/add-custom-template-modal.js.map +1 -1
  4. package/build/components/add-new-template/index.js +8 -5
  5. package/build/components/add-new-template/index.js.map +1 -1
  6. package/build/components/add-new-template/new-template-part.js +21 -6
  7. package/build/components/add-new-template/new-template-part.js.map +1 -1
  8. package/build/components/add-new-template/new-template.js +12 -8
  9. package/build/components/add-new-template/new-template.js.map +1 -1
  10. package/build/components/app/index.js +15 -30
  11. package/build/components/app/index.js.map +1 -1
  12. package/build/components/block-editor/editor-canvas.js +64 -0
  13. package/build/components/block-editor/editor-canvas.js.map +1 -0
  14. package/build/components/block-editor/index.js +62 -59
  15. package/build/components/block-editor/index.js.map +1 -1
  16. package/build/components/block-editor/resizable-editor.js +10 -44
  17. package/build/components/block-editor/resizable-editor.js.map +1 -1
  18. package/build/components/editor/index.js +76 -135
  19. package/build/components/editor/index.js.map +1 -1
  20. package/build/components/global-styles/block-preview-panel.js +57 -0
  21. package/build/components/global-styles/block-preview-panel.js.map +1 -0
  22. package/build/components/global-styles/border-panel.js +0 -1
  23. package/build/components/global-styles/border-panel.js.map +1 -1
  24. package/build/components/global-styles/context-menu.js +6 -2
  25. package/build/components/global-styles/context-menu.js.map +1 -1
  26. package/build/components/global-styles/custom-css.js +62 -0
  27. package/build/components/global-styles/custom-css.js.map +1 -0
  28. package/build/components/global-styles/dimensions-panel.js +2 -6
  29. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  30. package/build/components/global-styles/global-styles-provider.js +18 -4
  31. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  32. package/build/components/global-styles/hooks.js +5 -2
  33. package/build/components/global-styles/hooks.js.map +1 -1
  34. package/build/components/global-styles/palette.js +1 -1
  35. package/build/components/global-styles/palette.js.map +1 -1
  36. package/build/components/global-styles/screen-background-color.js +0 -1
  37. package/build/components/global-styles/screen-background-color.js.map +1 -1
  38. package/build/components/global-styles/screen-block-list.js +2 -1
  39. package/build/components/global-styles/screen-block-list.js.map +1 -1
  40. package/build/components/global-styles/screen-block.js +5 -1
  41. package/build/components/global-styles/screen-block.js.map +1 -1
  42. package/build/components/global-styles/screen-border.js +47 -0
  43. package/build/components/global-styles/screen-border.js.map +1 -0
  44. package/build/components/global-styles/screen-button-color.js +0 -2
  45. package/build/components/global-styles/screen-button-color.js.map +1 -1
  46. package/build/components/global-styles/screen-colors.js +5 -1
  47. package/build/components/global-styles/screen-colors.js.map +1 -1
  48. package/build/components/global-styles/screen-css.js +42 -0
  49. package/build/components/global-styles/screen-css.js.map +1 -0
  50. package/build/components/global-styles/screen-heading-color.js +1 -3
  51. package/build/components/global-styles/screen-heading-color.js.map +1 -1
  52. package/build/components/global-styles/screen-layout.js +4 -5
  53. package/build/components/global-styles/screen-layout.js.map +1 -1
  54. package/build/components/global-styles/screen-link-color.js +0 -1
  55. package/build/components/global-styles/screen-link-color.js.map +1 -1
  56. package/build/components/global-styles/screen-root.js +20 -2
  57. package/build/components/global-styles/screen-root.js.map +1 -1
  58. package/build/components/global-styles/screen-style-variations.js +3 -3
  59. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  60. package/build/components/global-styles/screen-text-color.js +0 -1
  61. package/build/components/global-styles/screen-text-color.js.map +1 -1
  62. package/build/components/global-styles/screen-typography.js +4 -0
  63. package/build/components/global-styles/screen-typography.js.map +1 -1
  64. package/build/components/global-styles/typography-utils.js +17 -5
  65. package/build/components/global-styles/typography-utils.js.map +1 -1
  66. package/build/components/global-styles/ui.js +50 -4
  67. package/build/components/global-styles/ui.js.map +1 -1
  68. package/build/components/global-styles/use-global-styles-output.js +5 -1
  69. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  70. package/build/components/global-styles/utils.js +14 -4
  71. package/build/components/global-styles/utils.js.map +1 -1
  72. package/build/components/{editor/global-styles-renderer.js → global-styles-renderer/index.js} +4 -8
  73. package/build/components/global-styles-renderer/index.js.map +1 -0
  74. package/build/components/header-edit-mode/document-actions/index.js +21 -45
  75. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  76. package/build/components/header-edit-mode/index.js +19 -12
  77. package/build/components/header-edit-mode/index.js.map +1 -1
  78. package/build/components/keyboard-shortcuts/index.js +11 -1
  79. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  80. package/build/components/layout/index.js +200 -0
  81. package/build/components/layout/index.js.map +1 -0
  82. package/build/components/list/header.js +5 -1
  83. package/build/components/list/header.js.map +1 -1
  84. package/build/components/list/index.js +4 -22
  85. package/build/components/list/index.js.map +1 -1
  86. package/build/components/navigate-to-link/index.js +1 -3
  87. package/build/components/navigate-to-link/index.js.map +1 -1
  88. package/build/components/routes/index.js +1 -1
  89. package/build/components/routes/index.js.map +1 -1
  90. package/build/components/sidebar/index.js +46 -0
  91. package/build/components/sidebar/index.js.map +1 -0
  92. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +24 -4
  93. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  94. package/build/components/sidebar-edit-mode/index.js +4 -2
  95. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  96. package/build/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js +10 -0
  97. package/build/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js.map +1 -1
  98. package/build/components/sidebar-navigation-item/index.js +53 -0
  99. package/build/components/sidebar-navigation-item/index.js.map +1 -0
  100. package/build/components/sidebar-navigation-screen/index.js +49 -0
  101. package/build/components/sidebar-navigation-screen/index.js.map +1 -0
  102. package/build/components/sidebar-navigation-screen-main/index.js +46 -0
  103. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -0
  104. package/build/components/sidebar-navigation-screen-templates/index.js +169 -0
  105. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -0
  106. package/build/components/site-hub/index.js +149 -0
  107. package/build/components/site-hub/index.js.map +1 -0
  108. package/build/components/site-icon/index.js +70 -0
  109. package/build/components/site-icon/index.js.map +1 -0
  110. package/build/components/style-book/index.js +173 -0
  111. package/build/components/style-book/index.js.map +1 -0
  112. package/build/components/{url-query-controller/index.js → sync-state-with-url/use-init-edited-entity-from-url.js} +5 -4
  113. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -0
  114. package/build/components/sync-state-with-url/use-sync-sidebar-path-with-url.js +53 -0
  115. package/build/components/sync-state-with-url/use-sync-sidebar-path-with-url.js.map +1 -0
  116. package/build/components/use-edited-entity-record/index.js +60 -0
  117. package/build/components/use-edited-entity-record/index.js.map +1 -0
  118. package/build/hooks/index.js +2 -0
  119. package/build/hooks/index.js.map +1 -1
  120. package/build/hooks/push-changes-to-global-styles/index.js +144 -0
  121. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -0
  122. package/build/index.js +7 -45
  123. package/build/index.js.map +1 -1
  124. package/build/store/actions.js +93 -43
  125. package/build/store/actions.js.map +1 -1
  126. package/build/store/reducer.js +35 -107
  127. package/build/store/reducer.js.map +1 -1
  128. package/build/store/selectors.js +69 -78
  129. package/build/store/selectors.js.map +1 -1
  130. package/build-module/components/add-new-template/add-custom-template-modal.js +1 -0
  131. package/build-module/components/add-new-template/add-custom-template-modal.js.map +1 -1
  132. package/build-module/components/add-new-template/index.js +7 -5
  133. package/build-module/components/add-new-template/index.js.map +1 -1
  134. package/build-module/components/add-new-template/new-template-part.js +18 -6
  135. package/build-module/components/add-new-template/new-template-part.js.map +1 -1
  136. package/build-module/components/add-new-template/new-template.js +13 -9
  137. package/build-module/components/add-new-template/new-template.js.map +1 -1
  138. package/build-module/components/app/index.js +15 -28
  139. package/build-module/components/app/index.js.map +1 -1
  140. package/build-module/components/block-editor/editor-canvas.js +51 -0
  141. package/build-module/components/block-editor/editor-canvas.js.map +1 -0
  142. package/build-module/components/block-editor/index.js +62 -60
  143. package/build-module/components/block-editor/index.js.map +1 -1
  144. package/build-module/components/block-editor/resizable-editor.js +11 -40
  145. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  146. package/build-module/components/editor/index.js +75 -129
  147. package/build-module/components/editor/index.js.map +1 -1
  148. package/build-module/components/global-styles/block-preview-panel.js +46 -0
  149. package/build-module/components/global-styles/block-preview-panel.js.map +1 -0
  150. package/build-module/components/global-styles/border-panel.js +0 -1
  151. package/build-module/components/global-styles/border-panel.js.map +1 -1
  152. package/build-module/components/global-styles/context-menu.js +7 -3
  153. package/build-module/components/global-styles/context-menu.js.map +1 -1
  154. package/build-module/components/global-styles/custom-css.js +52 -0
  155. package/build-module/components/global-styles/custom-css.js.map +1 -0
  156. package/build-module/components/global-styles/dimensions-panel.js +3 -7
  157. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  158. package/build-module/components/global-styles/global-styles-provider.js +18 -4
  159. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  160. package/build-module/components/global-styles/hooks.js +5 -3
  161. package/build-module/components/global-styles/hooks.js.map +1 -1
  162. package/build-module/components/global-styles/palette.js +1 -1
  163. package/build-module/components/global-styles/palette.js.map +1 -1
  164. package/build-module/components/global-styles/screen-background-color.js +0 -1
  165. package/build-module/components/global-styles/screen-background-color.js.map +1 -1
  166. package/build-module/components/global-styles/screen-block-list.js +2 -1
  167. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  168. package/build-module/components/global-styles/screen-block.js +4 -1
  169. package/build-module/components/global-styles/screen-block.js.map +1 -1
  170. package/build-module/components/global-styles/screen-border.js +30 -0
  171. package/build-module/components/global-styles/screen-border.js.map +1 -0
  172. package/build-module/components/global-styles/screen-button-color.js +0 -2
  173. package/build-module/components/global-styles/screen-button-color.js.map +1 -1
  174. package/build-module/components/global-styles/screen-colors.js +4 -1
  175. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  176. package/build-module/components/global-styles/screen-css.js +28 -0
  177. package/build-module/components/global-styles/screen-css.js.map +1 -0
  178. package/build-module/components/global-styles/screen-heading-color.js +1 -3
  179. package/build-module/components/global-styles/screen-heading-color.js.map +1 -1
  180. package/build-module/components/global-styles/screen-layout.js +3 -4
  181. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  182. package/build-module/components/global-styles/screen-link-color.js +0 -1
  183. package/build-module/components/global-styles/screen-link-color.js.map +1 -1
  184. package/build-module/components/global-styles/screen-root.js +21 -3
  185. package/build-module/components/global-styles/screen-root.js.map +1 -1
  186. package/build-module/components/global-styles/screen-style-variations.js +2 -2
  187. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  188. package/build-module/components/global-styles/screen-text-color.js +0 -1
  189. package/build-module/components/global-styles/screen-text-color.js.map +1 -1
  190. package/build-module/components/global-styles/screen-typography.js +3 -0
  191. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  192. package/build-module/components/global-styles/typography-utils.js +17 -5
  193. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  194. package/build-module/components/global-styles/ui.js +48 -5
  195. package/build-module/components/global-styles/ui.js.map +1 -1
  196. package/build-module/components/global-styles/use-global-styles-output.js +5 -1
  197. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  198. package/build-module/components/global-styles/utils.js +13 -5
  199. package/build-module/components/global-styles/utils.js.map +1 -1
  200. package/build-module/components/{editor/global-styles-renderer.js → global-styles-renderer/index.js} +4 -7
  201. package/build-module/components/global-styles-renderer/index.js.map +1 -0
  202. package/build-module/components/header-edit-mode/document-actions/index.js +22 -43
  203. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  204. package/build-module/components/header-edit-mode/index.js +16 -11
  205. package/build-module/components/header-edit-mode/index.js.map +1 -1
  206. package/build-module/components/keyboard-shortcuts/index.js +10 -1
  207. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  208. package/build-module/components/layout/index.js +173 -0
  209. package/build-module/components/layout/index.js.map +1 -0
  210. package/build-module/components/list/header.js +5 -1
  211. package/build-module/components/list/header.js.map +1 -1
  212. package/build-module/components/list/index.js +4 -19
  213. package/build-module/components/list/index.js.map +1 -1
  214. package/build-module/components/navigate-to-link/index.js +1 -3
  215. package/build-module/components/navigate-to-link/index.js.map +1 -1
  216. package/build-module/components/routes/index.js +1 -1
  217. package/build-module/components/routes/index.js.map +1 -1
  218. package/build-module/components/sidebar/index.js +33 -0
  219. package/build-module/components/sidebar/index.js.map +1 -0
  220. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +27 -7
  221. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  222. package/build-module/components/sidebar-edit-mode/index.js +6 -4
  223. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  224. package/build-module/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js +11 -1
  225. package/build-module/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js.map +1 -1
  226. package/build-module/components/sidebar-navigation-item/index.js +40 -0
  227. package/build-module/components/sidebar-navigation-item/index.js.map +1 -0
  228. package/build-module/components/sidebar-navigation-screen/index.js +39 -0
  229. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -0
  230. package/build-module/components/sidebar-navigation-screen-main/index.js +32 -0
  231. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -0
  232. package/build-module/components/sidebar-navigation-screen-templates/index.js +147 -0
  233. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -0
  234. package/build-module/components/site-hub/index.js +126 -0
  235. package/build-module/components/site-hub/index.js.map +1 -0
  236. package/build-module/components/site-icon/index.js +55 -0
  237. package/build-module/components/site-icon/index.js.map +1 -0
  238. package/build-module/components/style-book/index.js +156 -0
  239. package/build-module/components/style-book/index.js.map +1 -0
  240. package/build-module/components/{url-query-controller/index.js → sync-state-with-url/use-init-edited-entity-from-url.js} +4 -3
  241. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -0
  242. package/build-module/components/sync-state-with-url/use-sync-sidebar-path-with-url.js +43 -0
  243. package/build-module/components/sync-state-with-url/use-sync-sidebar-path-with-url.js.map +1 -0
  244. package/build-module/components/use-edited-entity-record/index.js +48 -0
  245. package/build-module/components/use-edited-entity-record/index.js.map +1 -0
  246. package/build-module/hooks/index.js +1 -0
  247. package/build-module/hooks/index.js.map +1 -1
  248. package/build-module/hooks/push-changes-to-global-styles/index.js +132 -0
  249. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -0
  250. package/build-module/index.js +9 -36
  251. package/build-module/index.js.map +1 -1
  252. package/build-module/store/actions.js +87 -42
  253. package/build-module/store/actions.js.map +1 -1
  254. package/build-module/store/reducer.js +35 -102
  255. package/build-module/store/reducer.js.map +1 -1
  256. package/build-module/store/selectors.js +60 -72
  257. package/build-module/store/selectors.js.map +1 -1
  258. package/build-style/style-rtl.css +549 -352
  259. package/build-style/style.css +549 -352
  260. package/package.json +33 -31
  261. package/src/components/add-new-template/add-custom-template-modal.js +1 -0
  262. package/src/components/add-new-template/index.js +6 -3
  263. package/src/components/add-new-template/new-template-part.js +15 -3
  264. package/src/components/add-new-template/new-template.js +14 -7
  265. package/src/components/add-new-template/style.scss +0 -4
  266. package/src/components/app/index.js +14 -43
  267. package/src/components/block-editor/editor-canvas.js +69 -0
  268. package/src/components/block-editor/index.js +100 -87
  269. package/src/components/block-editor/resizable-editor.js +9 -64
  270. package/src/components/block-editor/style.scss +25 -1
  271. package/src/components/code-editor/style.scss +1 -1
  272. package/src/components/editor/index.js +157 -238
  273. package/src/components/editor/style.scss +0 -22
  274. package/src/components/global-styles/block-preview-panel.js +44 -0
  275. package/src/components/global-styles/border-panel.js +0 -1
  276. package/src/components/global-styles/context-menu.js +11 -2
  277. package/src/components/global-styles/custom-css.js +74 -0
  278. package/src/components/global-styles/dimensions-panel.js +2 -5
  279. package/src/components/global-styles/global-styles-provider.js +50 -22
  280. package/src/components/global-styles/hooks.js +8 -3
  281. package/src/components/global-styles/palette.js +1 -1
  282. package/src/components/global-styles/screen-background-color.js +0 -1
  283. package/src/components/global-styles/screen-block-list.js +2 -1
  284. package/src/components/global-styles/screen-block.js +6 -1
  285. package/src/components/global-styles/screen-border.js +25 -0
  286. package/src/components/global-styles/screen-button-color.js +0 -2
  287. package/src/components/global-styles/screen-colors.js +5 -1
  288. package/src/components/global-styles/screen-css.js +33 -0
  289. package/src/components/global-styles/screen-heading-color.js +1 -3
  290. package/src/components/global-styles/screen-layout.js +2 -3
  291. package/src/components/global-styles/screen-link-color.js +0 -1
  292. package/src/components/global-styles/screen-root.js +37 -1
  293. package/src/components/global-styles/screen-style-variations.js +5 -2
  294. package/src/components/global-styles/screen-text-color.js +0 -1
  295. package/src/components/global-styles/screen-typography.js +3 -0
  296. package/src/components/global-styles/style.scss +31 -2
  297. package/src/components/global-styles/test/typography-utils.js +72 -23
  298. package/src/components/global-styles/typography-utils.js +24 -4
  299. package/src/components/global-styles/ui.js +47 -4
  300. package/src/components/global-styles/use-global-styles-output.js +5 -0
  301. package/src/components/global-styles/utils.js +18 -6
  302. package/src/components/{editor/global-styles-renderer.js → global-styles-renderer/index.js} +3 -9
  303. package/src/components/header-edit-mode/document-actions/index.js +31 -45
  304. package/src/components/header-edit-mode/document-actions/style.scss +8 -1
  305. package/src/components/header-edit-mode/index.js +96 -78
  306. package/src/components/header-edit-mode/style.scss +6 -33
  307. package/src/components/keyboard-shortcuts/index.js +13 -0
  308. package/src/components/layout/index.js +235 -0
  309. package/src/components/layout/style.scss +183 -0
  310. package/src/components/list/header.js +5 -1
  311. package/src/components/list/index.js +12 -31
  312. package/src/components/list/style.scss +3 -4
  313. package/src/components/navigate-to-link/index.js +2 -8
  314. package/src/components/routes/index.js +1 -1
  315. package/src/components/sidebar/index.js +37 -0
  316. package/src/components/sidebar/style.scss +8 -0
  317. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +42 -7
  318. package/src/components/sidebar-edit-mode/index.js +4 -4
  319. package/src/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js +10 -0
  320. package/src/components/sidebar-edit-mode/navigation-menu-sidebar/style.scss +21 -3
  321. package/src/components/sidebar-edit-mode/settings-header/style.scss +47 -34
  322. package/src/components/sidebar-edit-mode/style.scss +0 -13
  323. package/src/components/sidebar-navigation-item/index.js +51 -0
  324. package/src/components/sidebar-navigation-item/style.scss +17 -0
  325. package/src/components/sidebar-navigation-screen/index.js +55 -0
  326. package/src/components/sidebar-navigation-screen/style.scss +39 -0
  327. package/src/components/sidebar-navigation-screen-main/index.js +44 -0
  328. package/src/components/sidebar-navigation-screen-templates/index.js +163 -0
  329. package/src/components/sidebar-navigation-screen-templates/style.scss +9 -0
  330. package/src/components/site-hub/index.js +150 -0
  331. package/src/components/site-hub/style.scss +31 -0
  332. package/src/components/site-icon/index.js +56 -0
  333. package/src/components/site-icon/style.scss +10 -0
  334. package/src/components/style-book/index.js +193 -0
  335. package/src/components/style-book/style.scss +78 -0
  336. package/src/components/{url-query-controller/index.js → sync-state-with-url/use-init-edited-entity-from-url.js} +3 -3
  337. package/src/components/sync-state-with-url/use-sync-sidebar-path-with-url.js +36 -0
  338. package/src/components/template-details/style.scss +4 -0
  339. package/src/components/use-edited-entity-record/index.js +37 -0
  340. package/src/hooks/index.js +1 -0
  341. package/src/hooks/push-changes-to-global-styles/index.js +162 -0
  342. package/src/hooks/push-changes-to-global-styles/style.scss +4 -0
  343. package/src/index.js +5 -53
  344. package/src/store/actions.js +93 -48
  345. package/src/store/reducer.js +29 -91
  346. package/src/store/selectors.js +61 -101
  347. package/src/store/test/actions.js +3 -15
  348. package/src/store/test/reducer.js +8 -192
  349. package/src/store/test/selectors.js +3 -42
  350. package/src/style.scss +21 -3
  351. package/build/components/editor/global-styles-renderer.js.map +0 -1
  352. package/build/components/navigation-sidebar/index.js +0 -62
  353. package/build/components/navigation-sidebar/index.js.map +0 -1
  354. package/build/components/navigation-sidebar/navigation-panel/constants.js +0 -77
  355. package/build/components/navigation-sidebar/navigation-panel/constants.js.map +0 -1
  356. package/build/components/navigation-sidebar/navigation-panel/index.js +0 -152
  357. package/build/components/navigation-sidebar/navigation-panel/index.js.map +0 -1
  358. package/build/components/navigation-sidebar/navigation-panel/template-hierarchy.js +0 -81
  359. package/build/components/navigation-sidebar/navigation-panel/template-hierarchy.js.map +0 -1
  360. package/build/components/navigation-sidebar/navigation-toggle/index.js +0 -124
  361. package/build/components/navigation-sidebar/navigation-toggle/index.js.map +0 -1
  362. package/build/components/url-query-controller/index.js.map +0 -1
  363. package/build-module/components/editor/global-styles-renderer.js.map +0 -1
  364. package/build-module/components/navigation-sidebar/index.js +0 -45
  365. package/build-module/components/navigation-sidebar/index.js.map +0 -1
  366. package/build-module/components/navigation-sidebar/navigation-panel/constants.js +0 -49
  367. package/build-module/components/navigation-sidebar/navigation-panel/constants.js.map +0 -1
  368. package/build-module/components/navigation-sidebar/navigation-panel/index.js +0 -131
  369. package/build-module/components/navigation-sidebar/navigation-panel/index.js.map +0 -1
  370. package/build-module/components/navigation-sidebar/navigation-panel/template-hierarchy.js +0 -66
  371. package/build-module/components/navigation-sidebar/navigation-panel/template-hierarchy.js.map +0 -1
  372. package/build-module/components/navigation-sidebar/navigation-toggle/index.js +0 -108
  373. package/build-module/components/navigation-sidebar/navigation-toggle/index.js.map +0 -1
  374. package/build-module/components/url-query-controller/index.js.map +0 -1
  375. package/src/components/navigation-sidebar/index.js +0 -46
  376. package/src/components/navigation-sidebar/navigation-panel/constants.js +0 -94
  377. package/src/components/navigation-sidebar/navigation-panel/index.js +0 -142
  378. package/src/components/navigation-sidebar/navigation-panel/style.scss +0 -152
  379. package/src/components/navigation-sidebar/navigation-panel/template-hierarchy.js +0 -81
  380. package/src/components/navigation-sidebar/navigation-toggle/index.js +0 -114
  381. package/src/components/navigation-sidebar/navigation-toggle/style.scss +0 -71
  382. package/src/components/navigation-sidebar/navigation-toggle/test/index.js +0 -65
@@ -0,0 +1,193 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classnames from 'classnames';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import {
10
+ Button,
11
+ TabPanel,
12
+ createSlotFill,
13
+ __experimentalUseSlotFills as useSlotFills,
14
+ } from '@wordpress/components';
15
+ import { __, sprintf } from '@wordpress/i18n';
16
+ import {
17
+ getCategories,
18
+ getBlockTypes,
19
+ getBlockFromExample,
20
+ createBlock,
21
+ } from '@wordpress/blocks';
22
+ import { BlockPreview } from '@wordpress/block-editor';
23
+ import { closeSmall } from '@wordpress/icons';
24
+ import { useResizeObserver } from '@wordpress/compose';
25
+ import { useMemo, memo } from '@wordpress/element';
26
+
27
+ /**
28
+ * Internal dependencies
29
+ */
30
+ import { useStyle } from '../global-styles';
31
+
32
+ const SLOT_FILL_NAME = 'EditSiteStyleBook';
33
+ const { Slot: StyleBookSlot, Fill: StyleBookFill } =
34
+ createSlotFill( SLOT_FILL_NAME );
35
+
36
+ function getExamples() {
37
+ // Use our own example for the Heading block so that we can show multiple
38
+ // heading levels.
39
+ const headingsExample = {
40
+ name: 'core/heading',
41
+ title: __( 'Headings' ),
42
+ category: 'text',
43
+ blocks: [
44
+ createBlock( 'core/heading', {
45
+ content: __( 'Code Is Poetry' ),
46
+ level: 1,
47
+ } ),
48
+ createBlock( 'core/heading', {
49
+ content: __( 'Code Is Poetry' ),
50
+ level: 2,
51
+ } ),
52
+ createBlock( 'core/heading', {
53
+ content: __( 'Code Is Poetry' ),
54
+ level: 3,
55
+ } ),
56
+ createBlock( 'core/heading', {
57
+ content: __( 'Code Is Poetry' ),
58
+ level: 4,
59
+ } ),
60
+ createBlock( 'core/heading', {
61
+ content: __( 'Code Is Poetry' ),
62
+ level: 5,
63
+ } ),
64
+ ],
65
+ };
66
+
67
+ const otherExamples = getBlockTypes()
68
+ .filter(
69
+ ( blockType ) =>
70
+ blockType.name !== 'core/heading' && !! blockType.example
71
+ )
72
+ .map( ( blockType ) => ( {
73
+ name: blockType.name,
74
+ title: blockType.title,
75
+ category: blockType.category,
76
+ blocks: getBlockFromExample( blockType.name, blockType.example ),
77
+ } ) );
78
+
79
+ return [ headingsExample, ...otherExamples ];
80
+ }
81
+
82
+ function StyleBook( { isSelected, onSelect, onClose } ) {
83
+ const [ resizeObserver, sizes ] = useResizeObserver();
84
+ const [ textColor ] = useStyle( 'color.text' );
85
+ const [ backgroundColor ] = useStyle( 'color.background' );
86
+ const examples = useMemo( getExamples, [] );
87
+ const tabs = useMemo(
88
+ () =>
89
+ getCategories()
90
+ .filter( ( category ) =>
91
+ examples.some(
92
+ ( example ) => example.category === category.slug
93
+ )
94
+ )
95
+ .map( ( category ) => ( {
96
+ name: category.slug,
97
+ title: category.title,
98
+ icon: category.icon,
99
+ } ) ),
100
+ [ examples ]
101
+ );
102
+ return (
103
+ <StyleBookFill>
104
+ <section
105
+ className={ classnames( 'edit-site-style-book', {
106
+ 'is-wide': sizes.width > 600,
107
+ } ) }
108
+ style={ {
109
+ color: textColor,
110
+ background: backgroundColor,
111
+ } }
112
+ aria-label={ __( 'Style Book' ) }
113
+ >
114
+ { resizeObserver }
115
+ <Button
116
+ className="edit-site-style-book__close-button"
117
+ icon={ closeSmall }
118
+ label={ __( 'Close Style Book' ) }
119
+ onClick={ onClose }
120
+ />
121
+ <TabPanel
122
+ className="edit-site-style-book__tab-panel"
123
+ tabs={ tabs }
124
+ >
125
+ { ( tab ) => (
126
+ <Examples
127
+ examples={ examples }
128
+ category={ tab.name }
129
+ isSelected={ isSelected }
130
+ onSelect={ onSelect }
131
+ />
132
+ ) }
133
+ </TabPanel>
134
+ </section>
135
+ </StyleBookFill>
136
+ );
137
+ }
138
+
139
+ const Examples = memo( ( { examples, category, isSelected, onSelect } ) => (
140
+ <div className="edit-site-style-book__examples">
141
+ { examples
142
+ .filter( ( example ) => example.category === category )
143
+ .map( ( example ) => (
144
+ <Example
145
+ key={ example.name }
146
+ title={ example.title }
147
+ blocks={ example.blocks }
148
+ isSelected={ isSelected( example.name ) }
149
+ onClick={ () => {
150
+ onSelect( example.name );
151
+ } }
152
+ />
153
+ ) ) }
154
+ </div>
155
+ ) );
156
+
157
+ const Example = memo( ( { title, blocks, isSelected, onClick } ) => (
158
+ <button
159
+ className={ classnames( 'edit-site-style-book__example', {
160
+ 'is-selected': isSelected,
161
+ } ) }
162
+ aria-label={ sprintf(
163
+ // translators: %s: Title of a block, e.g. Heading.
164
+ __( 'Open %s styles in Styles panel' ),
165
+ title
166
+ ) }
167
+ onClick={ onClick }
168
+ >
169
+ <span className="edit-site-style-book__example-title">{ title }</span>
170
+ <div className="edit-site-style-book__example-preview">
171
+ <BlockPreview
172
+ blocks={ blocks }
173
+ viewportWidth={ 0 }
174
+ __experimentalStyles={ [
175
+ {
176
+ css:
177
+ '.wp-block:first-child { margin-top: 0; }' +
178
+ '.wp-block:last-child { margin-bottom: 0; }',
179
+ },
180
+ ] }
181
+ />
182
+ </div>
183
+ </button>
184
+ ) );
185
+
186
+ function useHasStyleBook() {
187
+ const fills = useSlotFills( SLOT_FILL_NAME );
188
+ return !! fills?.length;
189
+ }
190
+
191
+ StyleBook.Slot = StyleBookSlot;
192
+ export default StyleBook;
193
+ export { useHasStyleBook };
@@ -0,0 +1,78 @@
1
+ .edit-site-style-book {
2
+ background: $white; // Fallback color, overriden by JavaScript.
3
+ border-radius: $radius-block-ui;
4
+ bottom: 0;
5
+ left: 0;
6
+ overflow: hidden;
7
+ position: absolute;
8
+ right: 0;
9
+ top: 0;
10
+ transition: all 0.3s; // Match .block-editor-iframe__body transition.
11
+ }
12
+
13
+ .edit-site-style-book__close-button {
14
+ position: absolute;
15
+ right: $grid-unit-10;
16
+ top: math.div($grid-unit-60 - $button-size, 2); // ( tab height - button size ) / 2
17
+ }
18
+
19
+ .edit-site-style-book__tab-panel {
20
+ .components-tab-panel__tabs {
21
+ background: $white;
22
+ color: $gray-900;
23
+ }
24
+
25
+ .components-tab-panel__tab-content {
26
+ bottom: 0;
27
+ left: 0;
28
+ overflow: auto;
29
+ padding: $grid-unit-40;
30
+ position: absolute;
31
+ right: 0;
32
+ top: $grid-unit-60; // Height of tabs.
33
+ }
34
+ }
35
+
36
+ .edit-site-style-book__examples {
37
+ max-width: 900px;
38
+ margin: 0 auto;
39
+ }
40
+
41
+ .edit-site-style-book__example {
42
+ background: none;
43
+ border-radius: $radius-block-ui;
44
+ border: none;
45
+ color: inherit;
46
+ cursor: pointer;
47
+ display: flex;
48
+ flex-direction: column;
49
+ gap: $grid-unit-50;
50
+ margin-bottom: $grid-unit-50;
51
+ padding: $grid-unit-20;
52
+ width: 100%;
53
+
54
+ &.is-selected {
55
+ box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
56
+ }
57
+
58
+ .edit-site-style-book.is-wide & {
59
+ flex-direction: row;
60
+ }
61
+ }
62
+
63
+ .edit-site-style-book__example-title {
64
+ font-size: 11px;
65
+ font-weight: 500;
66
+ margin: 0;
67
+ text-align: left;
68
+ text-transform: uppercase;
69
+
70
+ .edit-site-style-book.is-wide & {
71
+ text-align: right;
72
+ width: 120px;
73
+ }
74
+ }
75
+
76
+ .edit-site-style-book__example-preview {
77
+ width: 100%;
78
+ }
@@ -10,7 +10,7 @@ import { useDispatch } from '@wordpress/data';
10
10
  import { useLocation } from '../routes';
11
11
  import { store as editSiteStore } from '../../store';
12
12
 
13
- export default function URLQueryController() {
13
+ export default function useInitEditedEntityFromURL() {
14
14
  const { setTemplate, setTemplatePart, setPage } =
15
15
  useDispatch( editSiteStore );
16
16
  const {
@@ -19,6 +19,8 @@ export default function URLQueryController() {
19
19
 
20
20
  // Set correct entity on page navigation.
21
21
  useEffect( () => {
22
+ // This URL scheme mean we can't open a template part with the context of a given post.
23
+ // Potentially posts and pages could be moved to a "context" query string instead.
22
24
  if ( 'page' === postType || 'post' === postType ) {
23
25
  setPage( { context: { postType, postId } } ); // Resolves correct template based on ID.
24
26
  } else if ( 'wp_template' === postType ) {
@@ -27,6 +29,4 @@ export default function URLQueryController() {
27
29
  setTemplatePart( postId );
28
30
  }
29
31
  }, [ postId, postType ] );
30
-
31
- return null;
32
32
  }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __experimentalUseNavigator as useNavigator } from '@wordpress/components';
5
+ import { useEffect, useRef } from '@wordpress/element';
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ import { useLocation, useHistory } from '../routes';
11
+
12
+ export default function useSyncSidebarPathWithURL() {
13
+ const history = useHistory();
14
+ const { params } = useLocation();
15
+ const { sidebar = '/' } = params;
16
+ const { location, goTo } = useNavigator();
17
+ const currentSidebar = useRef( sidebar );
18
+ const currentNavigatorLocation = useRef( location.path );
19
+ useEffect( () => {
20
+ currentSidebar.current = sidebar;
21
+ if ( sidebar !== currentNavigatorLocation.current ) {
22
+ goTo( sidebar );
23
+ }
24
+ }, [ sidebar ] );
25
+ useEffect( () => {
26
+ currentNavigatorLocation.current = location.path;
27
+ if ( location.path !== currentSidebar.current ) {
28
+ history.push( {
29
+ ...params,
30
+ sidebar: location.path,
31
+ } );
32
+ }
33
+ }, [ location.path, history ] );
34
+
35
+ return sidebar;
36
+ }
@@ -20,6 +20,10 @@
20
20
  .edit-site-template-details__template-areas-item {
21
21
  position: relative;
22
22
 
23
+ .components-menu-items__item-icon {
24
+ color: var(--wp-block-synced-color);
25
+ }
26
+
23
27
  .edit-site-template-details__template-areas-item-more {
24
28
  position: absolute;
25
29
  right: 0;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useSelect } from '@wordpress/data';
5
+ import { store as coreStore } from '@wordpress/core-data';
6
+ import { store as editorStore } from '@wordpress/editor';
7
+ import { decodeEntities } from '@wordpress/html-entities';
8
+
9
+ /**
10
+ * Internal dependencies
11
+ */
12
+ import { store as editSiteStore } from '../../store';
13
+
14
+ export default function useEditedEntityRecord() {
15
+ const { record, title, isLoaded } = useSelect( ( select ) => {
16
+ const { getEditedPostType, getEditedPostId } = select( editSiteStore );
17
+ const { getEditedEntityRecord } = select( coreStore );
18
+ const { __experimentalGetTemplateInfo: getTemplateInfo } =
19
+ select( editorStore );
20
+ const postType = getEditedPostType();
21
+ const postId = getEditedPostId();
22
+ const _record = getEditedEntityRecord( 'postType', postType, postId );
23
+ const _isLoaded = !! postId;
24
+
25
+ return {
26
+ record: _record,
27
+ title: getTemplateInfo( _record ).title,
28
+ isLoaded: _isLoaded,
29
+ };
30
+ }, [] );
31
+
32
+ return {
33
+ isLoaded,
34
+ record,
35
+ getTitle: () => ( title ? decodeEntities( title ) : null ),
36
+ };
37
+ }
@@ -2,4 +2,5 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import './components';
5
+ import './push-changes-to-global-styles';
5
6
  import './template-part-edit';
@@ -0,0 +1,162 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { get, set } from 'lodash';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { addFilter } from '@wordpress/hooks';
10
+ import { createHigherOrderComponent } from '@wordpress/compose';
11
+ import {
12
+ InspectorAdvancedControls,
13
+ store as blockEditorStore,
14
+ } from '@wordpress/block-editor';
15
+ import { BaseControl, Button } from '@wordpress/components';
16
+ import { __, sprintf } from '@wordpress/i18n';
17
+ import {
18
+ __EXPERIMENTAL_STYLE_PROPERTY as STYLE_PROPERTY,
19
+ getBlockType,
20
+ } from '@wordpress/blocks';
21
+ import { useContext, useMemo, useCallback } from '@wordpress/element';
22
+ import { useDispatch } from '@wordpress/data';
23
+ import { store as noticesStore } from '@wordpress/notices';
24
+
25
+ /**
26
+ * Internal dependencies
27
+ */
28
+ import { getSupportedGlobalStylesPanels } from '../../components/global-styles/hooks';
29
+ import { GlobalStylesContext } from '../../components/global-styles/context';
30
+ import {
31
+ STYLE_PATH_TO_CSS_VAR_INFIX,
32
+ STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE,
33
+ } from '../../components/global-styles/utils';
34
+
35
+ function getChangesToPush( name, attributes ) {
36
+ return getSupportedGlobalStylesPanels( name ).flatMap( ( key ) => {
37
+ if ( ! STYLE_PROPERTY[ key ] ) {
38
+ return [];
39
+ }
40
+ const { value: path } = STYLE_PROPERTY[ key ];
41
+ const presetAttributeKey = path.join( '.' );
42
+ const presetAttributeValue =
43
+ attributes[
44
+ STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[ presetAttributeKey ]
45
+ ];
46
+ const value = presetAttributeValue
47
+ ? `var:preset|${ STYLE_PATH_TO_CSS_VAR_INFIX[ presetAttributeKey ] }|${ presetAttributeValue }`
48
+ : get( attributes.style, path );
49
+ return value ? [ { path, value } ] : [];
50
+ } );
51
+ }
52
+
53
+ function cloneDeep( object ) {
54
+ return ! object ? {} : JSON.parse( JSON.stringify( object ) );
55
+ }
56
+
57
+ function PushChangesToGlobalStylesControl( {
58
+ name,
59
+ attributes,
60
+ setAttributes,
61
+ } ) {
62
+ const changes = useMemo(
63
+ () => getChangesToPush( name, attributes ),
64
+ [ name, attributes ]
65
+ );
66
+
67
+ const { user: userConfig, setUserConfig } =
68
+ useContext( GlobalStylesContext );
69
+
70
+ const { __unstableMarkNextChangeAsNotPersistent } =
71
+ useDispatch( blockEditorStore );
72
+ const { createSuccessNotice } = useDispatch( noticesStore );
73
+
74
+ const pushChanges = useCallback( () => {
75
+ if ( changes.length === 0 ) {
76
+ return;
77
+ }
78
+
79
+ const { style: blockStyles } = attributes;
80
+
81
+ const newBlockStyles = cloneDeep( blockStyles );
82
+ const newUserConfig = cloneDeep( userConfig );
83
+
84
+ for ( const { path, value } of changes ) {
85
+ set( newBlockStyles, path, undefined );
86
+ set( newUserConfig, [ 'styles', 'blocks', name, ...path ], value );
87
+ }
88
+
89
+ // @wordpress/core-data doesn't support editing multiple entity types in
90
+ // a single undo level. So for now, we disable @wordpress/core-data undo
91
+ // tracking and implement our own Undo button in the snackbar
92
+ // notification.
93
+ __unstableMarkNextChangeAsNotPersistent();
94
+ setAttributes( { style: newBlockStyles } );
95
+ setUserConfig( () => newUserConfig, { undoIgnore: true } );
96
+
97
+ createSuccessNotice(
98
+ sprintf(
99
+ // translators: %s: Title of the block e.g. 'Heading'.
100
+ __( 'Pushed styles to all %s blocks.' ),
101
+ getBlockType( name ).title
102
+ ),
103
+ {
104
+ type: 'snackbar',
105
+ actions: [
106
+ {
107
+ label: __( 'Undo' ),
108
+ onClick() {
109
+ __unstableMarkNextChangeAsNotPersistent();
110
+ setAttributes( { style: blockStyles } );
111
+ setUserConfig( () => userConfig, {
112
+ undoIgnore: true,
113
+ } );
114
+ },
115
+ },
116
+ ],
117
+ }
118
+ );
119
+ }, [ changes, attributes, userConfig, name ] );
120
+
121
+ return (
122
+ <BaseControl
123
+ className="edit-site-push-changes-to-global-styles-control"
124
+ help={ sprintf(
125
+ // translators: %s: Title of the block e.g. 'Heading'.
126
+ __(
127
+ 'Move this block’s typography, spacing, dimensions, and color styles to all %s blocks.'
128
+ ),
129
+ getBlockType( name ).title
130
+ ) }
131
+ >
132
+ <BaseControl.VisualLabel>
133
+ { __( 'Styles' ) }
134
+ </BaseControl.VisualLabel>
135
+ <Button
136
+ variant="primary"
137
+ disabled={ changes.length === 0 }
138
+ onClick={ pushChanges }
139
+ >
140
+ { __( 'Push changes to Global Styles' ) }
141
+ </Button>
142
+ </BaseControl>
143
+ );
144
+ }
145
+
146
+ const withPushChangesToGlobalStyles = createHigherOrderComponent(
147
+ ( BlockEdit ) => ( props ) =>
148
+ (
149
+ <>
150
+ <BlockEdit { ...props } />
151
+ <InspectorAdvancedControls>
152
+ <PushChangesToGlobalStylesControl { ...props } />
153
+ </InspectorAdvancedControls>
154
+ </>
155
+ )
156
+ );
157
+
158
+ addFilter(
159
+ 'editor.BlockEdit',
160
+ 'core/edit-site/push-changes-to-global-styles',
161
+ withPushChangesToGlobalStyles
162
+ );
@@ -0,0 +1,4 @@
1
+ .edit-site-push-changes-to-global-styles-control .components-button {
2
+ justify-content: center;
3
+ width: 100%;
4
+ }
package/src/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  registerCoreBlocks,
7
7
  __experimentalRegisterExperimentalCoreBlocks,
8
8
  } from '@wordpress/block-library';
9
- import { dispatch, select } from '@wordpress/data';
9
+ import { dispatch } from '@wordpress/data';
10
10
  import { render, unmountComponentAtNode } from '@wordpress/element';
11
11
  import {
12
12
  __experimentalFetchLinkSuggestions as fetchLinkSuggestions,
@@ -15,19 +15,15 @@ import {
15
15
  import { store as editorStore } from '@wordpress/editor';
16
16
  import { store as interfaceStore } from '@wordpress/interface';
17
17
  import { store as preferencesStore } from '@wordpress/preferences';
18
- import { __ } from '@wordpress/i18n';
19
- import { store as viewportStore } from '@wordpress/viewport';
20
- import { getQueryArgs } from '@wordpress/url';
21
18
  import { addFilter } from '@wordpress/hooks';
19
+ import { registerLegacyWidgetBlock } from '@wordpress/widgets';
22
20
 
23
21
  /**
24
22
  * Internal dependencies
25
23
  */
26
24
  import './hooks';
27
25
  import { store as editSiteStore } from './store';
28
- import EditSiteApp from './components/app';
29
- import getIsListPage from './utils/get-is-list-page';
30
- import ErrorBoundaryWarning from './components/error-boundary/warning';
26
+ import App from './components/app';
31
27
 
32
28
  /**
33
29
  * Reinitializes the editor after the user chooses to reboot the editor after
@@ -38,22 +34,6 @@ import ErrorBoundaryWarning from './components/error-boundary/warning';
38
34
  * @param {?Object} settings Editor settings object.
39
35
  */
40
36
  export function reinitializeEditor( target, settings ) {
41
- // Display warning if editor wasn't able to resolve homepage template.
42
- if ( ! settings.__unstableHomeTemplate ) {
43
- render(
44
- <ErrorBoundaryWarning
45
- message={ __(
46
- 'The editor is unable to find a block template for the homepage.'
47
- ) }
48
- dashboardLink={
49
- settings.__experimentalDashboardLink ?? 'index.php'
50
- }
51
- />,
52
- target
53
- );
54
- return;
55
- }
56
-
57
37
  /*
58
38
  * Prevent adding the Clasic block in the site editor.
59
39
  * Only add the filter when the site editor is initialized, not imported.
@@ -91,16 +71,6 @@ export function reinitializeEditor( target, settings ) {
91
71
  showListViewByDefault: false,
92
72
  } );
93
73
 
94
- // Check if the block list view should be open by default.
95
- if (
96
- select( preferencesStore ).get(
97
- 'core/edit-site',
98
- 'showListViewByDefault'
99
- )
100
- ) {
101
- dispatch( editSiteStore ).setIsListViewOpened( true );
102
- }
103
-
104
74
  dispatch( interfaceStore ).setDefaultComplementaryArea(
105
75
  'core/edit-site',
106
76
  'edit-site/template'
@@ -116,31 +86,13 @@ export function reinitializeEditor( target, settings ) {
116
86
  defaultTemplateTypes: settings.defaultTemplateTypes,
117
87
  defaultTemplatePartAreas: settings.defaultTemplatePartAreas,
118
88
  } );
119
-
120
- const isLandingOnListPage = getIsListPage(
121
- getQueryArgs( window.location.href )
122
- );
123
-
124
- if ( isLandingOnListPage ) {
125
- // Default the navigation panel to be opened when we're in a bigger
126
- // screen and land in the list screen.
127
- dispatch( editSiteStore ).setIsNavigationPanelOpened(
128
- select( viewportStore ).isViewportMatch( 'medium' )
129
- );
130
- }
131
89
  }
132
90
 
133
91
  // Prevent the default browser action for files dropped outside of dropzones.
134
92
  window.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );
135
93
  window.addEventListener( 'drop', ( e ) => e.preventDefault(), false );
136
94
 
137
- render(
138
- <EditSiteApp
139
- reboot={ reboot }
140
- homeTemplate={ settings.__unstableHomeTemplate }
141
- />,
142
- target
143
- );
95
+ render( <App reboot={ reboot } />, target );
144
96
  }
145
97
 
146
98
  /**
@@ -158,6 +110,7 @@ export function initializeEditor( id, settings ) {
158
110
 
159
111
  dispatch( blocksStore ).__experimentalReapplyBlockTypeFilters();
160
112
  registerCoreBlocks();
113
+ registerLegacyWidgetBlock( { inserter: false } );
161
114
  if ( process.env.IS_GUTENBERG_PLUGIN ) {
162
115
  __experimentalRegisterExperimentalCoreBlocks( {
163
116
  enableFSEBlocks: true,
@@ -167,7 +120,6 @@ export function initializeEditor( id, settings ) {
167
120
  reinitializeEditor( target, settings );
168
121
  }
169
122
 
170
- export { default as __experimentalNavigationToggle } from './components/navigation-sidebar/navigation-toggle';
171
123
  export { default as PluginSidebar } from './components/sidebar-edit-mode/plugin-sidebar';
172
124
  export { default as PluginSidebarMoreMenuItem } from './components/header-edit-mode/plugin-sidebar-more-menu-item';
173
125
  export { default as PluginMoreMenuItem } from './components/header-edit-mode/plugin-more-menu-item';