@wordpress/edit-post 6.7.0 → 6.10.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 (228) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/build/components/block-manager/category.js.map +1 -1
  4. package/build/components/block-manager/index.js +12 -4
  5. package/build/components/block-manager/index.js.map +1 -1
  6. package/build/components/device-preview/index.js.map +1 -1
  7. package/build/components/editor-initialization/listener-hooks.js.map +1 -1
  8. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  9. package/build/components/header/header-toolbar/index.js.map +1 -1
  10. package/build/components/header/index.js.map +1 -1
  11. package/build/components/header/mode-switcher/index.js.map +1 -1
  12. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  13. package/build/components/header/template-title/delete-template.js.map +1 -1
  14. package/build/components/header/template-title/edit-template-title.js +11 -2
  15. package/build/components/header/template-title/edit-template-title.js.map +1 -1
  16. package/build/components/header/template-title/index.js.map +1 -1
  17. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  18. package/build/components/keyboard-shortcut-help-modal/config.js +12 -0
  19. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  20. package/build/components/keyboard-shortcut-help-modal/index.js +1 -3
  21. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  22. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  23. package/build/components/layout/actions-panel.js.map +1 -1
  24. package/build/components/layout/index.js.map +1 -1
  25. package/build/components/layout/index.native.js.map +1 -1
  26. package/build/components/preferences-modal/index.js +3 -26
  27. package/build/components/preferences-modal/index.js.map +1 -1
  28. package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  29. package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
  30. package/build/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
  31. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  32. package/build/components/sidebar/discussion-panel/index.js.map +1 -1
  33. package/build/components/sidebar/featured-image/index.js.map +1 -1
  34. package/build/components/sidebar/page-attributes/index.js.map +1 -1
  35. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  36. package/build/components/sidebar/plugin-post-status-info/index.js +2 -2
  37. package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  38. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  39. package/build/components/sidebar/post-excerpt/index.js.map +1 -1
  40. package/build/components/sidebar/post-format/index.js +3 -1
  41. package/build/components/sidebar/post-format/index.js.map +1 -1
  42. package/build/components/sidebar/post-schedule/index.js +28 -12
  43. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  44. package/build/components/sidebar/post-slug/index.js +3 -1
  45. package/build/components/sidebar/post-slug/index.js.map +1 -1
  46. package/build/components/sidebar/post-status/index.js +6 -2
  47. package/build/components/sidebar/post-status/index.js.map +1 -1
  48. package/build/components/sidebar/post-template/create-modal.js +116 -0
  49. package/build/components/sidebar/post-template/create-modal.js.map +1 -0
  50. package/build/components/sidebar/post-template/form.js +123 -0
  51. package/build/components/sidebar/post-template/form.js.map +1 -0
  52. package/build/components/sidebar/post-template/index.js +124 -0
  53. package/build/components/sidebar/post-template/index.js.map +1 -0
  54. package/build/components/sidebar/post-url/index.js +68 -0
  55. package/build/components/sidebar/post-url/index.js.map +1 -0
  56. package/build/components/sidebar/post-visibility/index.js +21 -6
  57. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  58. package/build/components/sidebar/settings-sidebar/index.js +2 -6
  59. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  60. package/build/components/start-page-options/index.js +31 -13
  61. package/build/components/start-page-options/index.js.map +1 -1
  62. package/build/components/visual-editor/block-inspector-button.js +3 -7
  63. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  64. package/build/components/visual-editor/index.js +4 -2
  65. package/build/components/visual-editor/index.js.map +1 -1
  66. package/build/editor.js +1 -1
  67. package/build/editor.js.map +1 -1
  68. package/build/editor.native.js +1 -1
  69. package/build/editor.native.js.map +1 -1
  70. package/build/plugins/copy-content-menu-item/index.js +1 -1
  71. package/build/plugins/copy-content-menu-item/index.js.map +1 -1
  72. package/build/store/actions.js.map +1 -1
  73. package/build/store/selectors.js +8 -8
  74. package/build/store/selectors.js.map +1 -1
  75. package/build-module/components/block-manager/category.js.map +1 -1
  76. package/build-module/components/block-manager/index.js +13 -5
  77. package/build-module/components/block-manager/index.js.map +1 -1
  78. package/build-module/components/device-preview/index.js.map +1 -1
  79. package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
  80. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  81. package/build-module/components/header/header-toolbar/index.js.map +1 -1
  82. package/build-module/components/header/index.js.map +1 -1
  83. package/build-module/components/header/mode-switcher/index.js.map +1 -1
  84. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  85. package/build-module/components/header/template-title/delete-template.js.map +1 -1
  86. package/build-module/components/header/template-title/edit-template-title.js +12 -2
  87. package/build-module/components/header/template-title/edit-template-title.js.map +1 -1
  88. package/build-module/components/header/template-title/index.js.map +1 -1
  89. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  90. package/build-module/components/keyboard-shortcut-help-modal/config.js +12 -0
  91. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  92. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -2
  93. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  94. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  95. package/build-module/components/layout/actions-panel.js.map +1 -1
  96. package/build-module/components/layout/index.js.map +1 -1
  97. package/build-module/components/layout/index.native.js.map +1 -1
  98. package/build-module/components/preferences-modal/index.js +3 -25
  99. package/build-module/components/preferences-modal/index.js.map +1 -1
  100. package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  101. package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
  102. package/build-module/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
  103. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  104. package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
  105. package/build-module/components/sidebar/featured-image/index.js.map +1 -1
  106. package/build-module/components/sidebar/page-attributes/index.js.map +1 -1
  107. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  108. package/build-module/components/sidebar/plugin-post-status-info/index.js +2 -2
  109. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  110. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  111. package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
  112. package/build-module/components/sidebar/post-format/index.js +3 -1
  113. package/build-module/components/sidebar/post-format/index.js.map +1 -1
  114. package/build-module/components/sidebar/post-schedule/index.js +32 -13
  115. package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
  116. package/build-module/components/sidebar/post-slug/index.js +3 -1
  117. package/build-module/components/sidebar/post-slug/index.js.map +1 -1
  118. package/build-module/components/sidebar/post-status/index.js +4 -2
  119. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  120. package/build-module/components/sidebar/post-template/create-modal.js +104 -0
  121. package/build-module/components/sidebar/post-template/create-modal.js.map +1 -0
  122. package/build-module/components/sidebar/post-template/form.js +106 -0
  123. package/build-module/components/sidebar/post-template/form.js.map +1 -0
  124. package/build-module/components/sidebar/post-template/index.js +110 -0
  125. package/build-module/components/sidebar/post-template/index.js.map +1 -0
  126. package/build-module/components/sidebar/post-url/index.js +59 -0
  127. package/build-module/components/sidebar/post-url/index.js.map +1 -0
  128. package/build-module/components/sidebar/post-visibility/index.js +24 -8
  129. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  130. package/build-module/components/sidebar/settings-sidebar/index.js +2 -4
  131. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  132. package/build-module/components/start-page-options/index.js +32 -14
  133. package/build-module/components/start-page-options/index.js.map +1 -1
  134. package/build-module/components/visual-editor/block-inspector-button.js +3 -5
  135. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  136. package/build-module/components/visual-editor/index.js +4 -2
  137. package/build-module/components/visual-editor/index.js.map +1 -1
  138. package/build-module/editor.js +2 -2
  139. package/build-module/editor.js.map +1 -1
  140. package/build-module/editor.native.js +2 -2
  141. package/build-module/editor.native.js.map +1 -1
  142. package/build-module/plugins/copy-content-menu-item/index.js +1 -1
  143. package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
  144. package/build-module/store/actions.js.map +1 -1
  145. package/build-module/store/selectors.js +8 -7
  146. package/build-module/store/selectors.js.map +1 -1
  147. package/build-style/style-rtl.css +85 -87
  148. package/build-style/style.css +84 -90
  149. package/package.json +27 -27
  150. package/src/components/block-manager/category.js +2 -2
  151. package/src/components/block-manager/index.js +15 -4
  152. package/src/components/device-preview/index.js +4 -6
  153. package/src/components/editor-initialization/listener-hooks.js +2 -3
  154. package/src/components/header/fullscreen-mode-close/index.js +2 -3
  155. package/src/components/header/header-toolbar/index.js +6 -11
  156. package/src/components/header/index.js +6 -9
  157. package/src/components/header/mode-switcher/index.js +4 -4
  158. package/src/components/header/post-publish-button-or-toggle.js +4 -6
  159. package/src/components/header/template-title/delete-template.js +2 -3
  160. package/src/components/header/template-title/edit-template-title.js +11 -1
  161. package/src/components/header/template-title/index.js +2 -3
  162. package/src/components/header/tools-more-menu-group/index.js +2 -3
  163. package/src/components/keyboard-shortcut-help-modal/config.js +8 -0
  164. package/src/components/keyboard-shortcut-help-modal/index.js +1 -2
  165. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -5
  166. package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +14 -0
  167. package/src/components/keyboard-shortcut-help-modal/test/index.js +2 -1
  168. package/src/components/keyboard-shortcuts/index.js +4 -8
  169. package/src/components/layout/actions-panel.js +6 -9
  170. package/src/components/layout/index.js +12 -21
  171. package/src/components/layout/index.native.js +4 -5
  172. package/src/components/preferences-modal/index.js +5 -23
  173. package/src/components/preferences-modal/options/enable-custom-fields.js +2 -2
  174. package/src/components/preferences-modal/options/enable-panel.js +2 -3
  175. package/src/components/preferences-modal/options/enable-publish-sidebar.js +2 -3
  176. package/src/components/preferences-modal/test/index.js +3 -3
  177. package/src/components/secondary-sidebar/inserter-sidebar.js +2 -3
  178. package/src/components/sidebar/discussion-panel/index.js +2 -3
  179. package/src/components/sidebar/featured-image/index.js +2 -3
  180. package/src/components/sidebar/page-attributes/index.js +2 -3
  181. package/src/components/sidebar/plugin-document-setting-panel/index.js +2 -3
  182. package/src/components/sidebar/plugin-post-status-info/index.js +2 -2
  183. package/src/components/sidebar/plugin-sidebar/index.js +2 -3
  184. package/src/components/sidebar/post-author/style.scss +4 -10
  185. package/src/components/sidebar/post-excerpt/index.js +2 -3
  186. package/src/components/sidebar/post-format/index.js +1 -1
  187. package/src/components/sidebar/post-format/style.scss +5 -0
  188. package/src/components/sidebar/post-schedule/index.js +27 -16
  189. package/src/components/sidebar/post-schedule/style.scss +17 -4
  190. package/src/components/sidebar/post-slug/index.js +1 -1
  191. package/src/components/sidebar/post-slug/style.scss +4 -3
  192. package/src/components/sidebar/post-status/index.js +8 -5
  193. package/src/components/sidebar/post-template/create-modal.js +146 -0
  194. package/src/components/sidebar/post-template/form.js +143 -0
  195. package/src/components/sidebar/post-template/index.js +102 -0
  196. package/src/components/sidebar/post-template/style.scss +36 -0
  197. package/src/components/sidebar/post-url/index.js +51 -0
  198. package/src/components/sidebar/post-url/style.scss +23 -0
  199. package/src/components/sidebar/post-visibility/index.js +22 -8
  200. package/src/components/sidebar/post-visibility/style.scss +5 -4
  201. package/src/components/sidebar/settings-sidebar/index.js +1 -5
  202. package/src/components/sidebar/template/style.scss +0 -8
  203. package/src/components/start-page-options/index.js +48 -28
  204. package/src/components/start-page-options/style.scss +0 -9
  205. package/src/components/visual-editor/block-inspector-button.js +4 -8
  206. package/src/components/visual-editor/index.js +2 -1
  207. package/src/editor.js +8 -10
  208. package/src/editor.native.js +5 -6
  209. package/src/plugins/copy-content-menu-item/index.js +1 -1
  210. package/src/store/actions.js +322 -295
  211. package/src/store/selectors.js +21 -24
  212. package/src/style.scss +3 -2
  213. package/build/components/sidebar/post-link/index.js +0 -182
  214. package/build/components/sidebar/post-link/index.js.map +0 -1
  215. package/build/components/sidebar/template/actions.js +0 -167
  216. package/build/components/sidebar/template/actions.js.map +0 -1
  217. package/build/components/sidebar/template/index.js +0 -164
  218. package/build/components/sidebar/template/index.js.map +0 -1
  219. package/build-module/components/sidebar/post-link/index.js +0 -165
  220. package/build-module/components/sidebar/post-link/index.js.map +0 -1
  221. package/build-module/components/sidebar/template/actions.js +0 -153
  222. package/build-module/components/sidebar/template/actions.js.map +0 -1
  223. package/build-module/components/sidebar/template/index.js +0 -145
  224. package/build-module/components/sidebar/template/index.js.map +0 -1
  225. package/src/components/sidebar/post-link/index.js +0 -180
  226. package/src/components/sidebar/post-link/style.scss +0 -20
  227. package/src/components/sidebar/template/actions.js +0 -203
  228. package/src/components/sidebar/template/index.js +0 -164
@@ -468,9 +468,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
468
468
  .interface-preferences-modal .components-modal__content {
469
469
  padding: 0;
470
470
  }
471
- .interface-preferences-modal .components-modal__content::before {
472
- content: none;
473
- }
474
471
  }
475
472
 
476
473
  .interface-preferences__tabs .components-tab-panel__tabs {
@@ -806,8 +803,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
806
803
  width: 36px;
807
804
  height: 36px;
808
805
  border-radius: 2px;
809
- -o-object-fit: cover;
810
- object-fit: cover;
806
+ object-fit: cover;
811
807
  margin-top: -1px;
812
808
  }
813
809
 
@@ -1009,9 +1005,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
1009
1005
  .edit-post-keyboard-shortcut-help-modal__section {
1010
1006
  margin: 0 0 2rem 0;
1011
1007
  }
1012
- .edit-post-keyboard-shortcut-help-modal__main-shortcuts .edit-post-keyboard-shortcut-help-modal__shortcut-list {
1013
- margin-top: -25px;
1014
- }
1015
1008
  .edit-post-keyboard-shortcut-help-modal__section-title {
1016
1009
  font-size: 0.9rem;
1017
1010
  font-weight: 600;
@@ -1431,77 +1424,123 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1431
1424
  padding: 16px;
1432
1425
  }
1433
1426
 
1434
- .editor-post-author__select {
1435
- margin: -5px 0;
1427
+ .edit-post-post-author {
1428
+ display: flex;
1429
+ flex-direction: column;
1430
+ align-items: stretch;
1431
+ }
1432
+
1433
+ .edit-post-post-format {
1434
+ display: flex;
1435
+ flex-direction: column;
1436
+ align-items: stretch;
1437
+ }
1438
+
1439
+ .edit-post-post-schedule {
1436
1440
  width: 100%;
1441
+ position: relative;
1442
+ justify-content: flex-start;
1437
1443
  }
1438
- @supports (position: sticky) {
1439
- .editor-post-author__select {
1440
- width: auto;
1441
- }
1444
+ .edit-post-post-schedule span {
1445
+ display: block;
1446
+ width: 45%;
1447
+ flex-shrink: 0;
1442
1448
  }
1443
1449
 
1444
- .edit-post-post-link__link-post-name {
1445
- font-weight: 600;
1450
+ .components-button.edit-post-post-schedule__toggle {
1451
+ text-align: left;
1452
+ white-space: normal;
1453
+ height: auto;
1454
+ }
1455
+ .components-button.edit-post-post-schedule__toggle span {
1456
+ width: 0;
1446
1457
  }
1447
1458
 
1448
- .edit-post-post-link__preview-label {
1449
- font-weight: 400;
1450
- margin: 0;
1459
+ .edit-post-post-schedule__dialog .block-editor-publish-date-time-picker {
1460
+ margin: 8px;
1451
1461
  }
1452
1462
 
1453
- .edit-post-post-link__link {
1454
- text-align: left;
1455
- word-wrap: break-word;
1456
- display: block;
1463
+ .edit-post-post-slug {
1464
+ display: flex;
1465
+ flex-direction: column;
1466
+ align-items: stretch;
1457
1467
  }
1458
1468
 
1459
- /* rtl:begin:ignore */
1460
- .edit-post-post-link__preview-link-container {
1461
- direction: ltr;
1469
+ .edit-post-post-status .edit-post-post-publish-dropdown__switch-to-draft {
1470
+ margin-top: 15px;
1471
+ width: 100%;
1472
+ text-align: center;
1462
1473
  }
1463
1474
 
1464
- /* rtl:end:ignore */
1465
- .edit-post-post-schedule {
1475
+ .edit-post-post-template {
1466
1476
  width: 100%;
1467
- position: relative;
1468
- justify-content: left;
1477
+ justify-content: flex-start;
1469
1478
  }
1470
- .edit-post-post-schedule span {
1479
+ .edit-post-post-template span {
1471
1480
  display: block;
1472
1481
  width: 45%;
1473
1482
  }
1474
1483
 
1475
- .components-button.edit-post-post-schedule__toggle {
1476
- text-align: right;
1484
+ .edit-post-post-template__dropdown {
1485
+ max-width: 55%;
1477
1486
  }
1478
1487
 
1479
- .edit-post-post-schedule__dialog .components-popover__content {
1480
- padding: 16px;
1488
+ .components-button.edit-post-post-template__toggle {
1489
+ display: inline-block;
1490
+ width: 100%;
1491
+ overflow: hidden;
1492
+ text-overflow: ellipsis;
1481
1493
  }
1482
1494
 
1483
- .editor-post-slug__input {
1484
- margin: -5px 0;
1485
- padding: 2px;
1495
+ .edit-post-post-template__dialog {
1496
+ z-index: 99999;
1486
1497
  }
1487
1498
 
1488
- .edit-post-post-status .edit-post-post-publish-dropdown__switch-to-draft {
1489
- margin-top: 15px;
1499
+ .edit-post-post-template__form {
1500
+ min-width: 248px;
1501
+ margin: 8px;
1502
+ }
1503
+
1504
+ @media (min-width: 782px) {
1505
+ .edit-post-post-template__create-form {
1506
+ width: 320px;
1507
+ }
1508
+ }
1509
+
1510
+ .edit-post-post-url {
1490
1511
  width: 100%;
1491
- text-align: center;
1512
+ justify-content: flex-start;
1513
+ }
1514
+ .edit-post-post-url span {
1515
+ display: block;
1516
+ width: 45%;
1517
+ flex-shrink: 0;
1518
+ }
1519
+
1520
+ .components-button.edit-post-post-url__toggle {
1521
+ text-align: left;
1522
+ white-space: normal;
1523
+ height: auto;
1524
+ word-break: break-word;
1525
+ }
1526
+
1527
+ .edit-post-post-url__dialog .editor-post-url {
1528
+ min-width: 248px;
1529
+ margin: 8px;
1492
1530
  }
1493
1531
 
1494
1532
  .edit-post-post-visibility {
1495
1533
  width: 100%;
1496
- justify-content: left;
1534
+ justify-content: flex-start;
1497
1535
  }
1498
1536
  .edit-post-post-visibility span {
1499
1537
  display: block;
1500
1538
  width: 45%;
1501
1539
  }
1502
1540
 
1503
- .edit-post-post-visibility__dialog .components-popover__content {
1504
- width: 262px;
1541
+ .edit-post-post-visibility__dialog .editor-post-visibility {
1542
+ min-width: 248px;
1543
+ margin: 8px;
1505
1544
  }
1506
1545
 
1507
1546
  .components-button.edit-post-sidebar__panel-tab {
@@ -1548,44 +1587,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1548
1587
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -3px 0 0 var(--wp-admin-theme-color);
1549
1588
  }
1550
1589
 
1551
- @media (min-width: 782px) {
1552
- .edit-post-template__modal .components-base-control {
1553
- width: 320px;
1554
- }
1555
- }
1556
- .edit-post-template__modal .components-modal__header {
1557
- border-bottom: none;
1558
- }
1559
- .edit-post-template__modal .components-modal__content::before {
1560
- margin-bottom: 4px;
1561
- }
1562
-
1563
- .edit-post-template__modal-actions {
1564
- margin-top: 12px;
1565
- }
1566
-
1567
- .edit-post-template-modal__tip {
1568
- padding: 16px 24px;
1569
- background: #f0f0f0;
1570
- border-radius: 2px;
1571
- }
1572
- @media (min-width: 782px) {
1573
- .edit-post-template-modal__tip {
1574
- width: 240px;
1575
- }
1576
- }
1577
-
1578
- .edit-post-template__notice {
1579
- margin: 0 0 8px 0;
1580
- }
1581
- .edit-post-template__notice .components-notice__content {
1582
- margin: 0;
1583
- }
1584
-
1585
- .edit-post-template__actions button:not(:last-child) {
1586
- margin-right: 8px;
1587
- }
1588
-
1589
1590
  h2.edit-post-template-summary__title {
1590
1591
  line-height: 24px;
1591
1592
  margin: 0 0 4px;
@@ -1718,8 +1719,7 @@ h2.edit-post-template-summary__title {
1718
1719
  .edit-template-welcome-guide__image > img {
1719
1720
  display: block;
1720
1721
  max-width: 100%;
1721
- -o-object-fit: cover;
1722
- object-fit: cover;
1722
+ object-fit: cover;
1723
1723
  }
1724
1724
  .edit-post-welcome-guide__heading,
1725
1725
  .edit-template-welcome-guide__heading {
@@ -1762,12 +1762,6 @@ h2.edit-post-template-summary__title {
1762
1762
  height: 70%;
1763
1763
  }
1764
1764
  }
1765
- .edit-post-start-page-options__modal .components-modal__header {
1766
- border-bottom: none;
1767
- }
1768
- .edit-post-start-page-options__modal .components-modal__content::before {
1769
- content: none;
1770
- }
1771
1765
 
1772
1766
  .edit-post-start-page-options__modal-content .block-editor-block-patterns-list {
1773
1767
  column-count: 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "6.7.0",
3
+ "version": "6.10.0",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,31 +27,31 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/a11y": "^3.10.0",
31
- "@wordpress/api-fetch": "^6.7.0",
32
- "@wordpress/block-editor": "^9.2.0",
33
- "@wordpress/block-library": "^7.7.0",
34
- "@wordpress/blocks": "^11.9.0",
35
- "@wordpress/components": "^19.12.0",
36
- "@wordpress/compose": "^5.8.0",
37
- "@wordpress/core-data": "^4.8.0",
38
- "@wordpress/data": "^6.10.0",
39
- "@wordpress/deprecated": "^3.10.0",
40
- "@wordpress/editor": "^12.9.0",
41
- "@wordpress/element": "^4.8.0",
42
- "@wordpress/hooks": "^3.10.0",
43
- "@wordpress/i18n": "^4.10.0",
44
- "@wordpress/icons": "^9.1.0",
45
- "@wordpress/interface": "^4.9.0",
46
- "@wordpress/keyboard-shortcuts": "^3.8.0",
47
- "@wordpress/keycodes": "^3.10.0",
48
- "@wordpress/media-utils": "^4.1.0",
49
- "@wordpress/notices": "^3.10.0",
50
- "@wordpress/plugins": "^4.8.0",
51
- "@wordpress/preferences": "^2.2.0",
52
- "@wordpress/url": "^3.11.0",
53
- "@wordpress/viewport": "^4.8.0",
54
- "@wordpress/warning": "^2.10.0",
30
+ "@wordpress/a11y": "^3.13.0",
31
+ "@wordpress/api-fetch": "^6.10.0",
32
+ "@wordpress/block-editor": "^9.5.0",
33
+ "@wordpress/block-library": "^7.10.0",
34
+ "@wordpress/blocks": "^11.12.0",
35
+ "@wordpress/components": "^19.15.0",
36
+ "@wordpress/compose": "^5.11.0",
37
+ "@wordpress/core-data": "^4.11.0",
38
+ "@wordpress/data": "^6.13.0",
39
+ "@wordpress/deprecated": "^3.13.0",
40
+ "@wordpress/editor": "^12.12.0",
41
+ "@wordpress/element": "^4.11.0",
42
+ "@wordpress/hooks": "^3.13.0",
43
+ "@wordpress/i18n": "^4.13.0",
44
+ "@wordpress/icons": "^9.4.0",
45
+ "@wordpress/interface": "^4.12.0",
46
+ "@wordpress/keyboard-shortcuts": "^3.11.0",
47
+ "@wordpress/keycodes": "^3.13.0",
48
+ "@wordpress/media-utils": "^4.4.0",
49
+ "@wordpress/notices": "^3.13.0",
50
+ "@wordpress/plugins": "^4.11.0",
51
+ "@wordpress/preferences": "^2.5.0",
52
+ "@wordpress/url": "^3.14.0",
53
+ "@wordpress/viewport": "^4.11.0",
54
+ "@wordpress/warning": "^2.13.0",
55
55
  "classnames": "^2.3.1",
56
56
  "lodash": "^4.17.21",
57
57
  "memize": "^1.1.0",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "a3e0b62091e8a8bdf5e2518e42d60d7098af48cc"
67
+ "gitHead": "9d9d33bbdf317a4381b8ca1713e43bb50df653b3"
68
68
  }
@@ -25,8 +25,8 @@ function BlockManagerCategory( { title, blockTypes } ) {
25
25
  const { getEditorSettings } = select( editorStore );
26
26
  const { getHiddenBlockTypes } = select( editPostStore );
27
27
  return {
28
- defaultAllowedBlockTypes: getEditorSettings()
29
- .defaultAllowedBlockTypes,
28
+ defaultAllowedBlockTypes:
29
+ getEditorSettings().defaultAllowedBlockTypes,
30
30
  hiddenBlockTypes: getHiddenBlockTypes(),
31
31
  };
32
32
  },
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { filter, includes, isArray } from 'lodash';
4
+ import { filter, includes } from 'lodash';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -117,12 +117,23 @@ export default withSelect( ( select ) => {
117
117
  isMatchingSearchTerm,
118
118
  } = select( blocksStore );
119
119
  const { getHiddenBlockTypes } = select( editPostStore );
120
- const hiddenBlockTypes = getHiddenBlockTypes();
120
+
121
+ // Some hidden blocks become unregistered
122
+ // by removing for instance the plugin that registered them, yet
123
+ // they're still remain as hidden by the user's action.
124
+ // We consider "hidden", blocks which were hidden and
125
+ // are still registered.
126
+ const blockTypes = getBlockTypes();
127
+ const hiddenBlockTypes = getHiddenBlockTypes().filter( ( hiddenBlock ) => {
128
+ return blockTypes.some(
129
+ ( registeredBlock ) => registeredBlock.name === hiddenBlock
130
+ );
131
+ } );
121
132
  const numberOfHiddenBlocks =
122
- isArray( hiddenBlockTypes ) && hiddenBlockTypes.length;
133
+ Array.isArray( hiddenBlockTypes ) && hiddenBlockTypes.length;
123
134
 
124
135
  return {
125
- blockTypes: getBlockTypes(),
136
+ blockTypes,
126
137
  categories: getCategories(),
127
138
  hasBlockSupport,
128
139
  isMatchingSearchTerm,
@@ -36,14 +36,12 @@ export default function DevicePreview() {
36
36
  isSaving: select( editPostStore ).isSavingMetaBoxes(),
37
37
  isPostSaveable: select( editorStore ).isEditedPostSaveable(),
38
38
  isViewable: get( postType, [ 'viewable' ], false ),
39
- deviceType: select(
40
- editPostStore
41
- ).__experimentalGetPreviewDeviceType(),
39
+ deviceType:
40
+ select( editPostStore ).__experimentalGetPreviewDeviceType(),
42
41
  };
43
42
  }, [] );
44
- const {
45
- __experimentalSetPreviewDeviceType: setPreviewDeviceType,
46
- } = useDispatch( editPostStore );
43
+ const { __experimentalSetPreviewDeviceType: setPreviewDeviceType } =
44
+ useDispatch( editPostStore );
47
45
 
48
46
  return (
49
47
  <PreviewOptions
@@ -24,9 +24,8 @@ import {
24
24
  export const useBlockSelectionListener = ( postId ) => {
25
25
  const { hasBlockSelection, isEditorSidebarOpened } = useSelect(
26
26
  ( select ) => ( {
27
- hasBlockSelection: !! select(
28
- blockEditorStore
29
- ).getBlockSelectionStart(),
27
+ hasBlockSelection:
28
+ !! select( blockEditorStore ).getBlockSelectionStart(),
30
29
  isEditorSidebarOpened: select( STORE_NAME ).isEditorSidebarOpened(),
31
30
  } ),
32
31
  [ postId ]
@@ -30,9 +30,8 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
30
30
  ( select ) => {
31
31
  const { getCurrentPostType } = select( editorStore );
32
32
  const { isFeatureActive } = select( editPostStore );
33
- const { getEntityRecord, getPostType, isResolving } = select(
34
- coreStore
35
- );
33
+ const { getEntityRecord, getPostType, isResolving } =
34
+ select( coreStore );
36
35
  const siteData =
37
36
  getEntityRecord( 'root', '__unstableBase', undefined ) || {};
38
37
 
@@ -31,9 +31,8 @@ const preventDefault = ( event ) => {
31
31
 
32
32
  function HeaderToolbar() {
33
33
  const inserterButton = useRef();
34
- const { setIsInserterOpened, setIsListViewOpened } = useDispatch(
35
- editPostStore
36
- );
34
+ const { setIsInserterOpened, setIsListViewOpened } =
35
+ useDispatch( editPostStore );
37
36
  const {
38
37
  isInserterEnabled,
39
38
  isInserterOpened,
@@ -42,15 +41,11 @@ function HeaderToolbar() {
42
41
  isListViewOpen,
43
42
  listViewShortcut,
44
43
  } = useSelect( ( select ) => {
45
- const {
46
- hasInserterItems,
47
- getBlockRootClientId,
48
- getBlockSelectionEnd,
49
- } = select( blockEditorStore );
44
+ const { hasInserterItems, getBlockRootClientId, getBlockSelectionEnd } =
45
+ select( blockEditorStore );
50
46
  const { getEditorSettings } = select( editorStore );
51
- const { getEditorMode, isFeatureActive, isListViewOpened } = select(
52
- editPostStore
53
- );
47
+ const { getEditorMode, isFeatureActive, isListViewOpened } =
48
+ select( editPostStore );
54
49
  const { getShortcutRepresentation } = select( keyboardShortcutsStore );
55
50
 
56
51
  return {
@@ -33,16 +33,13 @@ function Header( { setEntitiesSavedStatesCallback } ) {
33
33
  } = useSelect(
34
34
  ( select ) => ( {
35
35
  hasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),
36
- isPublishSidebarOpened: select(
37
- editPostStore
38
- ).isPublishSidebarOpened(),
36
+ isPublishSidebarOpened:
37
+ select( editPostStore ).isPublishSidebarOpened(),
39
38
  isSaving: select( editPostStore ).isSavingMetaBoxes(),
40
- showIconLabels: select( editPostStore ).isFeatureActive(
41
- 'showIconLabels'
42
- ),
43
- hasReducedUI: select( editPostStore ).isFeatureActive(
44
- 'reducedUI'
45
- ),
39
+ showIconLabels:
40
+ select( editPostStore ).isFeatureActive( 'showIconLabels' ),
41
+ hasReducedUI:
42
+ select( editPostStore ).isFeatureActive( 'reducedUI' ),
46
43
  } ),
47
44
  []
48
45
  );
@@ -40,10 +40,10 @@ function ModeSwitcher() {
40
40
  shortcut: select(
41
41
  keyboardShortcutsStore
42
42
  ).getShortcutRepresentation( 'core/edit-post/toggle-mode' ),
43
- isRichEditingEnabled: select( editorStore ).getEditorSettings()
44
- .richEditingEnabled,
45
- isCodeEditingEnabled: select( editorStore ).getEditorSettings()
46
- .codeEditingEnabled,
43
+ isRichEditingEnabled:
44
+ select( editorStore ).getEditorSettings().richEditingEnabled,
45
+ isCodeEditingEnabled:
46
+ select( editorStore ).getEditorSettings().codeEditingEnabled,
47
47
  isEditingTemplate: select( editPostStore ).isEditingTemplate(),
48
48
  mode: select( editPostStore ).getEditorMode(),
49
49
  } ),
@@ -91,12 +91,10 @@ export default compose(
91
91
  isBeingScheduled: select( editorStore ).isEditedPostBeingScheduled(),
92
92
  isPending: select( editorStore ).isCurrentPostPending(),
93
93
  isPublished: select( editorStore ).isCurrentPostPublished(),
94
- isPublishSidebarEnabled: select(
95
- editorStore
96
- ).isPublishSidebarEnabled(),
97
- isPublishSidebarOpened: select(
98
- editPostStore
99
- ).isPublishSidebarOpened(),
94
+ isPublishSidebarEnabled:
95
+ select( editorStore ).isPublishSidebarEnabled(),
96
+ isPublishSidebarOpened:
97
+ select( editPostStore ).isPublishSidebarOpened(),
100
98
  isScheduled: select( editorStore ).isCurrentPostScheduled(),
101
99
  } ) ),
102
100
  withDispatch( ( dispatch ) => {
@@ -30,9 +30,8 @@ export default function DeleteTemplate() {
30
30
  const { updateEditorSettings, editPost } = useDispatch( editorStore );
31
31
  const { deleteEntityRecord } = useDispatch( coreStore );
32
32
  const { template } = useSelect( ( select ) => {
33
- const { isEditingTemplate, getEditedPostTemplate } = select(
34
- editPostStore
35
- );
33
+ const { isEditingTemplate, getEditedPostTemplate } =
34
+ select( editPostStore );
36
35
  const _isEditing = isEditingTemplate();
37
36
  return {
38
37
  template: _isEditing ? getEditedPostTemplate() : null,
@@ -9,6 +9,7 @@ import { mapValues } from 'lodash';
9
9
  import { __ } from '@wordpress/i18n';
10
10
  import { TextControl } from '@wordpress/components';
11
11
  import { useDispatch, useSelect } from '@wordpress/data';
12
+ import { useState } from '@wordpress/element';
12
13
  import { store as editorStore } from '@wordpress/editor';
13
14
  import { store as coreStore } from '@wordpress/core-data';
14
15
 
@@ -18,6 +19,7 @@ import { store as coreStore } from '@wordpress/core-data';
18
19
  import { store as editPostStore } from '../../../store';
19
20
 
20
21
  export default function EditTemplateTitle() {
22
+ const [ forceEmpty, setForceEmpty ] = useState( false );
21
23
  const { template } = useSelect( ( select ) => {
22
24
  const { getEditedPostTemplate } = select( editPostStore );
23
25
  return {
@@ -45,11 +47,18 @@ export default function EditTemplateTitle() {
45
47
  <div className="edit-site-template-details__group">
46
48
  <TextControl
47
49
  label={ __( 'Title' ) }
48
- value={ templateTitle }
50
+ value={ forceEmpty ? '' : templateTitle }
49
51
  help={ __(
50
52
  'Give the template a title that indicates its purpose, e.g. "Full Width".'
51
53
  ) }
52
54
  onChange={ ( newTitle ) => {
55
+ // Allow having the field temporarily empty while typing.
56
+ if ( ! newTitle && ! forceEmpty ) {
57
+ setForceEmpty( true );
58
+ return;
59
+ }
60
+ setForceEmpty( false );
61
+
53
62
  const settings = getEditorSettings();
54
63
  const newAvailableTemplates = mapValues(
55
64
  settings.availableTemplates,
@@ -68,6 +77,7 @@ export default function EditTemplateTitle() {
68
77
  title: newTitle,
69
78
  } );
70
79
  } }
80
+ onBlur={ () => setForceEmpty( false ) }
71
81
  />
72
82
  </div>
73
83
  );
@@ -22,9 +22,8 @@ import TemplateDescription from './template-description';
22
22
 
23
23
  function TemplateTitle() {
24
24
  const { template, isEditing, title } = useSelect( ( select ) => {
25
- const { isEditingTemplate, getEditedPostTemplate } = select(
26
- editPostStore
27
- );
25
+ const { isEditingTemplate, getEditedPostTemplate } =
26
+ select( editPostStore );
28
27
  const { getEditedPostAttribute } = select( editorStore );
29
28
 
30
29
  const _isEditing = isEditingTemplate();
@@ -9,9 +9,8 @@ import { isEmpty } from 'lodash';
9
9
  import { createSlotFill, MenuGroup } from '@wordpress/components';
10
10
  import { __ } from '@wordpress/i18n';
11
11
 
12
- const { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill(
13
- 'ToolsMoreMenuGroup'
14
- );
12
+ const { Fill: ToolsMoreMenuGroup, Slot } =
13
+ createSlotFill( 'ToolsMoreMenuGroup' );
15
14
 
16
15
  ToolsMoreMenuGroup.Slot = ( { fillProps } ) => (
17
16
  <Slot fillProps={ fillProps }>
@@ -28,4 +28,12 @@ export const textFormattingShortcuts = [
28
28
  keyCombination: { modifier: 'primary', character: 'u' },
29
29
  description: __( 'Underline the selected text.' ),
30
30
  },
31
+ {
32
+ keyCombination: { modifier: 'access', character: 'd' },
33
+ description: __( 'Strikethrough the selected text.' ),
34
+ },
35
+ {
36
+ keyCombination: { modifier: 'access', character: 'x' },
37
+ description: __( 'Make the selected text inline code.' ),
38
+ },
31
39
  ];
@@ -2,7 +2,6 @@
2
2
  * External dependencies
3
3
  */
4
4
  import classnames from 'classnames';
5
- import { isString } from 'lodash';
6
5
 
7
6
  /**
8
7
  * WordPress dependencies
@@ -41,7 +40,7 @@ const ShortcutList = ( { shortcuts } ) => (
41
40
  className="edit-post-keyboard-shortcut-help-modal__shortcut"
42
41
  key={ index }
43
42
  >
44
- { isString( shortcut ) ? (
43
+ { typeof shortcut === 'string' ? (
45
44
  <DynamicShortcut name={ shortcut } />
46
45
  ) : (
47
46
  <Shortcut { ...shortcut } />
@@ -3,11 +3,6 @@
3
3
  margin: 0 0 2rem 0;
4
4
  }
5
5
 
6
- &__main-shortcuts .edit-post-keyboard-shortcut-help-modal__shortcut-list {
7
- // Push the shortcut to be flush with top modal header.
8
- margin-top: -$grid-unit-30 -$border-width;
9
- }
10
-
11
6
  &__section-title {
12
7
  font-size: 0.9rem;
13
8
  font-weight: 600;
@@ -82,6 +82,20 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ
82
82
  "modifier": "primary",
83
83
  },
84
84
  },
85
+ Object {
86
+ "description": "Strikethrough the selected text.",
87
+ "keyCombination": Object {
88
+ "character": "d",
89
+ "modifier": "access",
90
+ },
91
+ },
92
+ Object {
93
+ "description": "Make the selected text inline code.",
94
+ "keyCombination": Object {
95
+ "character": "x",
96
+ "modifier": "access",
97
+ },
98
+ },
85
99
  ]
86
100
  }
87
101
  title="Text formatting"