@wordpress/edit-site 3.0.14 → 3.0.18-next.33ec3857e2.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 (252) hide show
  1. package/build/components/add-new-template/new-template-part.js +29 -18
  2. package/build/components/add-new-template/new-template-part.js.map +1 -1
  3. package/build/components/add-new-template/new-template.js +30 -23
  4. package/build/components/add-new-template/new-template.js.map +1 -1
  5. package/build/components/app/index.js +51 -0
  6. package/build/components/app/index.js.map +1 -0
  7. package/build/components/block-editor/back-button.js +8 -20
  8. package/build/components/block-editor/back-button.js.map +1 -1
  9. package/build/components/block-editor/index.js +2 -1
  10. package/build/components/block-editor/index.js.map +1 -1
  11. package/build/components/block-editor/resizable-editor.js +1 -0
  12. package/build/components/block-editor/resizable-editor.js.map +1 -1
  13. package/build/components/create-template-part-modal/index.js +0 -2
  14. package/build/components/create-template-part-modal/index.js.map +1 -1
  15. package/build/components/edit-template-part-menu-button/index.js +20 -8
  16. package/build/components/edit-template-part-menu-button/index.js.map +1 -1
  17. package/build/components/editor/index.js +11 -30
  18. package/build/components/editor/index.js.map +1 -1
  19. package/build/components/global-styles/border-panel.js +81 -22
  20. package/build/components/global-styles/border-panel.js.map +1 -1
  21. package/build/components/global-styles/gradients-palette-panel.js +10 -10
  22. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  23. package/build/components/global-styles/screen-background-color.js +9 -10
  24. package/build/components/global-styles/screen-background-color.js.map +1 -1
  25. package/build/components/global-styles/screen-colors.js +1 -1
  26. package/build/components/global-styles/screen-colors.js.map +1 -1
  27. package/build/components/global-styles/screen-link-color.js +6 -10
  28. package/build/components/global-styles/screen-link-color.js.map +1 -1
  29. package/build/components/global-styles/screen-root.js +8 -2
  30. package/build/components/global-styles/screen-root.js.map +1 -1
  31. package/build/components/global-styles/screen-text-color.js +6 -10
  32. package/build/components/global-styles/screen-text-color.js.map +1 -1
  33. package/build/components/global-styles/ui.js +27 -14
  34. package/build/components/global-styles/ui.js.map +1 -1
  35. package/build/components/global-styles/use-global-styles-output.js +1 -2
  36. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  37. package/build/components/header/document-actions/index.js +3 -6
  38. package/build/components/header/document-actions/index.js.map +1 -1
  39. package/build/components/list/actions/index.js +1 -0
  40. package/build/components/list/actions/index.js.map +1 -1
  41. package/build/components/list/index.js +17 -15
  42. package/build/components/list/index.js.map +1 -1
  43. package/build/components/list/table.js +4 -4
  44. package/build/components/list/table.js.map +1 -1
  45. package/build/components/navigation-sidebar/index.js +12 -13
  46. package/build/components/navigation-sidebar/index.js.map +1 -1
  47. package/build/components/navigation-sidebar/navigation-panel/index.js +26 -24
  48. package/build/components/navigation-sidebar/navigation-panel/index.js.map +1 -1
  49. package/build/components/navigation-sidebar/navigation-toggle/index.js +3 -1
  50. package/build/components/navigation-sidebar/navigation-toggle/index.js.map +1 -1
  51. package/build/components/routes/index.js +60 -0
  52. package/build/components/routes/index.js.map +1 -0
  53. package/build/components/routes/link.js +65 -0
  54. package/build/components/routes/link.js.map +1 -0
  55. package/build/components/routes/use-title.js +57 -0
  56. package/build/components/routes/use-title.js.map +1 -0
  57. package/build/components/sidebar/default-sidebar.js +4 -2
  58. package/build/components/sidebar/default-sidebar.js.map +1 -1
  59. package/build/components/sidebar/global-styles-sidebar.js +11 -0
  60. package/build/components/sidebar/global-styles-sidebar.js.map +1 -1
  61. package/build/components/sidebar/template-card/template-areas.js +7 -4
  62. package/build/components/sidebar/template-card/template-areas.js.map +1 -1
  63. package/build/components/template-details/index.js +12 -10
  64. package/build/components/template-details/index.js.map +1 -1
  65. package/build/components/template-details/template-areas.js +27 -10
  66. package/build/components/template-details/template-areas.js.map +1 -1
  67. package/build/components/template-part-converter/convert-to-template-part.js +7 -12
  68. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  69. package/build/components/url-query-controller/index.js +41 -50
  70. package/build/components/url-query-controller/index.js.map +1 -1
  71. package/build/components/welcome-guide/editor.js +6 -0
  72. package/build/components/welcome-guide/editor.js.map +1 -1
  73. package/build/components/welcome-guide/index.js +1 -28
  74. package/build/components/welcome-guide/index.js.map +1 -1
  75. package/build/components/welcome-guide/styles.js +18 -1
  76. package/build/components/welcome-guide/styles.js.map +1 -1
  77. package/build/index.js +29 -35
  78. package/build/index.js.map +1 -1
  79. package/build/plugins/index.js +3 -23
  80. package/build/plugins/index.js.map +1 -1
  81. package/build/plugins/site-export.js +67 -0
  82. package/build/plugins/site-export.js.map +1 -0
  83. package/build/plugins/welcome-guide-menu-item.js +1 -7
  84. package/build/plugins/welcome-guide-menu-item.js.map +1 -1
  85. package/build/store/actions.js +0 -27
  86. package/build/store/actions.js.map +1 -1
  87. package/build/store/constants.js +1 -14
  88. package/build/store/constants.js.map +1 -1
  89. package/build/store/reducer.js +7 -16
  90. package/build/store/reducer.js.map +1 -1
  91. package/build/store/selectors.js +1 -31
  92. package/build/store/selectors.js.map +1 -1
  93. package/build/utils/get-is-list-page.js +23 -0
  94. package/build/utils/get-is-list-page.js.map +1 -0
  95. package/build/utils/history.js +35 -0
  96. package/build/utils/history.js.map +1 -0
  97. package/build-module/components/add-new-template/new-template-part.js +27 -16
  98. package/build-module/components/add-new-template/new-template-part.js.map +1 -1
  99. package/build-module/components/add-new-template/new-template.js +28 -18
  100. package/build-module/components/add-new-template/new-template.js.map +1 -1
  101. package/build-module/components/app/index.js +35 -0
  102. package/build-module/components/app/index.js.map +1 -0
  103. package/build-module/components/block-editor/back-button.js +8 -19
  104. package/build-module/components/block-editor/back-button.js.map +1 -1
  105. package/build-module/components/block-editor/index.js +2 -1
  106. package/build-module/components/block-editor/index.js.map +1 -1
  107. package/build-module/components/block-editor/resizable-editor.js +1 -0
  108. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  109. package/build-module/components/create-template-part-modal/index.js +0 -2
  110. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  111. package/build-module/components/edit-template-part-menu-button/index.js +17 -9
  112. package/build-module/components/edit-template-part-menu-button/index.js.map +1 -1
  113. package/build-module/components/editor/index.js +13 -33
  114. package/build-module/components/editor/index.js.map +1 -1
  115. package/build-module/components/global-styles/border-panel.js +82 -23
  116. package/build-module/components/global-styles/border-panel.js.map +1 -1
  117. package/build-module/components/global-styles/gradients-palette-panel.js +10 -10
  118. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  119. package/build-module/components/global-styles/screen-background-color.js +9 -11
  120. package/build-module/components/global-styles/screen-background-color.js.map +1 -1
  121. package/build-module/components/global-styles/screen-colors.js +1 -1
  122. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  123. package/build-module/components/global-styles/screen-link-color.js +7 -11
  124. package/build-module/components/global-styles/screen-link-color.js.map +1 -1
  125. package/build-module/components/global-styles/screen-root.js +9 -4
  126. package/build-module/components/global-styles/screen-root.js.map +1 -1
  127. package/build-module/components/global-styles/screen-text-color.js +7 -11
  128. package/build-module/components/global-styles/screen-text-color.js.map +1 -1
  129. package/build-module/components/global-styles/ui.js +26 -14
  130. package/build-module/components/global-styles/ui.js.map +1 -1
  131. package/build-module/components/global-styles/use-global-styles-output.js +1 -2
  132. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  133. package/build-module/components/header/document-actions/index.js +3 -6
  134. package/build-module/components/header/document-actions/index.js.map +1 -1
  135. package/build-module/components/list/actions/index.js +1 -0
  136. package/build-module/components/list/actions/index.js.map +1 -1
  137. package/build-module/components/list/index.js +15 -15
  138. package/build-module/components/list/index.js.map +1 -1
  139. package/build-module/components/list/table.js +4 -4
  140. package/build-module/components/list/table.js.map +1 -1
  141. package/build-module/components/navigation-sidebar/index.js +13 -13
  142. package/build-module/components/navigation-sidebar/index.js.map +1 -1
  143. package/build-module/components/navigation-sidebar/navigation-panel/index.js +24 -24
  144. package/build-module/components/navigation-sidebar/navigation-panel/index.js.map +1 -1
  145. package/build-module/components/navigation-sidebar/navigation-toggle/index.js +3 -1
  146. package/build-module/components/navigation-sidebar/navigation-toggle/index.js.map +1 -1
  147. package/build-module/components/routes/index.js +47 -0
  148. package/build-module/components/routes/index.js.map +1 -0
  149. package/build-module/components/routes/link.js +51 -0
  150. package/build-module/components/routes/link.js.map +1 -0
  151. package/build-module/components/routes/use-title.js +44 -0
  152. package/build-module/components/routes/use-title.js.map +1 -0
  153. package/build-module/components/sidebar/default-sidebar.js +4 -2
  154. package/build-module/components/sidebar/default-sidebar.js.map +1 -1
  155. package/build-module/components/sidebar/global-styles-sidebar.js +9 -0
  156. package/build-module/components/sidebar/global-styles-sidebar.js.map +1 -1
  157. package/build-module/components/sidebar/template-card/template-areas.js +8 -4
  158. package/build-module/components/sidebar/template-card/template-areas.js.map +1 -1
  159. package/build-module/components/template-details/index.js +10 -9
  160. package/build-module/components/template-details/index.js.map +1 -1
  161. package/build-module/components/template-details/template-areas.js +24 -9
  162. package/build-module/components/template-details/template-areas.js.map +1 -1
  163. package/build-module/components/template-part-converter/convert-to-template-part.js +7 -12
  164. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  165. package/build-module/components/url-query-controller/index.js +40 -49
  166. package/build-module/components/url-query-controller/index.js.map +1 -1
  167. package/build-module/components/welcome-guide/editor.js +7 -1
  168. package/build-module/components/welcome-guide/editor.js.map +1 -1
  169. package/build-module/components/welcome-guide/index.js +2 -26
  170. package/build-module/components/welcome-guide/index.js.map +1 -1
  171. package/build-module/components/welcome-guide/styles.js +18 -2
  172. package/build-module/components/welcome-guide/styles.js.map +1 -1
  173. package/build-module/index.js +28 -33
  174. package/build-module/index.js.map +1 -1
  175. package/build-module/plugins/index.js +2 -18
  176. package/build-module/plugins/index.js.map +1 -1
  177. package/build-module/plugins/site-export.js +51 -0
  178. package/build-module/plugins/site-export.js.map +1 -0
  179. package/build-module/plugins/welcome-guide-menu-item.js +2 -7
  180. package/build-module/plugins/welcome-guide-menu-item.js.map +1 -1
  181. package/build-module/store/actions.js +0 -23
  182. package/build-module/store/actions.js.map +1 -1
  183. package/build-module/store/constants.js +0 -11
  184. package/build-module/store/constants.js.map +1 -1
  185. package/build-module/store/reducer.js +7 -16
  186. package/build-module/store/reducer.js.map +1 -1
  187. package/build-module/store/selectors.js +1 -27
  188. package/build-module/store/selectors.js.map +1 -1
  189. package/build-module/utils/get-is-list-page.js +16 -0
  190. package/build-module/utils/get-is-list-page.js.map +1 -0
  191. package/build-module/utils/history.js +25 -0
  192. package/build-module/utils/history.js.map +1 -0
  193. package/build-style/style-rtl.css +36 -61
  194. package/build-style/style.css +36 -61
  195. package/package.json +29 -28
  196. package/src/components/add-new-template/new-template-part.js +29 -11
  197. package/src/components/add-new-template/new-template.js +26 -12
  198. package/src/components/app/index.js +47 -0
  199. package/src/components/block-editor/back-button.js +6 -14
  200. package/src/components/block-editor/index.js +1 -0
  201. package/src/components/block-editor/resizable-editor.js +1 -0
  202. package/src/components/block-editor/style.scss +10 -18
  203. package/src/components/create-template-part-modal/index.js +0 -2
  204. package/src/components/edit-template-part-menu-button/index.js +16 -5
  205. package/src/components/editor/index.js +105 -131
  206. package/src/components/global-styles/border-panel.js +106 -42
  207. package/src/components/global-styles/gradients-palette-panel.js +12 -12
  208. package/src/components/global-styles/screen-background-color.js +7 -10
  209. package/src/components/global-styles/screen-colors.js +1 -1
  210. package/src/components/global-styles/screen-link-color.js +6 -14
  211. package/src/components/global-styles/screen-root.js +17 -7
  212. package/src/components/global-styles/screen-text-color.js +6 -14
  213. package/src/components/global-styles/style.scss +6 -17
  214. package/src/components/global-styles/test/use-global-styles-output.js +7 -1
  215. package/src/components/global-styles/ui.js +50 -25
  216. package/src/components/global-styles/use-global-styles-output.js +0 -1
  217. package/src/components/header/document-actions/index.js +3 -9
  218. package/src/components/header/document-actions/style.scss +1 -9
  219. package/src/components/header/style.scss +2 -1
  220. package/src/components/list/actions/index.js +1 -0
  221. package/src/components/list/index.js +11 -12
  222. package/src/components/list/style.scss +6 -11
  223. package/src/components/list/table.js +5 -5
  224. package/src/components/navigation-sidebar/index.js +18 -17
  225. package/src/components/navigation-sidebar/navigation-panel/index.js +16 -22
  226. package/src/components/navigation-sidebar/navigation-toggle/index.js +2 -0
  227. package/src/components/routes/index.js +53 -0
  228. package/src/components/routes/link.js +44 -0
  229. package/src/components/routes/use-title.js +56 -0
  230. package/src/components/sidebar/default-sidebar.js +2 -0
  231. package/src/components/sidebar/global-styles-sidebar.js +9 -0
  232. package/src/components/sidebar/style.scss +21 -14
  233. package/src/components/sidebar/template-card/template-areas.js +16 -4
  234. package/src/components/template-details/index.js +8 -6
  235. package/src/components/template-details/template-areas.js +31 -8
  236. package/src/components/template-part-converter/convert-to-template-part.js +4 -2
  237. package/src/components/url-query-controller/index.js +34 -45
  238. package/src/components/welcome-guide/editor.js +10 -1
  239. package/src/components/welcome-guide/index.js +6 -25
  240. package/src/components/welcome-guide/styles.js +20 -2
  241. package/src/index.js +33 -36
  242. package/src/plugins/index.js +2 -32
  243. package/src/plugins/site-export.js +52 -0
  244. package/src/plugins/welcome-guide-menu-item.js +2 -16
  245. package/src/store/actions.js +0 -23
  246. package/src/store/constants.js +0 -12
  247. package/src/store/reducer.js +12 -26
  248. package/src/store/selectors.js +1 -27
  249. package/src/store/test/reducer.js +22 -39
  250. package/src/store/test/selectors.js +3 -34
  251. package/src/utils/get-is-list-page.js +11 -0
  252. package/src/utils/history.js +35 -0
@@ -468,10 +468,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
468
468
  border-radius: 2px;
469
469
  }
470
470
 
471
- .edit-site-visual-editor__editor-canvas {
472
- border-radius: 2px 2px 0 0;
473
- }
474
-
475
471
  .edit-site-visual-editor__back-button {
476
472
  position: absolute;
477
473
  top: 8px;
@@ -492,28 +488,24 @@ body.is-fullscreen-mode .interface-interface-skeleton {
492
488
  bottom: 0;
493
489
  padding: 0;
494
490
  margin: auto 0;
495
- width: 8px;
491
+ width: 4px;
496
492
  height: 100px;
497
493
  -webkit-appearance: none;
498
494
  appearance: none;
499
- cursor: grab;
495
+ cursor: ew-resize;
500
496
  outline: none;
501
- background: #757575;
502
- border-radius: 4px;
497
+ background: #949494;
498
+ border-radius: 2px;
503
499
  border: 0;
504
500
  }
505
501
  .resizable-editor__drag-handle.is-left {
506
- right: -28px;
502
+ right: -16px;
507
503
  }
508
504
  .resizable-editor__drag-handle.is-right {
509
- left: -28px;
510
- }
511
- .resizable-editor__drag-handle:hover {
512
- background: #949494;
505
+ left: -16px;
513
506
  }
514
- .resizable-editor__drag-handle:active {
515
- cursor: grabbing;
516
- background: #949494;
507
+ .resizable-editor__drag-handle:hover, .resizable-editor__drag-handle:active {
508
+ background: #ccc;
517
509
  }
518
510
  .resizable-editor__drag-handle:focus {
519
511
  box-shadow: 0 0 0 1px #2f2f2f, 0 0 0 calc(var(--wp-admin-border-width-focus) + 1px) var(--wp-admin-theme-color);
@@ -526,14 +518,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
526
518
  min-height: 152px;
527
519
  line-height: 1;
528
520
  }
529
- .edit-site-global-styles-preview .component-color-indicator {
530
- border-radius: 50%;
531
- border: 0;
532
- height: 36px;
533
- width: 36px;
534
- margin-right: 0;
535
- padding: 0;
536
- }
537
521
 
538
522
  .edit-site-typography-panel__preview {
539
523
  display: flex;
@@ -563,13 +547,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
563
547
  margin: 16px;
564
548
  }
565
549
  .edit-site-global-styles-screen-colors .component-color-indicator {
566
- margin-right: 0;
567
- display: block;
568
- border-radius: 50%;
569
- height: 24px;
570
- width: 24px;
571
- padding: 0;
572
- border: 1px solid #ddd;
573
550
  background: linear-gradient(45deg, transparent 48%, #ddd 48%, #ddd 52%, transparent 52%);
574
551
  }
575
552
 
@@ -600,6 +577,12 @@ h2.edit-site-global-styles-gradient-palette-panel__duotone-heading.components-he
600
577
  margin-bottom: 8px;
601
578
  }
602
579
 
580
+ .edit-site-screen-text-color__control,
581
+ .edit-site-screen-link-color__control,
582
+ .edit-site-screen-background-color__control {
583
+ padding: 16px;
584
+ }
585
+
603
586
  .edit-site-header {
604
587
  align-items: center;
605
588
  background-color: #fff;
@@ -628,6 +611,8 @@ body.is-fullscreen-mode .edit-site-header {
628
611
  display: flex;
629
612
  align-items: center;
630
613
  height: 100%;
614
+ flex-grow: 1;
615
+ justify-content: center;
631
616
  min-width: 0;
632
617
  }
633
618
  .edit-site-header .edit-site-header_end {
@@ -705,7 +690,6 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
705
690
  .edit-site-header__actions {
706
691
  display: inline-flex;
707
692
  align-items: center;
708
- flex-wrap: wrap;
709
693
  padding-left: 4px;
710
694
  }
711
695
  .edit-site-header__actions .interface-pinned-items {
@@ -760,6 +744,7 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
760
744
  display: flex;
761
745
  flex-direction: column;
762
746
  justify-content: center;
747
+ padding: 0 8px;
763
748
  height: 100%;
764
749
  min-width: 0;
765
750
  }
@@ -786,17 +771,6 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
786
771
  white-space: nowrap;
787
772
  overflow: hidden;
788
773
  text-overflow: ellipsis;
789
- max-width: 120px;
790
- }
791
- @media (min-width: 782px) {
792
- .edit-site-document-actions .edit-site-document-actions__title {
793
- max-width: 75px;
794
- }
795
- }
796
- @media (min-width: 1080px) {
797
- .edit-site-document-actions .edit-site-document-actions__title {
798
- max-width: 180px;
799
- }
800
774
  }
801
775
  .edit-site-document-actions .edit-site-document-actions__secondary-item {
802
776
  white-space: nowrap;
@@ -1122,16 +1096,11 @@ body.is-fullscreen-mode .edit-site-list-header {
1122
1096
  }
1123
1097
  .edit-site .edit-site-list .interface-interface-skeleton__content {
1124
1098
  background: #fff;
1125
- }
1126
-
1127
- .edit-site-list-main {
1128
- display: flex;
1129
1099
  align-items: center;
1130
- justify-content: center;
1131
1100
  padding: 16px;
1132
1101
  }
1133
1102
  @media (min-width: 782px) {
1134
- .edit-site-list-main {
1103
+ .edit-site .edit-site-list .interface-interface-skeleton__content {
1135
1104
  padding: 72px;
1136
1105
  }
1137
1106
  }
@@ -1293,6 +1262,20 @@ body.is-fullscreen-mode .edit-site-list-header {
1293
1262
  margin: 0;
1294
1263
  }
1295
1264
 
1265
+ .edit-site-global-styles-sidebar {
1266
+ display: flex;
1267
+ flex-direction: column;
1268
+ height: 100%;
1269
+ }
1270
+ .edit-site-global-styles-sidebar__panel, .edit-site-global-styles-sidebar__navigator-provider {
1271
+ display: flex;
1272
+ flex-direction: column;
1273
+ flex: 1;
1274
+ }
1275
+ .edit-site-global-styles-sidebar__navigator-screen {
1276
+ flex: 1;
1277
+ }
1278
+
1296
1279
  .edit-site-global-styles-sidebar .interface-complementary-area-header .components-button.has-icon {
1297
1280
  margin-right: 0;
1298
1281
  }
@@ -1301,18 +1284,6 @@ body.is-fullscreen-mode .edit-site-list-header {
1301
1284
  margin-right: auto;
1302
1285
  }
1303
1286
 
1304
- .edit-site-global-styles-sidebar__border-controls-row {
1305
- display: flex;
1306
- justify-content: space-between;
1307
- margin-bottom: 12px;
1308
- }
1309
- .edit-site-global-styles-sidebar__border-controls-row > * {
1310
- width: calc(50% - 8px);
1311
- }
1312
- .edit-site-global-styles-sidebar__border-controls-row .components-border-style-control__buttons {
1313
- margin-bottom: 0;
1314
- }
1315
-
1316
1287
  .edit-site-global-styles-sidebar .components-navigation__menu-title-heading {
1317
1288
  font-size: 15.6px;
1318
1289
  font-weight: 500;
@@ -1327,6 +1298,10 @@ body.is-fullscreen-mode .edit-site-list-header {
1327
1298
  border: 0;
1328
1299
  }
1329
1300
 
1301
+ .edit-site-global-styles-sidebar .components-tools-panel-item.single-column {
1302
+ grid-column: span 1;
1303
+ }
1304
+
1330
1305
  .edit-site-global-styles-sidebar__blocks-group {
1331
1306
  padding-top: 24px;
1332
1307
  border-top: 1px solid #e0e0e0;
@@ -468,10 +468,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
468
468
  border-radius: 2px;
469
469
  }
470
470
 
471
- .edit-site-visual-editor__editor-canvas {
472
- border-radius: 2px 2px 0 0;
473
- }
474
-
475
471
  .edit-site-visual-editor__back-button {
476
472
  position: absolute;
477
473
  top: 8px;
@@ -492,28 +488,24 @@ body.is-fullscreen-mode .interface-interface-skeleton {
492
488
  bottom: 0;
493
489
  padding: 0;
494
490
  margin: auto 0;
495
- width: 8px;
491
+ width: 4px;
496
492
  height: 100px;
497
493
  -webkit-appearance: none;
498
494
  appearance: none;
499
- cursor: grab;
495
+ cursor: ew-resize;
500
496
  outline: none;
501
- background: #757575;
502
- border-radius: 4px;
497
+ background: #949494;
498
+ border-radius: 2px;
503
499
  border: 0;
504
500
  }
505
501
  .resizable-editor__drag-handle.is-left {
506
- left: -28px;
502
+ left: -16px;
507
503
  }
508
504
  .resizable-editor__drag-handle.is-right {
509
- right: -28px;
510
- }
511
- .resizable-editor__drag-handle:hover {
512
- background: #949494;
505
+ right: -16px;
513
506
  }
514
- .resizable-editor__drag-handle:active {
515
- cursor: grabbing;
516
- background: #949494;
507
+ .resizable-editor__drag-handle:hover, .resizable-editor__drag-handle:active {
508
+ background: #ccc;
517
509
  }
518
510
  .resizable-editor__drag-handle:focus {
519
511
  box-shadow: 0 0 0 1px #2f2f2f, 0 0 0 calc(var(--wp-admin-border-width-focus) + 1px) var(--wp-admin-theme-color);
@@ -526,14 +518,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
526
518
  min-height: 152px;
527
519
  line-height: 1;
528
520
  }
529
- .edit-site-global-styles-preview .component-color-indicator {
530
- border-radius: 50%;
531
- border: 0;
532
- height: 36px;
533
- width: 36px;
534
- margin-left: 0;
535
- padding: 0;
536
- }
537
521
 
538
522
  .edit-site-typography-panel__preview {
539
523
  display: flex;
@@ -563,13 +547,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
563
547
  margin: 16px;
564
548
  }
565
549
  .edit-site-global-styles-screen-colors .component-color-indicator {
566
- margin-left: 0;
567
- display: block;
568
- border-radius: 50%;
569
- height: 24px;
570
- width: 24px;
571
- padding: 0;
572
- border: 1px solid #ddd;
573
550
  background: linear-gradient(-45deg, transparent 48%, #ddd 48%, #ddd 52%, transparent 52%);
574
551
  }
575
552
 
@@ -600,6 +577,12 @@ h2.edit-site-global-styles-gradient-palette-panel__duotone-heading.components-he
600
577
  margin-bottom: 8px;
601
578
  }
602
579
 
580
+ .edit-site-screen-text-color__control,
581
+ .edit-site-screen-link-color__control,
582
+ .edit-site-screen-background-color__control {
583
+ padding: 16px;
584
+ }
585
+
603
586
  .edit-site-header {
604
587
  align-items: center;
605
588
  background-color: #fff;
@@ -628,6 +611,8 @@ body.is-fullscreen-mode .edit-site-header {
628
611
  display: flex;
629
612
  align-items: center;
630
613
  height: 100%;
614
+ flex-grow: 1;
615
+ justify-content: center;
631
616
  min-width: 0;
632
617
  }
633
618
  .edit-site-header .edit-site-header_end {
@@ -705,7 +690,6 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
705
690
  .edit-site-header__actions {
706
691
  display: inline-flex;
707
692
  align-items: center;
708
- flex-wrap: wrap;
709
693
  padding-right: 4px;
710
694
  }
711
695
  .edit-site-header__actions .interface-pinned-items {
@@ -760,6 +744,7 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
760
744
  display: flex;
761
745
  flex-direction: column;
762
746
  justify-content: center;
747
+ padding: 0 8px;
763
748
  height: 100%;
764
749
  min-width: 0;
765
750
  }
@@ -786,17 +771,6 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
786
771
  white-space: nowrap;
787
772
  overflow: hidden;
788
773
  text-overflow: ellipsis;
789
- max-width: 120px;
790
- }
791
- @media (min-width: 782px) {
792
- .edit-site-document-actions .edit-site-document-actions__title {
793
- max-width: 75px;
794
- }
795
- }
796
- @media (min-width: 1080px) {
797
- .edit-site-document-actions .edit-site-document-actions__title {
798
- max-width: 180px;
799
- }
800
774
  }
801
775
  .edit-site-document-actions .edit-site-document-actions__secondary-item {
802
776
  white-space: nowrap;
@@ -1122,16 +1096,11 @@ body.is-fullscreen-mode .edit-site-list-header {
1122
1096
  }
1123
1097
  .edit-site .edit-site-list .interface-interface-skeleton__content {
1124
1098
  background: #fff;
1125
- }
1126
-
1127
- .edit-site-list-main {
1128
- display: flex;
1129
1099
  align-items: center;
1130
- justify-content: center;
1131
1100
  padding: 16px;
1132
1101
  }
1133
1102
  @media (min-width: 782px) {
1134
- .edit-site-list-main {
1103
+ .edit-site .edit-site-list .interface-interface-skeleton__content {
1135
1104
  padding: 72px;
1136
1105
  }
1137
1106
  }
@@ -1293,6 +1262,20 @@ body.is-fullscreen-mode .edit-site-list-header {
1293
1262
  margin: 0;
1294
1263
  }
1295
1264
 
1265
+ .edit-site-global-styles-sidebar {
1266
+ display: flex;
1267
+ flex-direction: column;
1268
+ height: 100%;
1269
+ }
1270
+ .edit-site-global-styles-sidebar__panel, .edit-site-global-styles-sidebar__navigator-provider {
1271
+ display: flex;
1272
+ flex-direction: column;
1273
+ flex: 1;
1274
+ }
1275
+ .edit-site-global-styles-sidebar__navigator-screen {
1276
+ flex: 1;
1277
+ }
1278
+
1296
1279
  .edit-site-global-styles-sidebar .interface-complementary-area-header .components-button.has-icon {
1297
1280
  margin-left: 0;
1298
1281
  }
@@ -1301,18 +1284,6 @@ body.is-fullscreen-mode .edit-site-list-header {
1301
1284
  margin-left: auto;
1302
1285
  }
1303
1286
 
1304
- .edit-site-global-styles-sidebar__border-controls-row {
1305
- display: flex;
1306
- justify-content: space-between;
1307
- margin-bottom: 12px;
1308
- }
1309
- .edit-site-global-styles-sidebar__border-controls-row > * {
1310
- width: calc(50% - 8px);
1311
- }
1312
- .edit-site-global-styles-sidebar__border-controls-row .components-border-style-control__buttons {
1313
- margin-bottom: 0;
1314
- }
1315
-
1316
1287
  .edit-site-global-styles-sidebar .components-navigation__menu-title-heading {
1317
1288
  font-size: 15.6px;
1318
1289
  font-weight: 500;
@@ -1327,6 +1298,10 @@ body.is-fullscreen-mode .edit-site-list-header {
1327
1298
  border: 0;
1328
1299
  }
1329
1300
 
1301
+ .edit-site-global-styles-sidebar .components-tools-panel-item.single-column {
1302
+ grid-column: span 1;
1303
+ }
1304
+
1330
1305
  .edit-site-global-styles-sidebar__blocks-group {
1331
1306
  padding-top: 24px;
1332
1307
  border-top: 1px solid #e0e0e0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "3.0.14",
3
+ "version": "3.0.18-next.33ec3857e2.0",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,35 +27,36 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/a11y": "^3.2.4",
31
- "@wordpress/api-fetch": "^5.2.6",
32
- "@wordpress/block-editor": "^8.0.8",
33
- "@wordpress/block-library": "^6.0.12",
34
- "@wordpress/blocks": "^11.1.4",
35
- "@wordpress/components": "^19.1.2",
36
- "@wordpress/compose": "^5.0.6",
37
- "@wordpress/core-data": "^4.0.8",
38
- "@wordpress/data": "^6.1.4",
39
- "@wordpress/data-controls": "^2.2.7",
40
- "@wordpress/editor": "^12.0.11",
41
- "@wordpress/element": "^4.0.4",
42
- "@wordpress/hooks": "^3.2.2",
43
- "@wordpress/html-entities": "^3.2.3",
44
- "@wordpress/i18n": "^4.2.4",
45
- "@wordpress/icons": "^6.1.1",
46
- "@wordpress/interface": "^4.1.10",
47
- "@wordpress/keyboard-shortcuts": "^3.0.6",
48
- "@wordpress/keycodes": "^3.2.4",
49
- "@wordpress/media-utils": "^3.0.5",
50
- "@wordpress/notices": "^3.2.7",
51
- "@wordpress/plugins": "^4.0.6",
52
- "@wordpress/primitives": "^3.0.4",
53
- "@wordpress/reusable-blocks": "^3.0.14",
54
- "@wordpress/url": "^3.3.1",
55
- "@wordpress/viewport": "^4.0.6",
30
+ "@wordpress/a11y": "^3.2.5-next.33ec3857e2.0",
31
+ "@wordpress/api-fetch": "^5.2.7-next.33ec3857e2.0",
32
+ "@wordpress/block-editor": "^8.0.12-next.33ec3857e2.0",
33
+ "@wordpress/block-library": "^6.0.17-next.33ec3857e2.0",
34
+ "@wordpress/blocks": "^11.1.5-next.33ec3857e2.0",
35
+ "@wordpress/components": "^19.2.1-next.33ec3857e2.0",
36
+ "@wordpress/compose": "^5.0.7-next.33ec3857e2.0",
37
+ "@wordpress/core-data": "^4.0.10-next.33ec3857e2.0",
38
+ "@wordpress/data": "^6.1.6-next.33ec3857e2.0",
39
+ "@wordpress/data-controls": "^2.2.8-next.33ec3857e2.0",
40
+ "@wordpress/editor": "^12.0.15-next.33ec3857e2.0",
41
+ "@wordpress/element": "^4.0.6-next.33ec3857e2.0",
42
+ "@wordpress/hooks": "^3.2.3-next.33ec3857e2.0",
43
+ "@wordpress/html-entities": "^3.2.4-next.33ec3857e2.0",
44
+ "@wordpress/i18n": "^4.2.5-next.33ec3857e2.0",
45
+ "@wordpress/icons": "^6.1.2-next.33ec3857e2.0",
46
+ "@wordpress/interface": "^4.1.14-next.33ec3857e2.0",
47
+ "@wordpress/keyboard-shortcuts": "^3.0.7-next.33ec3857e2.0",
48
+ "@wordpress/keycodes": "^3.2.5-next.33ec3857e2.0",
49
+ "@wordpress/media-utils": "^3.0.6-next.33ec3857e2.0",
50
+ "@wordpress/notices": "^3.2.8-next.33ec3857e2.0",
51
+ "@wordpress/plugins": "^4.0.7-next.33ec3857e2.0",
52
+ "@wordpress/primitives": "^3.0.5-next.33ec3857e2.0",
53
+ "@wordpress/reusable-blocks": "^3.0.18-next.33ec3857e2.0",
54
+ "@wordpress/url": "^3.3.2-next.33ec3857e2.0",
55
+ "@wordpress/viewport": "^4.0.7-next.33ec3857e2.0",
56
56
  "classnames": "^2.3.1",
57
57
  "downloadjs": "^1.4.7",
58
58
  "file-saver": "^2.0.2",
59
+ "history": "^5.1.0",
59
60
  "jszip": "^3.2.2",
60
61
  "lodash": "^4.17.21",
61
62
  "rememo": "^3.0.0"
@@ -63,5 +64,5 @@
63
64
  "publishConfig": {
64
65
  "access": "public"
65
66
  },
66
- "gitHead": "34b76b2f9397215e5afb8443f5b3073c83913102"
67
+ "gitHead": "51c7917ea7fac72953702f24d6daac87d99e7617"
67
68
  }
@@ -7,21 +7,24 @@ import { kebabCase } from 'lodash';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { useState } from '@wordpress/element';
10
- import { useDispatch } from '@wordpress/data';
10
+ import { useSelect, useDispatch } from '@wordpress/data';
11
11
  import { Button } from '@wordpress/components';
12
- import { addQueryArgs } from '@wordpress/url';
13
- import apiFetch from '@wordpress/api-fetch';
14
12
  import { __ } from '@wordpress/i18n';
15
13
  import { store as noticesStore } from '@wordpress/notices';
14
+ import { store as coreStore } from '@wordpress/core-data';
16
15
 
17
16
  /**
18
17
  * Internal dependencies
19
18
  */
19
+ import { useHistory } from '../routes';
20
20
  import CreateTemplatePartModal from '../create-template-part-modal';
21
21
 
22
22
  export default function NewTemplatePart( { postType } ) {
23
+ const history = useHistory();
23
24
  const [ isModalOpen, setIsModalOpen ] = useState( false );
24
25
  const { createErrorNotice } = useDispatch( noticesStore );
26
+ const { saveEntityRecord } = useDispatch( coreStore );
27
+ const { getLastEntitySaveError } = useSelect( coreStore );
25
28
 
26
29
  async function createTemplatePart( { title, area } ) {
27
30
  if ( ! title ) {
@@ -32,22 +35,35 @@ export default function NewTemplatePart( { postType } ) {
32
35
  }
33
36
 
34
37
  try {
35
- const templatePart = await apiFetch( {
36
- path: '/wp/v2/template-parts',
37
- method: 'POST',
38
- data: {
38
+ const templatePart = await saveEntityRecord(
39
+ 'postType',
40
+ 'wp_template_part',
41
+ {
39
42
  slug: kebabCase( title ),
40
43
  title,
41
44
  content: '',
42
45
  area,
43
- },
44
- } );
46
+ }
47
+ );
48
+
49
+ const lastEntitySaveError = getLastEntitySaveError(
50
+ 'postType',
51
+ 'wp_template_part',
52
+ templatePart.id
53
+ );
54
+ if ( lastEntitySaveError ) {
55
+ throw lastEntitySaveError;
56
+ }
57
+
58
+ setIsModalOpen( false );
45
59
 
46
60
  // Navigate to the created template part editor.
47
- window.location.href = addQueryArgs( window.location.href, {
61
+ history.push( {
48
62
  postId: templatePart.id,
49
- postType: 'wp_template_part',
63
+ postType: templatePart.type,
50
64
  } );
65
+
66
+ // TODO: Add a success notice?
51
67
  } catch ( error ) {
52
68
  const errorMessage =
53
69
  error.message && error.code !== 'unknown_error'
@@ -57,6 +73,8 @@ export default function NewTemplatePart( { postType } ) {
57
73
  );
58
74
 
59
75
  createErrorNotice( errorMessage, { type: 'snackbar' } );
76
+
77
+ setIsModalOpen( false );
60
78
  }
61
79
  }
62
80
 
@@ -15,11 +15,14 @@ import {
15
15
  import { useSelect, useDispatch } from '@wordpress/data';
16
16
  import { store as coreStore } from '@wordpress/core-data';
17
17
  import { store as editorStore } from '@wordpress/editor';
18
- import { addQueryArgs } from '@wordpress/url';
19
- import apiFetch from '@wordpress/api-fetch';
20
18
  import { __ } from '@wordpress/i18n';
21
19
  import { store as noticesStore } from '@wordpress/notices';
22
20
 
21
+ /**
22
+ * Internal dependencies
23
+ */
24
+ import { useHistory } from '../routes';
25
+
23
26
  const DEFAULT_TEMPLATE_SLUGS = [
24
27
  'front-page',
25
28
  'single-post',
@@ -31,6 +34,7 @@ const DEFAULT_TEMPLATE_SLUGS = [
31
34
  ];
32
35
 
33
36
  export default function NewTemplate( { postType } ) {
37
+ const history = useHistory();
34
38
  const { templates, defaultTemplateTypes } = useSelect(
35
39
  ( select ) => ( {
36
40
  templates: select( coreStore ).getEntityRecords(
@@ -44,7 +48,9 @@ export default function NewTemplate( { postType } ) {
44
48
  } ),
45
49
  []
46
50
  );
51
+ const { saveEntityRecord } = useDispatch( coreStore );
47
52
  const { createErrorNotice } = useDispatch( noticesStore );
53
+ const { getLastEntitySaveError } = useSelect( coreStore );
48
54
 
49
55
  async function createTemplate( { slug } ) {
50
56
  try {
@@ -52,26 +58,34 @@ export default function NewTemplate( { postType } ) {
52
58
  slug,
53
59
  } );
54
60
 
55
- const template = await apiFetch( {
56
- path: '/wp/v2/templates',
57
- method: 'POST',
58
- data: {
61
+ const template = await saveEntityRecord(
62
+ 'postType',
63
+ 'wp_template',
64
+ {
59
65
  excerpt: description,
60
66
  // Slugs need to be strings, so this is for template `404`
61
67
  slug: slug.toString(),
62
68
  status: 'publish',
63
69
  title,
64
- },
65
- } );
70
+ }
71
+ );
72
+
73
+ const lastEntitySaveError = getLastEntitySaveError(
74
+ 'postType',
75
+ 'wp_template',
76
+ template.id
77
+ );
78
+ if ( lastEntitySaveError ) {
79
+ throw lastEntitySaveError;
80
+ }
66
81
 
67
82
  // Navigate to the created template editor.
68
- window.location.href = addQueryArgs( window.location.href, {
83
+ history.push( {
69
84
  postId: template.id,
70
- postType: 'wp_template',
85
+ postType: template.type,
71
86
  } );
72
87
 
73
- // Wait for async navigation to happen before closing the modal.
74
- await new Promise( () => {} );
88
+ // TODO: Add a success notice?
75
89
  } catch ( error ) {
76
90
  const errorMessage =
77
91
  error.message && error.code !== 'unknown_error'
@@ -0,0 +1,47 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { SlotFillProvider } from '@wordpress/components';
5
+ import { UnsavedChangesWarning } from '@wordpress/editor';
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ import { Routes } from '../routes';
11
+ import Editor from '../editor';
12
+ import List from '../list';
13
+ import NavigationSidebar from '../navigation-sidebar';
14
+ import getIsListPage from '../../utils/get-is-list-page';
15
+
16
+ export default function EditSiteApp( { reboot } ) {
17
+ return (
18
+ <SlotFillProvider>
19
+ <UnsavedChangesWarning />
20
+
21
+ <Routes>
22
+ { ( { params } ) => {
23
+ const isListPage = getIsListPage( params );
24
+
25
+ return (
26
+ <>
27
+ { isListPage ? (
28
+ <List />
29
+ ) : (
30
+ <Editor onError={ reboot } />
31
+ ) }
32
+ { /* Keep the instance of the sidebar to ensure focus will not be lost
33
+ * when navigating to other pages. */ }
34
+ <NavigationSidebar
35
+ // Open the navigation sidebar by default when in the list page.
36
+ isDefaultOpen={ !! isListPage }
37
+ activeTemplateType={
38
+ isListPage ? params.postType : undefined
39
+ }
40
+ />
41
+ </>
42
+ );
43
+ } }
44
+ </Routes>
45
+ </SlotFillProvider>
46
+ );
47
+ }