@wordpress/edit-site 6.0.0 → 6.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 (205) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-page/index.js +2 -1
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/app/index.js +17 -1
  5. package/build/components/app/index.js.map +1 -1
  6. package/build/components/editor/index.js +55 -69
  7. package/build/components/editor/index.js.map +1 -1
  8. package/build/components/editor/use-editor-title.js +39 -0
  9. package/build/components/editor/use-editor-title.js.map +1 -0
  10. package/build/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  11. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  12. package/build/components/global-styles/screen-css.js +1 -1
  13. package/build/components/global-styles/screen-css.js.map +1 -1
  14. package/build/components/global-styles/screen-revisions/index.js +4 -23
  15. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  16. package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  17. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  18. package/build/components/global-styles/shadows-edit-panel.js +1 -0
  19. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  20. package/build/components/global-styles/variations/variation.js +11 -16
  21. package/build/components/global-styles/variations/variation.js.map +1 -1
  22. package/build/components/global-styles/variations/variations-color.js +2 -1
  23. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  24. package/build/components/global-styles/variations/variations-typography.js +1 -0
  25. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  26. package/build/components/global-styles-sidebar/index.js +2 -0
  27. package/build/components/global-styles-sidebar/index.js.map +1 -1
  28. package/build/components/layout/index.js +23 -95
  29. package/build/components/layout/index.js.map +1 -1
  30. package/build/components/page/header.js +1 -0
  31. package/build/components/page/header.js.map +1 -1
  32. package/build/components/page-patterns/header.js +2 -1
  33. package/build/components/page-patterns/header.js.map +1 -1
  34. package/build/components/page-patterns/index.js +5 -5
  35. package/build/components/page-patterns/index.js.map +1 -1
  36. package/build/components/pagination/index.js +17 -8
  37. package/build/components/pagination/index.js.map +1 -1
  38. package/build/components/posts-app/index.js +50 -0
  39. package/build/components/posts-app/index.js.map +1 -0
  40. package/build/components/sidebar-dataviews/dataview-item.js +6 -2
  41. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  42. package/build/components/sidebar-navigation-screen/index.js +1 -1
  43. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  44. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -0
  45. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  46. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
  47. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  48. package/build/components/sidebar-navigation-screen-patterns/category-item.js +1 -1
  49. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  50. package/build/components/sidebar-navigation-screen-patterns/index.js +1 -1
  51. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  52. package/build/components/site-hub/index.js +38 -128
  53. package/build/components/site-hub/index.js.map +1 -1
  54. package/build/hooks/commands/use-set-command-context.js +53 -0
  55. package/build/hooks/commands/use-set-command-context.js.map +1 -0
  56. package/build/hooks/push-changes-to-global-styles/index.js +3 -2
  57. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  58. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +20 -88
  59. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  60. package/build/index.js +15 -2
  61. package/build/index.js.map +1 -1
  62. package/build/posts.js +34 -0
  63. package/build/posts.js.map +1 -0
  64. package/build/store/private-actions.js +33 -18
  65. package/build/store/private-actions.js.map +1 -1
  66. package/build-module/components/add-new-page/index.js +2 -1
  67. package/build-module/components/add-new-page/index.js.map +1 -1
  68. package/build-module/components/app/index.js +17 -1
  69. package/build-module/components/app/index.js.map +1 -1
  70. package/build-module/components/editor/index.js +55 -69
  71. package/build-module/components/editor/index.js.map +1 -1
  72. package/build-module/components/editor/use-editor-title.js +31 -0
  73. package/build-module/components/editor/use-editor-title.js.map +1 -0
  74. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  75. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  76. package/build-module/components/global-styles/screen-css.js +1 -1
  77. package/build-module/components/global-styles/screen-css.js.map +1 -1
  78. package/build-module/components/global-styles/screen-revisions/index.js +4 -23
  79. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  80. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  81. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  82. package/build-module/components/global-styles/shadows-edit-panel.js +1 -0
  83. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  84. package/build-module/components/global-styles/variations/variation.js +11 -16
  85. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  86. package/build-module/components/global-styles/variations/variations-color.js +3 -2
  87. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  88. package/build-module/components/global-styles/variations/variations-typography.js +1 -0
  89. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  90. package/build-module/components/global-styles-sidebar/index.js +2 -0
  91. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  92. package/build-module/components/layout/index.js +27 -99
  93. package/build-module/components/layout/index.js.map +1 -1
  94. package/build-module/components/page/header.js +1 -0
  95. package/build-module/components/page/header.js.map +1 -1
  96. package/build-module/components/page-patterns/header.js +2 -1
  97. package/build-module/components/page-patterns/header.js.map +1 -1
  98. package/build-module/components/page-patterns/index.js +5 -5
  99. package/build-module/components/page-patterns/index.js.map +1 -1
  100. package/build-module/components/pagination/index.js +17 -8
  101. package/build-module/components/pagination/index.js.map +1 -1
  102. package/build-module/components/posts-app/index.js +43 -0
  103. package/build-module/components/posts-app/index.js.map +1 -0
  104. package/build-module/components/sidebar-dataviews/dataview-item.js +6 -2
  105. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  106. package/build-module/components/sidebar-navigation-screen/index.js +1 -1
  107. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  108. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -0
  109. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  110. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
  111. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  112. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -2
  113. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  114. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -1
  115. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  116. package/build-module/components/site-hub/index.js +40 -130
  117. package/build-module/components/site-hub/index.js.map +1 -1
  118. package/build-module/hooks/commands/use-set-command-context.js +46 -0
  119. package/build-module/hooks/commands/use-set-command-context.js.map +1 -0
  120. package/build-module/hooks/push-changes-to-global-styles/index.js +3 -2
  121. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  122. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +19 -86
  123. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  124. package/build-module/index.js +8 -2
  125. package/build-module/index.js.map +1 -1
  126. package/build-module/posts.js +27 -0
  127. package/build-module/posts.js.map +1 -0
  128. package/build-module/store/private-actions.js +33 -18
  129. package/build-module/store/private-actions.js.map +1 -1
  130. package/build-style/posts-rtl.css +1707 -0
  131. package/build-style/posts.css +1707 -0
  132. package/build-style/style-rtl.css +59 -104
  133. package/build-style/style.css +59 -104
  134. package/package.json +41 -41
  135. package/src/components/add-new-page/index.js +2 -1
  136. package/src/components/app/index.js +17 -1
  137. package/src/components/block-editor/style.scss +11 -0
  138. package/src/components/editor/index.js +69 -103
  139. package/src/components/editor/style.scss +1 -5
  140. package/src/components/editor/use-editor-title.js +35 -0
  141. package/src/components/global-styles/font-library-modal/installed-fonts.js +1 -0
  142. package/src/components/global-styles/screen-css.js +1 -1
  143. package/src/components/global-styles/screen-revisions/index.js +4 -24
  144. package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  145. package/src/components/global-styles/screen-revisions/style.scss +4 -8
  146. package/src/components/global-styles/shadows-edit-panel.js +1 -0
  147. package/src/components/global-styles/style.scss +1 -7
  148. package/src/components/global-styles/variations/variation.js +14 -19
  149. package/src/components/global-styles/variations/variations-color.js +12 -4
  150. package/src/components/global-styles/variations/variations-typography.js +5 -1
  151. package/src/components/global-styles-sidebar/index.js +2 -0
  152. package/src/components/global-styles-sidebar/style.scss +0 -1
  153. package/src/components/layout/index.js +41 -137
  154. package/src/components/layout/style.scss +18 -58
  155. package/src/components/page/header.js +1 -0
  156. package/src/components/page/style.scss +6 -0
  157. package/src/components/page-patterns/header.js +8 -2
  158. package/src/components/page-patterns/index.js +15 -12
  159. package/src/components/page-patterns/style.scss +6 -0
  160. package/src/components/pagination/index.js +21 -16
  161. package/src/components/posts-app/index.js +39 -0
  162. package/src/components/sidebar/style.scss +4 -4
  163. package/src/components/sidebar-dataviews/dataview-item.js +6 -2
  164. package/src/components/sidebar-navigation-screen/index.js +1 -1
  165. package/src/components/sidebar-navigation-screen/style.scss +2 -2
  166. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -0
  167. package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
  168. package/src/components/sidebar-navigation-screen-patterns/category-item.js +11 -2
  169. package/src/components/sidebar-navigation-screen-patterns/index.js +5 -1
  170. package/src/components/site-hub/index.js +55 -146
  171. package/src/components/site-hub/style.scss +1 -4
  172. package/src/components/site-icon/style.scss +0 -4
  173. package/src/hooks/commands/use-set-command-context.js +37 -0
  174. package/src/hooks/push-changes-to-global-styles/index.js +3 -2
  175. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +1 -875
  176. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +29 -117
  177. package/src/index.js +10 -2
  178. package/src/posts.js +29 -0
  179. package/src/posts.scss +46 -0
  180. package/src/store/private-actions.js +58 -30
  181. package/build/components/block-editor/block-inspector-button.js +0 -57
  182. package/build/components/block-editor/block-inspector-button.js.map +0 -1
  183. package/build/components/block-editor/inserter-media-categories.js +0 -183
  184. package/build/components/block-editor/inserter-media-categories.js.map +0 -1
  185. package/build/components/template-part-converter/convert-to-regular.js +0 -38
  186. package/build/components/template-part-converter/convert-to-regular.js.map +0 -1
  187. package/build/components/template-part-converter/convert-to-template-part.js +0 -84
  188. package/build/components/template-part-converter/convert-to-template-part.js.map +0 -1
  189. package/build/components/template-part-converter/index.js +0 -67
  190. package/build/components/template-part-converter/index.js.map +0 -1
  191. package/build-module/components/block-editor/block-inspector-button.js +0 -50
  192. package/build-module/components/block-editor/block-inspector-button.js.map +0 -1
  193. package/build-module/components/block-editor/inserter-media-categories.js +0 -177
  194. package/build-module/components/block-editor/inserter-media-categories.js.map +0 -1
  195. package/build-module/components/template-part-converter/convert-to-regular.js +0 -31
  196. package/build-module/components/template-part-converter/convert-to-regular.js.map +0 -1
  197. package/build-module/components/template-part-converter/convert-to-template-part.js +0 -79
  198. package/build-module/components/template-part-converter/convert-to-template-part.js.map +0 -1
  199. package/build-module/components/template-part-converter/index.js +0 -59
  200. package/build-module/components/template-part-converter/index.js.map +0 -1
  201. package/src/components/block-editor/block-inspector-button.js +0 -60
  202. package/src/components/block-editor/inserter-media-categories.js +0 -227
  203. package/src/components/template-part-converter/convert-to-regular.js +0 -32
  204. package/src/components/template-part-converter/convert-to-template-part.js +0 -78
  205. package/src/components/template-part-converter/index.js +0 -59
@@ -459,8 +459,7 @@
459
459
  line-height: 16px;
460
460
  }
461
461
  .dataviews-view-grid .dataviews-view-grid__fields:not(:empty) {
462
- padding: 12px 0;
463
- padding-top: 0;
462
+ padding: 0 0 12px;
464
463
  }
465
464
  .dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field {
466
465
  align-items: flex-start;
@@ -513,6 +512,7 @@
513
512
  .dataviews-view-list li .dataviews-view-list__item-actions .components-button {
514
513
  opacity: 0;
515
514
  position: fixed;
515
+ right: 0;
516
516
  }
517
517
  .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
518
  padding-right: 32px;
@@ -652,11 +652,6 @@
652
652
  margin: 0;
653
653
  }
654
654
 
655
- .dataviews-filters__custom-menu-radio-item-prefix {
656
- display: block;
657
- width: 24px;
658
- }
659
-
660
655
  .dataviews-bulk-edit-button.components-button {
661
656
  flex-shrink: 0;
662
657
  }
@@ -928,12 +923,15 @@
928
923
  }
929
924
 
930
925
  .dataviews-bulk-actions {
931
- position: absolute;
926
+ position: sticky;
932
927
  display: flex;
933
928
  flex-direction: column;
934
929
  align-content: center;
935
930
  flex-wrap: wrap;
936
- width: 100%;
931
+ width: -moz-fit-content;
932
+ width: fit-content;
933
+ margin-left: auto;
934
+ margin-right: auto;
937
935
  bottom: 24px;
938
936
  z-index: 2;
939
937
  }
@@ -1110,6 +1108,18 @@
1110
1108
  align-items: flex-start;
1111
1109
  }
1112
1110
 
1111
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
1112
+ ::view-transition-old(frame),
1113
+ ::view-transition-new(frame) {
1114
+ animation-duration: 0;
1115
+ }
1116
+
1117
+ /* stylelint-enable */
1118
+ .edit-site-visual-editor__editor-canvas {
1119
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
1120
+ view-transition-name: frame;
1121
+ /* stylelint-enable */
1122
+ }
1113
1123
  .edit-site-visual-editor__editor-canvas.is-focused {
1114
1124
  outline: calc(2 * var(--wp-admin-border-width-focus)) solid var(--wp-admin-theme-color);
1115
1125
  outline-offset: calc(-2 * var(--wp-admin-border-width-focus));
@@ -1171,11 +1181,6 @@
1171
1181
  overflow: hidden;
1172
1182
  }
1173
1183
 
1174
- .edit-site-typography-panel__full-width-control {
1175
- grid-column: 1/-1;
1176
- max-width: 100%;
1177
- }
1178
-
1179
1184
  .edit-site-global-styles-screen {
1180
1185
  margin: 12px 16px 16px;
1181
1186
  }
@@ -1230,8 +1235,7 @@
1230
1235
  color: #2f2f2f;
1231
1236
  font-weight: 600;
1232
1237
  line-height: 1.2;
1233
- padding: 16px;
1234
- padding-bottom: 0;
1238
+ padding: 16px 16px 0;
1235
1239
  margin: 0;
1236
1240
  }
1237
1241
 
@@ -1505,18 +1509,12 @@
1505
1509
  will-change: opacity;
1506
1510
  }
1507
1511
  .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
1512
  color: #1e1e1e;
1511
- margin-bottom: 4px;
1512
- line-height: 1.2;
1513
1513
  }
1514
- .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled {
1514
+ .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled,
1515
+ .edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true] {
1515
1516
  color: #949494;
1516
1517
  }
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
1518
 
1521
1519
  .edit-site-global-styles-screen-revisions__footer {
1522
1520
  height: 56px;
@@ -1572,7 +1570,6 @@
1572
1570
  font-weight: 500;
1573
1571
  }
1574
1572
 
1575
- .edit-site-typography-panel,
1576
1573
  .edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings {
1577
1574
  border: 0;
1578
1575
  }
@@ -1647,6 +1644,11 @@
1647
1644
  .edit-site-page-header .edit-site-page-header__page-title {
1648
1645
  min-height: 40px;
1649
1646
  }
1647
+ .edit-site-page-header .edit-site-page-header__page-title .components-heading {
1648
+ flex-grow: 1;
1649
+ flex-basis: 0;
1650
+ white-space: nowrap;
1651
+ }
1650
1652
  .edit-site-page-header .edit-site-page-header__sub-title {
1651
1653
  margin-bottom: 8px;
1652
1654
  }
@@ -1814,6 +1816,11 @@
1814
1816
  .edit-site-page-patterns-dataviews .edit-site-patterns__section-header .edit-site-patterns__title {
1815
1817
  min-height: 40px;
1816
1818
  }
1819
+ .edit-site-page-patterns-dataviews .edit-site-patterns__section-header .edit-site-patterns__title .components-heading {
1820
+ flex-grow: 1;
1821
+ flex-basis: 0;
1822
+ white-space: nowrap;
1823
+ }
1817
1824
  .edit-site-page-patterns-dataviews .edit-site-patterns__section-header .edit-site-patterns__sub-title {
1818
1825
  margin-bottom: 8px;
1819
1826
  }
@@ -2012,17 +2019,17 @@
2012
2019
  border-bottom: 1px solid #f0f0f0;
2013
2020
  }
2014
2021
 
2015
- .edit-site-editor__interface-skeleton {
2022
+ .edit-site-editor__editor-interface {
2016
2023
  opacity: 1;
2017
2024
  transition: opacity 0.1s ease-out;
2018
2025
  }
2019
2026
  @media (prefers-reduced-motion: reduce) {
2020
- .edit-site-editor__interface-skeleton {
2027
+ .edit-site-editor__editor-interface {
2021
2028
  transition-duration: 0s;
2022
2029
  transition-delay: 0s;
2023
2030
  }
2024
2031
  }
2025
- .edit-site-editor__interface-skeleton.is-loading {
2032
+ .edit-site-editor__editor-interface.is-loading {
2026
2033
  opacity: 0;
2027
2034
  }
2028
2035
 
@@ -2036,10 +2043,6 @@
2036
2043
  justify-content: center;
2037
2044
  }
2038
2045
 
2039
- .editor-header {
2040
- padding-left: 60px;
2041
- }
2042
-
2043
2046
  .edit-site-welcome-guide {
2044
2047
  width: 312px;
2045
2048
  }
@@ -2090,38 +2093,8 @@
2090
2093
  display: flex;
2091
2094
  flex-direction: column;
2092
2095
  }
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;
2096
+ .edit-site-layout:not(.is-full-canvas) .editor-visual-editor {
2097
+ background: #1e1e1e;
2125
2098
  }
2126
2099
 
2127
2100
  .edit-site-layout__content {
@@ -2232,10 +2205,22 @@
2232
2205
  height: 100%;
2233
2206
  }
2234
2207
 
2208
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
2209
+ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2210
+ animation-delay: 255ms;
2211
+ }
2212
+
2213
+ /* stylelint-enable */
2214
+ .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle {
2215
+ display: none;
2216
+ }
2217
+
2235
2218
  .edit-site-layout__view-mode-toggle.components-button {
2219
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
2220
+ view-transition-name: toggle;
2221
+ /* stylelint-enable */
2236
2222
  position: relative;
2237
2223
  color: #fff;
2238
- border-radius: 0;
2239
2224
  height: 60px;
2240
2225
  width: 60px;
2241
2226
  overflow: hidden;
@@ -2243,6 +2228,8 @@
2243
2228
  display: flex;
2244
2229
  align-items: center;
2245
2230
  justify-content: center;
2231
+ background: #1e1e1e;
2232
+ border-radius: 0;
2246
2233
  }
2247
2234
  .edit-site-layout__view-mode-toggle.components-button:hover, .edit-site-layout__view-mode-toggle.components-button:active {
2248
2235
  color: #fff;
@@ -2273,7 +2260,6 @@
2273
2260
  }
2274
2261
  .edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon {
2275
2262
  display: flex;
2276
- border-radius: 2px;
2277
2263
  height: 64px;
2278
2264
  width: 64px;
2279
2265
  justify-content: center;
@@ -2304,27 +2290,6 @@
2304
2290
  }
2305
2291
  }
2306
2292
 
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
2293
  .edit-site-layout__area {
2329
2294
  flex-grow: 1;
2330
2295
  margin: 0;
@@ -2379,7 +2344,7 @@
2379
2344
  overflow-y: auto;
2380
2345
  }
2381
2346
 
2382
- @keyframes slide-from-right {
2347
+ @keyframes _w89s1_slide-from-right {
2383
2348
  from {
2384
2349
  transform: translateX(50px);
2385
2350
  opacity: 0;
@@ -2389,7 +2354,7 @@
2389
2354
  opacity: 1;
2390
2355
  }
2391
2356
  }
2392
- @keyframes slide-from-left {
2357
+ @keyframes _w89s1_slide-from-left {
2393
2358
  from {
2394
2359
  transform: translateX(-50px);
2395
2360
  opacity: 0;
@@ -2445,10 +2410,10 @@
2445
2410
  }
2446
2411
  }
2447
2412
  .edit-site-sidebar__screen-wrapper.slide-from-left {
2448
- animation-name: slide-from-left;
2413
+ animation-name: _w89s1_slide-from-left;
2449
2414
  }
2450
2415
  .edit-site-sidebar__screen-wrapper.slide-from-right {
2451
- animation-name: slide-from-right;
2416
+ animation-name: _w89s1_slide-from-right;
2452
2417
  }
2453
2418
 
2454
2419
  .edit-site-sidebar-button {
@@ -2550,7 +2515,7 @@
2550
2515
  position: sticky;
2551
2516
  top: 0;
2552
2517
  background: #1e1e1e;
2553
- padding-top: 108px;
2518
+ padding-top: 48px;
2554
2519
  margin-bottom: 8px;
2555
2520
  padding-bottom: 8px;
2556
2521
  z-index: 1;
@@ -2558,8 +2523,8 @@
2558
2523
 
2559
2524
  .edit-site-sidebar-navigation-screen__title {
2560
2525
  flex-grow: 1;
2561
- padding: 6px 0 0 0;
2562
2526
  overflow-wrap: break-word;
2527
+ padding: 2px 0 0 0;
2563
2528
  }
2564
2529
 
2565
2530
  .edit-site-sidebar-navigation-screen__actions {
@@ -2728,6 +2693,7 @@
2728
2693
  align-items: center;
2729
2694
  justify-content: space-between;
2730
2695
  gap: 8px;
2696
+ margin-right: 12px;
2731
2697
  }
2732
2698
 
2733
2699
  .edit-site-site-hub__actions {
@@ -2739,9 +2705,6 @@
2739
2705
  width: 60px;
2740
2706
  flex-shrink: 0;
2741
2707
  }
2742
- .edit-site-site-hub__view-mode-toggle-container .edit-site-layout__view-mode-toggle-icon {
2743
- background: #1e1e1e;
2744
- }
2745
2708
  .edit-site-site-hub__view-mode-toggle-container.has-transparent-background .edit-site-layout__view-mode-toggle-icon {
2746
2709
  background: transparent;
2747
2710
  }
@@ -2831,13 +2794,6 @@
2831
2794
 
2832
2795
  .edit-site-site-icon__icon {
2833
2796
  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
2797
  }
2842
2798
  .edit-site-layout.is-full-canvas .edit-site-site-icon__icon {
2843
2799
  padding: 6px;
@@ -2846,7 +2802,6 @@
2846
2802
  .edit-site-site-icon__image {
2847
2803
  width: 100%;
2848
2804
  height: 100%;
2849
- border-radius: 4px;
2850
2805
  object-fit: cover;
2851
2806
  background: #333;
2852
2807
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
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.1.0",
33
+ "@wordpress/api-fetch": "^7.1.0",
34
+ "@wordpress/blob": "^4.1.0",
35
+ "@wordpress/block-editor": "^13.1.0",
36
+ "@wordpress/block-library": "^9.1.0",
37
+ "@wordpress/blocks": "^13.1.0",
38
+ "@wordpress/commands": "^1.1.0",
39
+ "@wordpress/components": "^28.1.0",
40
+ "@wordpress/compose": "^7.1.0",
41
+ "@wordpress/core-commands": "^1.1.0",
42
+ "@wordpress/core-data": "^7.1.0",
43
+ "@wordpress/data": "^10.1.0",
44
+ "@wordpress/dataviews": "^2.1.0",
45
+ "@wordpress/date": "^5.1.0",
46
+ "@wordpress/deprecated": "^4.1.0",
47
+ "@wordpress/dom": "^4.1.0",
48
+ "@wordpress/editor": "^14.1.0",
49
+ "@wordpress/element": "^6.1.0",
50
+ "@wordpress/escape-html": "^3.1.0",
51
+ "@wordpress/hooks": "^4.1.0",
52
+ "@wordpress/html-entities": "^4.1.0",
53
+ "@wordpress/i18n": "^5.1.0",
54
+ "@wordpress/icons": "^10.1.0",
55
+ "@wordpress/keyboard-shortcuts": "^5.1.0",
56
+ "@wordpress/keycodes": "^4.1.0",
57
+ "@wordpress/notices": "^5.1.0",
58
+ "@wordpress/patterns": "^2.1.0",
59
+ "@wordpress/plugins": "^7.1.0",
60
+ "@wordpress/preferences": "^4.1.0",
61
+ "@wordpress/primitives": "^4.1.0",
62
+ "@wordpress/priority-queue": "^3.1.0",
63
+ "@wordpress/private-apis": "^1.1.0",
64
+ "@wordpress/reusable-blocks": "^5.1.0",
65
+ "@wordpress/router": "^1.1.0",
66
+ "@wordpress/style-engine": "^2.1.0",
67
+ "@wordpress/url": "^4.1.0",
68
+ "@wordpress/viewport": "^6.1.0",
69
+ "@wordpress/widgets": "^4.1.0",
70
+ "@wordpress/wordcount": "^4.1.0",
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": "66d3bf12e67d16deddc4b4a9ec42e1d0bed3479a"
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',
@@ -17,10 +17,26 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
17
17
  */
18
18
  import Layout from '../layout';
19
19
  import { unlock } from '../../lock-unlock';
20
+ import { useCommonCommands } from '../../hooks/commands/use-common-commands';
21
+ import { useEditModeCommands } from '../../hooks/commands/use-edit-mode-commands';
22
+ import useInitEditedEntityFromURL from '../sync-state-with-url/use-init-edited-entity-from-url';
23
+ import useLayoutAreas from '../layout/router';
24
+ import useSetCommandContext from '../../hooks/commands/use-set-command-context';
20
25
 
21
26
  const { RouterProvider } = unlock( routerPrivateApis );
22
27
  const { GlobalStylesProvider } = unlock( editorPrivateApis );
23
28
 
29
+ function AppLayout() {
30
+ // This ensures the edited entity id and type are initialized properly.
31
+ useInitEditedEntityFromURL();
32
+ useEditModeCommands();
33
+ useCommonCommands();
34
+ useSetCommandContext();
35
+ const route = useLayoutAreas();
36
+
37
+ return <Layout route={ route } />;
38
+ }
39
+
24
40
  export default function App() {
25
41
  const { createErrorNotice } = useDispatch( noticesStore );
26
42
 
@@ -41,7 +57,7 @@ export default function App() {
41
57
  <GlobalStylesProvider>
42
58
  <UnsavedChangesWarning />
43
59
  <RouterProvider>
44
- <Layout />
60
+ <AppLayout />
45
61
  <PluginArea onError={ onPluginAreaError } />
46
62
  </RouterProvider>
47
63
  </GlobalStylesProvider>
@@ -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));