@wordpress/edit-post 6.3.10 → 6.6.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 (103) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/device-preview/index.js +26 -7
  3. package/build/components/device-preview/index.js.map +1 -1
  4. package/build/components/header/header-toolbar/index.native.js +25 -7
  5. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  6. package/build/components/header/template-title/delete-template.js +6 -5
  7. package/build/components/header/template-title/delete-template.js.map +1 -1
  8. package/build/components/header/template-title/edit-template-title.js +4 -2
  9. package/build/components/header/template-title/edit-template-title.js.map +1 -1
  10. package/build/components/header/template-title/template-description.js +3 -1
  11. package/build/components/header/template-title/template-description.js.map +1 -1
  12. package/build/components/layout/index.js.map +1 -1
  13. package/build/components/layout/index.native.js +5 -3
  14. package/build/components/layout/index.native.js.map +1 -1
  15. package/build/components/preferences-modal/index.js +10 -6
  16. package/build/components/preferences-modal/index.js.map +1 -1
  17. package/build/components/secondary-sidebar/list-view-sidebar.js +1 -5
  18. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  19. package/build/components/sidebar/plugin-document-setting-panel/index.js +0 -1
  20. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  21. package/build/components/sidebar/post-schedule/index.js +1 -1
  22. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  23. package/build/components/sidebar/post-visibility/index.js +16 -1
  24. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  25. package/build/components/text-editor/index.js +11 -24
  26. package/build/components/text-editor/index.js.map +1 -1
  27. package/build/components/visual-editor/index.js +19 -1
  28. package/build/components/visual-editor/index.js.map +1 -1
  29. package/build/index.js +7 -1
  30. package/build/index.js.map +1 -1
  31. package/build-module/components/device-preview/index.js +24 -7
  32. package/build-module/components/device-preview/index.js.map +1 -1
  33. package/build-module/components/header/header-toolbar/index.native.js +26 -8
  34. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  35. package/build-module/components/header/template-title/delete-template.js +6 -5
  36. package/build-module/components/header/template-title/delete-template.js.map +1 -1
  37. package/build-module/components/header/template-title/edit-template-title.js +4 -2
  38. package/build-module/components/header/template-title/edit-template-title.js.map +1 -1
  39. package/build-module/components/header/template-title/template-description.js +4 -2
  40. package/build-module/components/header/template-title/template-description.js.map +1 -1
  41. package/build-module/components/layout/index.js.map +1 -1
  42. package/build-module/components/layout/index.native.js +5 -3
  43. package/build-module/components/layout/index.native.js.map +1 -1
  44. package/build-module/components/preferences-modal/index.js +10 -6
  45. package/build-module/components/preferences-modal/index.js.map +1 -1
  46. package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -5
  47. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  48. package/build-module/components/sidebar/plugin-document-setting-panel/index.js +0 -1
  49. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  50. package/build-module/components/sidebar/post-schedule/index.js +1 -1
  51. package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
  52. package/build-module/components/sidebar/post-visibility/index.js +17 -1
  53. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  54. package/build-module/components/text-editor/index.js +11 -22
  55. package/build-module/components/text-editor/index.js.map +1 -1
  56. package/build-module/components/visual-editor/index.js +20 -2
  57. package/build-module/components/visual-editor/index.js.map +1 -1
  58. package/build-module/index.js +7 -1
  59. package/build-module/index.js.map +1 -1
  60. package/build-style/style-rtl.css +41 -81
  61. package/build-style/style.css +41 -81
  62. package/package.json +27 -27
  63. package/src/components/block-manager/style.scss +0 -4
  64. package/src/components/device-preview/index.js +36 -23
  65. package/src/components/header/header-toolbar/index.native.js +45 -8
  66. package/src/components/header/header-toolbar/style.native.scss +8 -4
  67. package/src/components/header/style.scss +14 -36
  68. package/src/components/header/template-title/delete-template.js +11 -4
  69. package/src/components/header/template-title/edit-template-title.js +27 -25
  70. package/src/components/header/template-title/style.scss +26 -5
  71. package/src/components/header/template-title/template-description.js +3 -2
  72. package/src/components/layout/index.js +1 -0
  73. package/src/components/layout/index.native.js +8 -5
  74. package/src/components/preferences-modal/index.js +18 -9
  75. package/src/components/preferences-modal/test/__snapshots__/index.js.snap +24 -14
  76. package/src/components/secondary-sidebar/list-view-sidebar.js +1 -5
  77. package/src/components/sidebar/plugin-document-setting-panel/index.js +0 -1
  78. package/src/components/sidebar/post-schedule/index.js +1 -1
  79. package/src/components/sidebar/post-schedule/style.scss +2 -2
  80. package/src/components/sidebar/post-visibility/index.js +12 -2
  81. package/src/components/sidebar/post-visibility/style.scss +2 -30
  82. package/src/components/sidebar/settings-header/style.scss +1 -1
  83. package/src/components/text-editor/index.js +9 -19
  84. package/src/components/visual-editor/index.js +14 -2
  85. package/src/components/visual-editor/test/index.native.js +93 -0
  86. package/src/index.js +7 -0
  87. package/src/test/editor.native.js +11 -2
  88. package/build/components/admin-notices/index.js +0 -129
  89. package/build/components/admin-notices/index.js.map +0 -1
  90. package/build/components/block-manager/show-all.js +0 -39
  91. package/build/components/block-manager/show-all.js.map +0 -1
  92. package/build/components/editor-initialization/utils.js +0 -38
  93. package/build/components/editor-initialization/utils.js.map +0 -1
  94. package/build-module/components/admin-notices/index.js +0 -114
  95. package/build-module/components/admin-notices/index.js.map +0 -1
  96. package/build-module/components/block-manager/show-all.js +0 -29
  97. package/build-module/components/block-manager/show-all.js.map +0 -1
  98. package/build-module/components/editor-initialization/utils.js +0 -29
  99. package/build-module/components/editor-initialization/utils.js.map +0 -1
  100. package/src/components/admin-notices/index.js +0 -110
  101. package/src/components/admin-notices/test/index.js +0 -63
  102. package/src/components/block-manager/show-all.js +0 -30
  103. package/src/components/editor-initialization/utils.js +0 -24
@@ -416,7 +416,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
416
416
  }
417
417
  @media (min-width: 480px) {
418
418
  .interface-more-menu-dropdown__content .components-popover__content {
419
- width: auto;
420
419
  max-width: 480px;
421
420
  }
422
421
  }
@@ -430,6 +429,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
430
429
 
431
430
  .interface-pinned-items {
432
431
  display: flex;
432
+ gap: 4px;
433
+ margin-left: -4px;
433
434
  }
434
435
  .interface-pinned-items .components-button:not(:first-child) {
435
436
  display: none;
@@ -440,7 +441,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
440
441
  }
441
442
  }
442
443
  .interface-pinned-items .components-button {
443
- margin-right: 4px;
444
+ margin: 0;
444
445
  }
445
446
  .interface-pinned-items .components-button svg {
446
447
  max-width: 24px;
@@ -571,38 +572,26 @@ body.is-fullscreen-mode .interface-interface-skeleton {
571
572
  }
572
573
  }
573
574
 
575
+ /**
576
+ * Buttons on the right side
577
+ */
574
578
  .edit-post-header__settings {
575
579
  display: inline-flex;
576
580
  align-items: center;
577
581
  flex-wrap: wrap;
578
582
  padding-left: 4px;
579
- /**
580
- * Buttons in the Toolbar
581
- */
583
+ gap: 4px;
582
584
  }
583
585
  @media (min-width: 600px) {
584
586
  .edit-post-header__settings {
585
- padding-left: 16px;
587
+ padding-left: 10px;
586
588
  }
587
589
  }
588
- .edit-post-header__settings .editor-post-saved-state,
589
- .edit-post-header__settings .components-button.components-button {
590
- margin-left: 4px;
591
- }
592
590
  @media (min-width: 600px) {
593
- .edit-post-header__settings .editor-post-saved-state,
594
- .edit-post-header__settings .components-button.components-button {
595
- margin-left: 12px;
591
+ .edit-post-header__settings {
592
+ gap: 8px;
596
593
  }
597
594
  }
598
- .edit-post-header__settings .editor-post-saved-state,
599
- .edit-post-header__settings .components-button.is-tertiary {
600
- padding: 0 6px;
601
- }
602
- .edit-post-header__settings .interface-more-menu-dropdown .components-button,
603
- .edit-post-header__settings .interface-pinned-items .components-button {
604
- margin-left: 0;
605
- }
606
595
 
607
596
  .edit-post-header-preview__grouping-external {
608
597
  display: flex;
@@ -621,10 +610,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
621
610
  margin-right: auto;
622
611
  }
623
612
 
624
- .edit-post-post-preview-dropdown .components-popover__content > div {
613
+ .edit-post-post-preview-dropdown .components-popover__content {
625
614
  padding-bottom: 0;
626
615
  }
627
616
 
617
+ /**
618
+ * Show icon labels.
619
+ */
628
620
  .show-icon-labels.interface-pinned-items .components-button.has-icon,
629
621
  .show-icon-labels .edit-post-header .components-button.has-icon,
630
622
  .edit-post-header__dropdown .components-button.has-icon {
@@ -697,22 +689,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
697
689
  padding-left: 12px;
698
690
  }
699
691
  }
700
- .show-icon-labels.interface-pinned-items .components-dropdown-menu__toggle,
701
- .show-icon-labels .edit-post-header .components-dropdown-menu__toggle,
702
- .edit-post-header__dropdown .components-dropdown-menu__toggle {
703
- margin-right: 8px;
704
- padding-right: 8px;
705
- padding-left: 8px;
706
- }
707
- @media (min-width: 600px) {
708
- .show-icon-labels.interface-pinned-items .components-dropdown-menu__toggle,
709
- .show-icon-labels .edit-post-header .components-dropdown-menu__toggle,
710
- .edit-post-header__dropdown .components-dropdown-menu__toggle {
711
- margin-right: 12px;
712
- padding-right: 12px;
713
- padding-left: 12px;
714
- }
715
- }
716
692
  .show-icon-labels.interface-pinned-items .edit-post-header-toolbar__inserter-toggle.edit-post-header-toolbar__inserter-toggle::after,
717
693
  .show-icon-labels .edit-post-header .edit-post-header-toolbar__inserter-toggle.edit-post-header-toolbar__inserter-toggle::after,
718
694
  .edit-post-header__dropdown .edit-post-header-toolbar__inserter-toggle.edit-post-header-toolbar__inserter-toggle::after {
@@ -992,26 +968,42 @@ body.is-fullscreen-mode .interface-interface-skeleton {
992
968
 
993
969
  .edit-post-template-top-area__popover .components-popover__content {
994
970
  min-width: 280px;
995
- padding: 8px;
971
+ }
972
+ .edit-post-template-top-area__popover .components-popover__content > div {
973
+ padding: 0;
974
+ }
975
+ .edit-post-template-top-area__popover .edit-site-template-details__group {
976
+ padding: 16px;
977
+ }
978
+ .edit-post-template-top-area__popover .edit-site-template-details__group .components-base-control__help {
979
+ margin-bottom: 0;
996
980
  }
997
981
  .edit-post-template-top-area__popover .edit-post-template-details__description {
998
982
  color: #757575;
999
983
  }
1000
984
 
1001
985
  .edit-post-template-top-area__second-menu-group {
1002
- margin-right: -16px;
1003
- margin-left: -16px;
1004
- padding: 16px;
1005
- padding-bottom: 0;
1006
986
  border-top: 1px solid #ddd;
987
+ padding: 16px 8px;
1007
988
  }
1008
989
  .edit-post-template-top-area__second-menu-group .edit-post-template-top-area__delete-template-button {
1009
990
  display: flex;
1010
991
  justify-content: center;
992
+ padding: 4px 8px;
993
+ }
994
+ .edit-post-template-top-area__second-menu-group .edit-post-template-top-area__delete-template-button.is-destructive {
995
+ padding: inherit;
996
+ margin-right: 8px;
997
+ margin-left: 8px;
998
+ width: calc(100% - 16px);
999
+ }
1000
+ .edit-post-template-top-area__second-menu-group .edit-post-template-top-area__delete-template-button.is-destructive .components-menu-item__item {
1001
+ width: auto;
1011
1002
  }
1012
1003
  .edit-post-template-top-area__second-menu-group .edit-post-template-top-area__delete-template-button .components-menu-item__item {
1013
1004
  margin-left: 0;
1014
1005
  min-width: 0;
1006
+ width: 100%;
1015
1007
  }
1016
1008
 
1017
1009
  .edit-post-keyboard-shortcut-help-modal__section {
@@ -1229,10 +1221,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1229
1221
  font-weight: 600;
1230
1222
  }
1231
1223
 
1232
- .edit-post-block-manager__show-all {
1233
- margin-left: 8px;
1234
- }
1235
-
1236
1224
  .edit-post-block-manager__checklist {
1237
1225
  margin-top: 0;
1238
1226
  }
@@ -1484,7 +1472,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1484
1472
  text-align: left;
1485
1473
  }
1486
1474
 
1487
- .edit-post-post-schedule__dialog .components-popover__content > div {
1475
+ .edit-post-post-schedule__dialog .components-popover__content {
1488
1476
  padding: 0;
1489
1477
  }
1490
1478
 
@@ -1508,36 +1496,8 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1508
1496
  width: 45%;
1509
1497
  }
1510
1498
 
1511
- @media (min-width: 782px) {
1512
- .edit-post-post-visibility__dialog .components-popover__content {
1513
- width: 257px;
1514
- }
1515
- }
1516
-
1517
- .edit-post-post-visibility__dialog-legend {
1518
- font-weight: 600;
1519
- }
1520
-
1521
- .edit-post-post-visibility__choice {
1522
- margin: 10px 0;
1523
- }
1524
-
1525
- .edit-post-post-visibility__dialog-radio,
1526
- .edit-post-post-visibility__dialog-label {
1527
- vertical-align: top;
1528
- }
1529
-
1530
- .edit-post-post-visibility__dialog-password-input {
1531
- width: calc(100% - 20px);
1532
- margin-right: 20px;
1533
- }
1534
-
1535
- .edit-post-post-visibility__dialog-info {
1536
- color: #757575;
1537
- padding-right: 20px;
1538
- font-style: italic;
1539
- margin: 4px 0 0;
1540
- line-height: 1.4;
1499
+ .edit-post-post-visibility__dialog .components-popover__content {
1500
+ width: 262px;
1541
1501
  }
1542
1502
 
1543
1503
  .components-button.edit-post-sidebar__panel-tab {
@@ -1562,7 +1522,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1562
1522
  visibility: hidden;
1563
1523
  }
1564
1524
  .components-button.edit-post-sidebar__panel-tab.is-active {
1565
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -4px 0 0 var(--wp-admin-theme-color);
1525
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
1566
1526
  position: relative;
1567
1527
  z-index: 1;
1568
1528
  }
@@ -1573,7 +1533,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1573
1533
  bottom: 1px;
1574
1534
  left: 0;
1575
1535
  right: 0;
1576
- border-bottom: 4px solid transparent;
1536
+ border-bottom: 1.5px solid transparent;
1577
1537
  }
1578
1538
  .components-button.edit-post-sidebar__panel-tab:focus {
1579
1539
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
@@ -1581,7 +1541,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1581
1541
  z-index: 1;
1582
1542
  }
1583
1543
  .components-button.edit-post-sidebar__panel-tab.is-active:focus {
1584
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -4px 0 0 var(--wp-admin-theme-color);
1544
+ 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);
1585
1545
  }
1586
1546
 
1587
1547
  @media (min-width: 782px) {
@@ -416,7 +416,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
416
416
  }
417
417
  @media (min-width: 480px) {
418
418
  .interface-more-menu-dropdown__content .components-popover__content {
419
- width: auto;
420
419
  max-width: 480px;
421
420
  }
422
421
  }
@@ -430,6 +429,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
430
429
 
431
430
  .interface-pinned-items {
432
431
  display: flex;
432
+ gap: 4px;
433
+ margin-right: -4px;
433
434
  }
434
435
  .interface-pinned-items .components-button:not(:first-child) {
435
436
  display: none;
@@ -440,7 +441,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
440
441
  }
441
442
  }
442
443
  .interface-pinned-items .components-button {
443
- margin-left: 4px;
444
+ margin: 0;
444
445
  }
445
446
  .interface-pinned-items .components-button svg {
446
447
  max-width: 24px;
@@ -571,38 +572,26 @@ body.is-fullscreen-mode .interface-interface-skeleton {
571
572
  }
572
573
  }
573
574
 
575
+ /**
576
+ * Buttons on the right side
577
+ */
574
578
  .edit-post-header__settings {
575
579
  display: inline-flex;
576
580
  align-items: center;
577
581
  flex-wrap: wrap;
578
582
  padding-right: 4px;
579
- /**
580
- * Buttons in the Toolbar
581
- */
583
+ gap: 4px;
582
584
  }
583
585
  @media (min-width: 600px) {
584
586
  .edit-post-header__settings {
585
- padding-right: 16px;
587
+ padding-right: 10px;
586
588
  }
587
589
  }
588
- .edit-post-header__settings .editor-post-saved-state,
589
- .edit-post-header__settings .components-button.components-button {
590
- margin-right: 4px;
591
- }
592
590
  @media (min-width: 600px) {
593
- .edit-post-header__settings .editor-post-saved-state,
594
- .edit-post-header__settings .components-button.components-button {
595
- margin-right: 12px;
591
+ .edit-post-header__settings {
592
+ gap: 8px;
596
593
  }
597
594
  }
598
- .edit-post-header__settings .editor-post-saved-state,
599
- .edit-post-header__settings .components-button.is-tertiary {
600
- padding: 0 6px;
601
- }
602
- .edit-post-header__settings .interface-more-menu-dropdown .components-button,
603
- .edit-post-header__settings .interface-pinned-items .components-button {
604
- margin-right: 0;
605
- }
606
595
 
607
596
  .edit-post-header-preview__grouping-external {
608
597
  display: flex;
@@ -621,10 +610,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
621
610
  margin-left: auto;
622
611
  }
623
612
 
624
- .edit-post-post-preview-dropdown .components-popover__content > div {
613
+ .edit-post-post-preview-dropdown .components-popover__content {
625
614
  padding-bottom: 0;
626
615
  }
627
616
 
617
+ /**
618
+ * Show icon labels.
619
+ */
628
620
  .show-icon-labels.interface-pinned-items .components-button.has-icon,
629
621
  .show-icon-labels .edit-post-header .components-button.has-icon,
630
622
  .edit-post-header__dropdown .components-button.has-icon {
@@ -697,22 +689,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
697
689
  padding-right: 12px;
698
690
  }
699
691
  }
700
- .show-icon-labels.interface-pinned-items .components-dropdown-menu__toggle,
701
- .show-icon-labels .edit-post-header .components-dropdown-menu__toggle,
702
- .edit-post-header__dropdown .components-dropdown-menu__toggle {
703
- margin-left: 8px;
704
- padding-left: 8px;
705
- padding-right: 8px;
706
- }
707
- @media (min-width: 600px) {
708
- .show-icon-labels.interface-pinned-items .components-dropdown-menu__toggle,
709
- .show-icon-labels .edit-post-header .components-dropdown-menu__toggle,
710
- .edit-post-header__dropdown .components-dropdown-menu__toggle {
711
- margin-left: 12px;
712
- padding-left: 12px;
713
- padding-right: 12px;
714
- }
715
- }
716
692
  .show-icon-labels.interface-pinned-items .edit-post-header-toolbar__inserter-toggle.edit-post-header-toolbar__inserter-toggle::after,
717
693
  .show-icon-labels .edit-post-header .edit-post-header-toolbar__inserter-toggle.edit-post-header-toolbar__inserter-toggle::after,
718
694
  .edit-post-header__dropdown .edit-post-header-toolbar__inserter-toggle.edit-post-header-toolbar__inserter-toggle::after {
@@ -992,26 +968,42 @@ body.is-fullscreen-mode .interface-interface-skeleton {
992
968
 
993
969
  .edit-post-template-top-area__popover .components-popover__content {
994
970
  min-width: 280px;
995
- padding: 8px;
971
+ }
972
+ .edit-post-template-top-area__popover .components-popover__content > div {
973
+ padding: 0;
974
+ }
975
+ .edit-post-template-top-area__popover .edit-site-template-details__group {
976
+ padding: 16px;
977
+ }
978
+ .edit-post-template-top-area__popover .edit-site-template-details__group .components-base-control__help {
979
+ margin-bottom: 0;
996
980
  }
997
981
  .edit-post-template-top-area__popover .edit-post-template-details__description {
998
982
  color: #757575;
999
983
  }
1000
984
 
1001
985
  .edit-post-template-top-area__second-menu-group {
1002
- margin-left: -16px;
1003
- margin-right: -16px;
1004
- padding: 16px;
1005
- padding-bottom: 0;
1006
986
  border-top: 1px solid #ddd;
987
+ padding: 16px 8px;
1007
988
  }
1008
989
  .edit-post-template-top-area__second-menu-group .edit-post-template-top-area__delete-template-button {
1009
990
  display: flex;
1010
991
  justify-content: center;
992
+ padding: 4px 8px;
993
+ }
994
+ .edit-post-template-top-area__second-menu-group .edit-post-template-top-area__delete-template-button.is-destructive {
995
+ padding: inherit;
996
+ margin-left: 8px;
997
+ margin-right: 8px;
998
+ width: calc(100% - 16px);
999
+ }
1000
+ .edit-post-template-top-area__second-menu-group .edit-post-template-top-area__delete-template-button.is-destructive .components-menu-item__item {
1001
+ width: auto;
1011
1002
  }
1012
1003
  .edit-post-template-top-area__second-menu-group .edit-post-template-top-area__delete-template-button .components-menu-item__item {
1013
1004
  margin-right: 0;
1014
1005
  min-width: 0;
1006
+ width: 100%;
1015
1007
  }
1016
1008
 
1017
1009
  .edit-post-keyboard-shortcut-help-modal__section {
@@ -1229,10 +1221,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1229
1221
  font-weight: 600;
1230
1222
  }
1231
1223
 
1232
- .edit-post-block-manager__show-all {
1233
- margin-right: 8px;
1234
- }
1235
-
1236
1224
  .edit-post-block-manager__checklist {
1237
1225
  margin-top: 0;
1238
1226
  }
@@ -1488,7 +1476,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1488
1476
  text-align: right;
1489
1477
  }
1490
1478
 
1491
- .edit-post-post-schedule__dialog .components-popover__content > div {
1479
+ .edit-post-post-schedule__dialog .components-popover__content {
1492
1480
  padding: 0;
1493
1481
  }
1494
1482
 
@@ -1512,36 +1500,8 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1512
1500
  width: 45%;
1513
1501
  }
1514
1502
 
1515
- @media (min-width: 782px) {
1516
- .edit-post-post-visibility__dialog .components-popover__content {
1517
- width: 257px;
1518
- }
1519
- }
1520
-
1521
- .edit-post-post-visibility__dialog-legend {
1522
- font-weight: 600;
1523
- }
1524
-
1525
- .edit-post-post-visibility__choice {
1526
- margin: 10px 0;
1527
- }
1528
-
1529
- .edit-post-post-visibility__dialog-radio,
1530
- .edit-post-post-visibility__dialog-label {
1531
- vertical-align: top;
1532
- }
1533
-
1534
- .edit-post-post-visibility__dialog-password-input {
1535
- width: calc(100% - 20px);
1536
- margin-left: 20px;
1537
- }
1538
-
1539
- .edit-post-post-visibility__dialog-info {
1540
- color: #757575;
1541
- padding-left: 20px;
1542
- font-style: italic;
1543
- margin: 4px 0 0;
1544
- line-height: 1.4;
1503
+ .edit-post-post-visibility__dialog .components-popover__content {
1504
+ width: 262px;
1545
1505
  }
1546
1506
 
1547
1507
  .components-button.edit-post-sidebar__panel-tab {
@@ -1566,7 +1526,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1566
1526
  visibility: hidden;
1567
1527
  }
1568
1528
  .components-button.edit-post-sidebar__panel-tab.is-active {
1569
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -4px 0 0 var(--wp-admin-theme-color);
1529
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
1570
1530
  position: relative;
1571
1531
  z-index: 1;
1572
1532
  }
@@ -1577,7 +1537,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1577
1537
  bottom: 1px;
1578
1538
  right: 0;
1579
1539
  left: 0;
1580
- border-bottom: 4px solid transparent;
1540
+ border-bottom: 1.5px solid transparent;
1581
1541
  }
1582
1542
  .components-button.edit-post-sidebar__panel-tab:focus {
1583
1543
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
@@ -1585,7 +1545,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1585
1545
  z-index: 1;
1586
1546
  }
1587
1547
  .components-button.edit-post-sidebar__panel-tab.is-active:focus {
1588
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -4px 0 0 var(--wp-admin-theme-color);
1548
+ 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);
1589
1549
  }
1590
1550
 
1591
1551
  @media (min-width: 782px) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "6.3.10",
3
+ "version": "6.6.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.6.1",
31
- "@wordpress/api-fetch": "^6.3.1",
32
- "@wordpress/block-editor": "^8.5.7",
33
- "@wordpress/block-library": "^7.3.10",
34
- "@wordpress/blocks": "^11.5.3",
35
- "@wordpress/components": "^19.8.4",
36
- "@wordpress/compose": "^5.4.1",
37
- "@wordpress/core-data": "^4.4.5",
38
- "@wordpress/data": "^6.6.1",
39
- "@wordpress/deprecated": "^3.6.1",
40
- "@wordpress/editor": "^12.5.7",
41
- "@wordpress/element": "^4.4.1",
42
- "@wordpress/hooks": "^3.6.1",
43
- "@wordpress/i18n": "^4.6.1",
44
- "@wordpress/icons": "^8.2.2",
45
- "@wordpress/interface": "^4.5.5",
46
- "@wordpress/keyboard-shortcuts": "^3.4.1",
47
- "@wordpress/keycodes": "^3.6.1",
48
- "@wordpress/media-utils": "^3.4.1",
49
- "@wordpress/notices": "^3.6.1",
50
- "@wordpress/plugins": "^4.4.2",
51
- "@wordpress/preferences": "^1.2.4",
52
- "@wordpress/url": "^3.7.1",
53
- "@wordpress/viewport": "^4.4.1",
54
- "@wordpress/warning": "^2.6.1",
30
+ "@wordpress/a11y": "^3.9.0",
31
+ "@wordpress/api-fetch": "^6.6.0",
32
+ "@wordpress/block-editor": "^9.1.0",
33
+ "@wordpress/block-library": "^7.6.0",
34
+ "@wordpress/blocks": "^11.8.0",
35
+ "@wordpress/components": "^19.11.0",
36
+ "@wordpress/compose": "^5.7.0",
37
+ "@wordpress/core-data": "^4.7.0",
38
+ "@wordpress/data": "^6.9.0",
39
+ "@wordpress/deprecated": "^3.9.0",
40
+ "@wordpress/editor": "^12.8.0",
41
+ "@wordpress/element": "^4.7.0",
42
+ "@wordpress/hooks": "^3.9.0",
43
+ "@wordpress/i18n": "^4.9.0",
44
+ "@wordpress/icons": "^9.0.0",
45
+ "@wordpress/interface": "^4.8.0",
46
+ "@wordpress/keyboard-shortcuts": "^3.7.0",
47
+ "@wordpress/keycodes": "^3.9.0",
48
+ "@wordpress/media-utils": "^4.0.0",
49
+ "@wordpress/notices": "^3.9.0",
50
+ "@wordpress/plugins": "^4.7.0",
51
+ "@wordpress/preferences": "^2.1.0",
52
+ "@wordpress/url": "^3.10.0",
53
+ "@wordpress/viewport": "^4.7.0",
54
+ "@wordpress/warning": "^2.9.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": "d9042594d77ee2d9e28326266de078a505fdf645"
67
+ "gitHead": "198fa129cf1af8dc615918987ea6795cd40ab7df"
68
68
  }
@@ -44,10 +44,6 @@
44
44
  }
45
45
  }
46
46
 
47
- .edit-post-block-manager__show-all {
48
- margin-right: $grid-unit-10;
49
- }
50
-
51
47
  .edit-post-block-manager__checklist {
52
48
  margin-top: 0;
53
49
  }
@@ -1,3 +1,8 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { get } from 'lodash';
5
+
1
6
  /**
2
7
  * WordPress dependencies
3
8
  */
@@ -7,6 +12,7 @@ import { external } from '@wordpress/icons';
7
12
  import { __ } from '@wordpress/i18n';
8
13
  import { __experimentalPreviewOptions as PreviewOptions } from '@wordpress/block-editor';
9
14
  import { useDispatch, useSelect } from '@wordpress/data';
15
+ import { store as coreStore } from '@wordpress/core-data';
10
16
 
11
17
  /**
12
18
  * Internal dependencies
@@ -18,18 +24,23 @@ export default function DevicePreview() {
18
24
  hasActiveMetaboxes,
19
25
  isPostSaveable,
20
26
  isSaving,
27
+ isViewable,
21
28
  deviceType,
22
- } = useSelect(
23
- ( select ) => ( {
29
+ } = useSelect( ( select ) => {
30
+ const { getEditedPostAttribute } = select( editorStore );
31
+ const { getPostType } = select( coreStore );
32
+ const postType = getPostType( getEditedPostAttribute( 'type' ) );
33
+
34
+ return {
24
35
  hasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),
25
36
  isSaving: select( editPostStore ).isSavingMetaBoxes(),
26
37
  isPostSaveable: select( editorStore ).isEditedPostSaveable(),
38
+ isViewable: get( postType, [ 'viewable' ], false ),
27
39
  deviceType: select(
28
40
  editPostStore
29
41
  ).__experimentalGetPreviewDeviceType(),
30
- } ),
31
- []
32
- );
42
+ };
43
+ }, [] );
33
44
  const {
34
45
  __experimentalSetPreviewDeviceType: setPreviewDeviceType,
35
46
  } = useDispatch( editPostStore );
@@ -41,24 +52,26 @@ export default function DevicePreview() {
41
52
  deviceType={ deviceType }
42
53
  setDeviceType={ setPreviewDeviceType }
43
54
  >
44
- <MenuGroup>
45
- <div className="edit-post-header-preview__grouping-external">
46
- <PostPreviewButton
47
- className={
48
- 'edit-post-header-preview__button-external'
49
- }
50
- role="menuitem"
51
- forceIsAutosaveable={ hasActiveMetaboxes }
52
- forcePreviewLink={ isSaving ? null : undefined }
53
- textContent={
54
- <>
55
- { __( 'Preview in new tab' ) }
56
- <Icon icon={ external } />
57
- </>
58
- }
59
- />
60
- </div>
61
- </MenuGroup>
55
+ { isViewable && (
56
+ <MenuGroup>
57
+ <div className="edit-post-header-preview__grouping-external">
58
+ <PostPreviewButton
59
+ className={
60
+ 'edit-post-header-preview__button-external'
61
+ }
62
+ role="menuitem"
63
+ forceIsAutosaveable={ hasActiveMetaboxes }
64
+ forcePreviewLink={ isSaving ? null : undefined }
65
+ textContent={
66
+ <>
67
+ { __( 'Preview in new tab' ) }
68
+ <Icon icon={ external } />
69
+ </>
70
+ }
71
+ />
72
+ </div>
73
+ </MenuGroup>
74
+ ) }
62
75
  </PreviewOptions>
63
76
  );
64
77
  }