@wordpress/edit-site 3.0.2 → 3.0.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 (252) hide show
  1. package/README.md +1 -1
  2. package/build/components/block-editor/back-button.js +60 -0
  3. package/build/components/block-editor/back-button.js.map +1 -0
  4. package/build/components/block-editor/index.js +18 -4
  5. package/build/components/block-editor/index.js.map +1 -1
  6. package/build/components/edit-template-part-menu-button/index.js +63 -0
  7. package/build/components/edit-template-part-menu-button/index.js.map +1 -0
  8. package/build/components/editor/global-styles-provider.js +1 -1
  9. package/build/components/editor/global-styles-provider.js.map +1 -1
  10. package/build/components/editor/index.js +7 -7
  11. package/build/components/editor/index.js.map +1 -1
  12. package/build/components/editor/utils.js +1 -1
  13. package/build/components/editor/utils.js.map +1 -1
  14. package/build/components/{sidebar → global-styles}/border-panel.js +0 -0
  15. package/build/components/global-styles/border-panel.js.map +1 -0
  16. package/build/components/{sidebar → global-styles}/color-palette-panel.js +4 -2
  17. package/build/components/global-styles/color-palette-panel.js.map +1 -0
  18. package/build/components/{sidebar → global-styles}/color-panel.js +7 -11
  19. package/build/components/global-styles/color-panel.js.map +1 -0
  20. package/build/components/global-styles/context-menu.js +58 -0
  21. package/build/components/global-styles/context-menu.js.map +1 -0
  22. package/build/components/{sidebar → global-styles}/dimensions-panel.js +6 -7
  23. package/build/components/global-styles/dimensions-panel.js.map +1 -0
  24. package/build/components/global-styles/header.js +54 -0
  25. package/build/components/global-styles/header.js.map +1 -0
  26. package/build/components/global-styles/index.js +89 -0
  27. package/build/components/global-styles/index.js.map +1 -0
  28. package/build/components/global-styles/navigation-button.js +43 -0
  29. package/build/components/global-styles/navigation-button.js.map +1 -0
  30. package/build/components/global-styles/palette.js +57 -0
  31. package/build/components/global-styles/palette.js.map +1 -0
  32. package/build/components/global-styles/preview.js +59 -0
  33. package/build/components/global-styles/preview.js.map +1 -0
  34. package/build/components/global-styles/screen-block-list.js +76 -0
  35. package/build/components/global-styles/screen-block-list.js.map +1 -0
  36. package/build/components/global-styles/screen-block.js +45 -0
  37. package/build/components/global-styles/screen-block.js.map +1 -0
  38. package/build/components/global-styles/screen-color-palette.js +48 -0
  39. package/build/components/global-styles/screen-color-palette.js.map +1 -0
  40. package/build/components/global-styles/screen-colors.js +51 -0
  41. package/build/components/global-styles/screen-colors.js.map +1 -0
  42. package/build/components/global-styles/screen-layout.js +60 -0
  43. package/build/components/global-styles/screen-layout.js.map +1 -0
  44. package/build/components/global-styles/screen-root.js +44 -0
  45. package/build/components/global-styles/screen-root.js.map +1 -0
  46. package/build/components/global-styles/screen-typography.js +50 -0
  47. package/build/components/global-styles/screen-typography.js.map +1 -0
  48. package/build/components/global-styles/subtitle.js +25 -0
  49. package/build/components/global-styles/subtitle.js.map +1 -0
  50. package/build/components/{sidebar → global-styles}/typography-panel.js +1 -3
  51. package/build/components/global-styles/typography-panel.js.map +1 -0
  52. package/build/components/header/plugin-more-menu-item/index.js +82 -0
  53. package/build/components/header/plugin-more-menu-item/index.js.map +1 -0
  54. package/build/components/header/plugin-sidebar-more-menu-item/index.js +75 -0
  55. package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -0
  56. package/build/components/header/undo-redo/redo.js +1 -1
  57. package/build/components/header/undo-redo/redo.js.map +1 -1
  58. package/build/components/header/undo-redo/undo.js +1 -1
  59. package/build/components/header/undo-redo/undo.js.map +1 -1
  60. package/build/components/keyboard-shortcuts/index.js +2 -10
  61. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  62. package/build/components/navigation-sidebar/index.js +1 -1
  63. package/build/components/navigation-sidebar/index.js.map +1 -1
  64. package/build/components/navigation-sidebar/navigation-panel/constants.js +10 -10
  65. package/build/components/navigation-sidebar/navigation-panel/constants.js.map +1 -1
  66. package/build/components/save-button/index.js +1 -1
  67. package/build/components/save-button/index.js.map +1 -1
  68. package/build/components/secondary-sidebar/inserter-sidebar.js +2 -1
  69. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  70. package/build/components/sidebar/global-styles-sidebar.js +11 -161
  71. package/build/components/sidebar/global-styles-sidebar.js.map +1 -1
  72. package/build/components/sidebar/index.js +1 -6
  73. package/build/components/sidebar/index.js.map +1 -1
  74. package/build/components/sidebar/plugin-sidebar/index.js +95 -0
  75. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -0
  76. package/build/components/template-details/index.js +12 -6
  77. package/build/components/template-details/index.js.map +1 -1
  78. package/build/components/template-details/template-areas.js +73 -0
  79. package/build/components/template-details/template-areas.js.map +1 -0
  80. package/build/components/template-part-converter/index.js +1 -1
  81. package/build/components/template-part-converter/index.js.map +1 -1
  82. package/build/components/url-query-controller/index.js +1 -1
  83. package/build/components/url-query-controller/index.js.map +1 -1
  84. package/build/index.js +24 -0
  85. package/build/index.js.map +1 -1
  86. package/build/store/actions.js +54 -1
  87. package/build/store/actions.js.map +1 -1
  88. package/build/store/constants.js +19 -1
  89. package/build/store/constants.js.map +1 -1
  90. package/build/store/reducer.js +16 -7
  91. package/build/store/reducer.js.map +1 -1
  92. package/build/store/selectors.js +91 -9
  93. package/build/store/selectors.js.map +1 -1
  94. package/build-module/components/block-editor/back-button.js +48 -0
  95. package/build-module/components/block-editor/back-button.js.map +1 -0
  96. package/build-module/components/block-editor/index.js +15 -4
  97. package/build-module/components/block-editor/index.js.map +1 -1
  98. package/build-module/components/edit-template-part-menu-button/index.js +49 -0
  99. package/build-module/components/edit-template-part-menu-button/index.js.map +1 -0
  100. package/build-module/components/editor/global-styles-provider.js +1 -1
  101. package/build-module/components/editor/global-styles-provider.js.map +1 -1
  102. package/build-module/components/editor/index.js +4 -5
  103. package/build-module/components/editor/index.js.map +1 -1
  104. package/build-module/components/editor/utils.js +1 -1
  105. package/build-module/components/editor/utils.js.map +1 -1
  106. package/build-module/components/{sidebar → global-styles}/border-panel.js +0 -0
  107. package/build-module/components/global-styles/border-panel.js.map +1 -0
  108. package/build-module/components/{sidebar → global-styles}/color-palette-panel.js +4 -2
  109. package/build-module/components/global-styles/color-palette-panel.js.map +1 -0
  110. package/build-module/components/{sidebar → global-styles}/color-panel.js +8 -12
  111. package/build-module/components/global-styles/color-panel.js.map +1 -0
  112. package/build-module/components/global-styles/context-menu.js +41 -0
  113. package/build-module/components/global-styles/context-menu.js.map +1 -0
  114. package/build-module/components/{sidebar → global-styles}/dimensions-panel.js +6 -7
  115. package/build-module/components/global-styles/dimensions-panel.js.map +1 -0
  116. package/build-module/components/global-styles/header.js +41 -0
  117. package/build-module/components/global-styles/header.js.map +1 -0
  118. package/build-module/components/global-styles/index.js +70 -0
  119. package/build-module/components/global-styles/index.js.map +1 -0
  120. package/build-module/components/global-styles/navigation-button.js +31 -0
  121. package/build-module/components/global-styles/navigation-button.js.map +1 -0
  122. package/build-module/components/global-styles/palette.js +43 -0
  123. package/build-module/components/global-styles/palette.js.map +1 -0
  124. package/build-module/components/global-styles/preview.js +50 -0
  125. package/build-module/components/global-styles/preview.js.map +1 -0
  126. package/build-module/components/global-styles/screen-block-list.js +58 -0
  127. package/build-module/components/global-styles/screen-block-list.js.map +1 -0
  128. package/build-module/components/global-styles/screen-block.js +32 -0
  129. package/build-module/components/global-styles/screen-block.js.map +1 -0
  130. package/build-module/components/global-styles/screen-color-palette.js +35 -0
  131. package/build-module/components/global-styles/screen-color-palette.js.map +1 -0
  132. package/build-module/components/global-styles/screen-colors.js +38 -0
  133. package/build-module/components/global-styles/screen-colors.js.map +1 -0
  134. package/build-module/components/global-styles/screen-layout.js +44 -0
  135. package/build-module/components/global-styles/screen-layout.js.map +1 -0
  136. package/build-module/components/global-styles/screen-root.js +29 -0
  137. package/build-module/components/global-styles/screen-root.js.map +1 -0
  138. package/build-module/components/global-styles/screen-typography.js +37 -0
  139. package/build-module/components/global-styles/screen-typography.js.map +1 -0
  140. package/build-module/components/global-styles/subtitle.js +17 -0
  141. package/build-module/components/global-styles/subtitle.js.map +1 -0
  142. package/build-module/components/{sidebar → global-styles}/typography-panel.js +1 -2
  143. package/build-module/components/global-styles/typography-panel.js.map +1 -0
  144. package/build-module/components/header/plugin-more-menu-item/index.js +70 -0
  145. package/build-module/components/header/plugin-more-menu-item/index.js.map +1 -0
  146. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +64 -0
  147. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -0
  148. package/build-module/components/header/undo-redo/redo.js +1 -1
  149. package/build-module/components/header/undo-redo/redo.js.map +1 -1
  150. package/build-module/components/header/undo-redo/undo.js +1 -1
  151. package/build-module/components/header/undo-redo/undo.js.map +1 -1
  152. package/build-module/components/keyboard-shortcuts/index.js +3 -11
  153. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  154. package/build-module/components/navigation-sidebar/index.js +1 -1
  155. package/build-module/components/navigation-sidebar/index.js.map +1 -1
  156. package/build-module/components/navigation-sidebar/navigation-panel/constants.js +5 -3
  157. package/build-module/components/navigation-sidebar/navigation-panel/constants.js.map +1 -1
  158. package/build-module/components/save-button/index.js +1 -1
  159. package/build-module/components/save-button/index.js.map +1 -1
  160. package/build-module/components/secondary-sidebar/inserter-sidebar.js +2 -1
  161. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  162. package/build-module/components/sidebar/global-styles-sidebar.js +13 -159
  163. package/build-module/components/sidebar/global-styles-sidebar.js.map +1 -1
  164. package/build-module/components/sidebar/index.js +2 -7
  165. package/build-module/components/sidebar/index.js.map +1 -1
  166. package/build-module/components/sidebar/plugin-sidebar/index.js +84 -0
  167. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -0
  168. package/build-module/components/template-details/index.js +13 -8
  169. package/build-module/components/template-details/index.js.map +1 -1
  170. package/build-module/components/template-details/template-areas.js +60 -0
  171. package/build-module/components/template-details/template-areas.js.map +1 -0
  172. package/build-module/components/template-part-converter/index.js +1 -1
  173. package/build-module/components/template-part-converter/index.js.map +1 -1
  174. package/build-module/components/url-query-controller/index.js +1 -1
  175. package/build-module/components/url-query-controller/index.js.map +1 -1
  176. package/build-module/index.js +3 -0
  177. package/build-module/index.js.map +1 -1
  178. package/build-module/store/actions.js +45 -1
  179. package/build-module/store/actions.js.map +1 -1
  180. package/build-module/store/constants.js +13 -0
  181. package/build-module/store/constants.js.map +1 -1
  182. package/build-module/store/reducer.js +16 -7
  183. package/build-module/store/reducer.js.map +1 -1
  184. package/build-module/store/selectors.js +85 -9
  185. package/build-module/store/selectors.js.map +1 -1
  186. package/build-style/style-rtl.css +122 -17
  187. package/build-style/style.css +122 -17
  188. package/package.json +26 -26
  189. package/src/components/block-editor/back-button.js +44 -0
  190. package/src/components/block-editor/index.js +16 -1
  191. package/src/components/block-editor/style.scss +26 -0
  192. package/src/components/edit-template-part-menu-button/index.js +57 -0
  193. package/src/components/editor/global-styles-provider.js +1 -1
  194. package/src/components/editor/index.js +5 -8
  195. package/src/components/editor/utils.js +1 -0
  196. package/src/components/{sidebar → global-styles}/border-panel.js +0 -0
  197. package/src/components/{sidebar → global-styles}/color-palette-panel.js +13 -11
  198. package/src/components/{sidebar → global-styles}/color-panel.js +12 -17
  199. package/src/components/global-styles/context-menu.js +54 -0
  200. package/src/components/{sidebar → global-styles}/dimensions-panel.js +6 -10
  201. package/src/components/global-styles/header.js +50 -0
  202. package/src/components/global-styles/index.js +81 -0
  203. package/src/components/global-styles/navigation-button.js +35 -0
  204. package/src/components/global-styles/palette.js +67 -0
  205. package/src/components/global-styles/preview.js +41 -0
  206. package/src/components/global-styles/screen-block-list.js +59 -0
  207. package/src/components/global-styles/screen-block.js +28 -0
  208. package/src/components/global-styles/screen-color-palette.js +33 -0
  209. package/src/components/global-styles/screen-colors.js +36 -0
  210. package/src/components/global-styles/screen-layout.js +45 -0
  211. package/src/components/global-styles/screen-root.js +43 -0
  212. package/src/components/global-styles/screen-typography.js +33 -0
  213. package/src/components/global-styles/style.scss +35 -0
  214. package/src/components/global-styles/subtitle.js +10 -0
  215. package/src/components/{sidebar → global-styles}/typography-panel.js +1 -2
  216. package/src/components/header/plugin-more-menu-item/index.js +71 -0
  217. package/src/components/header/plugin-sidebar-more-menu-item/index.js +64 -0
  218. package/src/components/header/undo-redo/redo.js +4 -1
  219. package/src/components/header/undo-redo/undo.js +4 -1
  220. package/src/components/keyboard-shortcuts/index.js +25 -40
  221. package/src/components/navigation-sidebar/index.js +1 -1
  222. package/src/components/navigation-sidebar/navigation-panel/constants.js +9 -4
  223. package/src/components/navigation-sidebar/navigation-panel/style.scss +1 -0
  224. package/src/components/save-button/index.js +1 -1
  225. package/src/components/secondary-sidebar/inserter-sidebar.js +1 -0
  226. package/src/components/sidebar/global-styles-sidebar.js +14 -187
  227. package/src/components/sidebar/index.js +2 -7
  228. package/src/components/sidebar/plugin-sidebar/index.js +80 -0
  229. package/src/components/sidebar/style.scss +40 -0
  230. package/src/components/template-details/index.js +17 -7
  231. package/src/components/template-details/style.scss +36 -27
  232. package/src/components/template-details/template-areas.js +66 -0
  233. package/src/components/template-part-converter/index.js +1 -1
  234. package/src/components/url-query-controller/index.js +1 -1
  235. package/src/index.js +3 -0
  236. package/src/store/actions.js +53 -1
  237. package/src/store/constants.js +15 -0
  238. package/src/store/reducer.js +26 -12
  239. package/src/store/selectors.js +96 -9
  240. package/src/store/test/reducer.js +40 -23
  241. package/src/store/test/selectors.js +34 -3
  242. package/src/style.scss +1 -0
  243. package/build/components/sidebar/border-panel.js.map +0 -1
  244. package/build/components/sidebar/color-palette-panel.js.map +0 -1
  245. package/build/components/sidebar/color-panel.js.map +0 -1
  246. package/build/components/sidebar/dimensions-panel.js.map +0 -1
  247. package/build/components/sidebar/typography-panel.js.map +0 -1
  248. package/build-module/components/sidebar/border-panel.js.map +0 -1
  249. package/build-module/components/sidebar/color-palette-panel.js.map +0 -1
  250. package/build-module/components/sidebar/color-panel.js.map +0 -1
  251. package/build-module/components/sidebar/dimensions-panel.js.map +0 -1
  252. package/build-module/components/sidebar/typography-panel.js.map +0 -1
@@ -122,6 +122,12 @@
122
122
  }
123
123
  }
124
124
 
125
+ @media (min-width: 782px) {
126
+ .components-panel__header + .interface-complementary-area-header {
127
+ margin-top: 0;
128
+ }
129
+ }
130
+
125
131
  .interface-complementary-area {
126
132
  background: #fff;
127
133
  color: #1e1e1e;
@@ -444,6 +450,62 @@ body.is-fullscreen-mode .interface-interface-skeleton {
444
450
  padding: 6px;
445
451
  }
446
452
 
453
+ .edit-site-visual-editor {
454
+ position: relative;
455
+ background-color: #2f2f2f;
456
+ }
457
+ .edit-site-visual-editor.is-focus-mode {
458
+ padding: 48px 48px 0;
459
+ }
460
+
461
+ .edit-site-visual-editor__editor-canvas {
462
+ border-radius: 2px 2px 0 0;
463
+ }
464
+
465
+ .edit-site-visual-editor__back-button {
466
+ position: absolute;
467
+ top: 8px;
468
+ right: 8px;
469
+ color: #fff;
470
+ }
471
+ .edit-site-visual-editor__back-button:active:not([aria-disabled=true]), .edit-site-visual-editor__back-button:focus:not([aria-disabled=true]), .edit-site-visual-editor__back-button:hover {
472
+ color: #f0f0f0;
473
+ }
474
+
475
+ .edit-site-global-styles-preview {
476
+ display: flex;
477
+ align-items: center;
478
+ justify-content: center;
479
+ min-height: 152px;
480
+ margin: 16px;
481
+ line-height: 1;
482
+ }
483
+ .edit-site-global-styles-preview .component-color-indicator {
484
+ border-radius: 50%;
485
+ border: 0;
486
+ height: 36px;
487
+ width: 36px;
488
+ margin-right: 0;
489
+ padding: 0;
490
+ }
491
+
492
+ .edit-site-global-style-palette {
493
+ margin: 16px;
494
+ }
495
+ .edit-site-global-style-palette .component-color-indicator {
496
+ display: block;
497
+ border-radius: 50%;
498
+ border: 0;
499
+ height: 24px;
500
+ width: 24px;
501
+ margin-right: 0;
502
+ padding: 0;
503
+ }
504
+
505
+ .edit-site-global-styles-header__description {
506
+ padding: 0 16px;
507
+ }
508
+
447
509
  .edit-site-header {
448
510
  align-items: center;
449
511
  background-color: #fff;
@@ -764,6 +826,7 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
764
826
  width: 0;
765
827
  overflow: hidden;
766
828
  background: #1e1e1e;
829
+ color: #fff;
767
830
  transition: width 100ms linear;
768
831
  }
769
832
  @media (prefers-reduced-motion: reduce) {
@@ -947,6 +1010,46 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
947
1010
  margin-bottom: 0;
948
1011
  }
949
1012
 
1013
+ .edit-site-global-styles-sidebar .components-navigation__menu-title-heading {
1014
+ font-size: 15.6px;
1015
+ font-weight: 500;
1016
+ }
1017
+
1018
+ .edit-site-global-styles-sidebar .components-navigation__item > button span {
1019
+ font-weight: 500;
1020
+ }
1021
+
1022
+ .edit-site-typography-panel,
1023
+ .edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings {
1024
+ border: 0;
1025
+ }
1026
+
1027
+ .edit-site-global-styles-sidebar__blocks-group {
1028
+ padding-top: 24px;
1029
+ border-top: 1px solid #e0e0e0;
1030
+ }
1031
+
1032
+ .edit-site-global-styles-sidebar__blocks-group-help {
1033
+ padding: 0 16px;
1034
+ }
1035
+
1036
+ .edit-site-global-styles-color-palette-panel {
1037
+ padding: 16px;
1038
+ }
1039
+
1040
+ .edit-site-global-styles-sidebar__beta {
1041
+ display: inline-flex;
1042
+ margin-right: 8px;
1043
+ padding: 0 8px;
1044
+ height: 24px;
1045
+ border-radius: 2px;
1046
+ background-color: #000;
1047
+ color: #fff;
1048
+ align-items: center;
1049
+ font-size: 12px;
1050
+ line-height: 1;
1051
+ }
1052
+
950
1053
  .components-panel__header.edit-site-sidebar__panel-tabs {
951
1054
  justify-content: flex-start;
952
1055
  padding-right: 0;
@@ -1125,30 +1228,32 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
1125
1228
  right: 0 !important;
1126
1229
  }
1127
1230
 
1128
- .edit-site-template-details {
1129
- margin: 8px 16px;
1231
+ .edit-site-template-details .edit-site-template-details__group {
1232
+ margin: 0;
1233
+ padding: 16px;
1130
1234
  }
1131
- .edit-site-template-details p {
1132
- padding: 8px 0;
1235
+ .edit-site-template-details .edit-site-template-details__group + .edit-site-template-details__group {
1236
+ border-top: 1px solid #ccc;
1133
1237
  }
1134
-
1135
- .edit-site-template-details__description {
1238
+ .edit-site-template-details .edit-site-template-details__title {
1239
+ margin: 0 0 12px;
1240
+ }
1241
+ .edit-site-template-details .edit-site-template-details__description {
1242
+ margin: 0 0 12px;
1136
1243
  color: #757575;
1137
1244
  }
1138
-
1139
- .edit-site-template-details__revert {
1140
- border-top: 1px solid #ccc;
1245
+ .edit-site-template-details .edit-site-template-details__group.edit-site-template-details__template-areas {
1246
+ padding: 8px;
1141
1247
  }
1142
- .edit-site-template-details__revert .components-menu-item__button {
1248
+ .edit-site-template-details .edit-site-template-details__revert-button {
1143
1249
  height: auto;
1144
- padding: 16px;
1250
+ padding: 0;
1145
1251
  text-align: right;
1146
1252
  }
1147
- .edit-site-template-details__revert .components-menu-item__button:focus:not(:disabled) {
1253
+ .edit-site-template-details .edit-site-template-details__revert-button:focus:not(:disabled) {
1148
1254
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 3px #fff;
1149
1255
  }
1150
-
1151
- .edit-site-template-details__show-all-button.components-button {
1256
+ .edit-site-template-details .edit-site-template-details__show-all-button.components-button {
1152
1257
  display: block;
1153
1258
  background: #1e1e1e;
1154
1259
  color: #fff;
@@ -1156,13 +1261,13 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
1156
1261
  height: 44px;
1157
1262
  border-radius: 0;
1158
1263
  }
1159
- .edit-site-template-details__show-all-button.components-button:hover {
1264
+ .edit-site-template-details .edit-site-template-details__show-all-button.components-button:hover {
1160
1265
  color: #fff;
1161
1266
  }
1162
- .edit-site-template-details__show-all-button.components-button:active {
1267
+ .edit-site-template-details .edit-site-template-details__show-all-button.components-button:active {
1163
1268
  color: #ccc;
1164
1269
  }
1165
- .edit-site-template-details__show-all-button.components-button:focus:not(:disabled) {
1270
+ .edit-site-template-details .edit-site-template-details__show-all-button.components-button:focus:not(:disabled) {
1166
1271
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 3px #fff;
1167
1272
  }
1168
1273
 
@@ -122,6 +122,12 @@
122
122
  }
123
123
  }
124
124
 
125
+ @media (min-width: 782px) {
126
+ .components-panel__header + .interface-complementary-area-header {
127
+ margin-top: 0;
128
+ }
129
+ }
130
+
125
131
  .interface-complementary-area {
126
132
  background: #fff;
127
133
  color: #1e1e1e;
@@ -444,6 +450,62 @@ body.is-fullscreen-mode .interface-interface-skeleton {
444
450
  padding: 6px;
445
451
  }
446
452
 
453
+ .edit-site-visual-editor {
454
+ position: relative;
455
+ background-color: #2f2f2f;
456
+ }
457
+ .edit-site-visual-editor.is-focus-mode {
458
+ padding: 48px 48px 0;
459
+ }
460
+
461
+ .edit-site-visual-editor__editor-canvas {
462
+ border-radius: 2px 2px 0 0;
463
+ }
464
+
465
+ .edit-site-visual-editor__back-button {
466
+ position: absolute;
467
+ top: 8px;
468
+ left: 8px;
469
+ color: #fff;
470
+ }
471
+ .edit-site-visual-editor__back-button:active:not([aria-disabled=true]), .edit-site-visual-editor__back-button:focus:not([aria-disabled=true]), .edit-site-visual-editor__back-button:hover {
472
+ color: #f0f0f0;
473
+ }
474
+
475
+ .edit-site-global-styles-preview {
476
+ display: flex;
477
+ align-items: center;
478
+ justify-content: center;
479
+ min-height: 152px;
480
+ margin: 16px;
481
+ line-height: 1;
482
+ }
483
+ .edit-site-global-styles-preview .component-color-indicator {
484
+ border-radius: 50%;
485
+ border: 0;
486
+ height: 36px;
487
+ width: 36px;
488
+ margin-left: 0;
489
+ padding: 0;
490
+ }
491
+
492
+ .edit-site-global-style-palette {
493
+ margin: 16px;
494
+ }
495
+ .edit-site-global-style-palette .component-color-indicator {
496
+ display: block;
497
+ border-radius: 50%;
498
+ border: 0;
499
+ height: 24px;
500
+ width: 24px;
501
+ margin-left: 0;
502
+ padding: 0;
503
+ }
504
+
505
+ .edit-site-global-styles-header__description {
506
+ padding: 0 16px;
507
+ }
508
+
447
509
  .edit-site-header {
448
510
  align-items: center;
449
511
  background-color: #fff;
@@ -764,6 +826,7 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
764
826
  width: 0;
765
827
  overflow: hidden;
766
828
  background: #1e1e1e;
829
+ color: #fff;
767
830
  transition: width 100ms linear;
768
831
  }
769
832
  @media (prefers-reduced-motion: reduce) {
@@ -947,6 +1010,46 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
947
1010
  margin-bottom: 0;
948
1011
  }
949
1012
 
1013
+ .edit-site-global-styles-sidebar .components-navigation__menu-title-heading {
1014
+ font-size: 15.6px;
1015
+ font-weight: 500;
1016
+ }
1017
+
1018
+ .edit-site-global-styles-sidebar .components-navigation__item > button span {
1019
+ font-weight: 500;
1020
+ }
1021
+
1022
+ .edit-site-typography-panel,
1023
+ .edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings {
1024
+ border: 0;
1025
+ }
1026
+
1027
+ .edit-site-global-styles-sidebar__blocks-group {
1028
+ padding-top: 24px;
1029
+ border-top: 1px solid #e0e0e0;
1030
+ }
1031
+
1032
+ .edit-site-global-styles-sidebar__blocks-group-help {
1033
+ padding: 0 16px;
1034
+ }
1035
+
1036
+ .edit-site-global-styles-color-palette-panel {
1037
+ padding: 16px;
1038
+ }
1039
+
1040
+ .edit-site-global-styles-sidebar__beta {
1041
+ display: inline-flex;
1042
+ margin-left: 8px;
1043
+ padding: 0 8px;
1044
+ height: 24px;
1045
+ border-radius: 2px;
1046
+ background-color: #000;
1047
+ color: #fff;
1048
+ align-items: center;
1049
+ font-size: 12px;
1050
+ line-height: 1;
1051
+ }
1052
+
950
1053
  .components-panel__header.edit-site-sidebar__panel-tabs {
951
1054
  justify-content: flex-start;
952
1055
  padding-left: 0;
@@ -1125,30 +1228,32 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
1125
1228
  left: 0 !important;
1126
1229
  }
1127
1230
 
1128
- .edit-site-template-details {
1129
- margin: 8px 16px;
1231
+ .edit-site-template-details .edit-site-template-details__group {
1232
+ margin: 0;
1233
+ padding: 16px;
1130
1234
  }
1131
- .edit-site-template-details p {
1132
- padding: 8px 0;
1235
+ .edit-site-template-details .edit-site-template-details__group + .edit-site-template-details__group {
1236
+ border-top: 1px solid #ccc;
1133
1237
  }
1134
-
1135
- .edit-site-template-details__description {
1238
+ .edit-site-template-details .edit-site-template-details__title {
1239
+ margin: 0 0 12px;
1240
+ }
1241
+ .edit-site-template-details .edit-site-template-details__description {
1242
+ margin: 0 0 12px;
1136
1243
  color: #757575;
1137
1244
  }
1138
-
1139
- .edit-site-template-details__revert {
1140
- border-top: 1px solid #ccc;
1245
+ .edit-site-template-details .edit-site-template-details__group.edit-site-template-details__template-areas {
1246
+ padding: 8px;
1141
1247
  }
1142
- .edit-site-template-details__revert .components-menu-item__button {
1248
+ .edit-site-template-details .edit-site-template-details__revert-button {
1143
1249
  height: auto;
1144
- padding: 16px;
1250
+ padding: 0;
1145
1251
  text-align: left;
1146
1252
  }
1147
- .edit-site-template-details__revert .components-menu-item__button:focus:not(:disabled) {
1253
+ .edit-site-template-details .edit-site-template-details__revert-button:focus:not(:disabled) {
1148
1254
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 3px #fff;
1149
1255
  }
1150
-
1151
- .edit-site-template-details__show-all-button.components-button {
1256
+ .edit-site-template-details .edit-site-template-details__show-all-button.components-button {
1152
1257
  display: block;
1153
1258
  background: #1e1e1e;
1154
1259
  color: #fff;
@@ -1156,13 +1261,13 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
1156
1261
  height: 44px;
1157
1262
  border-radius: 0;
1158
1263
  }
1159
- .edit-site-template-details__show-all-button.components-button:hover {
1264
+ .edit-site-template-details .edit-site-template-details__show-all-button.components-button:hover {
1160
1265
  color: #fff;
1161
1266
  }
1162
- .edit-site-template-details__show-all-button.components-button:active {
1267
+ .edit-site-template-details .edit-site-template-details__show-all-button.components-button:active {
1163
1268
  color: #ccc;
1164
1269
  }
1165
- .edit-site-template-details__show-all-button.components-button:focus:not(:disabled) {
1270
+ .edit-site-template-details .edit-site-template-details__show-all-button.components-button:focus:not(:disabled) {
1166
1271
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 3px #fff;
1167
1272
  }
1168
1273
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,30 +27,30 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.13.10",
30
- "@wordpress/a11y": "^3.2.2",
31
- "@wordpress/api-fetch": "^5.2.2",
32
- "@wordpress/block-editor": "^7.0.2",
33
- "@wordpress/block-library": "^6.0.0",
34
- "@wordpress/blocks": "^11.1.0",
35
- "@wordpress/components": "^17.0.0",
36
- "@wordpress/compose": "^5.0.2",
37
- "@wordpress/core-data": "^4.0.2",
38
- "@wordpress/data": "^6.1.0",
39
- "@wordpress/data-controls": "^2.2.3",
40
- "@wordpress/editor": "^11.0.2",
41
- "@wordpress/element": "^4.0.1",
42
- "@wordpress/hooks": "^3.2.0",
43
- "@wordpress/html-entities": "^3.2.1",
44
- "@wordpress/i18n": "^4.2.2",
45
- "@wordpress/icons": "^5.0.2",
46
- "@wordpress/interface": "^4.1.0",
47
- "@wordpress/keyboard-shortcuts": "^3.0.2",
48
- "@wordpress/keycodes": "^3.2.2",
49
- "@wordpress/media-utils": "^3.0.1",
50
- "@wordpress/notices": "^3.2.3",
51
- "@wordpress/plugins": "^4.0.2",
52
- "@wordpress/primitives": "^3.0.1",
53
- "@wordpress/url": "^3.2.2",
30
+ "@wordpress/a11y": "^3.2.3",
31
+ "@wordpress/api-fetch": "^5.2.3",
32
+ "@wordpress/block-editor": "^7.0.3",
33
+ "@wordpress/block-library": "^6.0.1",
34
+ "@wordpress/blocks": "^11.1.1",
35
+ "@wordpress/components": "^18.0.0",
36
+ "@wordpress/compose": "^5.0.3",
37
+ "@wordpress/core-data": "^4.0.3",
38
+ "@wordpress/data": "^6.1.1",
39
+ "@wordpress/data-controls": "^2.2.4",
40
+ "@wordpress/editor": "^12.0.0",
41
+ "@wordpress/element": "^4.0.2",
42
+ "@wordpress/hooks": "^3.2.1",
43
+ "@wordpress/html-entities": "^3.2.2",
44
+ "@wordpress/i18n": "^4.2.3",
45
+ "@wordpress/icons": "^6.0.0",
46
+ "@wordpress/interface": "^4.1.1",
47
+ "@wordpress/keyboard-shortcuts": "^3.0.3",
48
+ "@wordpress/keycodes": "^3.2.3",
49
+ "@wordpress/media-utils": "^3.0.2",
50
+ "@wordpress/notices": "^3.2.4",
51
+ "@wordpress/plugins": "^4.0.3",
52
+ "@wordpress/primitives": "^3.0.2",
53
+ "@wordpress/url": "^3.2.3",
54
54
  "classnames": "^2.3.1",
55
55
  "downloadjs": "^1.4.7",
56
56
  "file-saver": "^2.0.2",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "98c42a7187f788fe3e023f04df7f5dcbdae4e4e7"
64
+ "gitHead": "8f7f052bc04e3f4eb50f479ced14be1489b9fa79"
65
65
  }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { Button } from '@wordpress/components';
5
+ import { arrowLeft } from '@wordpress/icons';
6
+ import { useSelect, useDispatch } from '@wordpress/data';
7
+ import { __ } from '@wordpress/i18n';
8
+
9
+ /**
10
+ * Internal dependencies
11
+ */
12
+ import { store as editSiteStore } from '../../store';
13
+
14
+ function BackButton() {
15
+ const { isTemplatePart, previousTemplateId } = useSelect( ( select ) => {
16
+ const { getEditedPostType, getPreviousEditedPostId } = select(
17
+ editSiteStore
18
+ );
19
+
20
+ return {
21
+ isTemplatePart: getEditedPostType() === 'wp_template_part',
22
+ previousTemplateId: getPreviousEditedPostId(),
23
+ };
24
+ }, [] );
25
+ const { goBack } = useDispatch( editSiteStore );
26
+
27
+ if ( ! isTemplatePart || ! previousTemplateId ) {
28
+ return null;
29
+ }
30
+
31
+ return (
32
+ <Button
33
+ className="edit-site-visual-editor__back-button"
34
+ icon={ arrowLeft }
35
+ onClick={ () => {
36
+ goBack();
37
+ } }
38
+ >
39
+ { __( 'Back' ) }
40
+ </Button>
41
+ );
42
+ }
43
+
44
+ export default BackButton;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classnames from 'classnames';
5
+
1
6
  /**
2
7
  * WordPress dependencies
3
8
  */
@@ -27,6 +32,8 @@ import NavigateToLink from '../navigate-to-link';
27
32
  import { SidebarInspectorFill } from '../sidebar';
28
33
  import { store as editSiteStore } from '../../store';
29
34
  import BlockInspectorButton from './block-inspector-button';
35
+ import EditTemplatePartMenuButton from '../edit-template-part-menu-button';
36
+ import BackButton from './back-button';
30
37
 
31
38
  const LAYOUT = {
32
39
  type: 'default',
@@ -43,6 +50,7 @@ export default function BlockEditor( { setIsInserterOpen } ) {
43
50
  getPage,
44
51
  __experimentalGetPreviewDeviceType,
45
52
  } = select( editSiteStore );
53
+
46
54
  return {
47
55
  settings: getSettings( setIsInserterOpen ),
48
56
  templateType: getEditedPostType(),
@@ -62,6 +70,8 @@ export default function BlockEditor( { setIsInserterOpen } ) {
62
70
  const contentRef = useRef();
63
71
  const mergedRefs = useMergeRefs( [ contentRef, useTypingObserver() ] );
64
72
 
73
+ const isTemplatePart = templateType === 'wp_template_part';
74
+
65
75
  return (
66
76
  <BlockEditorProvider
67
77
  settings={ settings }
@@ -70,6 +80,7 @@ export default function BlockEditor( { setIsInserterOpen } ) {
70
80
  onChange={ onChange }
71
81
  useSubRegistry={ false }
72
82
  >
83
+ <EditTemplatePartMenuButton />
73
84
  <TemplatePartConverter />
74
85
  <__experimentalLinkControl.ViewerFill>
75
86
  { useCallback(
@@ -87,15 +98,19 @@ export default function BlockEditor( { setIsInserterOpen } ) {
87
98
  <BlockInspector />
88
99
  </SidebarInspectorFill>
89
100
  <BlockTools
90
- className="edit-site-visual-editor"
101
+ className={ classnames( 'edit-site-visual-editor', {
102
+ 'is-focus-mode': isTemplatePart,
103
+ } ) }
91
104
  __unstableContentRef={ contentRef }
92
105
  >
106
+ <BackButton />
93
107
  <Iframe
94
108
  style={ resizedCanvasStyles }
95
109
  head={ <EditorStyles styles={ settings.styles } /> }
96
110
  ref={ ref }
97
111
  contentRef={ mergedRefs }
98
112
  name="editor-canvas"
113
+ className="edit-site-visual-editor__editor-canvas"
99
114
  >
100
115
  <BlockList
101
116
  className="edit-site-block-editor__block-list wp-site-blocks"
@@ -11,3 +11,29 @@
11
11
  padding: 6px;
12
12
  }
13
13
  }
14
+
15
+ .edit-site-visual-editor {
16
+ position: relative;
17
+ background-color: $gray-800;
18
+
19
+ &.is-focus-mode {
20
+ padding: 48px 48px 0;
21
+ }
22
+ }
23
+
24
+ .edit-site-visual-editor__editor-canvas {
25
+ border-radius: 2px 2px 0 0;
26
+ }
27
+
28
+ .edit-site-visual-editor__back-button {
29
+ position: absolute;
30
+ top: $grid-unit-10;
31
+ left: $grid-unit-10;
32
+ color: $white;
33
+
34
+ &:active:not([aria-disabled="true"]),
35
+ &:focus:not([aria-disabled="true"]),
36
+ &:hover {
37
+ color: $gray-100;
38
+ }
39
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useSelect, useDispatch } from '@wordpress/data';
5
+ import {
6
+ store as blockEditorStore,
7
+ BlockSettingsMenuControls,
8
+ } from '@wordpress/block-editor';
9
+ import { store as coreStore } from '@wordpress/core-data';
10
+ import { MenuItem } from '@wordpress/components';
11
+ import { isTemplatePart } from '@wordpress/blocks';
12
+ import { __, sprintf } from '@wordpress/i18n';
13
+
14
+ /**
15
+ * Internal dependencies
16
+ */
17
+ import { store as editSiteStore } from '../../store';
18
+
19
+ export default function EditTemplatePartMenuButton() {
20
+ const selectedTemplatePart = useSelect( ( select ) => {
21
+ const block = select( blockEditorStore ).getSelectedBlock();
22
+
23
+ if ( block && isTemplatePart( block ) ) {
24
+ const { theme, slug } = block.attributes;
25
+
26
+ return select( coreStore ).getEntityRecord(
27
+ 'postType',
28
+ 'wp_template_part',
29
+ // Ideally this should be an official public API.
30
+ `${ theme }//${ slug }`
31
+ );
32
+ }
33
+ }, [] );
34
+ const { pushTemplatePart } = useDispatch( editSiteStore );
35
+
36
+ if ( ! selectedTemplatePart ) {
37
+ return null;
38
+ }
39
+
40
+ return (
41
+ <BlockSettingsMenuControls>
42
+ { ( { onClose } ) => (
43
+ <MenuItem
44
+ onClick={ () => {
45
+ pushTemplatePart( selectedTemplatePart.id );
46
+ onClose();
47
+ } }
48
+ >
49
+ {
50
+ /* translators: %s: template part title */
51
+ sprintf( __( 'Edit %s' ), selectedTemplatePart.slug )
52
+ }
53
+ </MenuItem>
54
+ ) }
55
+ </BlockSettingsMenuControls>
56
+ );
57
+ }
@@ -139,7 +139,7 @@ export default function GlobalStylesProvider( { children, baseStyles } ) {
139
139
  blockTypes: select( blocksStore ).getBlockTypes(),
140
140
  settings: select( editSiteStore ).getSettings(),
141
141
  };
142
- } );
142
+ }, [] );
143
143
  const { updateSettings } = useDispatch( editSiteStore );
144
144
 
145
145
  const blocks = useMemo( () => getBlockMetadata( blockTypes ), [