@wordpress/edit-site 5.15.0 → 5.16.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 (229) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-pattern/index.js +2 -1
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/block-editor/use-site-editor-settings.js +29 -2
  5. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  6. package/build/components/editor/index.js +4 -4
  7. package/build/components/editor/index.js.map +1 -1
  8. package/build/components/global-styles/global-styles-provider.js +12 -7
  9. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  10. package/build/components/global-styles/screen-block.js +16 -0
  11. package/build/components/global-styles/screen-block.js.map +1 -1
  12. package/build/components/global-styles/screen-revisions/index.js +12 -5
  13. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  14. package/build/components/global-styles/screen-revisions/revisions-buttons.js +10 -22
  15. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  16. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +32 -25
  17. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  18. package/build/components/global-styles/style-variations-container.js +5 -3
  19. package/build/components/global-styles/style-variations-container.js.map +1 -1
  20. package/build/components/header-edit-mode/document-actions/index.js +4 -2
  21. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  22. package/build/components/keyboard-shortcuts/edit-mode.js +7 -5
  23. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  24. package/build/components/layout/index.js +9 -2
  25. package/build/components/layout/index.js.map +1 -1
  26. package/build/components/page/index.js +3 -3
  27. package/build/components/page/index.js.map +1 -1
  28. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -1
  29. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  30. package/build/components/page-patterns/patterns-list.js +18 -4
  31. package/build/components/page-patterns/patterns-list.js.map +1 -1
  32. package/build/components/page-patterns/use-patterns.js +20 -3
  33. package/build/components/page-patterns/use-patterns.js.map +1 -1
  34. package/build/components/page-template-parts/index.js +1 -2
  35. package/build/components/page-template-parts/index.js.map +1 -1
  36. package/build/components/page-templates/index.js +1 -16
  37. package/build/components/page-templates/index.js.map +1 -1
  38. package/build/components/resizable-frame/index.js +11 -19
  39. package/build/components/resizable-frame/index.js.map +1 -1
  40. package/build/components/save-button/index.js +4 -2
  41. package/build/components/save-button/index.js.map +1 -1
  42. package/build/components/save-hub/index.js +10 -4
  43. package/build/components/save-hub/index.js.map +1 -1
  44. package/build/components/sidebar-edit-mode/template-panel/index.js +15 -8
  45. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  46. package/build/components/sidebar-navigation-screen/index.js +24 -14
  47. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  48. package/build/components/sidebar-navigation-screen-global-styles/index.js +34 -40
  49. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  50. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  51. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  52. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +4 -4
  53. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  54. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +8 -0
  55. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  56. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +1 -1
  57. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  58. package/build/components/sidebar-navigation-screen-pages/index.js +2 -0
  59. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  60. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -1
  61. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  62. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +8 -1
  63. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  64. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +50 -26
  65. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  66. package/build/components/sidebar-navigation-screen-patterns/category-item.js +0 -5
  67. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  68. package/build/components/sidebar-navigation-screen-patterns/index.js +0 -9
  69. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  70. package/build/components/sidebar-navigation-screen-templates/index.js +1 -10
  71. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  72. package/build/components/sidebar-navigation-screen-templates-browse/index.js +9 -0
  73. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  74. package/build/components/site-hub/index.js +5 -2
  75. package/build/components/site-hub/index.js.map +1 -1
  76. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  77. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  78. package/build/hooks/commands/use-common-commands.js +57 -27
  79. package/build/hooks/commands/use-common-commands.js.map +1 -1
  80. package/build/hooks/commands/use-edit-mode-commands.js +65 -7
  81. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  82. package/build/hooks/push-changes-to-global-styles/index.js +84 -49
  83. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  84. package/build/store/private-actions.js +2 -1
  85. package/build/store/private-actions.js.map +1 -1
  86. package/build/utils/use-debounced-input.js +5 -7
  87. package/build/utils/use-debounced-input.js.map +1 -1
  88. package/build-module/components/add-new-pattern/index.js +2 -1
  89. package/build-module/components/add-new-pattern/index.js.map +1 -1
  90. package/build-module/components/block-editor/use-site-editor-settings.js +29 -2
  91. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  92. package/build-module/components/editor/index.js +4 -4
  93. package/build-module/components/editor/index.js.map +1 -1
  94. package/build-module/components/global-styles/global-styles-provider.js +12 -7
  95. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  96. package/build-module/components/global-styles/screen-block.js +16 -0
  97. package/build-module/components/global-styles/screen-block.js.map +1 -1
  98. package/build-module/components/global-styles/screen-revisions/index.js +13 -6
  99. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  100. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +10 -22
  101. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  102. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +28 -21
  103. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  104. package/build-module/components/global-styles/style-variations-container.js +5 -3
  105. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  106. package/build-module/components/header-edit-mode/document-actions/index.js +6 -4
  107. package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
  108. package/build-module/components/keyboard-shortcuts/edit-mode.js +7 -5
  109. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
  110. package/build-module/components/layout/index.js +9 -2
  111. package/build-module/components/layout/index.js.map +1 -1
  112. package/build-module/components/page/index.js +3 -3
  113. package/build-module/components/page/index.js.map +1 -1
  114. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -1
  115. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  116. package/build-module/components/page-patterns/patterns-list.js +19 -5
  117. package/build-module/components/page-patterns/patterns-list.js.map +1 -1
  118. package/build-module/components/page-patterns/use-patterns.js +19 -3
  119. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  120. package/build-module/components/page-template-parts/index.js +1 -2
  121. package/build-module/components/page-template-parts/index.js.map +1 -1
  122. package/build-module/components/page-templates/index.js +2 -15
  123. package/build-module/components/page-templates/index.js.map +1 -1
  124. package/build-module/components/resizable-frame/index.js +12 -20
  125. package/build-module/components/resizable-frame/index.js.map +1 -1
  126. package/build-module/components/save-button/index.js +4 -2
  127. package/build-module/components/save-button/index.js.map +1 -1
  128. package/build-module/components/save-hub/index.js +10 -4
  129. package/build-module/components/save-hub/index.js.map +1 -1
  130. package/build-module/components/sidebar-edit-mode/template-panel/index.js +15 -9
  131. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  132. package/build-module/components/sidebar-navigation-screen/index.js +21 -14
  133. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  134. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +34 -40
  135. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  136. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  137. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  138. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +4 -4
  139. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  140. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +7 -0
  141. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  142. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +2 -2
  143. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  144. package/build-module/components/sidebar-navigation-screen-pages/index.js +2 -0
  145. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  146. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -1
  147. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  148. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +7 -1
  149. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  150. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +49 -26
  151. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  152. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +0 -5
  153. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  154. package/build-module/components/sidebar-navigation-screen-patterns/index.js +0 -7
  155. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  156. package/build-module/components/sidebar-navigation-screen-templates/index.js +1 -8
  157. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  158. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +7 -0
  159. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  160. package/build-module/components/site-hub/index.js +4 -2
  161. package/build-module/components/site-hub/index.js.map +1 -1
  162. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
  163. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  164. package/build-module/hooks/commands/use-common-commands.js +57 -27
  165. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  166. package/build-module/hooks/commands/use-edit-mode-commands.js +65 -9
  167. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  168. package/build-module/hooks/push-changes-to-global-styles/index.js +84 -49
  169. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  170. package/build-module/store/private-actions.js +2 -1
  171. package/build-module/store/private-actions.js.map +1 -1
  172. package/build-module/utils/use-debounced-input.js +5 -7
  173. package/build-module/utils/use-debounced-input.js.map +1 -1
  174. package/build-style/style-rtl.css +67 -47
  175. package/build-style/style.css +67 -47
  176. package/package.json +39 -39
  177. package/src/components/add-new-pattern/index.js +2 -0
  178. package/src/components/block-editor/use-site-editor-settings.js +22 -2
  179. package/src/components/editor/index.js +3 -3
  180. package/src/components/global-styles/global-styles-provider.js +7 -2
  181. package/src/components/global-styles/screen-block.js +15 -0
  182. package/src/components/global-styles/screen-revisions/index.js +64 -58
  183. package/src/components/global-styles/screen-revisions/revisions-buttons.js +17 -31
  184. package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +14 -1
  185. package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +64 -48
  186. package/src/components/global-styles/style-variations-container.js +2 -0
  187. package/src/components/header-edit-mode/document-actions/index.js +8 -4
  188. package/src/components/header-edit-mode/document-actions/style.scss +41 -28
  189. package/src/components/keyboard-shortcuts/edit-mode.js +4 -5
  190. package/src/components/layout/index.js +33 -20
  191. package/src/components/layout/style.scss +2 -2
  192. package/src/components/page/index.js +8 -8
  193. package/src/components/page/style.scss +8 -5
  194. package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -1
  195. package/src/components/page-patterns/patterns-list.js +25 -12
  196. package/src/components/page-patterns/style.scss +9 -8
  197. package/src/components/page-patterns/use-patterns.js +19 -3
  198. package/src/components/page-template-parts/index.js +0 -1
  199. package/src/components/page-templates/index.js +6 -19
  200. package/src/components/resizable-frame/index.js +10 -25
  201. package/src/components/save-button/index.js +2 -0
  202. package/src/components/save-hub/index.js +6 -1
  203. package/src/components/save-hub/style.scss +1 -1
  204. package/src/components/sidebar-edit-mode/template-panel/index.js +15 -11
  205. package/src/components/sidebar-navigation-screen/index.js +24 -16
  206. package/src/components/sidebar-navigation-screen/style.scss +4 -0
  207. package/src/components/sidebar-navigation-screen-details-panel/style.scss +1 -0
  208. package/src/components/sidebar-navigation-screen-global-styles/index.js +48 -44
  209. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -2
  210. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +4 -4
  211. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +27 -15
  212. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +1 -4
  213. package/src/components/sidebar-navigation-screen-pages/index.js +9 -4
  214. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -1
  215. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +11 -1
  216. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +69 -41
  217. package/src/components/sidebar-navigation-screen-patterns/category-item.js +5 -13
  218. package/src/components/sidebar-navigation-screen-patterns/index.js +0 -8
  219. package/src/components/sidebar-navigation-screen-templates/index.js +1 -9
  220. package/src/components/sidebar-navigation-screen-templates-browse/index.js +10 -0
  221. package/src/components/site-hub/index.js +3 -1
  222. package/src/components/site-hub/style.scss +1 -2
  223. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -4
  224. package/src/components/table/style.scss +1 -0
  225. package/src/hooks/commands/use-common-commands.js +63 -23
  226. package/src/hooks/commands/use-edit-mode-commands.js +94 -23
  227. package/src/hooks/push-changes-to-global-styles/index.js +83 -46
  228. package/src/store/private-actions.js +5 -1
  229. package/src/utils/use-debounced-input.js +8 -7
@@ -1467,17 +1467,23 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
1467
1467
  }
1468
1468
 
1469
1469
  .edit-site-document-actions {
1470
- display: grid;
1471
- grid-template-columns: 1fr 2fr 1fr;
1470
+ display: flex;
1471
+ align-items: center;
1472
1472
  height: 36px;
1473
+ justify-content: space-between;
1473
1474
  min-width: 0;
1474
1475
  background: #f0f0f0;
1475
1476
  border-radius: 4px;
1476
1477
  width: min(100%, 450px);
1477
- overflow: hidden;
1478
1478
  }
1479
- .edit-site-document-actions:hover {
1480
- color: currentColor;
1479
+ .has-fixed-toolbar .edit-site-document-actions {
1480
+ width: min(100%, 380px);
1481
+ }
1482
+ .edit-site-document-actions .components-button {
1483
+ border-radius: 4px;
1484
+ }
1485
+ .edit-site-document-actions .components-button:hover {
1486
+ color: var(--wp-block-synced-color);
1481
1487
  background: #e0e0e0;
1482
1488
  }
1483
1489
  @media (min-width: 782px) {
@@ -1490,28 +1496,34 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
1490
1496
  width: min(100%, 450px);
1491
1497
  }
1492
1498
  }
1499
+ .edit-site-document-actions.is-synced-entity .edit-site-document-actions__title {
1500
+ color: var(--wp-block-synced-color);
1501
+ }
1502
+ .edit-site-document-actions.is-synced-entity .edit-site-document-actions__title h1 {
1503
+ color: var(--wp-block-synced-color);
1504
+ }
1493
1505
 
1494
1506
  .edit-site-document-actions__command {
1495
- grid-column: 1/-1;
1496
- display: grid;
1497
- grid-template-columns: 1fr 2fr 1fr;
1498
- grid-row: 1;
1507
+ flex-grow: 1;
1508
+ color: var(--wp-block-synced-color);
1509
+ overflow: hidden;
1499
1510
  }
1500
1511
 
1501
1512
  .edit-site-document-actions__title {
1502
1513
  flex-grow: 1;
1503
- color: var(--wp-block-synced-color);
1504
1514
  overflow: hidden;
1505
- grid-column: 2/3;
1515
+ }
1516
+ .edit-site-document-actions__title:hover {
1517
+ color: var(--wp-block-synced-color);
1506
1518
  }
1507
1519
  .edit-site-document-actions__title .block-editor-block-icon {
1508
1520
  min-width: 24px;
1521
+ flex-shrink: 0;
1509
1522
  }
1510
1523
  .edit-site-document-actions__title h1 {
1511
1524
  white-space: nowrap;
1512
1525
  overflow: hidden;
1513
1526
  text-overflow: ellipsis;
1514
- color: var(--wp-block-synced-color);
1515
1527
  }
1516
1528
  .edit-site-document-actions.is-page .edit-site-document-actions__title {
1517
1529
  color: #2f2f2f;
@@ -1538,31 +1550,25 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
1538
1550
  }
1539
1551
  }
1540
1552
 
1541
- .edit-site-document-actions__shortcut,
1542
- .edit-site-document-actions__back {
1543
- color: #2f2f2f;
1544
- }
1545
- .edit-site-document-actions:hover .edit-site-document-actions__shortcut,
1546
- .edit-site-document-actions:hover .edit-site-document-actions__back {
1547
- color: #1e1e1e;
1548
- }
1549
-
1550
1553
  .edit-site-document-actions__shortcut {
1551
- text-align: right;
1554
+ color: #2f2f2f;
1552
1555
  }
1553
1556
 
1554
- .edit-site-document-actions__back {
1557
+ .edit-site-document-actions__back.components-button.has-icon.has-text {
1555
1558
  min-width: 36px;
1556
1559
  flex-shrink: 0;
1557
- grid-column: 1/2;
1558
- grid-row: 1;
1560
+ color: #757575;
1561
+ gap: 0;
1559
1562
  z-index: 1;
1560
1563
  }
1561
- .edit-site-document-actions.is-animated .edit-site-document-actions__back {
1564
+ .edit-site-document-actions__back.components-button.has-icon.has-text:hover {
1565
+ color: currentColor;
1566
+ }
1567
+ .edit-site-document-actions.is-animated .edit-site-document-actions__back.components-button.has-icon.has-text {
1562
1568
  animation: edit-site-document-actions__slide-in-left 0.3s;
1563
1569
  }
1564
1570
  @media (prefers-reduced-motion: reduce) {
1565
- .edit-site-document-actions.is-animated .edit-site-document-actions__back {
1571
+ .edit-site-document-actions.is-animated .edit-site-document-actions__back.components-button.has-icon.has-text {
1566
1572
  animation-duration: 1ms;
1567
1573
  animation-delay: 0s;
1568
1574
  }
@@ -1767,7 +1773,7 @@ body.is-fullscreen-mode .edit-site-list-header {
1767
1773
  color: #2f2f2f;
1768
1774
  background: #fff;
1769
1775
  flex-grow: 1;
1770
- overflow: auto;
1776
+ overflow: hidden;
1771
1777
  margin: 0;
1772
1778
  margin-top: 60px;
1773
1779
  }
@@ -1780,8 +1786,7 @@ body.is-fullscreen-mode .edit-site-list-header {
1780
1786
 
1781
1787
  .edit-site-page-header {
1782
1788
  padding: 0 32px;
1783
- height: 60px;
1784
- padding-left: 32px;
1789
+ min-height: 60px;
1785
1790
  border-bottom: 1px solid #f0f0f0;
1786
1791
  background: #fff;
1787
1792
  position: sticky;
@@ -1800,8 +1805,12 @@ body.is-fullscreen-mode .edit-site-list-header {
1800
1805
  }
1801
1806
 
1802
1807
  .edit-site-page-content {
1803
- padding: 32px 32px;
1804
- overflow-x: auto;
1808
+ height: 100%;
1809
+ display: flex;
1810
+ overflow: auto;
1811
+ flex-flow: column;
1812
+ position: relative;
1813
+ z-index: 1;
1805
1814
  }
1806
1815
 
1807
1816
  .edit-site-patterns {
@@ -1812,13 +1821,6 @@ body.is-fullscreen-mode .edit-site-list-header {
1812
1821
  padding: 0;
1813
1822
  overflow-x: auto;
1814
1823
  }
1815
- .edit-site-patterns .edit-site-page-content {
1816
- height: 100%;
1817
- position: relative;
1818
- padding: 0;
1819
- display: flex;
1820
- flex-flow: column;
1821
- }
1822
1824
  .edit-site-patterns .components-base-control {
1823
1825
  width: 100%;
1824
1826
  }
@@ -1867,6 +1869,9 @@ body.is-fullscreen-mode .edit-site-list-header {
1867
1869
  width: 300px;
1868
1870
  }
1869
1871
  }
1872
+ .edit-site-patterns .edit-site-patterns__sync-status-filter-option:not([aria-checked=true]) {
1873
+ color: #949494;
1874
+ }
1870
1875
  .edit-site-patterns .edit-site-patterns__sync-status-filter-option:active {
1871
1876
  background: #757575;
1872
1877
  color: #f0f0f0;
@@ -1923,6 +1928,16 @@ body.is-fullscreen-mode .edit-site-list-header {
1923
1928
  grid-template-columns: 1fr 1fr;
1924
1929
  }
1925
1930
  }
1931
+ @media (min-width: 1440px) {
1932
+ .edit-site-patterns__grid {
1933
+ grid-template-columns: 1fr 1fr 1fr;
1934
+ }
1935
+ }
1936
+ @media (min-width: 1920px) {
1937
+ .edit-site-patterns__grid {
1938
+ grid-template-columns: 1fr 1fr 1fr 1fr;
1939
+ }
1940
+ }
1926
1941
  .edit-site-patterns__grid .edit-site-patterns__pattern {
1927
1942
  break-inside: avoid-column;
1928
1943
  display: flex;
@@ -2001,6 +2016,7 @@ body.is-fullscreen-mode .edit-site-list-header {
2001
2016
 
2002
2017
  .edit-site-table-wrapper {
2003
2018
  width: 100%;
2019
+ padding: 32px;
2004
2020
  }
2005
2021
 
2006
2022
  .edit-site-table {
@@ -2722,28 +2738,28 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2722
2738
  display: flex;
2723
2739
  }
2724
2740
 
2725
- .edit-site-layout__sidebar {
2741
+ .edit-site-layout__sidebar-region {
2726
2742
  z-index: 1;
2727
2743
  width: 100vw;
2728
2744
  flex-shrink: 0;
2729
2745
  }
2730
2746
  @media (min-width: 782px) {
2731
- .edit-site-layout__sidebar {
2747
+ .edit-site-layout__sidebar-region {
2732
2748
  width: 360px;
2733
2749
  }
2734
2750
  }
2735
- .edit-site-layout.is-full-canvas .edit-site-layout__sidebar {
2751
+ .edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region {
2736
2752
  position: fixed !important;
2737
2753
  height: 100vh;
2738
2754
  left: 0;
2739
2755
  top: 0;
2740
2756
  }
2741
- .edit-site-layout__sidebar > div {
2757
+ .edit-site-layout__sidebar-region .edit-site-layout__sidebar {
2742
2758
  display: flex;
2743
2759
  flex-direction: column;
2744
2760
  height: 100%;
2745
2761
  }
2746
- .edit-site-layout__sidebar .resizable-editor__drag-handle {
2762
+ .edit-site-layout__sidebar-region .resizable-editor__drag-handle {
2747
2763
  right: 0;
2748
2764
  }
2749
2765
 
@@ -2937,7 +2953,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2937
2953
  border-top: 1px solid #2f2f2f;
2938
2954
  flex-shrink: 0;
2939
2955
  margin: 0;
2940
- padding: 24px;
2956
+ padding: 20px 24px;
2941
2957
  }
2942
2958
 
2943
2959
  .edit-site-save-hub__button {
@@ -3063,6 +3079,10 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
3063
3079
 
3064
3080
  .edit-site-sidebar-navigation-screen__main {
3065
3081
  flex-grow: 1;
3082
+ margin-bottom: 16px;
3083
+ }
3084
+ .edit-site-sidebar-navigation-screen__main.has-footer {
3085
+ margin-bottom: 0;
3066
3086
  }
3067
3087
 
3068
3088
  .edit-site-sidebar-navigation-screen__content {
@@ -3284,6 +3304,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
3284
3304
  .edit-site-sidebar-navigation-details-screen-panel__label.edit-site-sidebar-navigation-details-screen-panel__label {
3285
3305
  color: #949494;
3286
3306
  width: 100px;
3307
+ flex-shrink: 0;
3287
3308
  }
3288
3309
 
3289
3310
  .edit-site-sidebar-navigation-details-screen-panel__value.edit-site-sidebar-navigation-details-screen-panel__value {
@@ -3404,6 +3425,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
3404
3425
  }
3405
3426
  .edit-site-site-hub .edit-site-site-hub__site-view-link {
3406
3427
  flex-grow: 0;
3428
+ margin-right: var(--wp-admin-border-width-focus);
3407
3429
  }
3408
3430
  @media (min-width: 480px) {
3409
3431
  .edit-site-site-hub .edit-site-site-hub__site-view-link {
@@ -3412,8 +3434,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
3412
3434
  }
3413
3435
  }
3414
3436
  .edit-site-site-hub .edit-site-site-hub__site-view-link:focus {
3415
- outline: none;
3416
- box-shadow: none;
3417
3437
  opacity: 1;
3418
3438
  }
3419
3439
  .edit-site-site-hub .edit-site-site-hub__site-view-link svg {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "5.15.0",
3
+ "version": "5.16.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,43 +27,43 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/a11y": "^3.38.0",
31
- "@wordpress/api-fetch": "^6.35.0",
32
- "@wordpress/block-editor": "^12.6.0",
33
- "@wordpress/block-library": "^8.15.0",
34
- "@wordpress/blocks": "^12.15.0",
35
- "@wordpress/commands": "^0.9.0",
36
- "@wordpress/components": "^25.4.0",
37
- "@wordpress/compose": "^6.15.0",
38
- "@wordpress/core-commands": "^0.7.0",
39
- "@wordpress/core-data": "^6.15.0",
40
- "@wordpress/data": "^9.8.0",
41
- "@wordpress/date": "^4.38.0",
42
- "@wordpress/deprecated": "^3.38.0",
43
- "@wordpress/dom": "^3.38.0",
44
- "@wordpress/editor": "^13.15.0",
45
- "@wordpress/element": "^5.15.0",
46
- "@wordpress/escape-html": "^2.38.0",
47
- "@wordpress/hooks": "^3.38.0",
48
- "@wordpress/html-entities": "^3.38.0",
49
- "@wordpress/i18n": "^4.38.0",
50
- "@wordpress/icons": "^9.29.0",
51
- "@wordpress/interface": "^5.15.0",
52
- "@wordpress/keyboard-shortcuts": "^4.15.0",
53
- "@wordpress/keycodes": "^3.38.0",
54
- "@wordpress/media-utils": "^4.29.0",
55
- "@wordpress/notices": "^4.6.0",
56
- "@wordpress/plugins": "^6.6.0",
57
- "@wordpress/preferences": "^3.15.0",
58
- "@wordpress/primitives": "^3.36.0",
59
- "@wordpress/private-apis": "^0.20.0",
60
- "@wordpress/reusable-blocks": "^4.15.0",
61
- "@wordpress/router": "^0.7.0",
62
- "@wordpress/style-engine": "^1.21.0",
63
- "@wordpress/url": "^3.39.0",
64
- "@wordpress/viewport": "^5.15.0",
65
- "@wordpress/widgets": "^3.15.0",
66
- "@wordpress/wordcount": "^3.38.0",
30
+ "@wordpress/a11y": "^3.39.0",
31
+ "@wordpress/api-fetch": "^6.36.0",
32
+ "@wordpress/block-editor": "^12.7.0",
33
+ "@wordpress/block-library": "^8.16.0",
34
+ "@wordpress/blocks": "^12.16.0",
35
+ "@wordpress/commands": "^0.10.0",
36
+ "@wordpress/components": "^25.5.0",
37
+ "@wordpress/compose": "^6.16.0",
38
+ "@wordpress/core-commands": "^0.8.0",
39
+ "@wordpress/core-data": "^6.16.0",
40
+ "@wordpress/data": "^9.9.0",
41
+ "@wordpress/date": "^4.39.0",
42
+ "@wordpress/deprecated": "^3.39.0",
43
+ "@wordpress/dom": "^3.39.0",
44
+ "@wordpress/editor": "^13.16.0",
45
+ "@wordpress/element": "^5.16.0",
46
+ "@wordpress/escape-html": "^2.39.0",
47
+ "@wordpress/hooks": "^3.39.0",
48
+ "@wordpress/html-entities": "^3.39.0",
49
+ "@wordpress/i18n": "^4.39.0",
50
+ "@wordpress/icons": "^9.30.0",
51
+ "@wordpress/interface": "^5.16.0",
52
+ "@wordpress/keyboard-shortcuts": "^4.16.0",
53
+ "@wordpress/keycodes": "^3.39.0",
54
+ "@wordpress/media-utils": "^4.30.0",
55
+ "@wordpress/notices": "^4.7.0",
56
+ "@wordpress/plugins": "^6.7.0",
57
+ "@wordpress/preferences": "^3.16.0",
58
+ "@wordpress/primitives": "^3.37.0",
59
+ "@wordpress/private-apis": "^0.21.0",
60
+ "@wordpress/reusable-blocks": "^4.16.0",
61
+ "@wordpress/router": "^0.8.0",
62
+ "@wordpress/style-engine": "^1.22.0",
63
+ "@wordpress/url": "^3.40.0",
64
+ "@wordpress/viewport": "^5.16.0",
65
+ "@wordpress/widgets": "^3.16.0",
66
+ "@wordpress/wordcount": "^3.39.0",
67
67
  "change-case": "^4.1.2",
68
68
  "classnames": "^2.3.1",
69
69
  "colord": "^2.9.2",
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "6f14d11ed4cb59df110a28ebaa23ecba95eb673a"
86
+ "gitHead": "b898cf1dc8e70841d1647ea0994ac6278acc18a7"
87
87
  }
@@ -65,6 +65,8 @@ export default function AddNewPattern() {
65
65
  },
66
66
  ];
67
67
 
68
+ // Remove condition when command palette issues are resolved.
69
+ // See: https://github.com/WordPress/gutenberg/issues/52154.
68
70
  if ( ! isTemplatePartsMode ) {
69
71
  controls.push( {
70
72
  icon: symbolFilled,
@@ -17,6 +17,8 @@ function useArchiveLabel( templateSlug ) {
17
17
  );
18
18
  let taxonomy;
19
19
  let term;
20
+ let isAuthor = false;
21
+ let authorSlug;
20
22
  if ( taxonomyMatches ) {
21
23
  // If is for a all taxonomies of a type
22
24
  if ( taxonomyMatches[ 1 ] ) {
@@ -35,10 +37,19 @@ function useArchiveLabel( templateSlug ) {
35
37
 
36
38
  //getTaxonomy( 'category' );
37
39
  //wp.data.select('core').getEntityRecords( 'taxonomy', 'category', {slug: 'newcat'} );
40
+ } else {
41
+ const authorMatches = templateSlug?.match( /^(author)$|^author-(.+)$/ );
42
+ if ( authorMatches ) {
43
+ isAuthor = true;
44
+ if ( authorMatches[ 2 ] ) {
45
+ authorSlug = authorMatches[ 2 ];
46
+ }
47
+ }
38
48
  }
39
49
  return useSelect(
40
50
  ( select ) => {
41
- const { getEntityRecords, getTaxonomy } = select( coreStore );
51
+ const { getEntityRecords, getTaxonomy, getAuthors } =
52
+ select( coreStore );
42
53
  let archiveTypeLabel;
43
54
  let archiveNameLabel;
44
55
  if ( taxonomy ) {
@@ -54,12 +65,21 @@ function useArchiveLabel( templateSlug ) {
54
65
  archiveNameLabel = records[ 0 ].name;
55
66
  }
56
67
  }
68
+ if ( isAuthor ) {
69
+ archiveTypeLabel = 'Author';
70
+ if ( authorSlug ) {
71
+ const authorRecords = getAuthors( { slug: authorSlug } );
72
+ if ( authorRecords && authorRecords[ 0 ] ) {
73
+ archiveNameLabel = authorRecords[ 0 ].name;
74
+ }
75
+ }
76
+ }
57
77
  return {
58
78
  archiveTypeLabel,
59
79
  archiveNameLabel,
60
80
  };
61
81
  },
62
- [ taxonomy, term ]
82
+ [ authorSlug, isAuthor, taxonomy, term ]
63
83
  );
64
84
  }
65
85
 
@@ -58,9 +58,10 @@ const interfaceLabels = {
58
58
  };
59
59
 
60
60
  const typeLabels = {
61
- wp_template: __( 'Template Part' ),
61
+ wp_template: __( 'Template' ),
62
62
  wp_template_part: __( 'Template Part' ),
63
63
  wp_block: __( 'Pattern' ),
64
+ wp_navigation: __( 'Navigation' ),
64
65
  };
65
66
 
66
67
  // Prevent accidental removal of certain blocks, asking the user for
@@ -165,12 +166,11 @@ export default function Editor( { isLoading } ) {
165
166
 
166
167
  let title;
167
168
  if ( hasLoadedPost ) {
168
- const type = typeLabels[ editedPostType ] ?? __( 'Template' );
169
169
  title = sprintf(
170
170
  // translators: A breadcrumb trail in browser tab. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).
171
171
  __( '%1$s ‹ %2$s ‹ Editor' ),
172
172
  getTitle(),
173
- type
173
+ typeLabels[ editedPostType ] ?? typeLabels.wp_template
174
174
  );
175
175
  }
176
176
 
@@ -31,7 +31,7 @@ export function mergeBaseAndUserConfigs( base, user ) {
31
31
  }
32
32
 
33
33
  function useGlobalStylesUserConfig() {
34
- const { globalStylesId, isReady, settings, styles } = useSelect(
34
+ const { globalStylesId, isReady, settings, styles, behaviors } = useSelect(
35
35
  ( select ) => {
36
36
  const { getEditedEntityRecord, hasFinishedResolution } =
37
37
  select( coreStore );
@@ -65,6 +65,7 @@ function useGlobalStylesUserConfig() {
65
65
  isReady: hasResolved,
66
66
  settings: record?.settings,
67
67
  styles: record?.styles,
68
+ behaviors: record?.behaviors,
68
69
  };
69
70
  },
70
71
  []
@@ -76,8 +77,9 @@ function useGlobalStylesUserConfig() {
76
77
  return {
77
78
  settings: settings ?? {},
78
79
  styles: styles ?? {},
80
+ behaviors: behaviors ?? {},
79
81
  };
80
- }, [ settings, styles ] );
82
+ }, [ settings, styles, behaviors ] );
81
83
 
82
84
  const setConfig = useCallback(
83
85
  ( callback, options = {} ) => {
@@ -89,6 +91,7 @@ function useGlobalStylesUserConfig() {
89
91
  const currentConfig = {
90
92
  styles: record?.styles ?? {},
91
93
  settings: record?.settings ?? {},
94
+ behaviors: record?.behaviors ?? {},
92
95
  };
93
96
  const updatedConfig = callback( currentConfig );
94
97
  editEntityRecord(
@@ -98,6 +101,8 @@ function useGlobalStylesUserConfig() {
98
101
  {
99
102
  styles: cleanEmptyObject( updatedConfig.styles ) || {},
100
103
  settings: cleanEmptyObject( updatedConfig.settings ) || {},
104
+ behaviors:
105
+ cleanEmptyObject( updatedConfig.behaviors ) || {},
101
106
  },
102
107
  options
103
108
  );
@@ -61,12 +61,15 @@ const {
61
61
  useHasDimensionsPanel,
62
62
  useHasTypographyPanel,
63
63
  useHasBorderPanel,
64
+ __experimentalUseHasBehaviorsPanel: useHasBehaviorsPanel,
64
65
  useGlobalSetting,
65
66
  useSettingsForBlockElement,
66
67
  useHasColorPanel,
67
68
  useHasEffectsPanel,
68
69
  useHasFiltersPanel,
69
70
  useGlobalStyle,
71
+ __experimentalUseGlobalBehaviors: useGlobalBehaviors,
72
+ __experimentalBehaviorsPanel: StylesBehaviorsPanel,
70
73
  BorderPanel: StylesBorderPanel,
71
74
  ColorPanel: StylesColorPanel,
72
75
  TypographyPanel: StylesTypographyPanel,
@@ -91,10 +94,14 @@ function ScreenBlock( { name, variation } ) {
91
94
  } );
92
95
  const [ rawSettings, setSettings ] = useGlobalSetting( '', name );
93
96
  const settings = useSettingsForBlockElement( rawSettings, name );
97
+ const { inheritedBehaviors, setBehavior } = useGlobalBehaviors( name );
98
+ const { behavior } = useGlobalBehaviors( name, 'user' );
99
+
94
100
  const blockType = getBlockType( name );
95
101
  const blockVariations = useBlockVariations( name );
96
102
  const hasTypographyPanel = useHasTypographyPanel( settings );
97
103
  const hasColorPanel = useHasColorPanel( settings );
104
+ const hasBehaviorsPanel = useHasBehaviorsPanel( rawSettings, name );
98
105
  const hasBorderPanel = useHasBorderPanel( settings );
99
106
  const hasDimensionsPanel = useHasDimensionsPanel( settings );
100
107
  const hasEffectsPanel = useHasEffectsPanel( settings );
@@ -267,6 +274,14 @@ function ScreenBlock( { name, variation } ) {
267
274
  onChange={ setStyle }
268
275
  inheritedValue={ inheritedStyle }
269
276
  />
277
+ { hasBehaviorsPanel && (
278
+ <StylesBehaviorsPanel
279
+ value={ behavior }
280
+ onChange={ setBehavior }
281
+ behaviors={ inheritedBehaviors }
282
+ blockName={ name }
283
+ ></StylesBehaviorsPanel>
284
+ ) }
270
285
  </PanelBody>
271
286
  ) }
272
287
  </>