@wordpress/edit-site 5.3.2 → 5.3.3

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 (287) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/build/components/add-new-template/new-template-part.js +8 -5
  3. package/build/components/add-new-template/new-template-part.js.map +1 -1
  4. package/build/components/add-new-template/new-template.js +8 -5
  5. package/build/components/add-new-template/new-template.js.map +1 -1
  6. package/build/components/block-editor/editor-canvas.js +3 -3
  7. package/build/components/block-editor/editor-canvas.js.map +1 -1
  8. package/build/components/block-editor/index.js +3 -3
  9. package/build/components/block-editor/index.js.map +1 -1
  10. package/build/components/editor/index.js +25 -23
  11. package/build/components/editor/index.js.map +1 -1
  12. package/build/components/global-styles/border-panel.js +2 -2
  13. package/build/components/global-styles/border-panel.js.map +1 -1
  14. package/build/components/global-styles/color-palette-panel.js +2 -2
  15. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  16. package/build/components/global-styles/custom-css.js +2 -2
  17. package/build/components/global-styles/custom-css.js.map +1 -1
  18. package/build/components/global-styles/dimensions-panel.js +2 -2
  19. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  20. package/build/components/global-styles/global-styles-provider.js +2 -2
  21. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  22. package/build/components/global-styles/gradients-palette-panel.js +2 -2
  23. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  24. package/build/components/global-styles/header.js +1 -1
  25. package/build/components/global-styles/header.js.map +1 -1
  26. package/build/components/global-styles/hooks.js +2 -2
  27. package/build/components/global-styles/hooks.js.map +1 -1
  28. package/build/components/global-styles/navigation-button.js +1 -1
  29. package/build/components/global-styles/navigation-button.js.map +1 -1
  30. package/build/components/global-styles/palette.js +2 -2
  31. package/build/components/global-styles/palette.js.map +1 -1
  32. package/build/components/global-styles/preview.js +2 -2
  33. package/build/components/global-styles/preview.js.map +1 -1
  34. package/build/components/global-styles/screen-background-color.js +2 -2
  35. package/build/components/global-styles/screen-background-color.js.map +1 -1
  36. package/build/components/global-styles/screen-button-color.js +2 -2
  37. package/build/components/global-styles/screen-button-color.js.map +1 -1
  38. package/build/components/global-styles/screen-colors.js +2 -2
  39. package/build/components/global-styles/screen-colors.js.map +1 -1
  40. package/build/components/global-styles/screen-css.js +5 -5
  41. package/build/components/global-styles/screen-css.js.map +1 -1
  42. package/build/components/global-styles/screen-heading-color.js +2 -2
  43. package/build/components/global-styles/screen-heading-color.js.map +1 -1
  44. package/build/components/global-styles/screen-link-color.js +2 -2
  45. package/build/components/global-styles/screen-link-color.js.map +1 -1
  46. package/build/components/global-styles/screen-root.js +2 -2
  47. package/build/components/global-styles/screen-root.js.map +1 -1
  48. package/build/components/global-styles/screen-style-variations.js +2 -2
  49. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  50. package/build/components/global-styles/screen-text-color.js +2 -2
  51. package/build/components/global-styles/screen-text-color.js.map +1 -1
  52. package/build/components/global-styles/screen-typography.js +2 -2
  53. package/build/components/global-styles/screen-typography.js.map +1 -1
  54. package/build/components/global-styles/shadow-panel.js +2 -2
  55. package/build/components/global-styles/shadow-panel.js.map +1 -1
  56. package/build/components/global-styles/typography-panel.js +2 -2
  57. package/build/components/global-styles/typography-panel.js.map +1 -1
  58. package/build/components/global-styles/typography-preview.js +2 -2
  59. package/build/components/global-styles/typography-preview.js.map +1 -1
  60. package/build/components/global-styles/ui.js +3 -10
  61. package/build/components/global-styles/ui.js.map +1 -1
  62. package/build/components/global-styles-renderer/index.js +2 -2
  63. package/build/components/global-styles-renderer/index.js.map +1 -1
  64. package/build/components/header-edit-mode/index.js +6 -3
  65. package/build/components/header-edit-mode/index.js.map +1 -1
  66. package/build/components/keyboard-shortcut-help-modal/config.js +1 -1
  67. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  68. package/build/components/layout/index.js +10 -23
  69. package/build/components/layout/index.js.map +1 -1
  70. package/build/components/list/actions/rename-menu-item.js +1 -1
  71. package/build/components/list/actions/rename-menu-item.js.map +1 -1
  72. package/build/components/list/table.js +1 -0
  73. package/build/components/list/table.js.map +1 -1
  74. package/build/components/navigation-inspector/navigation-menu.js +2 -2
  75. package/build/components/navigation-inspector/navigation-menu.js.map +1 -1
  76. package/build/components/save-panel/index.js +4 -3
  77. package/build/components/save-panel/index.js.map +1 -1
  78. package/build/components/sidebar/index.js +17 -3
  79. package/build/components/sidebar/index.js.map +1 -1
  80. package/build/components/sidebar-navigation-screen/index.js +28 -7
  81. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  82. package/build/components/sidebar-navigation-screen-navigation-item/index.js +72 -0
  83. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -0
  84. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +2 -2
  85. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  86. package/build/components/sidebar-navigation-screen-template/index.js +70 -0
  87. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -0
  88. package/build/components/sidebar-navigation-screen-templates/index.js +32 -82
  89. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  90. package/build/components/sidebar-navigation-screen-templates-browse/index.js +43 -0
  91. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -0
  92. package/build/components/site-hub/index.js +14 -49
  93. package/build/components/site-hub/index.js.map +1 -1
  94. package/build/components/style-book/index.js +10 -3
  95. package/build/components/style-book/index.js.map +1 -1
  96. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +55 -20
  97. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  98. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +3 -3
  99. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  100. package/build/components/sync-state-with-url/{use-sync-sidebar-path-with-url.js → use-sync-path-with-url.js} +12 -12
  101. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -0
  102. package/build/components/use-edited-entity-record/index.js +6 -2
  103. package/build/components/use-edited-entity-record/index.js.map +1 -1
  104. package/build/hooks/push-changes-to-global-styles/index.js +2 -2
  105. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  106. package/build/{experiments.js → private-apis.js} +3 -3
  107. package/build/private-apis.js.map +1 -0
  108. package/build/store/index.js +3 -3
  109. package/build/store/index.js.map +1 -1
  110. package/build/utils/get-is-list-page.js +5 -6
  111. package/build/utils/get-is-list-page.js.map +1 -1
  112. package/build-module/components/add-new-template/new-template-part.js +7 -4
  113. package/build-module/components/add-new-template/new-template-part.js.map +1 -1
  114. package/build-module/components/add-new-template/new-template.js +7 -4
  115. package/build-module/components/add-new-template/new-template.js.map +1 -1
  116. package/build-module/components/block-editor/editor-canvas.js +1 -1
  117. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  118. package/build-module/components/block-editor/index.js +3 -3
  119. package/build-module/components/block-editor/index.js.map +1 -1
  120. package/build-module/components/editor/index.js +25 -24
  121. package/build-module/components/editor/index.js.map +1 -1
  122. package/build-module/components/global-styles/border-panel.js +3 -3
  123. package/build-module/components/global-styles/border-panel.js.map +1 -1
  124. package/build-module/components/global-styles/color-palette-panel.js +3 -3
  125. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  126. package/build-module/components/global-styles/custom-css.js +3 -3
  127. package/build-module/components/global-styles/custom-css.js.map +1 -1
  128. package/build-module/components/global-styles/dimensions-panel.js +3 -3
  129. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  130. package/build-module/components/global-styles/global-styles-provider.js +3 -3
  131. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  132. package/build-module/components/global-styles/gradients-palette-panel.js +3 -3
  133. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  134. package/build-module/components/global-styles/header.js +2 -2
  135. package/build-module/components/global-styles/header.js.map +1 -1
  136. package/build-module/components/global-styles/hooks.js +3 -3
  137. package/build-module/components/global-styles/hooks.js.map +1 -1
  138. package/build-module/components/global-styles/navigation-button.js +2 -2
  139. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  140. package/build-module/components/global-styles/palette.js +3 -3
  141. package/build-module/components/global-styles/palette.js.map +1 -1
  142. package/build-module/components/global-styles/preview.js +3 -3
  143. package/build-module/components/global-styles/preview.js.map +1 -1
  144. package/build-module/components/global-styles/screen-background-color.js +3 -3
  145. package/build-module/components/global-styles/screen-background-color.js.map +1 -1
  146. package/build-module/components/global-styles/screen-button-color.js +3 -3
  147. package/build-module/components/global-styles/screen-button-color.js.map +1 -1
  148. package/build-module/components/global-styles/screen-colors.js +3 -3
  149. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  150. package/build-module/components/global-styles/screen-css.js +5 -5
  151. package/build-module/components/global-styles/screen-css.js.map +1 -1
  152. package/build-module/components/global-styles/screen-heading-color.js +3 -3
  153. package/build-module/components/global-styles/screen-heading-color.js.map +1 -1
  154. package/build-module/components/global-styles/screen-link-color.js +3 -3
  155. package/build-module/components/global-styles/screen-link-color.js.map +1 -1
  156. package/build-module/components/global-styles/screen-root.js +3 -3
  157. package/build-module/components/global-styles/screen-root.js.map +1 -1
  158. package/build-module/components/global-styles/screen-style-variations.js +3 -3
  159. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  160. package/build-module/components/global-styles/screen-text-color.js +3 -3
  161. package/build-module/components/global-styles/screen-text-color.js.map +1 -1
  162. package/build-module/components/global-styles/screen-typography.js +3 -3
  163. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  164. package/build-module/components/global-styles/shadow-panel.js +3 -3
  165. package/build-module/components/global-styles/shadow-panel.js.map +1 -1
  166. package/build-module/components/global-styles/typography-panel.js +3 -3
  167. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  168. package/build-module/components/global-styles/typography-preview.js +3 -3
  169. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  170. package/build-module/components/global-styles/ui.js +4 -11
  171. package/build-module/components/global-styles/ui.js.map +1 -1
  172. package/build-module/components/global-styles-renderer/index.js +3 -3
  173. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  174. package/build-module/components/header-edit-mode/index.js +6 -3
  175. package/build-module/components/header-edit-mode/index.js.map +1 -1
  176. package/build-module/components/keyboard-shortcut-help-modal/config.js +1 -1
  177. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  178. package/build-module/components/layout/index.js +10 -23
  179. package/build-module/components/layout/index.js.map +1 -1
  180. package/build-module/components/list/actions/rename-menu-item.js +1 -1
  181. package/build-module/components/list/actions/rename-menu-item.js.map +1 -1
  182. package/build-module/components/list/table.js +1 -0
  183. package/build-module/components/list/table.js.map +1 -1
  184. package/build-module/components/navigation-inspector/navigation-menu.js +3 -3
  185. package/build-module/components/navigation-inspector/navigation-menu.js.map +1 -1
  186. package/build-module/components/save-panel/index.js +3 -2
  187. package/build-module/components/save-panel/index.js.map +1 -1
  188. package/build-module/components/sidebar/index.js +14 -3
  189. package/build-module/components/sidebar/index.js.map +1 -1
  190. package/build-module/components/sidebar-navigation-screen/index.js +27 -9
  191. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  192. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +55 -0
  193. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -0
  194. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +2 -2
  195. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  196. package/build-module/components/sidebar-navigation-screen-template/index.js +53 -0
  197. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -0
  198. package/build-module/components/sidebar-navigation-screen-templates/index.js +34 -81
  199. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  200. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +31 -0
  201. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -0
  202. package/build-module/components/site-hub/index.js +14 -46
  203. package/build-module/components/site-hub/index.js.map +1 -1
  204. package/build-module/components/style-book/index.js +11 -4
  205. package/build-module/components/style-book/index.js.map +1 -1
  206. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +55 -21
  207. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  208. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  209. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  210. package/build-module/components/sync-state-with-url/{use-sync-sidebar-path-with-url.js → use-sync-path-with-url.js} +11 -11
  211. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -0
  212. package/build-module/components/use-edited-entity-record/index.js +6 -2
  213. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  214. package/build-module/hooks/push-changes-to-global-styles/index.js +3 -3
  215. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  216. package/build-module/{experiments.js → private-apis.js} +2 -2
  217. package/build-module/private-apis.js.map +1 -0
  218. package/build-module/store/index.js +1 -1
  219. package/build-module/store/index.js.map +1 -1
  220. package/build-module/utils/get-is-list-page.js +5 -6
  221. package/build-module/utils/get-is-list-page.js.map +1 -1
  222. package/build-style/style-rtl.css +18 -37
  223. package/build-style/style.css +18 -37
  224. package/package.json +20 -20
  225. package/src/components/add-new-template/new-template-part.js +7 -4
  226. package/src/components/add-new-template/new-template.js +8 -6
  227. package/src/components/block-editor/editor-canvas.js +1 -1
  228. package/src/components/block-editor/index.js +3 -3
  229. package/src/components/editor/index.js +29 -28
  230. package/src/components/global-styles/border-panel.js +3 -3
  231. package/src/components/global-styles/color-palette-panel.js +3 -3
  232. package/src/components/global-styles/custom-css.js +3 -3
  233. package/src/components/global-styles/dimensions-panel.js +3 -3
  234. package/src/components/global-styles/global-styles-provider.js +3 -3
  235. package/src/components/global-styles/gradients-palette-panel.js +3 -3
  236. package/src/components/global-styles/header.js +2 -2
  237. package/src/components/global-styles/hooks.js +3 -3
  238. package/src/components/global-styles/navigation-button.js +4 -2
  239. package/src/components/global-styles/palette.js +3 -3
  240. package/src/components/global-styles/preview.js +3 -3
  241. package/src/components/global-styles/screen-background-color.js +3 -3
  242. package/src/components/global-styles/screen-button-color.js +3 -3
  243. package/src/components/global-styles/screen-colors.js +3 -3
  244. package/src/components/global-styles/screen-css.js +14 -7
  245. package/src/components/global-styles/screen-heading-color.js +3 -3
  246. package/src/components/global-styles/screen-link-color.js +3 -3
  247. package/src/components/global-styles/screen-root.js +3 -3
  248. package/src/components/global-styles/screen-style-variations.js +3 -3
  249. package/src/components/global-styles/screen-text-color.js +3 -3
  250. package/src/components/global-styles/screen-typography.js +3 -3
  251. package/src/components/global-styles/shadow-panel.js +3 -3
  252. package/src/components/global-styles/style.scss +2 -1
  253. package/src/components/global-styles/typography-panel.js +3 -3
  254. package/src/components/global-styles/typography-preview.js +3 -3
  255. package/src/components/global-styles/ui.js +3 -8
  256. package/src/components/global-styles-renderer/index.js +3 -3
  257. package/src/components/header-edit-mode/index.js +6 -3
  258. package/src/components/keyboard-shortcut-help-modal/config.js +1 -1
  259. package/src/components/layout/index.js +35 -48
  260. package/src/components/layout/style.scss +11 -23
  261. package/src/components/list/actions/rename-menu-item.js +1 -1
  262. package/src/components/list/table.js +4 -0
  263. package/src/components/navigation-inspector/navigation-menu.js +3 -3
  264. package/src/components/save-panel/index.js +4 -1
  265. package/src/components/sidebar/index.js +10 -2
  266. package/src/components/sidebar-navigation-screen/index.js +27 -11
  267. package/src/components/sidebar-navigation-screen/style.scss +4 -6
  268. package/src/components/sidebar-navigation-screen-navigation-item/index.js +52 -0
  269. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  270. package/src/components/sidebar-navigation-screen-template/index.js +52 -0
  271. package/src/components/sidebar-navigation-screen-templates/index.js +49 -83
  272. package/src/components/sidebar-navigation-screen-templates-browse/index.js +31 -0
  273. package/src/components/site-hub/index.js +67 -122
  274. package/src/components/site-hub/style.scss +1 -11
  275. package/src/components/style-book/index.js +11 -7
  276. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +48 -14
  277. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  278. package/src/components/sync-state-with-url/{use-sync-sidebar-path-with-url.js → use-sync-path-with-url.js} +10 -10
  279. package/src/components/use-edited-entity-record/index.js +6 -2
  280. package/src/hooks/push-changes-to-global-styles/index.js +3 -3
  281. package/src/{experiments.js → private-apis.js} +1 -1
  282. package/src/store/index.js +1 -1
  283. package/src/utils/get-is-list-page.js +5 -5
  284. package/build/components/sync-state-with-url/use-sync-sidebar-path-with-url.js.map +0 -1
  285. package/build/experiments.js.map +0 -1
  286. package/build-module/components/sync-state-with-url/use-sync-sidebar-path-with-url.js.map +0 -1
  287. package/build-module/experiments.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';
4
+ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';
5
5
  export const {
6
6
  lock,
7
7
  unlock
8
8
  } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/edit-site');
9
- //# sourceMappingURL=experiments.js.map
9
+ //# sourceMappingURL=private-apis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/edit-site/src/private-apis.js"],"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAT,QAAiE,yBAAjE;AAEA,OAAO,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IACZF,gDAAgD,CAC/C,8GAD+C,EAE/C,sBAF+C,CAD1C","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 plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/edit-site'\n\t);\n"]}
@@ -12,7 +12,7 @@ import * as privateActions from './private-actions';
12
12
  import * as selectors from './selectors';
13
13
  import * as privateSelectors from './private-selectors';
14
14
  import { STORE_NAME } from './constants';
15
- import { unlock } from '../experiments';
15
+ import { unlock } from '../private-apis';
16
16
  export const storeConfig = {
17
17
  reducer,
18
18
  actions,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/store/index.js"],"names":["createReduxStore","register","reducer","actions","privateActions","selectors","privateSelectors","STORE_NAME","unlock","storeConfig","store","registerPrivateSelectors","registerPrivateActions"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,QAA3B,QAA2C,iBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAO,KAAKC,cAAZ,MAAgC,mBAAhC;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,OAAO,KAAKC,gBAAZ,MAAkC,qBAAlC;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,SAASC,MAAT,QAAuB,gBAAvB;AAEA,OAAO,MAAMC,WAAW,GAAG;AAC1BP,EAAAA,OAD0B;AAE1BC,EAAAA,OAF0B;AAG1BE,EAAAA;AAH0B,CAApB;AAMP,OAAO,MAAMK,KAAK,GAAGV,gBAAgB,CAAEO,UAAF,EAAcE,WAAd,CAA9B;AACPR,QAAQ,CAAES,KAAF,CAAR;AACAF,MAAM,CAAEE,KAAF,CAAN,CAAgBC,wBAAhB,CAA0CL,gBAA1C;AACAE,MAAM,CAAEE,KAAF,CAAN,CAAgBE,sBAAhB,CAAwCR,cAAxC","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 '../experiments';\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"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/store/index.js"],"names":["createReduxStore","register","reducer","actions","privateActions","selectors","privateSelectors","STORE_NAME","unlock","storeConfig","store","registerPrivateSelectors","registerPrivateActions"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,QAA3B,QAA2C,iBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAO,KAAKC,cAAZ,MAAgC,mBAAhC;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,OAAO,KAAKC,gBAAZ,MAAkC,qBAAlC;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,SAASC,MAAT,QAAuB,iBAAvB;AAEA,OAAO,MAAMC,WAAW,GAAG;AAC1BP,EAAAA,OAD0B;AAE1BC,EAAAA,OAF0B;AAG1BE,EAAAA;AAH0B,CAApB;AAMP,OAAO,MAAMK,KAAK,GAAGV,gBAAgB,CAAEO,UAAF,EAAcE,WAAd,CAA9B;AACPR,QAAQ,CAAES,KAAF,CAAR;AACAF,MAAM,CAAEE,KAAF,CAAN,CAAgBC,wBAAhB,CAA0CL,gBAA1C;AACAE,MAAM,CAAEE,KAAF,CAAN,CAAgBE,sBAAhB,CAAwCR,cAAxC","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 '../private-apis';\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"]}
@@ -1,16 +1,15 @@
1
1
  /**
2
2
  * Returns if the params match the list page route.
3
3
  *
4
- * @param {Object} params The search params.
5
- * @param {string} params.postId The post ID.
6
- * @param {string} params.postType The post type.
4
+ * @param {Object} params The url params.
5
+ * @param {string} params.path The current path.
6
+ *
7
7
  * @return {boolean} Is list page or not.
8
8
  */
9
9
  export default function getIsListPage(_ref) {
10
10
  let {
11
- postId,
12
- postType
11
+ path
13
12
  } = _ref;
14
- return !!(!postId && postType);
13
+ return path === '/templates/all' || path === '/template-parts/all';
15
14
  }
16
15
  //# sourceMappingURL=get-is-list-page.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-site/src/utils/get-is-list-page.js"],"names":["getIsListPage","postId","postType"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,aAAT,OAA+C;AAAA,MAAvB;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAuB;AAC7D,SAAO,CAAC,EAAI,CAAED,MAAF,IAAYC,QAAhB,CAAR;AACA","sourcesContent":["/**\n * Returns if the params match the list page route.\n *\n * @param {Object} params The search params.\n * @param {string} params.postId The post ID.\n * @param {string} params.postType The post type.\n * @return {boolean} Is list page or not.\n */\nexport default function getIsListPage( { postId, postType } ) {\n\treturn !! ( ! postId && postType );\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-site/src/utils/get-is-list-page.js"],"names":["getIsListPage","path"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,aAAT,OAAmC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACjD,SAAOA,IAAI,KAAK,gBAAT,IAA6BA,IAAI,KAAK,qBAA7C;AACA","sourcesContent":["/**\n * Returns if the params match the list page route.\n *\n * @param {Object} params The url params.\n * @param {string} params.path The current path.\n *\n * @return {boolean} Is list page or not.\n */\nexport default function getIsListPage( { path } ) {\n\treturn path === '/templates/all' || path === '/template-parts/all';\n}\n"]}
@@ -1114,7 +1114,8 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
1114
1114
  }
1115
1115
 
1116
1116
  .edit-site-global-styles-screen-css-help-link {
1117
- padding-right: 16px;
1117
+ display: block;
1118
+ margin-top: 8px;
1118
1119
  }
1119
1120
 
1120
1121
  .edit-site-global-styles-screen-variations {
@@ -2145,23 +2146,23 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2145
2146
 
2146
2147
  .edit-site-layout__hub {
2147
2148
  position: fixed;
2148
- top: 24px;
2149
- right: 24px;
2149
+ top: 0;
2150
+ right: 0;
2150
2151
  width: calc(100vw - 48px);
2151
- height: 68px;
2152
+ height: 60px;
2152
2153
  z-index: 3;
2153
- background: #000;
2154
- padding: 16px;
2155
- padding-right: 0;
2156
- border-radius: 8px;
2157
- box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.15), 0 2.7px 3.8px -0.2px rgba(0, 0, 0, 0.15), 0 5.5px 7.8px -0.3px rgba(0, 0, 0, 0.15), -0.1px 11.5px 16.4px -0.5px rgba(0, 0, 0, 0.15);
2154
+ }
2155
+ .edit-site-layout.is-full-canvas.is-edit-mode .edit-site-layout__hub {
2156
+ width: auto;
2157
+ padding-left: 0;
2158
+ }
2159
+ @media (min-width: 782px) {
2160
+ .edit-site-layout__hub {
2161
+ width: calc(360px - 48px);
2162
+ }
2158
2163
  }
2159
2164
  .edit-site-layout.is-full-canvas .edit-site-layout__hub {
2160
- top: 0;
2161
- right: 0;
2162
- padding: 0;
2163
2165
  padding-left: 16px;
2164
- height: 60px;
2165
2166
  border-radius: 0;
2166
2167
  width: 100vw;
2167
2168
  box-shadow: none;
@@ -2172,15 +2173,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2172
2173
  padding-left: 0;
2173
2174
  }
2174
2175
  }
2175
- .edit-site-layout.is-full-canvas.is-edit-mode .edit-site-layout__hub {
2176
- width: auto;
2177
- padding-left: 0;
2178
- }
2179
- @media (min-width: 782px) {
2180
- .edit-site-layout__hub {
2181
- width: calc(360px - 48px);
2182
- }
2183
- }
2184
2176
 
2185
2177
  .edit-site-layout__header {
2186
2178
  height: 60px;
@@ -2430,13 +2422,14 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2430
2422
 
2431
2423
  .edit-site-sidebar-navigation-screen__content {
2432
2424
  margin: 0 36px 16px 16px;
2425
+ color: #949494;
2433
2426
  }
2434
2427
 
2435
2428
  .edit-site-sidebar-navigation-screen__title-icon {
2436
2429
  position: sticky;
2437
2430
  top: 0;
2438
2431
  background: #1e1e1e;
2439
- padding-top: 164px;
2432
+ padding-top: 108px;
2440
2433
  box-shadow: 0 8px 16px #1e1e1e;
2441
2434
  margin-bottom: 8px;
2442
2435
  padding-bottom: 8px;
@@ -2454,14 +2447,10 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2454
2447
  .edit-site-sidebar-navigation-screen__back {
2455
2448
  color: #e0e0e0;
2456
2449
  }
2457
- .edit-site-sidebar-navigation-screen__back:hover {
2450
+ .edit-site-sidebar-navigation-screen__back:hover, .edit-site-sidebar-navigation-screen__back:not([aria-disabled=true]):active {
2458
2451
  color: #fff;
2459
2452
  }
2460
2453
 
2461
- .edit-site-sidebar-navigation-screen__icon-placeholder {
2462
- width: 36px;
2463
- }
2464
-
2465
2454
  .edit-site-sidebar-navigation-screen-templates__see-all {
2466
2455
  /* Overrides the margin that comes from the Item component */
2467
2456
  margin-top: 16px !important;
@@ -2479,11 +2468,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2479
2468
  gap: 8px;
2480
2469
  }
2481
2470
 
2482
- .edit-site-site-hub__edit-button {
2483
- height: 32px;
2484
- color: #fff;
2485
- }
2486
-
2487
2471
  .edit-site-site-hub__post-type {
2488
2472
  opacity: 0.6;
2489
2473
  }
@@ -2492,10 +2476,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2492
2476
  height: 60px;
2493
2477
  width: 64px;
2494
2478
  flex-shrink: 0;
2495
- }
2496
-
2497
- .edit-site-layout.is-edit-mode .edit-site-site-hub__view-mode-toggle-container {
2498
- width: 60px;
2479
+ background: #1e1e1e;
2499
2480
  }
2500
2481
 
2501
2482
  .edit-site-site-hub__text-content {
@@ -1114,7 +1114,8 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
1114
1114
  }
1115
1115
 
1116
1116
  .edit-site-global-styles-screen-css-help-link {
1117
- padding-left: 16px;
1117
+ display: block;
1118
+ margin-top: 8px;
1118
1119
  }
1119
1120
 
1120
1121
  .edit-site-global-styles-screen-variations {
@@ -2145,23 +2146,23 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2145
2146
 
2146
2147
  .edit-site-layout__hub {
2147
2148
  position: fixed;
2148
- top: 24px;
2149
- left: 24px;
2149
+ top: 0;
2150
+ left: 0;
2150
2151
  width: calc(100vw - 48px);
2151
- height: 68px;
2152
+ height: 60px;
2152
2153
  z-index: 3;
2153
- background: #000;
2154
- padding: 16px;
2155
- padding-left: 0;
2156
- border-radius: 8px;
2157
- box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.15), 0 2.7px 3.8px -0.2px rgba(0, 0, 0, 0.15), 0 5.5px 7.8px -0.3px rgba(0, 0, 0, 0.15), 0.1px 11.5px 16.4px -0.5px rgba(0, 0, 0, 0.15);
2154
+ }
2155
+ .edit-site-layout.is-full-canvas.is-edit-mode .edit-site-layout__hub {
2156
+ width: auto;
2157
+ padding-right: 0;
2158
+ }
2159
+ @media (min-width: 782px) {
2160
+ .edit-site-layout__hub {
2161
+ width: calc(360px - 48px);
2162
+ }
2158
2163
  }
2159
2164
  .edit-site-layout.is-full-canvas .edit-site-layout__hub {
2160
- top: 0;
2161
- left: 0;
2162
- padding: 0;
2163
2165
  padding-right: 16px;
2164
- height: 60px;
2165
2166
  border-radius: 0;
2166
2167
  width: 100vw;
2167
2168
  box-shadow: none;
@@ -2172,15 +2173,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2172
2173
  padding-right: 0;
2173
2174
  }
2174
2175
  }
2175
- .edit-site-layout.is-full-canvas.is-edit-mode .edit-site-layout__hub {
2176
- width: auto;
2177
- padding-right: 0;
2178
- }
2179
- @media (min-width: 782px) {
2180
- .edit-site-layout__hub {
2181
- width: calc(360px - 48px);
2182
- }
2183
- }
2184
2176
 
2185
2177
  .edit-site-layout__header {
2186
2178
  height: 60px;
@@ -2430,13 +2422,14 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2430
2422
 
2431
2423
  .edit-site-sidebar-navigation-screen__content {
2432
2424
  margin: 0 16px 16px 36px;
2425
+ color: #949494;
2433
2426
  }
2434
2427
 
2435
2428
  .edit-site-sidebar-navigation-screen__title-icon {
2436
2429
  position: sticky;
2437
2430
  top: 0;
2438
2431
  background: #1e1e1e;
2439
- padding-top: 164px;
2432
+ padding-top: 108px;
2440
2433
  box-shadow: 0 8px 16px #1e1e1e;
2441
2434
  margin-bottom: 8px;
2442
2435
  padding-bottom: 8px;
@@ -2454,14 +2447,10 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2454
2447
  .edit-site-sidebar-navigation-screen__back {
2455
2448
  color: #e0e0e0;
2456
2449
  }
2457
- .edit-site-sidebar-navigation-screen__back:hover {
2450
+ .edit-site-sidebar-navigation-screen__back:hover, .edit-site-sidebar-navigation-screen__back:not([aria-disabled=true]):active {
2458
2451
  color: #fff;
2459
2452
  }
2460
2453
 
2461
- .edit-site-sidebar-navigation-screen__icon-placeholder {
2462
- width: 36px;
2463
- }
2464
-
2465
2454
  .edit-site-sidebar-navigation-screen-templates__see-all {
2466
2455
  /* Overrides the margin that comes from the Item component */
2467
2456
  margin-top: 16px !important;
@@ -2479,11 +2468,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2479
2468
  gap: 8px;
2480
2469
  }
2481
2470
 
2482
- .edit-site-site-hub__edit-button {
2483
- height: 32px;
2484
- color: #fff;
2485
- }
2486
-
2487
2471
  .edit-site-site-hub__post-type {
2488
2472
  opacity: 0.6;
2489
2473
  }
@@ -2492,10 +2476,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2492
2476
  height: 60px;
2493
2477
  width: 64px;
2494
2478
  flex-shrink: 0;
2495
- }
2496
-
2497
- .edit-site-layout.is-edit-mode .edit-site-site-hub__view-mode-toggle-container {
2498
- width: 60px;
2479
+ background: #1e1e1e;
2499
2480
  }
2500
2481
 
2501
2482
  .edit-site-site-hub__text-content {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "5.3.2",
3
+ "version": "5.3.3",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,33 +29,33 @@
29
29
  "@babel/runtime": "^7.16.0",
30
30
  "@wordpress/a11y": "^3.26.1",
31
31
  "@wordpress/api-fetch": "^6.23.1",
32
- "@wordpress/block-editor": "^11.3.2",
33
- "@wordpress/block-library": "^8.3.2",
34
- "@wordpress/blocks": "^12.3.1",
35
- "@wordpress/components": "^23.3.1",
36
- "@wordpress/compose": "^6.3.1",
37
- "@wordpress/core-data": "^6.3.1",
38
- "@wordpress/data": "^8.3.1",
32
+ "@wordpress/block-editor": "^11.3.3",
33
+ "@wordpress/block-library": "^8.3.3",
34
+ "@wordpress/blocks": "^12.3.2",
35
+ "@wordpress/components": "^23.3.2",
36
+ "@wordpress/compose": "^6.3.2",
37
+ "@wordpress/core-data": "^6.3.2",
38
+ "@wordpress/data": "^8.3.2",
39
39
  "@wordpress/deprecated": "^3.26.1",
40
- "@wordpress/editor": "^13.3.2",
40
+ "@wordpress/editor": "^13.3.3",
41
41
  "@wordpress/element": "^5.3.1",
42
- "@wordpress/experiments": "^0.8.1",
43
42
  "@wordpress/hooks": "^3.26.1",
44
43
  "@wordpress/html-entities": "^3.26.1",
45
44
  "@wordpress/i18n": "^4.26.1",
46
45
  "@wordpress/icons": "^9.17.1",
47
- "@wordpress/interface": "^5.3.2",
48
- "@wordpress/keyboard-shortcuts": "^4.3.1",
49
- "@wordpress/keycodes": "^3.26.1",
46
+ "@wordpress/interface": "^5.3.3",
47
+ "@wordpress/keyboard-shortcuts": "^4.3.2",
48
+ "@wordpress/keycodes": "^3.26.2",
50
49
  "@wordpress/media-utils": "^4.17.1",
51
- "@wordpress/notices": "^3.26.1",
52
- "@wordpress/plugins": "^5.3.1",
53
- "@wordpress/preferences": "^3.3.1",
54
- "@wordpress/reusable-blocks": "^4.3.2",
50
+ "@wordpress/notices": "^3.26.2",
51
+ "@wordpress/plugins": "^5.3.2",
52
+ "@wordpress/preferences": "^3.3.2",
53
+ "@wordpress/private-apis": "^0.8.1",
54
+ "@wordpress/reusable-blocks": "^4.3.3",
55
55
  "@wordpress/style-engine": "^1.9.1",
56
56
  "@wordpress/url": "^3.27.1",
57
- "@wordpress/viewport": "^5.3.1",
58
- "@wordpress/widgets": "^3.3.2",
57
+ "@wordpress/viewport": "^5.3.2",
58
+ "@wordpress/widgets": "^3.3.3",
59
59
  "classnames": "^2.3.1",
60
60
  "colord": "^2.9.2",
61
61
  "downloadjs": "^1.4.7",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "3eb2c536278d5a17f698b9c378fe3db746a89622"
76
+ "gitHead": "1bf01c01a8238ce3a681ad1e517f86033818b78d"
77
77
  }
@@ -20,7 +20,7 @@ import {
20
20
  getUniqueTemplatePartTitle,
21
21
  getCleanTemplatePartSlug,
22
22
  } from '../../utils/template-part-create';
23
- import { unlock } from '../../experiments';
23
+ import { unlock } from '../../private-apis';
24
24
 
25
25
  export default function NewTemplatePart( {
26
26
  postType,
@@ -67,9 +67,12 @@ export default function NewTemplatePart( {
67
67
  setCanvasMode( 'edit' );
68
68
 
69
69
  // Navigate to the created template part editor.
70
- history.push( {
71
- postId: templatePart.id,
72
- postType: templatePart.type,
70
+ window.queueMicrotask( () => {
71
+ history.push( {
72
+ postId: templatePart.id,
73
+ postType: 'wp_template_part',
74
+ path: '/template-parts/single',
75
+ } );
73
76
  } );
74
77
 
75
78
  // TODO: Add a success notice?
@@ -48,7 +48,7 @@ import AddCustomGenericTemplateModal from './add-custom-generic-template-modal';
48
48
  import TemplateActionsLoadingScreen from './template-actions-loading-screen';
49
49
  import { useHistory } from '../routes';
50
50
  import { store as editSiteStore } from '../../store';
51
- import { unlock } from '../../experiments';
51
+ import { unlock } from '../../private-apis';
52
52
 
53
53
  const DEFAULT_TEMPLATE_SLUGS = [
54
54
  'front-page',
@@ -102,7 +102,6 @@ export default function NewTemplate( {
102
102
  const { setTemplate, setCanvasMode } = unlock(
103
103
  useDispatch( editSiteStore )
104
104
  );
105
-
106
105
  async function createTemplate( template, isWPSuggestion = true ) {
107
106
  if ( isCreatingTemplate ) {
108
107
  return;
@@ -140,15 +139,18 @@ export default function NewTemplate( {
140
139
 
141
140
  // Set template before navigating away to avoid initial stale value.
142
141
  setTemplate( newTemplate.id, newTemplate.slug );
143
-
144
142
  // Switch to edit mode.
145
143
  setCanvasMode( 'edit' );
146
144
 
147
145
  // Navigate to the created template editor.
148
- history.push( {
149
- postId: newTemplate.id,
150
- postType: newTemplate.type,
146
+ window.queueMicrotask( () => {
147
+ history.push( {
148
+ postId: newTemplate.id,
149
+ postType: newTemplate.type,
150
+ path: '/templates/single',
151
+ } );
151
152
  } );
153
+
152
154
  createSuccessNotice(
153
155
  sprintf(
154
156
  // translators: %s: Title of the created template e.g: "Category".
@@ -13,7 +13,7 @@ import { useSelect, useDispatch } from '@wordpress/data';
13
13
  /**
14
14
  * Internal dependencies
15
15
  */
16
- import { unlock } from '../../experiments';
16
+ import { unlock } from '../../private-apis';
17
17
  import { store as editSiteStore } from '../../store';
18
18
 
19
19
  function EditorCanvas( { enableResizing, settings, children, ...props } ) {
@@ -17,7 +17,7 @@ import {
17
17
  __unstableUseTypingObserver as useTypingObserver,
18
18
  BlockEditorKeyboardShortcuts,
19
19
  store as blockEditorStore,
20
- experiments as blockEditorExperiments,
20
+ privateApis as blockEditorPrivateApis,
21
21
  } from '@wordpress/block-editor';
22
22
  import {
23
23
  useMergeRefs,
@@ -37,9 +37,9 @@ import BackButton from './back-button';
37
37
  import ResizableEditor from './resizable-editor';
38
38
  import EditorCanvas from './editor-canvas';
39
39
  import StyleBook from '../style-book';
40
- import { unlock } from '../../experiments';
40
+ import { unlock } from '../../private-apis';
41
41
 
42
- const { ExperimentalBlockEditorProvider } = unlock( blockEditorExperiments );
42
+ const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
43
43
 
44
44
  const LAYOUT = {
45
45
  type: 'default',
@@ -4,7 +4,7 @@
4
4
  import { useMemo } from '@wordpress/element';
5
5
  import { useSelect, useDispatch } from '@wordpress/data';
6
6
  import { Notice } from '@wordpress/components';
7
- import { EntityProvider, store as coreStore } from '@wordpress/core-data';
7
+ import { EntityProvider } from '@wordpress/core-data';
8
8
  import { store as preferencesStore } from '@wordpress/preferences';
9
9
  import {
10
10
  BlockContextProvider,
@@ -17,7 +17,7 @@ import {
17
17
  store as interfaceStore,
18
18
  } from '@wordpress/interface';
19
19
  import { EditorNotices, EditorSnackbars } from '@wordpress/editor';
20
- import { __ } from '@wordpress/i18n';
20
+ import { __, sprintf } from '@wordpress/i18n';
21
21
 
22
22
  /**
23
23
  * Internal dependencies
@@ -34,7 +34,8 @@ import { GlobalStylesRenderer } from '../global-styles-renderer';
34
34
  import { GlobalStylesProvider } from '../global-styles/global-styles-provider';
35
35
  import useTitle from '../routes/use-title';
36
36
  import CanvasSpinner from '../canvas-spinner';
37
- import { unlock } from '../../experiments';
37
+ import { unlock } from '../../private-apis';
38
+ import useEditedEntityRecord from '../use-edited-entity-record';
38
39
 
39
40
  const interfaceLabels = {
40
41
  /* translators: accessibility text for the editor content landmark region. */
@@ -49,11 +50,15 @@ const interfaceLabels = {
49
50
 
50
51
  export default function Editor() {
51
52
  const {
52
- editedPostId,
53
- editedPostType,
54
- editedPost,
53
+ record: editedPost,
54
+ getTitle,
55
+ isLoaded: hasLoadedPost,
56
+ } = useEditedEntityRecord();
57
+
58
+ const { id: editedPostId, type: editedPostType } = editedPost;
59
+
60
+ const {
55
61
  context,
56
- hasLoadedPost,
57
62
  editorMode,
58
63
  canvasMode,
59
64
  blockEditorMode,
@@ -63,36 +68,19 @@ export default function Editor() {
63
68
  showIconLabels,
64
69
  } = useSelect( ( select ) => {
65
70
  const {
66
- getEditedPostType,
67
- getEditedPostId,
68
71
  getEditedPostContext,
69
72
  getEditorMode,
70
73
  getCanvasMode,
71
74
  isInserterOpened,
72
75
  isListViewOpened,
73
76
  } = unlock( select( editSiteStore ) );
74
- const { hasFinishedResolution, getEntityRecord } = select( coreStore );
75
77
  const { __unstableGetEditorMode } = select( blockEditorStore );
76
78
  const { getActiveComplementaryArea } = select( interfaceStore );
77
- const postType = getEditedPostType();
78
- const postId = getEditedPostId();
79
79
 
80
80
  // The currently selected entity to display.
81
81
  // Typically template or template part in the site editor.
82
82
  return {
83
- editedPostId: postId,
84
- editedPostType: postType,
85
- editedPost: postId
86
- ? getEntityRecord( 'postType', postType, postId )
87
- : null,
88
83
  context: getEditedPostContext(),
89
- hasLoadedPost: postId
90
- ? hasFinishedResolution( 'getEntityRecord', [
91
- 'postType',
92
- postType,
93
- postId,
94
- ] )
95
- : false,
96
84
  editorMode: getEditorMode(),
97
85
  canvasMode: getCanvasMode(),
98
86
  blockEditorMode: __unstableGetEditorMode(),
@@ -134,15 +122,28 @@ export default function Editor() {
134
122
  } ),
135
123
  ],
136
124
  } ),
137
- [ context ]
125
+ [ context, setEditedPostContext ]
138
126
  );
139
- const isReady = editedPostType !== undefined && editedPostId !== undefined;
127
+
128
+ let title;
129
+ if ( hasLoadedPost ) {
130
+ const type =
131
+ editedPostType === 'wp_template'
132
+ ? __( 'Template' )
133
+ : __( 'Template Part' );
134
+ title = sprintf(
135
+ // translators: A breadcrumb trail in browser tab. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).
136
+ __( '%1$s ‹ %2$s ‹ Editor' ),
137
+ getTitle(),
138
+ type
139
+ );
140
+ }
140
141
 
141
142
  // Only announce the title once the editor is ready to prevent "Replace"
142
143
  // action in <URlQueryController> from double-announcing.
143
- useTitle( isReady && __( 'Editor (beta)' ) );
144
+ useTitle( hasLoadedPost && title );
144
145
 
145
- if ( ! isReady ) {
146
+ if ( ! hasLoadedPost ) {
146
147
  return <CanvasSpinner />;
147
148
  }
148
149
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import {
5
5
  __experimentalBorderRadiusControl as BorderRadiusControl,
6
- experiments as blockEditorExperiments,
6
+ privateApis as blockEditorPrivateApis,
7
7
  } from '@wordpress/block-editor';
8
8
  import {
9
9
  __experimentalBorderBoxControl as BorderBoxControl,
@@ -19,9 +19,9 @@ import { __ } from '@wordpress/i18n';
19
19
  * Internal dependencies
20
20
  */
21
21
  import { getSupportedGlobalStylesPanels, useColorsPerOrigin } from './hooks';
22
- import { unlock } from '../../experiments';
22
+ import { unlock } from '../../private-apis';
23
23
 
24
- const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorExperiments );
24
+ const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
25
25
 
26
26
  export function useHasBorderPanel( name ) {
27
27
  const controls = [
@@ -6,14 +6,14 @@ import {
6
6
  __experimentalVStack as VStack,
7
7
  } from '@wordpress/components';
8
8
  import { __ } from '@wordpress/i18n';
9
- import { experiments as blockEditorExperiments } from '@wordpress/block-editor';
9
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
10
10
 
11
11
  /**
12
12
  * Internal dependencies
13
13
  */
14
- import { unlock } from '../../experiments';
14
+ import { unlock } from '../../private-apis';
15
15
 
16
- const { useGlobalSetting } = unlock( blockEditorExperiments );
16
+ const { useGlobalSetting } = unlock( blockEditorPrivateApis );
17
17
 
18
18
  export default function ColorPalettePanel( { name } ) {
19
19
  const [ themeColors, setThemeColors ] = useGlobalSetting(
@@ -12,7 +12,7 @@ import {
12
12
  } from '@wordpress/components';
13
13
  import { __ } from '@wordpress/i18n';
14
14
  import {
15
- experiments as blockEditorExperiments,
15
+ privateApis as blockEditorPrivateApis,
16
16
  transformStyles,
17
17
  } from '@wordpress/block-editor';
18
18
  import { info } from '@wordpress/icons';
@@ -20,10 +20,10 @@ import { info } from '@wordpress/icons';
20
20
  /**
21
21
  * Internal dependencies
22
22
  */
23
- import { unlock } from '../../experiments';
23
+ import { unlock } from '../../private-apis';
24
24
  import Subtitle from './subtitle';
25
25
 
26
- const { useGlobalStyle } = unlock( blockEditorExperiments );
26
+ const { useGlobalStyle } = unlock( blockEditorPrivateApis );
27
27
  function CustomCSSControl( { blockName } ) {
28
28
  // If blockName is defined, we are customizing CSS at the block level:
29
29
  // styles.blocks.blockName.css
@@ -20,7 +20,7 @@ import {
20
20
  __experimentalUseCustomSides as useCustomSides,
21
21
  HeightControl,
22
22
  __experimentalSpacingSizesControl as SpacingSizesControl,
23
- experiments as blockEditorExperiments,
23
+ privateApis as blockEditorPrivateApis,
24
24
  } from '@wordpress/block-editor';
25
25
  import { Icon, positionCenter, stretchWide } from '@wordpress/icons';
26
26
 
@@ -28,9 +28,9 @@ import { Icon, positionCenter, stretchWide } from '@wordpress/icons';
28
28
  * Internal dependencies
29
29
  */
30
30
  import { getSupportedGlobalStylesPanels } from './hooks';
31
- import { unlock } from '../../experiments';
31
+ import { unlock } from '../../private-apis';
32
32
 
33
- const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorExperiments );
33
+ const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
34
34
 
35
35
  const AXIAL_SIDES = [ 'horizontal', 'vertical' ];
36
36