@wordpress/edit-post 5.0.1 → 5.0.5
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/README.md +2 -5
- package/build/components/header/fullscreen-mode-close/index.js +19 -3
- package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.native.js +10 -3
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/more-menu/index.js +3 -14
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/template-title/index.js +1 -1
- package/build/components/header/template-title/index.js.map +1 -1
- package/build/components/header/writing-menu/index.js +7 -10
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +1 -3
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +1 -8
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/index.js +3 -5
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js +5 -1
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/meta-boxes/index.js +37 -20
- package/build/components/meta-boxes/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +56 -18
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +2 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +1 -0
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar/post-link/index.js +1 -1
- package/build/components/sidebar/post-link/index.js.map +1 -1
- package/build/components/sidebar/template/actions.js +6 -1
- package/build/components/sidebar/template/actions.js.map +1 -1
- package/build/components/sidebar/template/index.js +5 -2
- package/build/components/sidebar/template/index.js.map +1 -1
- package/build/components/sidebar/template-summary/index.js +2 -1
- package/build/components/sidebar/template-summary/index.js.map +1 -1
- package/build/components/visual-editor/index.js +6 -4
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/editor.js +17 -5
- package/build/editor.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js +1 -1
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/index.js +28 -12
- package/build/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item/index.js +6 -7
- package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build/store/actions.js +68 -59
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +0 -9
- package/build/store/defaults.js.map +1 -1
- package/build/store/reducer.js +20 -11
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +24 -10
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/header/fullscreen-mode-close/index.js +19 -4
- package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.native.js +11 -4
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +5 -15
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/template-title/index.js +1 -1
- package/build-module/components/header/template-title/index.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js +7 -8
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -3
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -8
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/index.js +4 -6
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +5 -1
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/meta-boxes/index.js +38 -20
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +57 -20
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +2 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -0
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-link/index.js +1 -1
- package/build-module/components/sidebar/post-link/index.js.map +1 -1
- package/build-module/components/sidebar/template/actions.js +6 -1
- package/build-module/components/sidebar/template/actions.js.map +1 -1
- package/build-module/components/sidebar/template/index.js +5 -2
- package/build-module/components/sidebar/template/index.js.map +1 -1
- package/build-module/components/sidebar/template-summary/index.js +2 -1
- package/build-module/components/sidebar/template-summary/index.js.map +1 -1
- package/build-module/components/visual-editor/index.js +6 -4
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/editor.js +17 -6
- package/build-module/editor.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js +1 -1
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/index.js +18 -5
- package/build-module/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item/index.js +7 -8
- package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
- package/build-module/store/actions.js +66 -59
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +0 -9
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/reducer.js +20 -11
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +20 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +68 -69
- package/build-style/style.css +68 -69
- package/package.json +27 -27
- package/src/components/header/fullscreen-mode-close/index.js +37 -15
- package/src/components/header/fullscreen-mode-close/style.scss +2 -2
- package/src/components/header/header-toolbar/index.native.js +8 -2
- package/src/components/header/more-menu/index.js +8 -13
- package/src/components/header/template-title/index.js +3 -1
- package/src/components/header/writing-menu/index.js +7 -8
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +15 -12
- package/src/components/keyboard-shortcut-help-modal/index.js +1 -3
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +2 -2
- package/src/components/keyboard-shortcuts/index.js +19 -32
- package/src/components/layout/index.js +4 -10
- package/src/components/layout/index.native.js +7 -1
- package/src/components/meta-boxes/index.js +35 -14
- package/src/components/preferences-modal/index.js +93 -30
- package/src/components/preferences-modal/style.scss +6 -56
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +334 -136
- package/src/components/secondary-sidebar/inserter-sidebar.js +1 -0
- package/src/components/secondary-sidebar/list-view-sidebar.js +1 -0
- package/src/components/sidebar/plugin-sidebar/index.js +1 -1
- package/src/components/sidebar/post-link/index.js +5 -1
- package/src/components/sidebar/template/actions.js +6 -1
- package/src/components/sidebar/template/index.js +5 -3
- package/src/components/sidebar/template-summary/index.js +1 -1
- package/src/components/sidebar/template-summary/style.scss +2 -1
- package/src/components/text-editor/style.scss +12 -22
- package/src/components/visual-editor/index.js +16 -10
- package/src/components/visual-editor/style.scss +4 -7
- package/src/components/welcome-guide/style.scss +5 -0
- package/src/editor.js +101 -79
- package/src/hooks/validate-multiple-use/index.js +1 -1
- package/src/index.js +18 -5
- package/src/plugins/welcome-guide-menu-item/index.js +7 -12
- package/src/store/actions.js +99 -80
- package/src/store/defaults.js +0 -9
- package/src/store/reducer.js +17 -10
- package/src/store/selectors.js +27 -7
- package/src/store/test/actions.js +0 -11
- package/src/store/test/reducer.js +0 -12
- package/src/store/test/selectors.js +0 -46
- package/build/components/header/feature-toggle/index.js +0 -76
- package/build/components/header/feature-toggle/index.js.map +0 -1
- package/build-module/components/header/feature-toggle/index.js +0 -60
- package/build-module/components/header/feature-toggle/index.js.map +0 -1
- package/src/components/header/feature-toggle/index.js +0 -61
- package/src/components/header/more-menu/test/__snapshots__/index.js.snap +0 -129
- package/src/components/header/more-menu/test/index.js +0 -17
package/build-style/style.css
CHANGED
|
@@ -122,6 +122,12 @@
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
@media (min-width: 782px) {
|
|
126
|
+
.components-panel__header + .interface-complementary-area-header {
|
|
127
|
+
margin-top: 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
125
131
|
.interface-complementary-area {
|
|
126
132
|
background: #fff;
|
|
127
133
|
color: #1e1e1e;
|
|
@@ -157,12 +163,18 @@
|
|
|
157
163
|
.interface-complementary-area p {
|
|
158
164
|
margin-top: 0;
|
|
159
165
|
}
|
|
160
|
-
.interface-complementary-area h2
|
|
161
|
-
.interface-complementary-area h3 {
|
|
166
|
+
.interface-complementary-area h2 {
|
|
162
167
|
font-size: 13px;
|
|
163
168
|
color: #1e1e1e;
|
|
164
169
|
margin-bottom: 1.5em;
|
|
165
170
|
}
|
|
171
|
+
.interface-complementary-area h3 {
|
|
172
|
+
font-size: 11px;
|
|
173
|
+
text-transform: uppercase;
|
|
174
|
+
font-weight: 500;
|
|
175
|
+
color: #1e1e1e;
|
|
176
|
+
margin-bottom: 1.5em;
|
|
177
|
+
}
|
|
166
178
|
.interface-complementary-area hr {
|
|
167
179
|
border-top: none;
|
|
168
180
|
border-bottom: 1px solid #f0f0f0;
|
|
@@ -383,6 +395,39 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
383
395
|
bottom: 0;
|
|
384
396
|
}
|
|
385
397
|
|
|
398
|
+
.interface-more-menu-dropdown {
|
|
399
|
+
margin-left: -4px;
|
|
400
|
+
}
|
|
401
|
+
.interface-more-menu-dropdown .components-button {
|
|
402
|
+
width: auto;
|
|
403
|
+
padding: 0 2px;
|
|
404
|
+
}
|
|
405
|
+
@media (min-width: 600px) {
|
|
406
|
+
.interface-more-menu-dropdown {
|
|
407
|
+
margin-left: 0;
|
|
408
|
+
}
|
|
409
|
+
.interface-more-menu-dropdown .components-button {
|
|
410
|
+
padding: 0 4px;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.interface-more-menu-dropdown__content .components-popover__content {
|
|
415
|
+
min-width: 280px;
|
|
416
|
+
}
|
|
417
|
+
@media (min-width: 480px) {
|
|
418
|
+
.interface-more-menu-dropdown__content .components-popover__content {
|
|
419
|
+
width: auto;
|
|
420
|
+
max-width: 480px;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
.interface-more-menu-dropdown__content .components-popover__content .components-dropdown-menu__menu {
|
|
424
|
+
padding: 0;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.components-popover.interface-more-menu-dropdown__content {
|
|
428
|
+
z-index: 99998;
|
|
429
|
+
}
|
|
430
|
+
|
|
386
431
|
.interface-pinned-items {
|
|
387
432
|
display: flex;
|
|
388
433
|
}
|
|
@@ -644,7 +689,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
644
689
|
align-items: center;
|
|
645
690
|
align-self: stretch;
|
|
646
691
|
border: none;
|
|
647
|
-
background: #
|
|
692
|
+
background: #1e1e1e;
|
|
648
693
|
color: #fff;
|
|
649
694
|
border-radius: 0;
|
|
650
695
|
height: 61px;
|
|
@@ -668,7 +713,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
668
713
|
bottom: 9px;
|
|
669
714
|
left: 9px;
|
|
670
715
|
border-radius: 4px;
|
|
671
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #
|
|
716
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #1e1e1e;
|
|
672
717
|
}
|
|
673
718
|
}
|
|
674
719
|
@media (min-width: 782px) and (prefers-reduced-motion: reduce) {
|
|
@@ -1278,55 +1323,9 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1278
1323
|
.edit-post-preferences-modal .components-modal__content::before {
|
|
1279
1324
|
content: none;
|
|
1280
1325
|
}
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
padding: 0;
|
|
1285
|
-
max-height: 100%;
|
|
1286
|
-
overflow-y: auto;
|
|
1287
|
-
}
|
|
1288
|
-
.edit-post-preferences-modal .components-navigation > * {
|
|
1289
|
-
padding: 24px 32px;
|
|
1290
|
-
}
|
|
1291
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu {
|
|
1292
|
-
margin: 0;
|
|
1293
|
-
color: #1e1e1e;
|
|
1294
|
-
}
|
|
1295
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item {
|
|
1296
|
-
color: #1e1e1e;
|
|
1297
|
-
}
|
|
1298
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button {
|
|
1299
|
-
color: inherit;
|
|
1300
|
-
padding: 3px 16px;
|
|
1301
|
-
height: 48px;
|
|
1302
|
-
margin: 0 -16px;
|
|
1303
|
-
width: calc(32px + 100%);
|
|
1304
|
-
}
|
|
1305
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button:focus {
|
|
1306
|
-
background: #f0f0f0;
|
|
1307
|
-
font-weight: 500;
|
|
1308
|
-
}
|
|
1309
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item > button:hover {
|
|
1310
|
-
color: var(--wp-admin-theme-color);
|
|
1311
|
-
}
|
|
1312
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__item .components-toggle-control__label {
|
|
1313
|
-
color: inherit;
|
|
1314
|
-
}
|
|
1315
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__menu-title-heading {
|
|
1316
|
-
color: inherit;
|
|
1317
|
-
border-bottom: 1px solid #ddd;
|
|
1318
|
-
padding-left: 0;
|
|
1319
|
-
padding-right: 0;
|
|
1320
|
-
}
|
|
1321
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__back-button {
|
|
1322
|
-
color: inherit;
|
|
1323
|
-
padding-left: 0;
|
|
1324
|
-
}
|
|
1325
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .components-navigation__back-button:hover {
|
|
1326
|
-
color: var(--wp-admin-theme-color);
|
|
1327
|
-
}
|
|
1328
|
-
.edit-post-preferences-modal .components-navigation .components-navigation__menu .edit-post-preferences-modal__custom-fields-confirmation-button {
|
|
1329
|
-
width: auto;
|
|
1326
|
+
.edit-post-preferences-modal .components-navigator-provider {
|
|
1327
|
+
height: 100%;
|
|
1328
|
+
}
|
|
1330
1329
|
}
|
|
1331
1330
|
.edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs {
|
|
1332
1331
|
position: absolute;
|
|
@@ -1359,6 +1358,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1359
1358
|
.edit-post-preferences-modal__section-title {
|
|
1360
1359
|
font-size: 0.9rem;
|
|
1361
1360
|
font-weight: 600;
|
|
1361
|
+
margin-top: 0;
|
|
1362
1362
|
}
|
|
1363
1363
|
.edit-post-preferences-modal__option .components-base-control .components-base-control__field {
|
|
1364
1364
|
align-items: center;
|
|
@@ -1656,8 +1656,9 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1656
1656
|
}
|
|
1657
1657
|
|
|
1658
1658
|
h2.edit-post-template-summary__title {
|
|
1659
|
-
margin: 0;
|
|
1660
1659
|
line-height: 24px;
|
|
1660
|
+
margin: 0 0 4px;
|
|
1661
|
+
font-weight: 500;
|
|
1661
1662
|
}
|
|
1662
1663
|
|
|
1663
1664
|
.edit-post-text-editor {
|
|
@@ -1666,34 +1667,24 @@ h2.edit-post-template-summary__title {
|
|
|
1666
1667
|
background-color: #fff;
|
|
1667
1668
|
flex-grow: 1;
|
|
1668
1669
|
}
|
|
1669
|
-
.edit-post-text-editor .editor-post-title
|
|
1670
|
+
.edit-post-text-editor .editor-post-title {
|
|
1670
1671
|
max-width: none;
|
|
1671
1672
|
line-height: 1.4;
|
|
1672
|
-
}
|
|
1673
|
-
.edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input.editor-post-title__input.editor-post-title__input {
|
|
1674
1673
|
font-family: Menlo, Consolas, monaco, monospace;
|
|
1675
1674
|
font-size: 2.5em;
|
|
1676
1675
|
font-weight: normal;
|
|
1677
|
-
}
|
|
1678
|
-
.edit-post-text-editor .editor-post-title.editor-post-title__block .editor-post-title__input {
|
|
1679
1676
|
border: 1px solid #949494;
|
|
1680
|
-
margin-bottom: -1px;
|
|
1681
1677
|
padding: 16px;
|
|
1682
1678
|
}
|
|
1683
1679
|
@media (min-width: 600px) {
|
|
1684
|
-
.edit-post-text-editor .editor-post-title
|
|
1680
|
+
.edit-post-text-editor .editor-post-title {
|
|
1685
1681
|
padding: 24px;
|
|
1686
1682
|
}
|
|
1687
1683
|
}
|
|
1688
|
-
.edit-post-text-editor .editor-post-title
|
|
1684
|
+
.edit-post-text-editor .editor-post-title:focus {
|
|
1689
1685
|
border-color: var(--wp-admin-theme-color);
|
|
1690
1686
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1691
1687
|
}
|
|
1692
|
-
@media (min-width: 600px) {
|
|
1693
|
-
.edit-post-text-editor .editor-post-title.editor-post-title__block {
|
|
1694
|
-
padding: 0;
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
1688
|
|
|
1698
1689
|
.edit-post-text-editor__body {
|
|
1699
1690
|
width: 100%;
|
|
@@ -1755,11 +1746,13 @@ h2.edit-post-template-summary__title {
|
|
|
1755
1746
|
padding: 6px;
|
|
1756
1747
|
}
|
|
1757
1748
|
|
|
1749
|
+
.edit-post-visual-editor__post-title-wrapper {
|
|
1750
|
+
margin-top: 4rem;
|
|
1751
|
+
margin-bottom: var(--wp--style--block-gap);
|
|
1752
|
+
}
|
|
1758
1753
|
.edit-post-visual-editor__post-title-wrapper .editor-post-title {
|
|
1759
|
-
margin-top: 2em;
|
|
1760
1754
|
margin-left: auto;
|
|
1761
1755
|
margin-right: auto;
|
|
1762
|
-
margin-bottom: 0;
|
|
1763
1756
|
}
|
|
1764
1757
|
|
|
1765
1758
|
.edit-post-visual-editor__exit-template-mode {
|
|
@@ -1787,6 +1780,12 @@ h2.edit-post-template-summary__title {
|
|
|
1787
1780
|
background: #00a0d2;
|
|
1788
1781
|
margin: 0 0 16px;
|
|
1789
1782
|
}
|
|
1783
|
+
.edit-post-welcome-guide__image > img {
|
|
1784
|
+
display: block;
|
|
1785
|
+
max-width: 100%;
|
|
1786
|
+
-o-object-fit: cover;
|
|
1787
|
+
object-fit: cover;
|
|
1788
|
+
}
|
|
1790
1789
|
.edit-post-welcome-guide__heading {
|
|
1791
1790
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
1792
1791
|
font-size: 24px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5",
|
|
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.13.10",
|
|
30
|
-
"@wordpress/a11y": "^3.2.
|
|
31
|
-
"@wordpress/api-fetch": "^5.2.
|
|
32
|
-
"@wordpress/block-editor": "^
|
|
33
|
-
"@wordpress/block-library": "^
|
|
34
|
-
"@wordpress/blocks": "^11.
|
|
35
|
-
"@wordpress/components": "^
|
|
36
|
-
"@wordpress/compose": "^5.0.
|
|
37
|
-
"@wordpress/core-data": "^4.0.
|
|
38
|
-
"@wordpress/data": "^6.
|
|
39
|
-
"@wordpress/data-controls": "^2.2.
|
|
40
|
-
"@wordpress/editor": "^
|
|
41
|
-
"@wordpress/element": "^4.0.
|
|
42
|
-
"@wordpress/hooks": "^3.2.
|
|
43
|
-
"@wordpress/i18n": "^4.2.
|
|
44
|
-
"@wordpress/icons": "^
|
|
45
|
-
"@wordpress/interface": "^4.
|
|
46
|
-
"@wordpress/keyboard-shortcuts": "^3.0.
|
|
47
|
-
"@wordpress/keycodes": "^3.2.
|
|
48
|
-
"@wordpress/media-utils": "^3.0.
|
|
49
|
-
"@wordpress/notices": "^3.2.
|
|
50
|
-
"@wordpress/plugins": "^4.0.
|
|
51
|
-
"@wordpress/primitives": "^3.0.
|
|
52
|
-
"@wordpress/url": "^3.
|
|
53
|
-
"@wordpress/viewport": "^4.0.
|
|
54
|
-
"@wordpress/warning": "^2.2.
|
|
30
|
+
"@wordpress/a11y": "^3.2.3",
|
|
31
|
+
"@wordpress/api-fetch": "^5.2.5",
|
|
32
|
+
"@wordpress/block-editor": "^8.0.0",
|
|
33
|
+
"@wordpress/block-library": "^6.0.3",
|
|
34
|
+
"@wordpress/blocks": "^11.1.3",
|
|
35
|
+
"@wordpress/components": "^19.0.1",
|
|
36
|
+
"@wordpress/compose": "^5.0.5",
|
|
37
|
+
"@wordpress/core-data": "^4.0.5",
|
|
38
|
+
"@wordpress/data": "^6.1.3",
|
|
39
|
+
"@wordpress/data-controls": "^2.2.6",
|
|
40
|
+
"@wordpress/editor": "^12.0.2",
|
|
41
|
+
"@wordpress/element": "^4.0.3",
|
|
42
|
+
"@wordpress/hooks": "^3.2.1",
|
|
43
|
+
"@wordpress/i18n": "^4.2.3",
|
|
44
|
+
"@wordpress/icons": "^6.1.0",
|
|
45
|
+
"@wordpress/interface": "^4.1.3",
|
|
46
|
+
"@wordpress/keyboard-shortcuts": "^3.0.5",
|
|
47
|
+
"@wordpress/keycodes": "^3.2.3",
|
|
48
|
+
"@wordpress/media-utils": "^3.0.4",
|
|
49
|
+
"@wordpress/notices": "^3.2.6",
|
|
50
|
+
"@wordpress/plugins": "^4.0.5",
|
|
51
|
+
"@wordpress/primitives": "^3.0.3",
|
|
52
|
+
"@wordpress/url": "^3.3.0",
|
|
53
|
+
"@wordpress/viewport": "^4.0.5",
|
|
54
|
+
"@wordpress/warning": "^2.2.2",
|
|
55
55
|
"classnames": "^2.3.1",
|
|
56
56
|
"lodash": "^4.17.21",
|
|
57
57
|
"memize": "^1.1.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "393c2b5533837fd637e998d23f0124c081a10df0"
|
|
65
65
|
}
|
|
@@ -7,12 +7,17 @@ import { get } from 'lodash';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { useSelect } from '@wordpress/data';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Button,
|
|
12
|
+
Icon,
|
|
13
|
+
__unstableMotion as motion,
|
|
14
|
+
} from '@wordpress/components';
|
|
11
15
|
import { __ } from '@wordpress/i18n';
|
|
12
16
|
import { addQueryArgs } from '@wordpress/url';
|
|
13
17
|
import { wordpress } from '@wordpress/icons';
|
|
14
18
|
import { store as editorStore } from '@wordpress/editor';
|
|
15
19
|
import { store as coreStore } from '@wordpress/core-data';
|
|
20
|
+
import { useReducedMotion } from '@wordpress/compose';
|
|
16
21
|
|
|
17
22
|
/**
|
|
18
23
|
* Internal dependencies
|
|
@@ -44,15 +49,26 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
|
|
|
44
49
|
[]
|
|
45
50
|
);
|
|
46
51
|
|
|
52
|
+
const disableMotion = useReducedMotion();
|
|
53
|
+
|
|
47
54
|
if ( ! isActive || ! postType ) {
|
|
48
55
|
return null;
|
|
49
56
|
}
|
|
50
57
|
|
|
51
58
|
let buttonIcon = <Icon size="36px" icon={ wordpress } />;
|
|
52
59
|
|
|
60
|
+
const effect = {
|
|
61
|
+
expand: {
|
|
62
|
+
scale: 1.7,
|
|
63
|
+
borderRadius: 0,
|
|
64
|
+
transition: { type: 'tween', duration: '0.2' },
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
53
68
|
if ( siteIconUrl ) {
|
|
54
69
|
buttonIcon = (
|
|
55
|
-
<img
|
|
70
|
+
<motion.img
|
|
71
|
+
variants={ ! disableMotion && effect }
|
|
56
72
|
alt={ __( 'Site Icon' ) }
|
|
57
73
|
className="edit-post-fullscreen-mode-close_site-icon"
|
|
58
74
|
src={ siteIconUrl }
|
|
@@ -70,19 +86,25 @@ function FullscreenModeClose( { showTooltip, icon, href } ) {
|
|
|
70
86
|
}
|
|
71
87
|
|
|
72
88
|
return (
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
href
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
89
|
+
<motion.div whileHover="expand">
|
|
90
|
+
<Button
|
|
91
|
+
className="edit-post-fullscreen-mode-close has-icon"
|
|
92
|
+
href={
|
|
93
|
+
href ??
|
|
94
|
+
addQueryArgs( 'edit.php', {
|
|
95
|
+
post_type: postType.slug,
|
|
96
|
+
} )
|
|
97
|
+
}
|
|
98
|
+
label={ get(
|
|
99
|
+
postType,
|
|
100
|
+
[ 'labels', 'view_items' ],
|
|
101
|
+
__( 'Back' )
|
|
102
|
+
) }
|
|
103
|
+
showTooltip={ showTooltip }
|
|
104
|
+
>
|
|
105
|
+
{ buttonIcon }
|
|
106
|
+
</Button>
|
|
107
|
+
</motion.div>
|
|
86
108
|
);
|
|
87
109
|
}
|
|
88
110
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
align-items: center;
|
|
12
12
|
align-self: stretch;
|
|
13
13
|
border: none;
|
|
14
|
-
background:
|
|
14
|
+
background: $gray-900;
|
|
15
15
|
color: $white;
|
|
16
16
|
border-radius: 0;
|
|
17
17
|
height: $header-height + $border-width;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
bottom: 9px;
|
|
39
39
|
left: 9px;
|
|
40
40
|
border-radius: $radius-block-ui + $border-width + $border-width;
|
|
41
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus)
|
|
41
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) $gray-900;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// Hover color.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { ScrollView, View } from 'react-native';
|
|
4
|
+
import { Platform, ScrollView, View } from 'react-native';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -43,7 +43,13 @@ function HeaderToolbar( {
|
|
|
43
43
|
} ) {
|
|
44
44
|
const scrollViewRef = useRef( null );
|
|
45
45
|
const scrollToStart = () => {
|
|
46
|
-
|
|
46
|
+
// scrollview doesn't seem to automatically adjust to RTL on Android so, scroll to end when Android
|
|
47
|
+
const isAndroid = Platform.OS === 'android';
|
|
48
|
+
if ( isAndroid && isRTL ) {
|
|
49
|
+
scrollViewRef.current.scrollToEnd();
|
|
50
|
+
} else {
|
|
51
|
+
scrollViewRef.current.scrollTo( { x: 0 } );
|
|
52
|
+
}
|
|
47
53
|
};
|
|
48
54
|
const renderHistoryButtons = () => {
|
|
49
55
|
const buttons = [
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { MenuGroup } from '@wordpress/components';
|
|
6
|
+
import {
|
|
7
|
+
ActionItem,
|
|
8
|
+
MoreMenuDropdown,
|
|
9
|
+
PinnedItems,
|
|
10
|
+
} from '@wordpress/interface';
|
|
8
11
|
import { useViewportMatch } from '@wordpress/compose';
|
|
9
12
|
|
|
10
13
|
/**
|
|
@@ -17,26 +20,18 @@ import WritingMenu from '../writing-menu';
|
|
|
17
20
|
|
|
18
21
|
const POPOVER_PROPS = {
|
|
19
22
|
className: 'edit-post-more-menu__content',
|
|
20
|
-
position: 'bottom left',
|
|
21
|
-
};
|
|
22
|
-
const TOGGLE_PROPS = {
|
|
23
|
-
tooltipPosition: 'bottom',
|
|
24
23
|
};
|
|
25
24
|
|
|
26
25
|
const MoreMenu = ( { showIconLabels } ) => {
|
|
27
26
|
const isLargeViewport = useViewportMatch( 'large' );
|
|
28
27
|
|
|
29
28
|
return (
|
|
30
|
-
<
|
|
29
|
+
<MoreMenuDropdown
|
|
31
30
|
className="edit-post-more-menu"
|
|
32
|
-
icon={ moreVertical }
|
|
33
|
-
/* translators: button label text should, if possible, be under 16 characters. */
|
|
34
|
-
label={ __( 'Options' ) }
|
|
35
31
|
popoverProps={ POPOVER_PROPS }
|
|
36
32
|
toggleProps={ {
|
|
37
33
|
showTooltip: ! showIconLabels,
|
|
38
34
|
...( showIconLabels && { variant: 'tertiary' } ),
|
|
39
|
-
...TOGGLE_PROPS,
|
|
40
35
|
} }
|
|
41
36
|
>
|
|
42
37
|
{ ( { onClose } ) => (
|
|
@@ -61,7 +56,7 @@ const MoreMenu = ( { showIconLabels } ) => {
|
|
|
61
56
|
</MenuGroup>
|
|
62
57
|
</>
|
|
63
58
|
) }
|
|
64
|
-
</
|
|
59
|
+
</MoreMenuDropdown>
|
|
65
60
|
);
|
|
66
61
|
};
|
|
67
62
|
|
|
@@ -28,7 +28,9 @@ function TemplateTitle() {
|
|
|
28
28
|
return {
|
|
29
29
|
template: _isEditing ? getEditedPostTemplate() : null,
|
|
30
30
|
isEditing: _isEditing,
|
|
31
|
-
title: getEditedPostAttribute( 'title' )
|
|
31
|
+
title: getEditedPostAttribute( 'title' )
|
|
32
|
+
? getEditedPostAttribute( 'title' )
|
|
33
|
+
: __( 'Untitled' ),
|
|
32
34
|
};
|
|
33
35
|
}, [] );
|
|
34
36
|
|
|
@@ -5,11 +5,7 @@ import { MenuGroup } from '@wordpress/components';
|
|
|
5
5
|
import { __, _x } from '@wordpress/i18n';
|
|
6
6
|
import { useViewportMatch } from '@wordpress/compose';
|
|
7
7
|
import { displayShortcut } from '@wordpress/keycodes';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Internal dependencies
|
|
11
|
-
*/
|
|
12
|
-
import FeatureToggle from '../feature-toggle';
|
|
8
|
+
import { MoreMenuFeatureToggle } from '@wordpress/interface';
|
|
13
9
|
|
|
14
10
|
function WritingMenu() {
|
|
15
11
|
const isLargeViewport = useViewportMatch( 'medium' );
|
|
@@ -19,7 +15,8 @@ function WritingMenu() {
|
|
|
19
15
|
|
|
20
16
|
return (
|
|
21
17
|
<MenuGroup label={ _x( 'View', 'noun' ) }>
|
|
22
|
-
<
|
|
18
|
+
<MoreMenuFeatureToggle
|
|
19
|
+
scope="core/edit-post"
|
|
23
20
|
feature="fixedToolbar"
|
|
24
21
|
label={ __( 'Top toolbar' ) }
|
|
25
22
|
info={ __(
|
|
@@ -28,14 +25,16 @@ function WritingMenu() {
|
|
|
28
25
|
messageActivated={ __( 'Top toolbar activated' ) }
|
|
29
26
|
messageDeactivated={ __( 'Top toolbar deactivated' ) }
|
|
30
27
|
/>
|
|
31
|
-
<
|
|
28
|
+
<MoreMenuFeatureToggle
|
|
29
|
+
scope="core/edit-post"
|
|
32
30
|
feature="focusMode"
|
|
33
31
|
label={ __( 'Spotlight mode' ) }
|
|
34
32
|
info={ __( 'Focus on one block at a time' ) }
|
|
35
33
|
messageActivated={ __( 'Spotlight mode activated' ) }
|
|
36
34
|
messageDeactivated={ __( 'Spotlight mode deactivated' ) }
|
|
37
35
|
/>
|
|
38
|
-
<
|
|
36
|
+
<MoreMenuFeatureToggle
|
|
37
|
+
scope="core/edit-post"
|
|
39
38
|
feature="fullscreenMode"
|
|
40
39
|
label={ __( 'Fullscreen mode' ) }
|
|
41
40
|
info={ __( 'Work without distraction' ) }
|
|
@@ -10,19 +10,22 @@ import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
|
10
10
|
import Shortcut from './shortcut';
|
|
11
11
|
|
|
12
12
|
function DynamicShortcut( { name } ) {
|
|
13
|
-
const { keyCombination, description, aliases } = useSelect(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
const { keyCombination, description, aliases } = useSelect(
|
|
14
|
+
( select ) => {
|
|
15
|
+
const {
|
|
16
|
+
getShortcutKeyCombination,
|
|
17
|
+
getShortcutDescription,
|
|
18
|
+
getShortcutAliases,
|
|
19
|
+
} = select( keyboardShortcutsStore );
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
return {
|
|
22
|
+
keyCombination: getShortcutKeyCombination( name ),
|
|
23
|
+
aliases: getShortcutAliases( name ),
|
|
24
|
+
description: getShortcutDescription( name ),
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
[ name ]
|
|
28
|
+
);
|
|
26
29
|
|
|
27
30
|
if ( ! keyCombination ) {
|
|
28
31
|
return null;
|
|
@@ -91,9 +91,7 @@ const ShortcutCategorySection = ( {
|
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
export function KeyboardShortcutHelpModal( { isModalActive, toggleModal } ) {
|
|
94
|
-
useShortcut( 'core/edit-post/keyboard-shortcuts', toggleModal
|
|
95
|
-
bindGlobal: true,
|
|
96
|
-
} );
|
|
94
|
+
useShortcut( 'core/edit-post/keyboard-shortcuts', toggleModal );
|
|
97
95
|
|
|
98
96
|
if ( ! isModalActive ) {
|
|
99
97
|
return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`KeyboardShortcutHelpModal should match snapshot when the modal is active 1`] = `
|
|
4
|
-
<
|
|
4
|
+
<Modal
|
|
5
5
|
className="edit-post-keyboard-shortcut-help-modal"
|
|
6
6
|
closeLabel="Close"
|
|
7
7
|
onRequestClose={[Function]}
|
|
@@ -80,7 +80,7 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ
|
|
|
80
80
|
}
|
|
81
81
|
title="Text formatting"
|
|
82
82
|
/>
|
|
83
|
-
</
|
|
83
|
+
</Modal>
|
|
84
84
|
`;
|
|
85
85
|
|
|
86
86
|
exports[`KeyboardShortcutHelpModal should match snapshot when the modal is not active 1`] = `""`;
|
|
@@ -131,44 +131,31 @@ function KeyboardShortcuts() {
|
|
|
131
131
|
);
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
|
-
bindGlobal: true,
|
|
135
134
|
isDisabled: isModeToggleDisabled,
|
|
136
135
|
}
|
|
137
136
|
);
|
|
138
137
|
|
|
139
|
-
useShortcut(
|
|
140
|
-
'
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
useShortcut( 'core/edit-post/toggle-fullscreen', () => {
|
|
139
|
+
toggleFeature( 'fullscreenMode' );
|
|
140
|
+
} );
|
|
141
|
+
|
|
142
|
+
useShortcut( 'core/edit-post/toggle-sidebar', ( event ) => {
|
|
143
|
+
// This shortcut has no known clashes, but use preventDefault to prevent any
|
|
144
|
+
// obscure shortcuts from triggering.
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
|
|
147
|
+
if ( isEditorSidebarOpened() ) {
|
|
148
|
+
closeGeneralSidebar();
|
|
149
|
+
} else {
|
|
150
|
+
const sidebarToOpen = getBlockSelectionStart()
|
|
151
|
+
? 'edit-post/block'
|
|
152
|
+
: 'edit-post/document';
|
|
153
|
+
openGeneralSidebar( sidebarToOpen );
|
|
146
154
|
}
|
|
147
|
-
);
|
|
155
|
+
} );
|
|
148
156
|
|
|
149
|
-
useShortcut(
|
|
150
|
-
|
|
151
|
-
( event ) => {
|
|
152
|
-
// This shortcut has no known clashes, but use preventDefault to prevent any
|
|
153
|
-
// obscure shortcuts from triggering.
|
|
154
|
-
event.preventDefault();
|
|
155
|
-
|
|
156
|
-
if ( isEditorSidebarOpened() ) {
|
|
157
|
-
closeGeneralSidebar();
|
|
158
|
-
} else {
|
|
159
|
-
const sidebarToOpen = getBlockSelectionStart()
|
|
160
|
-
? 'edit-post/block'
|
|
161
|
-
: 'edit-post/document';
|
|
162
|
-
openGeneralSidebar( sidebarToOpen );
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
{ bindGlobal: true }
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
useShortcut(
|
|
169
|
-
'core/edit-post/toggle-list-view',
|
|
170
|
-
() => setIsListViewOpened( ! isListViewOpened() ),
|
|
171
|
-
{ bindGlobal: true }
|
|
157
|
+
useShortcut( 'core/edit-post/toggle-list-view', () =>
|
|
158
|
+
setIsListViewOpened( ! isListViewOpened() )
|
|
172
159
|
);
|
|
173
160
|
|
|
174
161
|
return null;
|