@wordpress/edit-site 6.0.0 → 6.0.2

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 (145) hide show
  1. package/build/components/add-new-page/index.js +2 -1
  2. package/build/components/add-new-page/index.js.map +1 -1
  3. package/build/components/block-editor/inserter-media-categories.js +1 -1
  4. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  5. package/build/components/editor/index.js +54 -60
  6. package/build/components/editor/index.js.map +1 -1
  7. package/build/components/editor/use-editor-title.js +39 -0
  8. package/build/components/editor/use-editor-title.js.map +1 -0
  9. package/build/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  10. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  11. package/build/components/global-styles/screen-css.js +1 -1
  12. package/build/components/global-styles/screen-css.js.map +1 -1
  13. package/build/components/global-styles/screen-revisions/index.js +4 -23
  14. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  15. package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  16. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  17. package/build/components/global-styles/shadows-edit-panel.js +1 -0
  18. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  19. package/build/components/global-styles/variations/variation.js +11 -16
  20. package/build/components/global-styles/variations/variation.js.map +1 -1
  21. package/build/components/global-styles/variations/variations-color.js +2 -1
  22. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  23. package/build/components/global-styles/variations/variations-typography.js +1 -0
  24. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  25. package/build/components/global-styles-sidebar/index.js +2 -0
  26. package/build/components/global-styles-sidebar/index.js.map +1 -1
  27. package/build/components/layout/index.js +16 -59
  28. package/build/components/layout/index.js.map +1 -1
  29. package/build/components/page-patterns/index.js +5 -5
  30. package/build/components/page-patterns/index.js.map +1 -1
  31. package/build/components/pagination/index.js +17 -8
  32. package/build/components/pagination/index.js.map +1 -1
  33. package/build/components/sidebar-dataviews/dataview-item.js +6 -2
  34. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  35. package/build/components/sidebar-navigation-screen/index.js +1 -1
  36. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  37. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -0
  38. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  39. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
  40. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  41. package/build/components/sidebar-navigation-screen-patterns/category-item.js +1 -1
  42. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  43. package/build/components/sidebar-navigation-screen-patterns/index.js +1 -1
  44. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  45. package/build/components/site-hub/index.js +38 -128
  46. package/build/components/site-hub/index.js.map +1 -1
  47. package/build/deprecated.js +11 -0
  48. package/build/deprecated.js.map +1 -1
  49. package/build/hooks/push-changes-to-global-styles/index.js +3 -2
  50. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  51. package/build/lock-unlock.js +1 -1
  52. package/build/lock-unlock.js.map +1 -1
  53. package/build/store/private-actions.js +33 -18
  54. package/build/store/private-actions.js.map +1 -1
  55. package/build-module/components/add-new-page/index.js +2 -1
  56. package/build-module/components/add-new-page/index.js.map +1 -1
  57. package/build-module/components/block-editor/inserter-media-categories.js +1 -1
  58. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  59. package/build-module/components/editor/index.js +54 -60
  60. package/build-module/components/editor/index.js.map +1 -1
  61. package/build-module/components/editor/use-editor-title.js +31 -0
  62. package/build-module/components/editor/use-editor-title.js.map +1 -0
  63. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  64. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  65. package/build-module/components/global-styles/screen-css.js +1 -1
  66. package/build-module/components/global-styles/screen-css.js.map +1 -1
  67. package/build-module/components/global-styles/screen-revisions/index.js +4 -23
  68. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  69. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  70. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  71. package/build-module/components/global-styles/shadows-edit-panel.js +1 -0
  72. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  73. package/build-module/components/global-styles/variations/variation.js +11 -16
  74. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  75. package/build-module/components/global-styles/variations/variations-color.js +3 -2
  76. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  77. package/build-module/components/global-styles/variations/variations-typography.js +1 -0
  78. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  79. package/build-module/components/global-styles-sidebar/index.js +2 -0
  80. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  81. package/build-module/components/layout/index.js +18 -61
  82. package/build-module/components/layout/index.js.map +1 -1
  83. package/build-module/components/page-patterns/index.js +5 -5
  84. package/build-module/components/page-patterns/index.js.map +1 -1
  85. package/build-module/components/pagination/index.js +17 -8
  86. package/build-module/components/pagination/index.js.map +1 -1
  87. package/build-module/components/sidebar-dataviews/dataview-item.js +6 -2
  88. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  89. package/build-module/components/sidebar-navigation-screen/index.js +1 -1
  90. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  91. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -0
  92. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  93. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
  94. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  95. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -2
  96. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  97. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -1
  98. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  99. package/build-module/components/site-hub/index.js +40 -130
  100. package/build-module/components/site-hub/index.js.map +1 -1
  101. package/build-module/deprecated.js +11 -0
  102. package/build-module/deprecated.js.map +1 -1
  103. package/build-module/hooks/push-changes-to-global-styles/index.js +3 -2
  104. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  105. package/build-module/lock-unlock.js +1 -1
  106. package/build-module/lock-unlock.js.map +1 -1
  107. package/build-module/store/private-actions.js +33 -18
  108. package/build-module/store/private-actions.js.map +1 -1
  109. package/build-style/style-rtl.css +43 -85
  110. package/build-style/style.css +43 -85
  111. package/package.json +41 -41
  112. package/src/components/add-new-page/index.js +2 -1
  113. package/src/components/block-editor/inserter-media-categories.js +1 -3
  114. package/src/components/block-editor/style.scss +11 -0
  115. package/src/components/editor/index.js +69 -96
  116. package/src/components/editor/style.scss +1 -5
  117. package/src/components/editor/use-editor-title.js +35 -0
  118. package/src/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  119. package/src/components/global-styles/screen-css.js +1 -1
  120. package/src/components/global-styles/screen-revisions/index.js +4 -24
  121. package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  122. package/src/components/global-styles/screen-revisions/style.scss +4 -8
  123. package/src/components/global-styles/shadows-edit-panel.js +1 -0
  124. package/src/components/global-styles/variations/variation.js +14 -19
  125. package/src/components/global-styles/variations/variations-color.js +12 -4
  126. package/src/components/global-styles/variations/variations-typography.js +5 -1
  127. package/src/components/global-styles-sidebar/index.js +2 -0
  128. package/src/components/layout/index.js +17 -67
  129. package/src/components/layout/style.scss +18 -58
  130. package/src/components/page-patterns/index.js +15 -12
  131. package/src/components/pagination/index.js +21 -16
  132. package/src/components/sidebar-dataviews/dataview-item.js +6 -2
  133. package/src/components/sidebar-navigation-screen/index.js +1 -1
  134. package/src/components/sidebar-navigation-screen/style.scss +2 -2
  135. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -0
  136. package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
  137. package/src/components/sidebar-navigation-screen-patterns/category-item.js +11 -2
  138. package/src/components/sidebar-navigation-screen-patterns/index.js +5 -1
  139. package/src/components/site-hub/index.js +55 -146
  140. package/src/components/site-hub/style.scss +1 -4
  141. package/src/components/site-icon/style.scss +0 -4
  142. package/src/deprecated.js +14 -0
  143. package/src/hooks/push-changes-to-global-styles/index.js +3 -2
  144. package/src/lock-unlock.js +1 -1
  145. package/src/store/private-actions.js +58 -30
@@ -513,6 +513,7 @@
513
513
  .dataviews-view-list li .dataviews-view-list__item-actions .components-button {
514
514
  opacity: 0;
515
515
  position: fixed;
516
+ right: 0;
516
517
  }
517
518
  .dataviews-view-list li.is-selected .dataviews-view-list__item-actions, .dataviews-view-list li.is-hovered .dataviews-view-list__item-actions, .dataviews-view-list li:focus-within .dataviews-view-list__item-actions {
518
519
  padding-right: 32px;
@@ -928,12 +929,15 @@
928
929
  }
929
930
 
930
931
  .dataviews-bulk-actions {
931
- position: absolute;
932
+ position: sticky;
932
933
  display: flex;
933
934
  flex-direction: column;
934
935
  align-content: center;
935
936
  flex-wrap: wrap;
936
- width: 100%;
937
+ width: -moz-fit-content;
938
+ width: fit-content;
939
+ margin-left: auto;
940
+ margin-right: auto;
937
941
  bottom: 24px;
938
942
  z-index: 2;
939
943
  }
@@ -1110,6 +1114,18 @@
1110
1114
  align-items: flex-start;
1111
1115
  }
1112
1116
 
1117
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
1118
+ ::view-transition-old(frame),
1119
+ ::view-transition-new(frame) {
1120
+ animation-duration: 0;
1121
+ }
1122
+
1123
+ /* stylelint-enable */
1124
+ .edit-site-visual-editor__editor-canvas {
1125
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
1126
+ view-transition-name: frame;
1127
+ /* stylelint-enable */
1128
+ }
1113
1129
  .edit-site-visual-editor__editor-canvas.is-focused {
1114
1130
  outline: calc(2 * var(--wp-admin-border-width-focus)) solid var(--wp-admin-theme-color);
1115
1131
  outline-offset: calc(-2 * var(--wp-admin-border-width-focus));
@@ -1505,18 +1521,12 @@
1505
1521
  will-change: opacity;
1506
1522
  }
1507
1523
  .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary {
1508
- font-size: 28px;
1509
- font-weight: 200;
1510
1524
  color: #1e1e1e;
1511
- margin-bottom: 4px;
1512
- line-height: 1.2;
1513
1525
  }
1514
- .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled {
1526
+ .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled,
1527
+ .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true] {
1515
1528
  color: #949494;
1516
1529
  }
1517
- .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:hover {
1518
- background: transparent;
1519
- }
1520
1530
 
1521
1531
  .edit-site-global-styles-screen-revisions__footer {
1522
1532
  height: 56px;
@@ -2012,17 +2022,17 @@
2012
2022
  border-bottom: 1px solid #f0f0f0;
2013
2023
  }
2014
2024
 
2015
- .edit-site-editor__interface-skeleton {
2025
+ .edit-site-editor__editor-interface {
2016
2026
  opacity: 1;
2017
2027
  transition: opacity 0.1s ease-out;
2018
2028
  }
2019
2029
  @media (prefers-reduced-motion: reduce) {
2020
- .edit-site-editor__interface-skeleton {
2030
+ .edit-site-editor__editor-interface {
2021
2031
  transition-duration: 0s;
2022
2032
  transition-delay: 0s;
2023
2033
  }
2024
2034
  }
2025
- .edit-site-editor__interface-skeleton.is-loading {
2035
+ .edit-site-editor__editor-interface.is-loading {
2026
2036
  opacity: 0;
2027
2037
  }
2028
2038
 
@@ -2036,10 +2046,6 @@
2036
2046
  justify-content: center;
2037
2047
  }
2038
2048
 
2039
- .editor-header {
2040
- padding-left: 60px;
2041
- }
2042
-
2043
2049
  .edit-site-welcome-guide {
2044
2050
  width: 312px;
2045
2051
  }
@@ -2090,38 +2096,8 @@
2090
2096
  display: flex;
2091
2097
  flex-direction: column;
2092
2098
  }
2093
-
2094
- .edit-site-layout__hub {
2095
- position: fixed;
2096
- top: 0;
2097
- left: 0;
2098
- width: calc(100vw - 32px);
2099
- height: 60px;
2100
- z-index: 3;
2101
- }
2102
- @media (min-width: 782px) {
2103
- .edit-site-layout__hub {
2104
- width: calc(360px - 12px);
2105
- }
2106
- }
2107
- .edit-site-layout.is-full-canvas .edit-site-layout__hub {
2108
- padding-right: 0;
2109
- border-radius: 0;
2110
- width: 60px;
2111
- box-shadow: none;
2112
- }
2113
-
2114
- .edit-site-layout__header-container:has(+ .edit-site-layout__content > .edit-site-layout__mobile > .edit-site-page) {
2115
- margin-bottom: 60px;
2116
- }
2117
- @media (min-width: 782px) {
2118
- .edit-site-layout__header-container:has(+ .edit-site-layout__content > .edit-site-layout__mobile > .edit-site-page) {
2119
- margin-bottom: 0;
2120
- }
2121
- }
2122
-
2123
- .edit-site-layout__header-container {
2124
- z-index: 4;
2099
+ .edit-site-layout:not(.is-full-canvas) .editor-visual-editor {
2100
+ background: #1e1e1e;
2125
2101
  }
2126
2102
 
2127
2103
  .edit-site-layout__content {
@@ -2232,10 +2208,22 @@
2232
2208
  height: 100%;
2233
2209
  }
2234
2210
 
2211
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
2212
+ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2213
+ animation-delay: 255ms;
2214
+ }
2215
+
2216
+ /* stylelint-enable */
2217
+ .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle {
2218
+ display: none;
2219
+ }
2220
+
2235
2221
  .edit-site-layout__view-mode-toggle.components-button {
2222
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
2223
+ view-transition-name: toggle;
2224
+ /* stylelint-enable */
2236
2225
  position: relative;
2237
2226
  color: #fff;
2238
- border-radius: 0;
2239
2227
  height: 60px;
2240
2228
  width: 60px;
2241
2229
  overflow: hidden;
@@ -2243,6 +2231,8 @@
2243
2231
  display: flex;
2244
2232
  align-items: center;
2245
2233
  justify-content: center;
2234
+ background: #1e1e1e;
2235
+ border-radius: 0;
2246
2236
  }
2247
2237
  .edit-site-layout__view-mode-toggle.components-button:hover, .edit-site-layout__view-mode-toggle.components-button:active {
2248
2238
  color: #fff;
@@ -2273,7 +2263,6 @@
2273
2263
  }
2274
2264
  .edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon {
2275
2265
  display: flex;
2276
- border-radius: 2px;
2277
2266
  height: 64px;
2278
2267
  width: 64px;
2279
2268
  justify-content: center;
@@ -2304,27 +2293,6 @@
2304
2293
  }
2305
2294
  }
2306
2295
 
2307
- .edit-site-layout.is-distraction-free .edit-site-layout__header-container {
2308
- height: 60px;
2309
- position: absolute;
2310
- top: 0;
2311
- left: 0;
2312
- right: 0;
2313
- z-index: 4;
2314
- width: 100%;
2315
- }
2316
- .edit-site-layout.is-distraction-free .edit-site-layout__header-container:focus-within {
2317
- opacity: 1 !important;
2318
- }
2319
- .edit-site-layout.is-distraction-free .edit-site-layout__header-container:focus-within div {
2320
- transform: translateX(0) translateY(0) translateZ(0) !important;
2321
- }
2322
- .edit-site-layout.is-distraction-free .edit-site-site-hub {
2323
- position: absolute;
2324
- top: 0;
2325
- z-index: 3;
2326
- }
2327
-
2328
2296
  .edit-site-layout__area {
2329
2297
  flex-grow: 1;
2330
2298
  margin: 0;
@@ -2550,7 +2518,7 @@
2550
2518
  position: sticky;
2551
2519
  top: 0;
2552
2520
  background: #1e1e1e;
2553
- padding-top: 108px;
2521
+ padding-top: 48px;
2554
2522
  margin-bottom: 8px;
2555
2523
  padding-bottom: 8px;
2556
2524
  z-index: 1;
@@ -2558,8 +2526,8 @@
2558
2526
 
2559
2527
  .edit-site-sidebar-navigation-screen__title {
2560
2528
  flex-grow: 1;
2561
- padding: 6px 0 0 0;
2562
2529
  overflow-wrap: break-word;
2530
+ padding: 2px 0 0 0;
2563
2531
  }
2564
2532
 
2565
2533
  .edit-site-sidebar-navigation-screen__actions {
@@ -2728,6 +2696,7 @@
2728
2696
  align-items: center;
2729
2697
  justify-content: space-between;
2730
2698
  gap: 8px;
2699
+ margin-right: 12px;
2731
2700
  }
2732
2701
 
2733
2702
  .edit-site-site-hub__actions {
@@ -2739,9 +2708,6 @@
2739
2708
  width: 60px;
2740
2709
  flex-shrink: 0;
2741
2710
  }
2742
- .edit-site-site-hub__view-mode-toggle-container .edit-site-layout__view-mode-toggle-icon {
2743
- background: #1e1e1e;
2744
- }
2745
2711
  .edit-site-site-hub__view-mode-toggle-container.has-transparent-background .edit-site-layout__view-mode-toggle-icon {
2746
2712
  background: transparent;
2747
2713
  }
@@ -2831,13 +2797,6 @@
2831
2797
 
2832
2798
  .edit-site-site-icon__icon {
2833
2799
  fill: currentColor;
2834
- transition: padding 0.3s ease-out;
2835
- }
2836
- @media (prefers-reduced-motion: reduce) {
2837
- .edit-site-site-icon__icon {
2838
- transition-duration: 0s;
2839
- transition-delay: 0s;
2840
- }
2841
2800
  }
2842
2801
  .edit-site-layout.is-full-canvas .edit-site-site-icon__icon {
2843
2802
  padding: 6px;
@@ -2846,7 +2805,6 @@
2846
2805
  .edit-site-site-icon__image {
2847
2806
  width: 100%;
2848
2807
  height: 100%;
2849
- border-radius: 4px;
2850
2808
  object-fit: cover;
2851
2809
  background: #333;
2852
2810
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,45 +29,45 @@
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7.16.0",
31
31
  "@react-spring/web": "^9.4.5",
32
- "@wordpress/a11y": "^4.0.0",
33
- "@wordpress/api-fetch": "^7.0.0",
34
- "@wordpress/blob": "^4.0.0",
35
- "@wordpress/block-editor": "^13.0.0",
36
- "@wordpress/block-library": "^9.0.0",
37
- "@wordpress/blocks": "^13.0.0",
38
- "@wordpress/commands": "^1.0.0",
39
- "@wordpress/components": "^28.0.0",
40
- "@wordpress/compose": "^7.0.0",
41
- "@wordpress/core-commands": "^1.0.0",
42
- "@wordpress/core-data": "^7.0.0",
43
- "@wordpress/data": "^10.0.0",
44
- "@wordpress/dataviews": "^2.0.0",
45
- "@wordpress/date": "^5.0.0",
46
- "@wordpress/deprecated": "^4.0.0",
47
- "@wordpress/dom": "^4.0.0",
48
- "@wordpress/editor": "^14.0.0",
49
- "@wordpress/element": "^6.0.0",
50
- "@wordpress/escape-html": "^3.0.0",
51
- "@wordpress/hooks": "^4.0.0",
52
- "@wordpress/html-entities": "^4.0.0",
53
- "@wordpress/i18n": "^5.0.0",
54
- "@wordpress/icons": "^10.0.0",
55
- "@wordpress/keyboard-shortcuts": "^5.0.0",
56
- "@wordpress/keycodes": "^4.0.0",
57
- "@wordpress/notices": "^5.0.0",
58
- "@wordpress/patterns": "^2.0.0",
59
- "@wordpress/plugins": "^7.0.0",
60
- "@wordpress/preferences": "^4.0.0",
61
- "@wordpress/primitives": "^4.0.0",
62
- "@wordpress/priority-queue": "^3.0.0",
63
- "@wordpress/private-apis": "^1.0.0",
64
- "@wordpress/reusable-blocks": "^5.0.0",
65
- "@wordpress/router": "^1.0.0",
66
- "@wordpress/style-engine": "^2.0.0",
67
- "@wordpress/url": "^4.0.0",
68
- "@wordpress/viewport": "^6.0.0",
69
- "@wordpress/widgets": "^4.0.0",
70
- "@wordpress/wordcount": "^4.0.0",
32
+ "@wordpress/a11y": "^4.0.1",
33
+ "@wordpress/api-fetch": "^7.0.1",
34
+ "@wordpress/blob": "^4.0.1",
35
+ "@wordpress/block-editor": "^13.0.2",
36
+ "@wordpress/block-library": "^9.0.2",
37
+ "@wordpress/blocks": "^13.0.2",
38
+ "@wordpress/commands": "^1.0.2",
39
+ "@wordpress/components": "^28.0.2",
40
+ "@wordpress/compose": "^7.0.1",
41
+ "@wordpress/core-commands": "^1.0.2",
42
+ "@wordpress/core-data": "^7.0.2",
43
+ "@wordpress/data": "^10.0.2",
44
+ "@wordpress/dataviews": "^2.0.2",
45
+ "@wordpress/date": "^5.0.1",
46
+ "@wordpress/deprecated": "^4.0.1",
47
+ "@wordpress/dom": "^4.0.1",
48
+ "@wordpress/editor": "^14.0.2",
49
+ "@wordpress/element": "^6.0.1",
50
+ "@wordpress/escape-html": "^3.0.1",
51
+ "@wordpress/hooks": "^4.0.1",
52
+ "@wordpress/html-entities": "^4.0.1",
53
+ "@wordpress/i18n": "^5.0.1",
54
+ "@wordpress/icons": "^10.0.1",
55
+ "@wordpress/keyboard-shortcuts": "^5.0.2",
56
+ "@wordpress/keycodes": "^4.0.1",
57
+ "@wordpress/notices": "^5.0.2",
58
+ "@wordpress/patterns": "^2.0.2",
59
+ "@wordpress/plugins": "^7.0.2",
60
+ "@wordpress/preferences": "^4.0.2",
61
+ "@wordpress/primitives": "^4.0.1",
62
+ "@wordpress/priority-queue": "^3.0.1",
63
+ "@wordpress/private-apis": "^1.0.2",
64
+ "@wordpress/reusable-blocks": "^5.0.2",
65
+ "@wordpress/router": "^1.0.2",
66
+ "@wordpress/style-engine": "^2.0.2",
67
+ "@wordpress/url": "^4.0.1",
68
+ "@wordpress/viewport": "^6.0.2",
69
+ "@wordpress/widgets": "^4.0.2",
70
+ "@wordpress/wordcount": "^4.0.1",
71
71
  "change-case": "^4.1.2",
72
72
  "clsx": "^2.1.1",
73
73
  "colord": "^2.9.2",
@@ -82,5 +82,5 @@
82
82
  "publishConfig": {
83
83
  "access": "public"
84
84
  },
85
- "gitHead": "2f30cddff15723ac7017fd009fc5913b7b419400"
85
+ "gitHead": "a68c6b5ef53956cccf4961d53d79b6af7e00ae60"
86
86
  }
@@ -13,6 +13,7 @@ import { useDispatch } from '@wordpress/data';
13
13
  import { useState } from '@wordpress/element';
14
14
  import { store as coreStore } from '@wordpress/core-data';
15
15
  import { store as noticesStore } from '@wordpress/notices';
16
+ import { decodeEntities } from '@wordpress/html-entities';
16
17
 
17
18
  export default function AddNewPageModal( { onSave, onClose } ) {
18
19
  const [ isCreatingPage, setIsCreatingPage ] = useState( false );
@@ -47,7 +48,7 @@ export default function AddNewPageModal( { onSave, onClose } ) {
47
48
  sprintf(
48
49
  // translators: %s: Title of the created template e.g: "Category".
49
50
  __( '"%s" successfully created.' ),
50
- newPage.title?.rendered || title
51
+ decodeEntities( newPage.title?.rendered || title )
51
52
  ),
52
53
  {
53
54
  type: 'snackbar',
@@ -191,9 +191,7 @@ const inserterMediaCategories = [
191
191
  per_page: 'page_size',
192
192
  search: 'q',
193
193
  };
194
- const url = new URL(
195
- 'https://api.openverse.engineering/v1/images/'
196
- );
194
+ const url = new URL( 'https://api.openverse.org/v1/images/' );
197
195
  Object.entries( finalQuery ).forEach( ( [ key, value ] ) => {
198
196
  const queryKey = mapFromInserterMediaRequest[ key ] || key;
199
197
  url.searchParams.set( queryKey, value );
@@ -1,4 +1,15 @@
1
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
2
+ ::view-transition-old(frame),
3
+ ::view-transition-new(frame) {
4
+ animation-duration: 0;
5
+ }
6
+ /* stylelint-enable */
7
+
1
8
  .edit-site-visual-editor__editor-canvas {
9
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
10
+ view-transition-name: frame;
11
+ /* stylelint-enable */
12
+
2
13
  &.is-focused {
3
14
  outline: calc(2 * var(--wp-admin-border-width-focus)) solid var(--wp-admin-theme-color);
4
15
  outline-offset: calc(-2 * var(--wp-admin-border-width-focus));
@@ -7,7 +7,7 @@ import clsx from 'clsx';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { useDispatch, useSelect } from '@wordpress/data';
10
- import { Notice } from '@wordpress/components';
10
+ import { Button } from '@wordpress/components';
11
11
  import { useInstanceId } from '@wordpress/compose';
12
12
  import {
13
13
  EditorKeyboardShortcutsRegister,
@@ -21,6 +21,7 @@ import { useCallback, useMemo } from '@wordpress/element';
21
21
  import { store as noticesStore } from '@wordpress/notices';
22
22
  import { privateApis as routerPrivateApis } from '@wordpress/router';
23
23
  import { store as preferencesStore } from '@wordpress/preferences';
24
+ import { decodeEntities } from '@wordpress/html-entities';
24
25
 
25
26
  /**
26
27
  * Internal dependencies
@@ -28,11 +29,8 @@ import { store as preferencesStore } from '@wordpress/preferences';
28
29
  import WelcomeGuide from '../welcome-guide';
29
30
  import { store as editSiteStore } from '../../store';
30
31
  import { GlobalStylesRenderer } from '../global-styles-renderer';
31
- import useTitle from '../routes/use-title';
32
32
  import CanvasLoader from '../canvas-loader';
33
33
  import { unlock } from '../../lock-unlock';
34
- import useEditedEntityRecord from '../use-edited-entity-record';
35
- import { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';
36
34
  import TemplatePartConverter from '../template-part-converter';
37
35
  import { useSpecificEditorSettings } from '../block-editor/use-site-editor-settings';
38
36
  import PluginTemplateSettingPanel from '../plugin-template-setting-panel';
@@ -44,26 +42,20 @@ import {
44
42
  } from '../editor-canvas-container';
45
43
  import SaveButton from '../save-button';
46
44
  import SiteEditorMoreMenu from '../more-menu';
45
+ import SiteIcon from '../site-icon';
47
46
  import useEditorIframeProps from '../block-editor/use-editor-iframe-props';
47
+ import useEditorTitle from './use-editor-title';
48
48
 
49
- const {
50
- EditorInterface,
51
- ExperimentalEditorProvider: EditorProvider,
52
- Sidebar,
53
- } = unlock( editorPrivateApis );
49
+ const { Editor, BackButton } = unlock( editorPrivateApis );
54
50
  const { useHistory } = unlock( routerPrivateApis );
55
51
  const { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );
56
52
 
57
- export default function Editor( { isLoading } ) {
53
+ export default function EditSiteEditor( { isLoading } ) {
58
54
  const {
59
- record: editedPost,
60
- getTitle,
61
- isLoaded: hasLoadedPost,
62
- } = useEditedEntityRecord();
63
- const { type: editedPostType } = editedPost;
64
- const {
65
- context,
66
- contextPost,
55
+ editedPostType,
56
+ editedPostId,
57
+ contextPostType,
58
+ contextPostId,
67
59
  editorMode,
68
60
  canvasMode,
69
61
  isEditingPage,
@@ -72,25 +64,25 @@ export default function Editor( { isLoading } ) {
72
64
  editorCanvasView,
73
65
  currentPostIsTrashed,
74
66
  } = useSelect( ( select ) => {
75
- const { getEditedPostContext, getCanvasMode, isPage } = unlock(
76
- select( editSiteStore )
77
- );
67
+ const {
68
+ getEditedPostContext,
69
+ getCanvasMode,
70
+ isPage,
71
+ getEditedPostType,
72
+ getEditedPostId,
73
+ } = unlock( select( editSiteStore ) );
78
74
  const { get } = select( preferencesStore );
79
- const { getEntityRecord, getCurrentTheme } = select( coreDataStore );
75
+ const { getCurrentTheme } = select( coreDataStore );
80
76
  const { getEditorMode } = select( editorStore );
81
77
  const _context = getEditedPostContext();
82
78
 
83
79
  // The currently selected entity to display.
84
80
  // Typically template or template part in the site editor.
85
81
  return {
86
- context: _context,
87
- contextPost: _context?.postId
88
- ? getEntityRecord(
89
- 'postType',
90
- _context.postType,
91
- _context.postId
92
- )
93
- : undefined,
82
+ editedPostType: getEditedPostType(),
83
+ editedPostId: getEditedPostId(),
84
+ contextPostType: _context?.postId ? _context.postType : undefined,
85
+ contextPostId: _context?.postId ? _context.postId : undefined,
94
86
  editorMode: getEditorMode(),
95
87
  canvasMode: getCanvasMode(),
96
88
  isEditingPage: isPage(),
@@ -104,30 +96,14 @@ export default function Editor( { isLoading } ) {
104
96
  'trash',
105
97
  };
106
98
  }, [] );
99
+ useEditorTitle();
107
100
  const _isPreviewingTheme = isPreviewingTheme();
108
101
  const hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();
109
102
  const iframeProps = useEditorIframeProps();
110
-
111
103
  const isViewMode = canvasMode === 'view';
112
104
  const isEditMode = canvasMode === 'edit';
113
105
  const showVisualEditor = isViewMode || editorMode === 'visual';
114
- const postWithTemplate = !! context?.postId;
115
-
116
- let title;
117
- if ( hasLoadedPost ) {
118
- title = sprintf(
119
- // translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).
120
- __( '%1$s ‹ %2$s' ),
121
- getTitle(),
122
- POST_TYPE_LABELS[ editedPostType ] ??
123
- POST_TYPE_LABELS[ TEMPLATE_POST_TYPE ]
124
- );
125
- }
126
-
127
- // Only announce the title once the editor is ready to prevent "Replace"
128
- // action in <URLQueryController> from double-announcing.
129
- useTitle( hasLoadedPost && title );
130
-
106
+ const postWithTemplate = !! contextPostId;
131
107
  const loadingProgressId = useInstanceId(
132
108
  CanvasLoader,
133
109
  'edit-site-editor__loading-progress'
@@ -152,6 +128,7 @@ export default function Editor( { isLoading } ) {
152
128
  ],
153
129
  [ settings.styles, canvasMode, currentPostIsTrashed ]
154
130
  );
131
+ const { setCanvasMode } = unlock( useDispatch( editSiteStore ) );
155
132
  const { createSuccessNotice } = useDispatch( noticesStore );
156
133
  const history = useHistory();
157
134
  const onActionPerformed = useCallback(
@@ -176,7 +153,7 @@ export default function Editor( { isLoading } ) {
176
153
  sprintf(
177
154
  // translators: %s: Title of the created post e.g: "Post 1".
178
155
  __( '"%s" successfully created.' ),
179
- _title
156
+ decodeEntities( _title )
180
157
  ),
181
158
  {
182
159
  type: 'snackbar',
@@ -202,10 +179,7 @@ export default function Editor( { isLoading } ) {
202
179
  [ history, createSuccessNotice ]
203
180
  );
204
181
 
205
- const isReady =
206
- ! isLoading &&
207
- ( ( postWithTemplate && !! contextPost && !! editedPost ) ||
208
- ( ! postWithTemplate && !! editedPost ) );
182
+ const isReady = ! isLoading;
209
183
 
210
184
  return (
211
185
  <>
@@ -215,55 +189,54 @@ export default function Editor( { isLoading } ) {
215
189
  { showVisualEditor && <TemplatePartConverter /> }
216
190
  { ! isReady ? <CanvasLoader id={ loadingProgressId } /> : null }
217
191
  { isEditMode && <WelcomeGuide /> }
218
- { hasLoadedPost && ! editedPost && (
219
- <Notice status="warning" isDismissible={ false }>
220
- { __(
221
- "You attempted to edit an item that doesn't exist. Perhaps it was deleted?"
222
- ) }
223
- </Notice>
224
- ) }
225
192
  { isReady && (
226
- <EditorProvider
227
- post={ postWithTemplate ? contextPost : editedPost }
228
- __unstableTemplate={
229
- postWithTemplate ? editedPost : undefined
193
+ <Editor
194
+ postType={
195
+ postWithTemplate ? contextPostType : editedPostType
230
196
  }
197
+ postId={ postWithTemplate ? contextPostId : editedPostId }
198
+ templateId={ postWithTemplate ? editedPostId : undefined }
231
199
  settings={ settings }
232
- useSubRegistry={ false }
200
+ className={ clsx( 'edit-site-editor__editor-interface', {
201
+ 'show-icon-labels': showIconLabels,
202
+ } ) }
203
+ styles={ styles }
204
+ enableRegionNavigation={ false }
205
+ customSaveButton={
206
+ _isPreviewingTheme && <SaveButton size="compact" />
207
+ }
208
+ forceDisableBlockTools={ ! hasDefaultEditorCanvasView }
209
+ title={
210
+ ! hasDefaultEditorCanvasView
211
+ ? getEditorCanvasContainerTitle( editorCanvasView )
212
+ : undefined
213
+ }
214
+ iframeProps={ iframeProps }
215
+ onActionPerformed={ onActionPerformed }
216
+ extraSidebarPanels={
217
+ ! isEditingPage && <PluginTemplateSettingPanel.Slot />
218
+ }
233
219
  >
234
- <SiteEditorMoreMenu />
235
- <EditorInterface
236
- className={ clsx(
237
- 'edit-site-editor__interface-skeleton',
238
- {
239
- 'show-icon-labels': showIconLabels,
220
+ { isEditMode && (
221
+ <BackButton>
222
+ { ( { length } ) =>
223
+ length <= 1 && (
224
+ <Button
225
+ label={ __( 'Open Navigation' ) }
226
+ className="edit-site-layout__view-mode-toggle"
227
+ onClick={ () =>
228
+ setCanvasMode( 'view' )
229
+ }
230
+ >
231
+ <SiteIcon className="edit-site-layout__view-mode-toggle-icon" />
232
+ </Button>
233
+ )
240
234
  }
241
- ) }
242
- styles={ styles }
243
- enableRegionNavigation={ false }
244
- customSaveButton={
245
- _isPreviewingTheme && <SaveButton size="compact" />
246
- }
247
- forceDisableBlockTools={ ! hasDefaultEditorCanvasView }
248
- title={
249
- ! hasDefaultEditorCanvasView
250
- ? getEditorCanvasContainerTitle(
251
- editorCanvasView
252
- )
253
- : undefined
254
- }
255
- iframeProps={ iframeProps }
256
- />
257
- <Sidebar
258
- onActionPerformed={ onActionPerformed }
259
- extraPanels={
260
- ! isEditingPage && (
261
- <PluginTemplateSettingPanel.Slot />
262
- )
263
- }
264
- />
235
+ </BackButton>
236
+ ) }
237
+ <SiteEditorMoreMenu />
265
238
  { supportsGlobalStyles && <GlobalStylesSidebar /> }
266
- </EditorProvider>
239
+ </Editor>
267
240
  ) }
268
241
  </>
269
242
  );
@@ -1,4 +1,4 @@
1
- .edit-site-editor__interface-skeleton {
1
+ .edit-site-editor__editor-interface {
2
2
  opacity: 1;
3
3
  transition: opacity 0.1s ease-out;
4
4
  @include reduce-motion("transition");
@@ -17,7 +17,3 @@
17
17
  display: flex;
18
18
  justify-content: center;
19
19
  }
20
-
21
- .editor-header {
22
- padding-left: $header-height;
23
- }