@wordpress/editor 14.0.0 → 14.0.1
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.
- package/build/components/block-settings-menu/content-only-settings-menu.js +14 -5
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build/components/editor/index.js +83 -0
- package/build/components/editor/index.js.map +1 -0
- package/build/components/editor-interface/index.js +6 -8
- package/build/components/editor-interface/index.js.map +1 -1
- package/build/components/header/back-button.js +4 -1
- package/build/components/header/back-button.js.map +1 -1
- package/build/components/header/index.js +1 -5
- package/build/components/header/index.js.map +1 -1
- package/build/components/media-categories/index.js +1 -1
- package/build/components/media-categories/index.js.map +1 -1
- package/build/components/post-actions/actions.js +3 -2
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-last-revision/index.js +35 -9
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +1 -0
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-panel/index.js +1 -0
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-sync-status/index.js +1 -1
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-url/panel.js +25 -3
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/provider/disable-non-page-content-blocks.js +5 -3
- package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/sidebar/post-summary.js +2 -1
- package/build/components/sidebar/post-summary.js.map +1 -1
- package/build/private-apis.js +3 -1
- package/build/private-apis.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +14 -5
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build-module/components/editor/index.js +76 -0
- package/build-module/components/editor/index.js.map +1 -0
- package/build-module/components/editor-interface/index.js +6 -8
- package/build-module/components/editor-interface/index.js.map +1 -1
- package/build-module/components/header/back-button.js +4 -1
- package/build-module/components/header/back-button.js.map +1 -1
- package/build-module/components/header/index.js +1 -5
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/media-categories/index.js +1 -1
- package/build-module/components/media-categories/index.js.map +1 -1
- package/build-module/components/post-actions/actions.js +3 -2
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +34 -11
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +1 -0
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +1 -0
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +1 -1
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-url/panel.js +26 -3
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +5 -3
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +2 -1
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/private-apis.js +3 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-style/style-rtl.css +28 -41
- package/build-style/style.css +28 -41
- package/package.json +35 -35
- package/src/components/block-settings-menu/content-only-settings-menu.js +26 -12
- package/src/components/collapsible-block-toolbar/style.scss +3 -1
- package/src/components/editor/index.js +93 -0
- package/src/components/editor-interface/index.js +5 -5
- package/src/components/editor-interface/style.scss +3 -0
- package/src/components/entities-saved-states/style.scss +0 -7
- package/src/components/header/back-button.js +6 -1
- package/src/components/header/index.js +1 -8
- package/src/components/header/style.scss +1 -1
- package/src/components/media-categories/index.js +1 -3
- package/src/components/post-actions/actions.js +3 -1
- package/src/components/post-last-revision/index.js +30 -7
- package/src/components/post-last-revision/style.scss +4 -0
- package/src/components/post-panel-row/style.scss +1 -0
- package/src/components/post-preview-button/index.js +1 -0
- package/src/components/post-preview-button/test/index.js +10 -2
- package/src/components/post-publish-panel/index.js +1 -0
- package/src/components/post-publish-panel/style.scss +28 -36
- package/src/components/post-sync-status/index.js +2 -8
- package/src/components/post-url/panel.js +13 -5
- package/src/components/provider/disable-non-page-content-blocks.js +9 -4
- package/src/components/save-publish-panels/style.scss +0 -8
- package/src/components/sidebar/post-summary.js +2 -0
- package/src/private-apis.js +3 -1
- package/src/style.scss +1 -0
|
@@ -352,10 +352,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
352
352
|
.interface-interface-skeleton__sidebar {
|
|
353
353
|
position: relative !important;
|
|
354
354
|
}
|
|
355
|
-
.is-sidebar-opened .interface-interface-skeleton__secondary-sidebar,
|
|
356
|
-
.is-sidebar-opened .interface-interface-skeleton__sidebar {
|
|
357
|
-
z-index: 90;
|
|
358
|
-
}
|
|
359
355
|
}
|
|
360
356
|
|
|
361
357
|
.interface-interface-skeleton__sidebar {
|
|
@@ -592,6 +588,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
592
588
|
.editor-collapsible-block-toolbar .block-editor-block-contextual-toolbar {
|
|
593
589
|
border-bottom: 0;
|
|
594
590
|
height: 100%;
|
|
591
|
+
background: transparent;
|
|
595
592
|
}
|
|
596
593
|
.editor-collapsible-block-toolbar .block-editor-block-toolbar {
|
|
597
594
|
height: 100%;
|
|
@@ -632,8 +629,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
632
629
|
}
|
|
633
630
|
@media (min-width: 600px) {
|
|
634
631
|
.editor-collapsible-block-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container {
|
|
632
|
+
height: 40px;
|
|
635
633
|
position: relative;
|
|
636
|
-
top: -
|
|
634
|
+
top: -5px;
|
|
637
635
|
}
|
|
638
636
|
}
|
|
639
637
|
.editor-collapsible-block-toolbar.is-collapsed {
|
|
@@ -965,6 +963,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
965
963
|
margin-right: 8px;
|
|
966
964
|
}
|
|
967
965
|
|
|
966
|
+
.editor-editor-interface .entities-saved-states__panel-header {
|
|
967
|
+
height: 61px;
|
|
968
|
+
}
|
|
969
|
+
|
|
968
970
|
.components-editor-notices__dismissible,
|
|
969
971
|
.components-editor-notices__pinned {
|
|
970
972
|
position: relative;
|
|
@@ -1017,11 +1019,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1017
1019
|
margin-bottom: 4px;
|
|
1018
1020
|
}
|
|
1019
1021
|
|
|
1020
|
-
.edit-post-layout .entities-saved-states__panel-header,
|
|
1021
|
-
.edit-site-editor__interface-skeleton .entities-saved-states__panel-header {
|
|
1022
|
-
height: 61px;
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
1022
|
.entities-saved-states__post-meta {
|
|
1026
1023
|
margin-right: 24px;
|
|
1027
1024
|
align-items: center;
|
|
@@ -1214,28 +1211,28 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1214
1211
|
}
|
|
1215
1212
|
}
|
|
1216
1213
|
|
|
1217
|
-
.is-distraction-free .interface-interface-skeleton__header {
|
|
1214
|
+
.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header {
|
|
1218
1215
|
border-bottom: none;
|
|
1219
1216
|
}
|
|
1220
|
-
.is-distraction-free .editor-header {
|
|
1217
|
+
.editor-editor-interface.is-distraction-free .editor-header {
|
|
1221
1218
|
background-color: #fff;
|
|
1222
1219
|
border-bottom: 1px solid #e0e0e0;
|
|
1223
1220
|
position: absolute;
|
|
1224
1221
|
width: 100%;
|
|
1225
1222
|
}
|
|
1226
|
-
.is-distraction-free .editor-header > .edit-post-header__settings > .edit-post-header__post-preview-button {
|
|
1223
|
+
.editor-editor-interface.is-distraction-free .editor-header > .edit-post-header__settings > .edit-post-header__post-preview-button {
|
|
1227
1224
|
visibility: hidden;
|
|
1228
1225
|
}
|
|
1229
|
-
.is-distraction-free .editor-header > .editor-header__toolbar .editor-document-tools__document-overview-toggle, .is-distraction-free .editor-header > .editor-header__settings > .editor-preview-dropdown, .is-distraction-free .editor-header > .editor-header__settings > .interface-pinned-items {
|
|
1226
|
+
.editor-editor-interface.is-distraction-free .editor-header > .editor-header__toolbar .editor-document-tools__document-overview-toggle, .editor-editor-interface.is-distraction-free .editor-header > .editor-header__settings > .editor-preview-dropdown, .editor-editor-interface.is-distraction-free .editor-header > .editor-header__settings > .interface-pinned-items {
|
|
1230
1227
|
display: none;
|
|
1231
1228
|
}
|
|
1232
|
-
.is-distraction-free .interface-interface-skeleton__header:focus-within {
|
|
1229
|
+
.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within {
|
|
1233
1230
|
opacity: 1 !important;
|
|
1234
1231
|
}
|
|
1235
|
-
.is-distraction-free .interface-interface-skeleton__header:focus-within div {
|
|
1232
|
+
.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within div {
|
|
1236
1233
|
transform: translateX(0) translateZ(0) !important;
|
|
1237
1234
|
}
|
|
1238
|
-
.is-distraction-free .components-editor-notices__dismissible {
|
|
1235
|
+
.editor-editor-interface.is-distraction-free .components-editor-notices__dismissible {
|
|
1239
1236
|
position: absolute;
|
|
1240
1237
|
z-index: 35;
|
|
1241
1238
|
}
|
|
@@ -1665,6 +1662,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1665
1662
|
padding: 16px;
|
|
1666
1663
|
}
|
|
1667
1664
|
|
|
1665
|
+
.editor-private-post-last-revision__button {
|
|
1666
|
+
display: inline-block;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1668
1669
|
.editor-post-locked-modal__buttons {
|
|
1669
1670
|
margin-top: 24px;
|
|
1670
1671
|
}
|
|
@@ -1703,6 +1704,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1703
1704
|
.editor-post-panel__row-control .components-button {
|
|
1704
1705
|
max-width: 100%;
|
|
1705
1706
|
text-align: right;
|
|
1707
|
+
text-wrap: balance;
|
|
1706
1708
|
text-wrap: pretty;
|
|
1707
1709
|
height: auto;
|
|
1708
1710
|
min-height: 32px;
|
|
@@ -1715,10 +1717,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1715
1717
|
padding: 16px;
|
|
1716
1718
|
}
|
|
1717
1719
|
|
|
1718
|
-
.editor-post-publish-panel {
|
|
1719
|
-
background: #fff;
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
1720
|
.editor-post-publish-panel__content {
|
|
1723
1721
|
min-height: calc(100% - 144px);
|
|
1724
1722
|
}
|
|
@@ -1784,6 +1782,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1784
1782
|
|
|
1785
1783
|
.editor-post-publish-panel__header-publish-button {
|
|
1786
1784
|
padding-left: 4px;
|
|
1785
|
+
justify-content: center;
|
|
1787
1786
|
}
|
|
1788
1787
|
|
|
1789
1788
|
.editor-post-publish-panel__header-cancel-button {
|
|
@@ -1830,6 +1829,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1830
1829
|
}
|
|
1831
1830
|
.editor-post-publish-panel__prepublish .components-panel__body-title .components-button {
|
|
1832
1831
|
align-items: flex-start;
|
|
1832
|
+
text-wrap: balance;
|
|
1833
1833
|
text-wrap: pretty;
|
|
1834
1834
|
}
|
|
1835
1835
|
|
|
@@ -1891,19 +1891,18 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1891
1891
|
height: 40px;
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
|
-
.
|
|
1895
|
-
.edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1894
|
+
.editor-post-publish-panel {
|
|
1896
1895
|
position: fixed;
|
|
1897
1896
|
z-index: 100001;
|
|
1898
|
-
|
|
1897
|
+
background: #fff;
|
|
1898
|
+
top: 0;
|
|
1899
1899
|
bottom: 0;
|
|
1900
1900
|
left: 0;
|
|
1901
1901
|
right: 0;
|
|
1902
1902
|
overflow: auto;
|
|
1903
1903
|
}
|
|
1904
1904
|
@media (min-width: 782px) {
|
|
1905
|
-
.
|
|
1906
|
-
.edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1905
|
+
.editor-post-publish-panel {
|
|
1907
1906
|
z-index: 99998;
|
|
1908
1907
|
top: 32px;
|
|
1909
1908
|
right: auto;
|
|
@@ -1914,28 +1913,21 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1914
1913
|
}
|
|
1915
1914
|
}
|
|
1916
1915
|
@media (min-width: 782px) and (prefers-reduced-motion: reduce) {
|
|
1917
|
-
.
|
|
1918
|
-
.edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1916
|
+
.editor-post-publish-panel {
|
|
1919
1917
|
animation-duration: 1ms;
|
|
1920
1918
|
animation-delay: 0s;
|
|
1921
1919
|
}
|
|
1922
1920
|
}
|
|
1923
1921
|
@media (min-width: 782px) {
|
|
1924
|
-
body.is-fullscreen-mode .
|
|
1925
|
-
body.is-fullscreen-mode .edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1922
|
+
body.is-fullscreen-mode .editor-post-publish-panel {
|
|
1926
1923
|
top: 0;
|
|
1927
1924
|
}
|
|
1928
1925
|
}
|
|
1929
1926
|
@media (min-width: 782px) {
|
|
1930
|
-
[role=region]:focus .
|
|
1931
|
-
[role=region]:focus .edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1927
|
+
[role=region]:focus .editor-post-publish-panel {
|
|
1932
1928
|
transform: translateX(0%);
|
|
1933
1929
|
}
|
|
1934
1930
|
}
|
|
1935
|
-
.edit-post-layout .editor-post-publish-panel__header-publish-button,
|
|
1936
|
-
.edit-site-editor__interface-skeleton .editor-post-publish-panel__header-publish-button {
|
|
1937
|
-
justify-content: center;
|
|
1938
|
-
}
|
|
1939
1931
|
|
|
1940
1932
|
@keyframes editor-post-publish-panel__slide-in-animation {
|
|
1941
1933
|
100% {
|
|
@@ -2408,11 +2400,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2408
2400
|
bottom: 0;
|
|
2409
2401
|
}
|
|
2410
2402
|
|
|
2411
|
-
.interface-interface-skeleton__sidebar:focus .edit-post-layout__toggle-sidebar-panel, .interface-interface-skeleton__sidebar:focus-within .edit-post-layout__toggle-sidebar-panel {
|
|
2412
|
-
top: auto;
|
|
2413
|
-
bottom: 0;
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
2403
|
.editor-start-page-options__modal-content .block-editor-block-patterns-list {
|
|
2417
2404
|
column-count: 2;
|
|
2418
2405
|
column-gap: 24px;
|
package/build-style/style.css
CHANGED
|
@@ -352,10 +352,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
352
352
|
.interface-interface-skeleton__sidebar {
|
|
353
353
|
position: relative !important;
|
|
354
354
|
}
|
|
355
|
-
.is-sidebar-opened .interface-interface-skeleton__secondary-sidebar,
|
|
356
|
-
.is-sidebar-opened .interface-interface-skeleton__sidebar {
|
|
357
|
-
z-index: 90;
|
|
358
|
-
}
|
|
359
355
|
}
|
|
360
356
|
|
|
361
357
|
.interface-interface-skeleton__sidebar {
|
|
@@ -592,6 +588,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
592
588
|
.editor-collapsible-block-toolbar .block-editor-block-contextual-toolbar {
|
|
593
589
|
border-bottom: 0;
|
|
594
590
|
height: 100%;
|
|
591
|
+
background: transparent;
|
|
595
592
|
}
|
|
596
593
|
.editor-collapsible-block-toolbar .block-editor-block-toolbar {
|
|
597
594
|
height: 100%;
|
|
@@ -632,8 +629,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
632
629
|
}
|
|
633
630
|
@media (min-width: 600px) {
|
|
634
631
|
.editor-collapsible-block-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container {
|
|
632
|
+
height: 40px;
|
|
635
633
|
position: relative;
|
|
636
|
-
top: -
|
|
634
|
+
top: -5px;
|
|
637
635
|
}
|
|
638
636
|
}
|
|
639
637
|
.editor-collapsible-block-toolbar.is-collapsed {
|
|
@@ -965,6 +963,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
965
963
|
margin-left: 8px;
|
|
966
964
|
}
|
|
967
965
|
|
|
966
|
+
.editor-editor-interface .entities-saved-states__panel-header {
|
|
967
|
+
height: 61px;
|
|
968
|
+
}
|
|
969
|
+
|
|
968
970
|
.components-editor-notices__dismissible,
|
|
969
971
|
.components-editor-notices__pinned {
|
|
970
972
|
position: relative;
|
|
@@ -1017,11 +1019,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1017
1019
|
margin-bottom: 4px;
|
|
1018
1020
|
}
|
|
1019
1021
|
|
|
1020
|
-
.edit-post-layout .entities-saved-states__panel-header,
|
|
1021
|
-
.edit-site-editor__interface-skeleton .entities-saved-states__panel-header {
|
|
1022
|
-
height: 61px;
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
1022
|
.entities-saved-states__post-meta {
|
|
1026
1023
|
margin-left: 24px;
|
|
1027
1024
|
align-items: center;
|
|
@@ -1214,28 +1211,28 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1214
1211
|
}
|
|
1215
1212
|
}
|
|
1216
1213
|
|
|
1217
|
-
.is-distraction-free .interface-interface-skeleton__header {
|
|
1214
|
+
.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header {
|
|
1218
1215
|
border-bottom: none;
|
|
1219
1216
|
}
|
|
1220
|
-
.is-distraction-free .editor-header {
|
|
1217
|
+
.editor-editor-interface.is-distraction-free .editor-header {
|
|
1221
1218
|
background-color: #fff;
|
|
1222
1219
|
border-bottom: 1px solid #e0e0e0;
|
|
1223
1220
|
position: absolute;
|
|
1224
1221
|
width: 100%;
|
|
1225
1222
|
}
|
|
1226
|
-
.is-distraction-free .editor-header > .edit-post-header__settings > .edit-post-header__post-preview-button {
|
|
1223
|
+
.editor-editor-interface.is-distraction-free .editor-header > .edit-post-header__settings > .edit-post-header__post-preview-button {
|
|
1227
1224
|
visibility: hidden;
|
|
1228
1225
|
}
|
|
1229
|
-
.is-distraction-free .editor-header > .editor-header__toolbar .editor-document-tools__document-overview-toggle, .is-distraction-free .editor-header > .editor-header__settings > .editor-preview-dropdown, .is-distraction-free .editor-header > .editor-header__settings > .interface-pinned-items {
|
|
1226
|
+
.editor-editor-interface.is-distraction-free .editor-header > .editor-header__toolbar .editor-document-tools__document-overview-toggle, .editor-editor-interface.is-distraction-free .editor-header > .editor-header__settings > .editor-preview-dropdown, .editor-editor-interface.is-distraction-free .editor-header > .editor-header__settings > .interface-pinned-items {
|
|
1230
1227
|
display: none;
|
|
1231
1228
|
}
|
|
1232
|
-
.is-distraction-free .interface-interface-skeleton__header:focus-within {
|
|
1229
|
+
.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within {
|
|
1233
1230
|
opacity: 1 !important;
|
|
1234
1231
|
}
|
|
1235
|
-
.is-distraction-free .interface-interface-skeleton__header:focus-within div {
|
|
1232
|
+
.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within div {
|
|
1236
1233
|
transform: translateX(0) translateZ(0) !important;
|
|
1237
1234
|
}
|
|
1238
|
-
.is-distraction-free .components-editor-notices__dismissible {
|
|
1235
|
+
.editor-editor-interface.is-distraction-free .components-editor-notices__dismissible {
|
|
1239
1236
|
position: absolute;
|
|
1240
1237
|
z-index: 35;
|
|
1241
1238
|
}
|
|
@@ -1665,6 +1662,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1665
1662
|
padding: 16px;
|
|
1666
1663
|
}
|
|
1667
1664
|
|
|
1665
|
+
.editor-private-post-last-revision__button {
|
|
1666
|
+
display: inline-block;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1668
1669
|
.editor-post-locked-modal__buttons {
|
|
1669
1670
|
margin-top: 24px;
|
|
1670
1671
|
}
|
|
@@ -1703,6 +1704,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1703
1704
|
.editor-post-panel__row-control .components-button {
|
|
1704
1705
|
max-width: 100%;
|
|
1705
1706
|
text-align: left;
|
|
1707
|
+
text-wrap: balance;
|
|
1706
1708
|
text-wrap: pretty;
|
|
1707
1709
|
height: auto;
|
|
1708
1710
|
min-height: 32px;
|
|
@@ -1715,10 +1717,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1715
1717
|
padding: 16px;
|
|
1716
1718
|
}
|
|
1717
1719
|
|
|
1718
|
-
.editor-post-publish-panel {
|
|
1719
|
-
background: #fff;
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
1720
|
.editor-post-publish-panel__content {
|
|
1723
1721
|
min-height: calc(100% - 144px);
|
|
1724
1722
|
}
|
|
@@ -1784,6 +1782,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1784
1782
|
|
|
1785
1783
|
.editor-post-publish-panel__header-publish-button {
|
|
1786
1784
|
padding-right: 4px;
|
|
1785
|
+
justify-content: center;
|
|
1787
1786
|
}
|
|
1788
1787
|
|
|
1789
1788
|
.editor-post-publish-panel__header-cancel-button {
|
|
@@ -1830,6 +1829,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1830
1829
|
}
|
|
1831
1830
|
.editor-post-publish-panel__prepublish .components-panel__body-title .components-button {
|
|
1832
1831
|
align-items: flex-start;
|
|
1832
|
+
text-wrap: balance;
|
|
1833
1833
|
text-wrap: pretty;
|
|
1834
1834
|
}
|
|
1835
1835
|
|
|
@@ -1891,19 +1891,18 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1891
1891
|
height: 40px;
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
|
-
.
|
|
1895
|
-
.edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1894
|
+
.editor-post-publish-panel {
|
|
1896
1895
|
position: fixed;
|
|
1897
1896
|
z-index: 100001;
|
|
1898
|
-
|
|
1897
|
+
background: #fff;
|
|
1898
|
+
top: 0;
|
|
1899
1899
|
bottom: 0;
|
|
1900
1900
|
right: 0;
|
|
1901
1901
|
left: 0;
|
|
1902
1902
|
overflow: auto;
|
|
1903
1903
|
}
|
|
1904
1904
|
@media (min-width: 782px) {
|
|
1905
|
-
.
|
|
1906
|
-
.edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1905
|
+
.editor-post-publish-panel {
|
|
1907
1906
|
z-index: 99998;
|
|
1908
1907
|
top: 32px;
|
|
1909
1908
|
left: auto;
|
|
@@ -1914,28 +1913,21 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
1914
1913
|
}
|
|
1915
1914
|
}
|
|
1916
1915
|
@media (min-width: 782px) and (prefers-reduced-motion: reduce) {
|
|
1917
|
-
.
|
|
1918
|
-
.edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1916
|
+
.editor-post-publish-panel {
|
|
1919
1917
|
animation-duration: 1ms;
|
|
1920
1918
|
animation-delay: 0s;
|
|
1921
1919
|
}
|
|
1922
1920
|
}
|
|
1923
1921
|
@media (min-width: 782px) {
|
|
1924
|
-
body.is-fullscreen-mode .
|
|
1925
|
-
body.is-fullscreen-mode .edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1922
|
+
body.is-fullscreen-mode .editor-post-publish-panel {
|
|
1926
1923
|
top: 0;
|
|
1927
1924
|
}
|
|
1928
1925
|
}
|
|
1929
1926
|
@media (min-width: 782px) {
|
|
1930
|
-
[role=region]:focus .
|
|
1931
|
-
[role=region]:focus .edit-site-editor__interface-skeleton .editor-post-publish-panel {
|
|
1927
|
+
[role=region]:focus .editor-post-publish-panel {
|
|
1932
1928
|
transform: translateX(0%);
|
|
1933
1929
|
}
|
|
1934
1930
|
}
|
|
1935
|
-
.edit-post-layout .editor-post-publish-panel__header-publish-button,
|
|
1936
|
-
.edit-site-editor__interface-skeleton .editor-post-publish-panel__header-publish-button {
|
|
1937
|
-
justify-content: center;
|
|
1938
|
-
}
|
|
1939
1931
|
|
|
1940
1932
|
@keyframes editor-post-publish-panel__slide-in-animation {
|
|
1941
1933
|
100% {
|
|
@@ -2412,11 +2404,6 @@ textarea.editor-post-text-editor:-ms-input-placeholder {
|
|
|
2412
2404
|
bottom: 0;
|
|
2413
2405
|
}
|
|
2414
2406
|
|
|
2415
|
-
.interface-interface-skeleton__sidebar:focus .edit-post-layout__toggle-sidebar-panel, .interface-interface-skeleton__sidebar:focus-within .edit-post-layout__toggle-sidebar-panel {
|
|
2416
|
-
top: auto;
|
|
2417
|
-
bottom: 0;
|
|
2418
|
-
}
|
|
2419
|
-
|
|
2420
2407
|
.editor-start-page-options__modal-content .block-editor-block-patterns-list {
|
|
2421
2408
|
column-count: 2;
|
|
2422
2409
|
column-gap: 24px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -32,39 +32,39 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
|
-
"@wordpress/a11y": "^4.0.
|
|
36
|
-
"@wordpress/api-fetch": "^7.0.
|
|
37
|
-
"@wordpress/blob": "^4.0.
|
|
38
|
-
"@wordpress/block-editor": "^13.0.
|
|
39
|
-
"@wordpress/blocks": "^13.0.
|
|
40
|
-
"@wordpress/commands": "^1.0.
|
|
41
|
-
"@wordpress/components": "^28.0.
|
|
42
|
-
"@wordpress/compose": "^7.0.
|
|
43
|
-
"@wordpress/core-data": "^7.0.
|
|
44
|
-
"@wordpress/data": "^10.0.
|
|
45
|
-
"@wordpress/date": "^5.0.
|
|
46
|
-
"@wordpress/deprecated": "^4.0.
|
|
47
|
-
"@wordpress/dom": "^4.0.
|
|
48
|
-
"@wordpress/element": "^6.0.
|
|
49
|
-
"@wordpress/hooks": "^4.0.
|
|
50
|
-
"@wordpress/html-entities": "^4.0.
|
|
51
|
-
"@wordpress/i18n": "^5.0.
|
|
52
|
-
"@wordpress/icons": "^10.0.
|
|
53
|
-
"@wordpress/interface": "^6.0.
|
|
54
|
-
"@wordpress/keyboard-shortcuts": "^5.0.
|
|
55
|
-
"@wordpress/keycodes": "^4.0.
|
|
56
|
-
"@wordpress/media-utils": "^5.0.
|
|
57
|
-
"@wordpress/notices": "^5.0.
|
|
58
|
-
"@wordpress/patterns": "^2.0.
|
|
59
|
-
"@wordpress/plugins": "^7.0.
|
|
60
|
-
"@wordpress/preferences": "^4.0.
|
|
61
|
-
"@wordpress/private-apis": "^1.0.
|
|
62
|
-
"@wordpress/reusable-blocks": "^5.0.
|
|
63
|
-
"@wordpress/rich-text": "^7.0.
|
|
64
|
-
"@wordpress/server-side-render": "^5.0.
|
|
65
|
-
"@wordpress/url": "^4.0.
|
|
66
|
-
"@wordpress/warning": "^3.0.
|
|
67
|
-
"@wordpress/wordcount": "^4.0.
|
|
35
|
+
"@wordpress/a11y": "^4.0.1",
|
|
36
|
+
"@wordpress/api-fetch": "^7.0.1",
|
|
37
|
+
"@wordpress/blob": "^4.0.1",
|
|
38
|
+
"@wordpress/block-editor": "^13.0.1",
|
|
39
|
+
"@wordpress/blocks": "^13.0.1",
|
|
40
|
+
"@wordpress/commands": "^1.0.1",
|
|
41
|
+
"@wordpress/components": "^28.0.1",
|
|
42
|
+
"@wordpress/compose": "^7.0.1",
|
|
43
|
+
"@wordpress/core-data": "^7.0.1",
|
|
44
|
+
"@wordpress/data": "^10.0.1",
|
|
45
|
+
"@wordpress/date": "^5.0.1",
|
|
46
|
+
"@wordpress/deprecated": "^4.0.1",
|
|
47
|
+
"@wordpress/dom": "^4.0.1",
|
|
48
|
+
"@wordpress/element": "^6.0.1",
|
|
49
|
+
"@wordpress/hooks": "^4.0.1",
|
|
50
|
+
"@wordpress/html-entities": "^4.0.1",
|
|
51
|
+
"@wordpress/i18n": "^5.0.1",
|
|
52
|
+
"@wordpress/icons": "^10.0.1",
|
|
53
|
+
"@wordpress/interface": "^6.0.1",
|
|
54
|
+
"@wordpress/keyboard-shortcuts": "^5.0.1",
|
|
55
|
+
"@wordpress/keycodes": "^4.0.1",
|
|
56
|
+
"@wordpress/media-utils": "^5.0.1",
|
|
57
|
+
"@wordpress/notices": "^5.0.1",
|
|
58
|
+
"@wordpress/patterns": "^2.0.1",
|
|
59
|
+
"@wordpress/plugins": "^7.0.1",
|
|
60
|
+
"@wordpress/preferences": "^4.0.1",
|
|
61
|
+
"@wordpress/private-apis": "^1.0.1",
|
|
62
|
+
"@wordpress/reusable-blocks": "^5.0.1",
|
|
63
|
+
"@wordpress/rich-text": "^7.0.1",
|
|
64
|
+
"@wordpress/server-side-render": "^5.0.1",
|
|
65
|
+
"@wordpress/url": "^4.0.1",
|
|
66
|
+
"@wordpress/warning": "^3.0.1",
|
|
67
|
+
"@wordpress/wordcount": "^4.0.1",
|
|
68
68
|
"change-case": "^4.1.2",
|
|
69
69
|
"client-zip": "^2.4.5",
|
|
70
70
|
"clsx": "^2.1.1",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "0e973525f7787401b5a544e0727774d52a78639f"
|
|
87
87
|
}
|
|
@@ -19,7 +19,7 @@ import { store as editorStore } from '../../store';
|
|
|
19
19
|
import { unlock } from '../../lock-unlock';
|
|
20
20
|
|
|
21
21
|
function ContentOnlySettingsMenuItems( { clientId, onClose } ) {
|
|
22
|
-
const { entity, onNavigateToEntityRecord } = useSelect(
|
|
22
|
+
const { entity, onNavigateToEntityRecord, canEditTemplates } = useSelect(
|
|
23
23
|
( select ) => {
|
|
24
24
|
const {
|
|
25
25
|
getBlockEditingMode,
|
|
@@ -46,11 +46,12 @@ function ContentOnlySettingsMenuItems( { clientId, onClose } ) {
|
|
|
46
46
|
getBlockAttributes( patternParent ).ref
|
|
47
47
|
);
|
|
48
48
|
} else {
|
|
49
|
-
const {
|
|
50
|
-
select( editorStore );
|
|
51
|
-
const currentPostType = getCurrentPostType();
|
|
49
|
+
const { getCurrentTemplateId } = select( editorStore );
|
|
52
50
|
const templateId = getCurrentTemplateId();
|
|
53
|
-
|
|
51
|
+
const { getContentLockingParent } = unlock(
|
|
52
|
+
select( blockEditorStore )
|
|
53
|
+
);
|
|
54
|
+
if ( ! getContentLockingParent( clientId ) && templateId ) {
|
|
54
55
|
record = select( coreStore ).getEntityRecord(
|
|
55
56
|
'postType',
|
|
56
57
|
'wp_template',
|
|
@@ -58,7 +59,12 @@ function ContentOnlySettingsMenuItems( { clientId, onClose } ) {
|
|
|
58
59
|
);
|
|
59
60
|
}
|
|
60
61
|
}
|
|
62
|
+
const _canEditTemplates = select( coreStore ).canUser(
|
|
63
|
+
'create',
|
|
64
|
+
'templates'
|
|
65
|
+
);
|
|
61
66
|
return {
|
|
67
|
+
canEditTemplates: _canEditTemplates,
|
|
62
68
|
entity: record,
|
|
63
69
|
onNavigateToEntityRecord:
|
|
64
70
|
getSettings().onNavigateToEntityRecord,
|
|
@@ -77,6 +83,19 @@ function ContentOnlySettingsMenuItems( { clientId, onClose } ) {
|
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
const isPattern = entity.type === 'wp_block';
|
|
86
|
+
let helpText = isPattern
|
|
87
|
+
? __(
|
|
88
|
+
'Edit the pattern to move, delete, or make further changes to this block.'
|
|
89
|
+
)
|
|
90
|
+
: __(
|
|
91
|
+
'Edit the template to move, delete, or make further changes to this block.'
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
if ( ! canEditTemplates ) {
|
|
95
|
+
helpText = __(
|
|
96
|
+
'Only users with permissions to edit the template can move or delete this block'
|
|
97
|
+
);
|
|
98
|
+
}
|
|
80
99
|
|
|
81
100
|
return (
|
|
82
101
|
<>
|
|
@@ -88,6 +107,7 @@ function ContentOnlySettingsMenuItems( { clientId, onClose } ) {
|
|
|
88
107
|
postType: entity.type,
|
|
89
108
|
} );
|
|
90
109
|
} }
|
|
110
|
+
disabled={ ! canEditTemplates }
|
|
91
111
|
>
|
|
92
112
|
{ isPattern ? __( 'Edit pattern' ) : __( 'Edit template' ) }
|
|
93
113
|
</MenuItem>
|
|
@@ -97,13 +117,7 @@ function ContentOnlySettingsMenuItems( { clientId, onClose } ) {
|
|
|
97
117
|
as="p"
|
|
98
118
|
className="editor-content-only-settings-menu__description"
|
|
99
119
|
>
|
|
100
|
-
{
|
|
101
|
-
? __(
|
|
102
|
-
'Edit the pattern to move, delete, or make further changes to this block.'
|
|
103
|
-
)
|
|
104
|
-
: __(
|
|
105
|
-
'Edit the template to move, delete, or make further changes to this block.'
|
|
106
|
-
) }
|
|
120
|
+
{ helpText }
|
|
107
121
|
</Text>
|
|
108
122
|
</>
|
|
109
123
|
);
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
.block-editor-block-contextual-toolbar {
|
|
8
8
|
border-bottom: 0;
|
|
9
9
|
height: 100%;
|
|
10
|
+
background: transparent;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
// These rules ensure that icons are always positioned in a way that lines up with the rest of the icons in the toolbar.
|
|
@@ -64,8 +65,9 @@
|
|
|
64
65
|
// Move up a little to prevent the toolbar shift when focus is on the vertical movers.
|
|
65
66
|
@include break-small() {
|
|
66
67
|
&:not(.is-horizontal) .block-editor-block-mover__move-button-container {
|
|
68
|
+
height: $grid-unit-50;
|
|
67
69
|
position: relative;
|
|
68
|
-
top: -
|
|
70
|
+
top: -5px; // Should be -4px, but that causes scrolling when focus lands on the movers, in a 60px header.
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
73
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useSelect } from '@wordpress/data';
|
|
5
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
6
|
+
import { Notice } from '@wordpress/components';
|
|
7
|
+
import { __ } from '@wordpress/i18n';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies
|
|
11
|
+
*/
|
|
12
|
+
import { TEMPLATE_POST_TYPE } from '../../store/constants';
|
|
13
|
+
import EditorInterface from '../editor-interface';
|
|
14
|
+
import { ExperimentalEditorProvider } from '../provider';
|
|
15
|
+
import Sidebar from '../sidebar';
|
|
16
|
+
|
|
17
|
+
function Editor( {
|
|
18
|
+
postType,
|
|
19
|
+
postId,
|
|
20
|
+
templateId,
|
|
21
|
+
settings,
|
|
22
|
+
children,
|
|
23
|
+
|
|
24
|
+
// This could be part of the settings.
|
|
25
|
+
onActionPerformed,
|
|
26
|
+
|
|
27
|
+
// The following abstractions are not ideal but necessary
|
|
28
|
+
// to account for site editor and post editor differences for now.
|
|
29
|
+
className,
|
|
30
|
+
styles,
|
|
31
|
+
customSaveButton,
|
|
32
|
+
forceDisableBlockTools,
|
|
33
|
+
title,
|
|
34
|
+
iframeProps,
|
|
35
|
+
extraSidebarPanels,
|
|
36
|
+
enableRegionNavigation = true,
|
|
37
|
+
} ) {
|
|
38
|
+
const { post, template, hasLoadedPost } = useSelect(
|
|
39
|
+
( select ) => {
|
|
40
|
+
const { getEntityRecord, hasFinishedResolution } =
|
|
41
|
+
select( coreStore );
|
|
42
|
+
return {
|
|
43
|
+
post: getEntityRecord( 'postType', postType, postId ),
|
|
44
|
+
template: templateId
|
|
45
|
+
? getEntityRecord(
|
|
46
|
+
'postType',
|
|
47
|
+
TEMPLATE_POST_TYPE,
|
|
48
|
+
templateId
|
|
49
|
+
)
|
|
50
|
+
: undefined,
|
|
51
|
+
hasLoadedPost: hasFinishedResolution( 'getEntityRecord', [
|
|
52
|
+
'postType',
|
|
53
|
+
postType,
|
|
54
|
+
postId,
|
|
55
|
+
] ),
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
[ postType, postId, templateId ]
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<ExperimentalEditorProvider
|
|
63
|
+
post={ post }
|
|
64
|
+
__unstableTemplate={ template }
|
|
65
|
+
settings={ settings }
|
|
66
|
+
useSubRegistry={ false }
|
|
67
|
+
>
|
|
68
|
+
{ hasLoadedPost && ! post && (
|
|
69
|
+
<Notice status="warning" isDismissible={ false }>
|
|
70
|
+
{ __(
|
|
71
|
+
"You attempted to edit an item that doesn't exist. Perhaps it was deleted?"
|
|
72
|
+
) }
|
|
73
|
+
</Notice>
|
|
74
|
+
) }
|
|
75
|
+
<EditorInterface
|
|
76
|
+
className={ className }
|
|
77
|
+
styles={ styles }
|
|
78
|
+
enableRegionNavigation={ enableRegionNavigation }
|
|
79
|
+
customSaveButton={ customSaveButton }
|
|
80
|
+
forceDisableBlockTools={ forceDisableBlockTools }
|
|
81
|
+
title={ title }
|
|
82
|
+
iframeProps={ iframeProps }
|
|
83
|
+
/>
|
|
84
|
+
<Sidebar
|
|
85
|
+
onActionPerformed={ onActionPerformed }
|
|
86
|
+
extraPanels={ extraSidebarPanels }
|
|
87
|
+
/>
|
|
88
|
+
{ children }
|
|
89
|
+
</ExperimentalEditorProvider>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export default Editor;
|