@wordpress/edit-site 5.3.5 → 5.3.7

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 (196) hide show
  1. package/build/components/add-new-template/add-custom-template-modal.js +12 -3
  2. package/build/components/add-new-template/add-custom-template-modal.js.map +1 -1
  3. package/build/components/add-new-template/new-template-part.js +5 -1
  4. package/build/components/add-new-template/new-template-part.js.map +1 -1
  5. package/build/components/block-editor/editor-canvas.js +2 -1
  6. package/build/components/block-editor/editor-canvas.js.map +1 -1
  7. package/build/components/editor/index.js +3 -3
  8. package/build/components/editor/index.js.map +1 -1
  9. package/build/components/global-styles/screen-variations.js +1 -1
  10. package/build/components/global-styles/screen-variations.js.map +1 -1
  11. package/build/components/global-styles/shadow-panel.js +6 -4
  12. package/build/components/global-styles/shadow-panel.js.map +1 -1
  13. package/build/components/keyboard-shortcuts/edit-mode.js +124 -0
  14. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -0
  15. package/build/components/keyboard-shortcuts/global.js +48 -0
  16. package/build/components/keyboard-shortcuts/global.js.map +1 -0
  17. package/build/components/keyboard-shortcuts/register.js +153 -0
  18. package/build/components/keyboard-shortcuts/register.js.map +1 -0
  19. package/build/components/layout/index.js +11 -1
  20. package/build/components/layout/index.js.map +1 -1
  21. package/build/components/list/added-by.js +41 -42
  22. package/build/components/list/added-by.js.map +1 -1
  23. package/build/components/list/index.js +2 -1
  24. package/build/components/list/index.js.map +1 -1
  25. package/build/components/list/table.js +3 -1
  26. package/build/components/list/table.js.map +1 -1
  27. package/build/components/routes/link.js +4 -1
  28. package/build/components/routes/link.js.map +1 -1
  29. package/build/components/save-hub/index.js +82 -0
  30. package/build/components/save-hub/index.js.map +1 -0
  31. package/build/components/sidebar/index.js +14 -4
  32. package/build/components/sidebar/index.js.map +1 -1
  33. package/build/components/sidebar-button/index.js +30 -0
  34. package/build/components/sidebar-button/index.js.map +1 -0
  35. package/build/components/sidebar-navigation-screen/index.js +11 -5
  36. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  37. package/build/components/sidebar-navigation-screen-main/index.js +1 -0
  38. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  39. package/build/components/sidebar-navigation-screen-navigation-item/index.js +18 -18
  40. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  41. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +139 -11
  42. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  43. package/build/components/sidebar-navigation-screen-navigation-menus/loader.js +19 -0
  44. package/build/components/sidebar-navigation-screen-navigation-menus/loader.js.map +1 -0
  45. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +77 -0
  46. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -0
  47. package/build/components/sidebar-navigation-screen-template/index.js +25 -8
  48. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  49. package/build/components/sidebar-navigation-screen-templates/index.js +22 -5
  50. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  51. package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -3
  52. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  53. package/build/components/style-book/index.js +17 -2
  54. package/build/components/style-book/index.js.map +1 -1
  55. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +7 -7
  56. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  57. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +24 -8
  58. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  59. package/build/components/sync-state-with-url/use-sync-path-with-url.js +29 -29
  60. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  61. package/build/components/template-details/index.js +5 -10
  62. package/build/components/template-details/index.js.map +1 -1
  63. package/build/components/use-edited-entity-record/index.js +6 -6
  64. package/build/components/use-edited-entity-record/index.js.map +1 -1
  65. package/build/index.js +13 -22
  66. package/build/index.js.map +1 -1
  67. package/build/utils/history.js +8 -2
  68. package/build/utils/history.js.map +1 -1
  69. package/build-module/components/add-new-template/add-custom-template-modal.js +13 -4
  70. package/build-module/components/add-new-template/add-custom-template-modal.js.map +1 -1
  71. package/build-module/components/add-new-template/new-template-part.js +5 -1
  72. package/build-module/components/add-new-template/new-template-part.js.map +1 -1
  73. package/build-module/components/block-editor/editor-canvas.js +2 -1
  74. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  75. package/build-module/components/editor/index.js +3 -3
  76. package/build-module/components/editor/index.js.map +1 -1
  77. package/build-module/components/global-styles/screen-variations.js +1 -1
  78. package/build-module/components/global-styles/screen-variations.js.map +1 -1
  79. package/build-module/components/global-styles/shadow-panel.js +6 -4
  80. package/build-module/components/global-styles/shadow-panel.js.map +1 -1
  81. package/build-module/components/keyboard-shortcuts/edit-mode.js +108 -0
  82. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -0
  83. package/build-module/components/keyboard-shortcuts/global.js +37 -0
  84. package/build-module/components/keyboard-shortcuts/global.js.map +1 -0
  85. package/build-module/components/keyboard-shortcuts/register.js +141 -0
  86. package/build-module/components/keyboard-shortcuts/register.js.map +1 -0
  87. package/build-module/components/layout/index.js +9 -1
  88. package/build-module/components/layout/index.js.map +1 -1
  89. package/build-module/components/list/added-by.js +43 -44
  90. package/build-module/components/list/added-by.js.map +1 -1
  91. package/build-module/components/list/index.js +2 -1
  92. package/build-module/components/list/index.js.map +1 -1
  93. package/build-module/components/list/table.js +3 -1
  94. package/build-module/components/list/table.js.map +1 -1
  95. package/build-module/components/routes/link.js +5 -2
  96. package/build-module/components/routes/link.js.map +1 -1
  97. package/build-module/components/save-hub/index.js +68 -0
  98. package/build-module/components/save-hub/index.js.map +1 -0
  99. package/build-module/components/sidebar/index.js +10 -5
  100. package/build-module/components/sidebar/index.js.map +1 -1
  101. package/build-module/components/sidebar-button/index.js +18 -0
  102. package/build-module/components/sidebar-button/index.js.map +1 -0
  103. package/build-module/components/sidebar-navigation-screen/index.js +9 -6
  104. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  105. package/build-module/components/sidebar-navigation-screen-main/index.js +1 -0
  106. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  107. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +20 -22
  108. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  109. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +131 -11
  110. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  111. package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js +11 -0
  112. package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js.map +1 -0
  113. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +66 -0
  114. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -0
  115. package/build-module/components/sidebar-navigation-screen-template/index.js +25 -10
  116. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  117. package/build-module/components/sidebar-navigation-screen-templates/index.js +19 -5
  118. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  119. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -3
  120. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  121. package/build-module/components/style-book/index.js +17 -3
  122. package/build-module/components/style-book/index.js.map +1 -1
  123. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +7 -7
  124. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  125. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +24 -8
  126. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  127. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +27 -29
  128. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  129. package/build-module/components/template-details/index.js +5 -9
  130. package/build-module/components/template-details/index.js.map +1 -1
  131. package/build-module/components/use-edited-entity-record/index.js +6 -6
  132. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  133. package/build-module/index.js +16 -23
  134. package/build-module/index.js.map +1 -1
  135. package/build-module/utils/history.js +9 -3
  136. package/build-module/utils/history.js.map +1 -1
  137. package/build-style/style-rtl.css +100 -94
  138. package/build-style/style.css +100 -94
  139. package/package.json +10 -10
  140. package/src/components/add-new-template/add-custom-template-modal.js +14 -10
  141. package/src/components/add-new-template/new-template-part.js +4 -3
  142. package/src/components/add-new-template/style.scss +0 -5
  143. package/src/components/block-editor/editor-canvas.js +2 -1
  144. package/src/components/block-editor/style.scss +1 -1
  145. package/src/components/editor/index.js +4 -3
  146. package/src/components/global-styles/screen-variations.js +0 -1
  147. package/src/components/global-styles/shadow-panel.js +4 -3
  148. package/src/components/keyboard-shortcuts/edit-mode.js +116 -0
  149. package/src/components/keyboard-shortcuts/global.js +35 -0
  150. package/src/components/keyboard-shortcuts/register.js +157 -0
  151. package/src/components/layout/index.js +18 -0
  152. package/src/components/layout/style.scss +1 -3
  153. package/src/components/list/added-by.js +48 -55
  154. package/src/components/list/index.js +3 -1
  155. package/src/components/list/style.scss +5 -13
  156. package/src/components/list/table.js +4 -1
  157. package/src/components/routes/link.js +9 -2
  158. package/src/components/save-hub/index.js +78 -0
  159. package/src/components/save-hub/style.scss +15 -0
  160. package/src/components/sidebar/index.js +11 -6
  161. package/src/components/sidebar/style.scss +4 -3
  162. package/src/components/sidebar-button/index.js +21 -0
  163. package/src/components/sidebar-button/style.scss +24 -0
  164. package/src/components/sidebar-navigation-item/style.scss +0 -20
  165. package/src/components/sidebar-navigation-screen/index.js +9 -4
  166. package/src/components/sidebar-navigation-screen/style.scss +16 -10
  167. package/src/components/sidebar-navigation-screen-main/index.js +3 -0
  168. package/src/components/sidebar-navigation-screen-navigation-item/index.js +33 -26
  169. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +141 -10
  170. package/src/components/sidebar-navigation-screen-navigation-menus/loader.js +9 -0
  171. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +78 -0
  172. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +55 -4
  173. package/src/components/sidebar-navigation-screen-template/index.js +27 -13
  174. package/src/components/sidebar-navigation-screen-templates/index.js +23 -4
  175. package/src/components/sidebar-navigation-screen-templates/style.scss +0 -5
  176. package/src/components/sidebar-navigation-screen-templates-browse/index.js +12 -1
  177. package/src/components/style-book/index.js +25 -1
  178. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -9
  179. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +38 -8
  180. package/src/components/sync-state-with-url/use-sync-path-with-url.js +34 -35
  181. package/src/components/template-details/index.js +4 -8
  182. package/src/components/use-edited-entity-record/index.js +26 -18
  183. package/src/index.js +11 -22
  184. package/src/style.scss +2 -1
  185. package/src/utils/history.js +13 -9
  186. package/build/components/navigation-inspector/index.js +0 -190
  187. package/build/components/navigation-inspector/index.js.map +0 -1
  188. package/build/components/navigation-inspector/navigation-menu.js +0 -62
  189. package/build/components/navigation-inspector/navigation-menu.js.map +0 -1
  190. package/build-module/components/navigation-inspector/index.js +0 -173
  191. package/build-module/components/navigation-inspector/index.js.map +0 -1
  192. package/build-module/components/navigation-inspector/navigation-menu.js +0 -52
  193. package/build-module/components/navigation-inspector/navigation-menu.js.map +0 -1
  194. package/src/components/navigation-inspector/index.js +0 -223
  195. package/src/components/navigation-inspector/navigation-menu.js +0 -66
  196. package/src/components/navigation-inspector/style.scss +0 -46
@@ -618,9 +618,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
618
618
  }
619
619
  }
620
620
 
621
- .edit-site-custom-template-modal__suggestions_list {
622
- margin-top: 16px;
623
- }
624
621
  @media (min-width: 600px) {
625
622
  .edit-site-custom-template-modal__suggestions_list {
626
623
  height: 232px;
@@ -671,8 +668,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
671
668
  border: 1px solid #ccc;
672
669
  border-radius: 2px;
673
670
  padding: 16px;
674
- margin-bottom: 0;
675
- margin-top: 16px;
676
671
  }
677
672
 
678
673
  @media (min-width: 782px) {
@@ -719,7 +714,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
719
714
  height: 100%;
720
715
  display: block;
721
716
  overflow: hidden;
722
- background-color: #2f2f2f;
717
+ background-color: #1e1e1e;
723
718
  align-items: center;
724
719
  /*
725
720
  Temporary to hide the contextual toolbar in view mode.
@@ -1530,7 +1525,6 @@ body.is-fullscreen-mode .edit-site-list-header {
1530
1525
  .edit-site-list-added-by__icon {
1531
1526
  display: flex;
1532
1527
  flex-shrink: 0;
1533
- position: relative;
1534
1528
  align-items: center;
1535
1529
  justify-content: center;
1536
1530
  width: 32px;
@@ -1541,17 +1535,6 @@ body.is-fullscreen-mode .edit-site-list-header {
1541
1535
  .edit-site-list-added-by__icon svg {
1542
1536
  fill: #fff;
1543
1537
  }
1544
- .edit-site-list-added-by__icon.is-customized::after {
1545
- position: absolute;
1546
- content: "";
1547
- background: var(--wp-admin-theme-color);
1548
- height: 8px;
1549
- width: 8px;
1550
- outline: 2px solid #fff;
1551
- border-radius: 100%;
1552
- top: -1px;
1553
- right: -1px;
1554
- }
1555
1538
 
1556
1539
  .edit-site-list-added-by__avatar {
1557
1540
  flex-shrink: 0;
@@ -1579,44 +1562,9 @@ body.is-fullscreen-mode .edit-site-list-header {
1579
1562
  opacity: 1;
1580
1563
  }
1581
1564
 
1582
- @keyframes loadingpulse {
1583
- 0% {
1584
- opacity: 1;
1585
- }
1586
- 50% {
1587
- opacity: 0.5;
1588
- }
1589
- 100% {
1590
- opacity: 1;
1591
- }
1592
- }
1593
- .edit-site-navigation-inspector .block-editor-list-view-leaf .block-editor-list-view-block-contents {
1594
- white-space: normal;
1595
- }
1596
- .edit-site-navigation-inspector .block-editor-list-view-block__title {
1597
- margin-top: 3px;
1598
- }
1599
- .edit-site-navigation-inspector .block-editor-list-view-block__menu-cell {
1600
- padding-right: 0;
1601
- }
1602
- .edit-site-navigation-inspector .edit-site-navigation-inspector__select-menu {
1603
- margin-bottom: 8px;
1604
- }
1605
-
1606
- .edit-site-navigation-inspector__placeholder {
1607
- padding: 8px;
1608
- margin: 8px;
1609
- background-color: #f0f0f0;
1610
- animation: loadingpulse 1s linear infinite;
1611
- animation-delay: 0.5s;
1612
- }
1613
- .edit-site-navigation-inspector__placeholder.is-child {
1614
- margin-left: 24px;
1615
- width: 50%;
1616
- }
1617
-
1618
- .edit-site-navigation-inspector__empty-msg {
1619
- padding: 0 8px;
1565
+ .edit-site-list-added-by__customized-info {
1566
+ display: block;
1567
+ color: #757575;
1620
1568
  }
1621
1569
 
1622
1570
  .edit-site-sidebar-edit-mode {
@@ -2192,9 +2140,9 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2192
2140
  }
2193
2141
 
2194
2142
  .edit-site-layout__content {
2143
+ height: 100%;
2195
2144
  flex-grow: 1;
2196
2145
  display: flex;
2197
- overflow: hidden;
2198
2146
  }
2199
2147
 
2200
2148
  .edit-site-layout__sidebar {
@@ -2342,6 +2290,20 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2342
2290
  }
2343
2291
  }
2344
2292
 
2293
+ .edit-site-save-hub {
2294
+ color: #949494;
2295
+ }
2296
+
2297
+ .edit-site-save-hub__button {
2298
+ color: inherit;
2299
+ }
2300
+ .edit-site-save-hub__button[aria-disabled=true] {
2301
+ opacity: 1;
2302
+ }
2303
+ .edit-site-save-hub__button[aria-disabled=true]:hover {
2304
+ color: inherit;
2305
+ }
2306
+
2345
2307
  @media (min-width: 600px) {
2346
2308
  .edit-site-save-panel__modal {
2347
2309
  width: 600px;
@@ -2351,25 +2313,27 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2351
2313
  .edit-site-sidebar__content {
2352
2314
  flex-grow: 1;
2353
2315
  overflow-y: auto;
2316
+ }
2317
+ .edit-site-sidebar__content .components-navigator-screen {
2354
2318
  visibility: hidden;
2355
2319
  scrollbar-color: #757575 #1e1e1e;
2356
2320
  scrollbar-width: thin;
2357
2321
  scrollbar-gutter: stable;
2358
2322
  }
2359
- .edit-site-sidebar__content::-webkit-scrollbar {
2323
+ .edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar {
2360
2324
  width: 12px;
2361
2325
  height: 12px;
2362
2326
  }
2363
- .edit-site-sidebar__content::-webkit-scrollbar-track {
2327
+ .edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar-track {
2364
2328
  background-color: #1e1e1e;
2365
2329
  }
2366
- .edit-site-sidebar__content::-webkit-scrollbar-thumb {
2330
+ .edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar-thumb {
2367
2331
  background-color: #757575;
2368
2332
  border-radius: 8px;
2369
2333
  border: 3px solid transparent;
2370
2334
  background-clip: padding-box;
2371
2335
  }
2372
- .edit-site-sidebar__content:hover, .edit-site-sidebar__content:focus, .edit-site-sidebar__content > * {
2336
+ .edit-site-sidebar__content .components-navigator-screen:hover, .edit-site-sidebar__content .components-navigator-screen:focus, .edit-site-sidebar__content .components-navigator-screen > * {
2373
2337
  visibility: visible;
2374
2338
  }
2375
2339
 
@@ -2378,8 +2342,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2378
2342
  flex-shrink: 0;
2379
2343
  margin: 0 24px;
2380
2344
  padding: 24px 0;
2381
- display: flex;
2382
- justify-content: flex-end;
2383
2345
  }
2384
2346
 
2385
2347
  .edit-site-sidebar__content.edit-site-sidebar__content {
@@ -2390,6 +2352,22 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2390
2352
  padding: 0 12px;
2391
2353
  }
2392
2354
 
2355
+ .edit-site-sidebar-button {
2356
+ color: #e0e0e0;
2357
+ flex-shrink: 0;
2358
+ }
2359
+ .edit-site-sidebar-button:focus:not(:disabled) {
2360
+ box-shadow: none;
2361
+ outline: none;
2362
+ }
2363
+ .edit-site-sidebar-button:focus-visible:not(:disabled) {
2364
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
2365
+ outline: 3px solid transparent;
2366
+ }
2367
+ .edit-site-sidebar-button:hover, .edit-site-sidebar-button:focus-visible, .edit-site-sidebar-button:focus, .edit-site-sidebar-button:not([aria-disabled=true]):active, .edit-site-sidebar-button[aria-expanded=true] {
2368
+ color: #fff;
2369
+ }
2370
+
2393
2371
  .edit-site-sidebar-navigation-item.components-item {
2394
2372
  color: #949494;
2395
2373
  border-width: 1.5px;
@@ -2403,20 +2381,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2403
2381
  background: var(--wp-admin-theme-color);
2404
2382
  }
2405
2383
 
2406
- .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button {
2407
- color: #949494;
2408
- }
2409
- .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button:hover, .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button:focus, .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button[aria-current] {
2410
- color: #fff;
2411
- }
2412
-
2413
- .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf:hover, .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf:focus, .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf[aria-current] {
2414
- background: #2f2f2f;
2415
- }
2416
- .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf .block-editor-list-view-block__menu {
2417
- margin-left: -8px;
2418
- }
2419
-
2420
2384
  .edit-site-sidebar-navigation-screen__content .block-editor-list-view-block-select-button {
2421
2385
  cursor: grab;
2422
2386
  width: calc(100% - 2px);
@@ -2435,6 +2399,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2435
2399
  color: #949494;
2436
2400
  }
2437
2401
 
2402
+ .edit-site-sidebar-navigation-screen__page-link {
2403
+ color: #949494;
2404
+ margin-left: 16px;
2405
+ display: inline-block;
2406
+ }
2407
+ .edit-site-sidebar-navigation-screen__page-link:hover, .edit-site-sidebar-navigation-screen__page-link:focus {
2408
+ color: #fff;
2409
+ }
2410
+ .edit-site-sidebar-navigation-screen__page-link .components-external-link__icon {
2411
+ margin-left: 4px;
2412
+ }
2413
+
2438
2414
  .edit-site-sidebar-navigation-screen__title-icon {
2439
2415
  position: sticky;
2440
2416
  top: 0;
@@ -2448,29 +2424,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2448
2424
 
2449
2425
  .edit-site-sidebar-navigation-screen__title {
2450
2426
  font-size: calc(1.56 * 13px);
2427
+ line-height: normal;
2451
2428
  font-weight: 500;
2452
2429
  flex-grow: 1;
2453
2430
  color: #fff;
2454
2431
  margin: 0;
2455
2432
  }
2456
2433
 
2457
- .edit-site-sidebar-navigation-screen__back {
2458
- color: #e0e0e0;
2459
- }
2460
- .edit-site-sidebar-navigation-screen__back:hover, .edit-site-sidebar-navigation-screen__back:focus, .edit-site-sidebar-navigation-screen__back:not([aria-disabled=true]):active {
2461
- color: #fff;
2462
- }
2463
-
2464
2434
  .edit-site-sidebar-navigation-screen-templates__see-all {
2465
2435
  /* Overrides the margin that comes from the Item component */
2466
2436
  margin-top: 16px !important;
2467
2437
  }
2468
2438
 
2469
- .edit-site-sidebar-navigation-screen-templates__add-button {
2470
- /* Overrides the color for all states of the button */
2471
- color: inherit !important;
2472
- }
2473
-
2474
2439
  .edit-site-site-hub {
2475
2440
  display: flex;
2476
2441
  align-items: center;
@@ -2499,16 +2464,57 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2499
2464
  overflow: hidden;
2500
2465
  }
2501
2466
 
2502
- .edit-site-sidebar-navigation-screen-navigation-menus .block-editor-list-view-block__menu-edit,
2503
- .edit-site-sidebar-navigation-screen-navigation-menus .edit-site-navigation-inspector__select-menu {
2504
- display: none;
2467
+ .edit-site-sidebar-navigation-screen__description {
2468
+ margin: 0 0 32px 16px;
2505
2469
  }
2506
- .edit-site-sidebar-navigation-screen-navigation-menus .offcanvas-editor-list-view-leaf {
2470
+
2471
+ .edit-site-sidebar-navigation-screen-navigation-menus__placeholder {
2472
+ padding: 8px;
2473
+ margin: 8px;
2474
+ background-color: #f0f0f0;
2475
+ animation: loadingpulse 1s linear infinite;
2476
+ animation-delay: 0.5s;
2477
+ }
2478
+
2479
+ @keyframes loadingpulse {
2480
+ 0% {
2481
+ opacity: 1;
2482
+ }
2483
+ 50% {
2484
+ opacity: 0.5;
2485
+ }
2486
+ 100% {
2487
+ opacity: 1;
2488
+ }
2489
+ }
2490
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf {
2507
2491
  max-width: calc(100% - 4px);
2492
+ border-radius: 2px;
2493
+ }
2494
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf:hover, .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf:focus, .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf[aria-current] {
2495
+ background: #2f2f2f;
2508
2496
  }
2509
- .edit-site-sidebar-navigation-screen-navigation-menus .block-editor-list-view-leaf .block-editor-list-view-block__contents-cell {
2497
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf .block-editor-list-view-block__menu {
2498
+ margin-left: -8px;
2499
+ }
2500
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block__contents-cell {
2510
2501
  width: 100%;
2511
2502
  }
2503
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block-contents {
2504
+ white-space: normal;
2505
+ }
2506
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__title {
2507
+ margin-top: 3px;
2508
+ }
2509
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu-cell {
2510
+ padding-right: 0;
2511
+ }
2512
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .components-button {
2513
+ color: #949494;
2514
+ }
2515
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .components-button:hover, .edit-site-sidebar-navigation-screen-navigation-menus__content .components-button:focus, .edit-site-sidebar-navigation-screen-navigation-menus__content .components-button[aria-current] {
2516
+ color: #fff;
2517
+ }
2512
2518
 
2513
2519
  .edit-site-site-icon__icon {
2514
2520
  fill: currentColor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "5.3.5",
3
+ "version": "5.3.7",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,33 +29,33 @@
29
29
  "@babel/runtime": "^7.16.0",
30
30
  "@wordpress/a11y": "^3.26.1",
31
31
  "@wordpress/api-fetch": "^6.23.1",
32
- "@wordpress/block-editor": "^11.3.5",
33
- "@wordpress/block-library": "^8.3.5",
32
+ "@wordpress/block-editor": "^11.3.7",
33
+ "@wordpress/block-library": "^8.3.7",
34
34
  "@wordpress/blocks": "^12.3.3",
35
- "@wordpress/components": "^23.3.4",
35
+ "@wordpress/components": "^23.3.5",
36
36
  "@wordpress/compose": "^6.3.3",
37
37
  "@wordpress/core-data": "^6.3.3",
38
38
  "@wordpress/data": "^8.3.3",
39
39
  "@wordpress/deprecated": "^3.26.1",
40
- "@wordpress/editor": "^13.3.5",
40
+ "@wordpress/editor": "^13.3.7",
41
41
  "@wordpress/element": "^5.3.2",
42
42
  "@wordpress/hooks": "^3.26.1",
43
43
  "@wordpress/html-entities": "^3.26.1",
44
44
  "@wordpress/i18n": "^4.26.1",
45
45
  "@wordpress/icons": "^9.17.2",
46
- "@wordpress/interface": "^5.3.5",
46
+ "@wordpress/interface": "^5.3.6",
47
47
  "@wordpress/keyboard-shortcuts": "^4.3.3",
48
48
  "@wordpress/keycodes": "^3.26.2",
49
49
  "@wordpress/media-utils": "^4.17.2",
50
50
  "@wordpress/notices": "^3.26.3",
51
51
  "@wordpress/plugins": "^5.3.3",
52
- "@wordpress/preferences": "^3.3.4",
52
+ "@wordpress/preferences": "^3.3.5",
53
53
  "@wordpress/private-apis": "^0.8.1",
54
- "@wordpress/reusable-blocks": "^4.3.5",
54
+ "@wordpress/reusable-blocks": "^4.3.7",
55
55
  "@wordpress/style-engine": "^1.9.1",
56
56
  "@wordpress/url": "^3.27.1",
57
57
  "@wordpress/viewport": "^5.3.3",
58
- "@wordpress/widgets": "^3.3.5",
58
+ "@wordpress/widgets": "^3.3.7",
59
59
  "classnames": "^2.3.1",
60
60
  "colord": "^2.9.2",
61
61
  "downloadjs": "^1.4.7",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "1e2b2f680c6378f789d6660bc04b30e35e3a33a3"
76
+ "gitHead": "d14fea64bd9ad9d2d86047936974dbed39a5b5b3"
77
77
  }
@@ -11,6 +11,7 @@ import {
11
11
  SearchControl,
12
12
  TextHighlight,
13
13
  __experimentalText as Text,
14
+ __experimentalVStack as VStack,
14
15
  __unstableComposite as Composite,
15
16
  __unstableUseCompositeState as useCompositeState,
16
17
  __unstableCompositeItem as CompositeItem,
@@ -158,9 +159,12 @@ function SuggestionList( { entityForSuggestions, onSelect } ) {
158
159
  </Composite>
159
160
  ) }
160
161
  { debouncedSearch && ! suggestions?.length && (
161
- <p className="edit-site-custom-template-modal__no-results">
162
+ <Text
163
+ as="p"
164
+ className="edit-site-custom-template-modal__no-results"
165
+ >
162
166
  { labels.not_found }
163
- </p>
167
+ </Text>
164
168
  ) }
165
169
  </>
166
170
  );
@@ -188,12 +192,12 @@ function AddCustomTemplateModal( {
188
192
  >
189
193
  { isCreatingTemplate && <TemplateActionsLoadingScreen /> }
190
194
  { ! showSearchEntities && (
191
- <>
192
- <p>
195
+ <VStack spacing={ 4 }>
196
+ <Text as="p">
193
197
  { __(
194
198
  'Select whether to create a single template for all items or a specific one.'
195
199
  ) }
196
- </p>
200
+ </Text>
197
201
  <Flex
198
202
  className={ `${ baseCssClass }__contents` }
199
203
  gap="4"
@@ -245,20 +249,20 @@ function AddCustomTemplateModal( {
245
249
  </Text>
246
250
  </FlexItem>
247
251
  </Flex>
248
- </>
252
+ </VStack>
249
253
  ) }
250
254
  { showSearchEntities && (
251
- <>
252
- <p>
255
+ <VStack spacing={ 4 }>
256
+ <Text as="p">
253
257
  { __(
254
258
  'This template will be used only for the specific item chosen.'
255
259
  ) }
256
- </p>
260
+ </Text>
257
261
  <SuggestionList
258
262
  entityForSuggestions={ entityForSuggestions }
259
263
  onSelect={ onSelect }
260
264
  />
261
- </>
265
+ </VStack>
262
266
  ) }
263
267
  </Modal>
264
268
  );
@@ -86,11 +86,12 @@ export default function NewTemplatePart( {
86
86
  setIsModalOpen( false );
87
87
  }
88
88
  }
89
+ const { as: Toggle = Button, ...restToggleProps } = toggleProps ?? {};
89
90
 
90
91
  return (
91
92
  <>
92
- <Button
93
- { ...toggleProps }
93
+ <Toggle
94
+ { ...restToggleProps }
94
95
  onClick={ () => {
95
96
  setIsModalOpen( true );
96
97
  } }
@@ -98,7 +99,7 @@ export default function NewTemplatePart( {
98
99
  label={ postType.labels.add_new }
99
100
  >
100
101
  { showIcon ? null : postType.labels.add_new }
101
- </Button>
102
+ </Toggle>
102
103
  { isModalOpen && (
103
104
  <CreateTemplatePartModal
104
105
  closeModal={ () => setIsModalOpen( false ) }
@@ -69,8 +69,6 @@
69
69
  }
70
70
 
71
71
  .edit-site-custom-template-modal__suggestions_list {
72
- margin-top: $grid-unit-20;
73
-
74
72
  @include break-small() {
75
73
  height: 232px;
76
74
  overflow: scroll;
@@ -130,11 +128,8 @@
130
128
  border: 1px solid $gray-400;
131
129
  border-radius: $radius-block-ui;
132
130
  padding: $grid-unit-20;
133
- margin-bottom: 0;
134
- margin-top: $grid-unit-20;
135
131
  }
136
132
 
137
-
138
133
  .edit-site-custom-generic-template__modal {
139
134
  .components-base-control {
140
135
  @include break-medium() {
@@ -43,7 +43,8 @@ function EditorCanvas( { enableResizing, settings, children, ...props } ) {
43
43
  // Forming a "block formatting context" to prevent margin collapsing.
44
44
  // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
45
45
  `.is-root-container { display: flow-root; }
46
- body { position: relative; }`
46
+ body { position: relative;
47
+ ${ canvasMode === 'view' ? 'cursor: pointer;' : '' }}}`
47
48
  }</style>
48
49
  { enableResizing && (
49
50
  <style>
@@ -17,7 +17,7 @@
17
17
  height: 100%;
18
18
  display: block;
19
19
  overflow: hidden;
20
- background-color: $gray-800;
20
+ background-color: $gray-900;
21
21
  // Centralize the editor horizontally (flex-direction is column).
22
22
  align-items: center;
23
23
 
@@ -25,7 +25,7 @@ import { __, sprintf } from '@wordpress/i18n';
25
25
  import { SidebarComplementaryAreaFills } from '../sidebar-edit-mode';
26
26
  import BlockEditor from '../block-editor';
27
27
  import CodeEditor from '../code-editor';
28
- import KeyboardShortcuts from '../keyboard-shortcuts';
28
+ import KeyboardShortcutsEditMode from '../keyboard-shortcuts/edit-mode';
29
29
  import InserterSidebar from '../secondary-sidebar/inserter-sidebar';
30
30
  import ListViewSidebar from '../secondary-sidebar/list-view-sidebar';
31
31
  import WelcomeGuide from '../welcome-guide';
@@ -150,7 +150,6 @@ export default function Editor() {
150
150
  return (
151
151
  <>
152
152
  { isEditMode && <WelcomeGuide /> }
153
- <KeyboardShortcuts.Register />
154
153
  <EntityProvider kind="root" type="site">
155
154
  <EntityProvider
156
155
  kind="postType"
@@ -186,7 +185,9 @@ export default function Editor() {
186
185
  ) }
187
186
  </Notice>
188
187
  ) }
189
- { isEditMode && <KeyboardShortcuts /> }
188
+ { isEditMode && (
189
+ <KeyboardShortcutsEditMode />
190
+ ) }
190
191
  </>
191
192
  }
192
193
  secondarySidebar={
@@ -24,7 +24,6 @@ export function ScreenVariations( { name, path = '' } ) {
24
24
  return (
25
25
  <div className="edit-site-global-styles-screen-variations">
26
26
  <VStack spacing={ 3 }>
27
- <p>Manage style variations, saved block appearence presets.</p>
28
27
  <Subtitle>{ __( 'Style Variations' ) }</Subtitle>
29
28
  <VariationsPanel name={ name } />
30
29
  </VStack>
@@ -143,9 +143,9 @@ function ShadowPopoverContainer( { shadow, onShadowChange } ) {
143
143
  function ShadowPresets( { presets, activeShadow, onSelect } ) {
144
144
  return ! presets ? null : (
145
145
  <Grid columns={ 6 } gap={ 0 } align="center" justify="center">
146
- { presets.map( ( { name, shadow }, i ) => (
146
+ { presets.map( ( { name, slug, shadow } ) => (
147
147
  <ShadowIndicator
148
- key={ i }
148
+ key={ slug }
149
149
  label={ name }
150
150
  isActive={ shadow === activeShadow }
151
151
  onSelect={ () =>
@@ -164,8 +164,9 @@ function ShadowIndicator( { label, isActive, onSelect, shadow } ) {
164
164
  <Button
165
165
  className="edit-site-global-styles__shadow-indicator"
166
166
  onClick={ onSelect }
167
- aria-label={ label }
167
+ label={ label }
168
168
  style={ { boxShadow: shadow } }
169
+ showTooltip
169
170
  >
170
171
  { isActive && <Icon icon={ check } /> }
171
172
  </Button>
@@ -0,0 +1,116 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useShortcut } from '@wordpress/keyboard-shortcuts';
5
+ import { useDispatch, useSelect } from '@wordpress/data';
6
+ import { store as coreStore } from '@wordpress/core-data';
7
+ import { store as blockEditorStore } from '@wordpress/block-editor';
8
+ import { store as interfaceStore } from '@wordpress/interface';
9
+ import { createBlock } from '@wordpress/blocks';
10
+
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+ import { store as editSiteStore } from '../../store';
15
+ import { SIDEBAR_BLOCK } from '../sidebar-edit-mode/constants';
16
+ import { STORE_NAME } from '../../store/constants';
17
+
18
+ function KeyboardShortcutsEditMode() {
19
+ const { getEditorMode } = useSelect( editSiteStore );
20
+ const isListViewOpen = useSelect(
21
+ ( select ) => select( editSiteStore ).isListViewOpened(),
22
+ []
23
+ );
24
+ const isBlockInspectorOpen = useSelect(
25
+ ( select ) =>
26
+ select( interfaceStore ).getActiveComplementaryArea(
27
+ editSiteStore.name
28
+ ) === SIDEBAR_BLOCK,
29
+ []
30
+ );
31
+ const { redo, undo } = useDispatch( coreStore );
32
+ const { setIsListViewOpened, switchEditorMode } =
33
+ useDispatch( editSiteStore );
34
+ const { enableComplementaryArea, disableComplementaryArea } =
35
+ useDispatch( interfaceStore );
36
+
37
+ const { replaceBlocks } = useDispatch( blockEditorStore );
38
+ const { getBlockName, getSelectedBlockClientId, getBlockAttributes } =
39
+ useSelect( blockEditorStore );
40
+
41
+ const handleTextLevelShortcut = ( event, level ) => {
42
+ event.preventDefault();
43
+ const destinationBlockName =
44
+ level === 0 ? 'core/paragraph' : 'core/heading';
45
+ const currentClientId = getSelectedBlockClientId();
46
+ if ( currentClientId === null ) {
47
+ return;
48
+ }
49
+ const blockName = getBlockName( currentClientId );
50
+ if ( blockName !== 'core/paragraph' && blockName !== 'core/heading' ) {
51
+ return;
52
+ }
53
+ const attributes = getBlockAttributes( currentClientId );
54
+ const textAlign =
55
+ blockName === 'core/paragraph' ? 'align' : 'textAlign';
56
+ const destinationTextAlign =
57
+ destinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';
58
+
59
+ replaceBlocks(
60
+ currentClientId,
61
+ createBlock( destinationBlockName, {
62
+ level,
63
+ content: attributes.content,
64
+ ...{ [ destinationTextAlign ]: attributes[ textAlign ] },
65
+ } )
66
+ );
67
+ };
68
+
69
+ useShortcut( 'core/edit-site/undo', ( event ) => {
70
+ undo();
71
+ event.preventDefault();
72
+ } );
73
+
74
+ useShortcut( 'core/edit-site/redo', ( event ) => {
75
+ redo();
76
+ event.preventDefault();
77
+ } );
78
+
79
+ useShortcut( 'core/edit-site/toggle-list-view', () => {
80
+ setIsListViewOpened( ! isListViewOpen );
81
+ } );
82
+
83
+ useShortcut( 'core/edit-site/toggle-block-settings-sidebar', ( event ) => {
84
+ // This shortcut has no known clashes, but use preventDefault to prevent any
85
+ // obscure shortcuts from triggering.
86
+ event.preventDefault();
87
+
88
+ if ( isBlockInspectorOpen ) {
89
+ disableComplementaryArea( STORE_NAME );
90
+ } else {
91
+ enableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );
92
+ }
93
+ } );
94
+
95
+ useShortcut( 'core/edit-site/toggle-mode', () => {
96
+ switchEditorMode( getEditorMode() === 'visual' ? 'text' : 'visual' );
97
+ } );
98
+
99
+ useShortcut( 'core/edit-site/transform-heading-to-paragraph', ( event ) =>
100
+ handleTextLevelShortcut( event, 0 )
101
+ );
102
+
103
+ [ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
104
+ //the loop is based off on a constant therefore
105
+ //the hook will execute the same way every time
106
+ //eslint-disable-next-line react-hooks/rules-of-hooks
107
+ useShortcut(
108
+ `core/edit-site/transform-paragraph-to-heading-${ level }`,
109
+ ( event ) => handleTextLevelShortcut( event, level )
110
+ );
111
+ } );
112
+
113
+ return null;
114
+ }
115
+
116
+ export default KeyboardShortcutsEditMode;