@wordpress/edit-site 6.0.1 → 6.1.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.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-page/index.js +2 -1
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/app/index.js +17 -1
- package/build/components/app/index.js.map +1 -1
- package/build/components/editor/index.js +3 -10
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +1 -0
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +4 -23
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/shadows-edit-panel.js +1 -0
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build/components/global-styles/variations/variation.js +11 -16
- package/build/components/global-styles/variations/variation.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js +1 -0
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js +1 -0
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/layout/index.js +8 -37
- package/build/components/layout/index.js.map +1 -1
- package/build/components/page/header.js +1 -0
- package/build/components/page/header.js.map +1 -1
- package/build/components/page-patterns/header.js +2 -1
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/posts-app/index.js +50 -0
- package/build/components/posts-app/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build/hooks/commands/use-set-command-context.js +53 -0
- package/build/hooks/commands/use-set-command-context.js.map +1 -0
- package/build/hooks/push-changes-to-global-styles/index.js +2 -2
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +20 -88
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +15 -2
- package/build/index.js.map +1 -1
- package/build/posts.js +34 -0
- package/build/posts.js.map +1 -0
- package/build-module/components/add-new-page/index.js +2 -1
- package/build-module/components/add-new-page/index.js.map +1 -1
- package/build-module/components/app/index.js +17 -1
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/editor/index.js +3 -10
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -0
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +4 -23
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +1 -0
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build-module/components/global-styles/variations/variation.js +11 -16
- package/build-module/components/global-styles/variations/variation.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +1 -0
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js +1 -0
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/layout/index.js +10 -39
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/page/header.js +1 -0
- package/build-module/components/page/header.js.map +1 -1
- package/build-module/components/page-patterns/header.js +2 -1
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/posts-app/index.js +43 -0
- package/build-module/components/posts-app/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build-module/hooks/commands/use-set-command-context.js +46 -0
- package/build-module/hooks/commands/use-set-command-context.js.map +1 -0
- package/build-module/hooks/push-changes-to-global-styles/index.js +2 -2
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +19 -86
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +8 -2
- package/build-module/index.js.map +1 -1
- package/build-module/posts.js +27 -0
- package/build-module/posts.js.map +1 -0
- package/build-style/posts-rtl.css +1707 -0
- package/build-style/posts.css +1707 -0
- package/build-style/style-rtl.css +16 -19
- package/build-style/style.css +16 -19
- package/package.json +41 -41
- package/src/components/add-new-page/index.js +2 -1
- package/src/components/app/index.js +17 -1
- package/src/components/editor/index.js +2 -8
- package/src/components/global-styles/font-library-modal/installed-fonts.js +1 -0
- package/src/components/global-styles/screen-revisions/index.js +4 -24
- package/src/components/global-styles/shadows-edit-panel.js +1 -0
- package/src/components/global-styles/style.scss +1 -7
- package/src/components/global-styles/variations/variation.js +14 -19
- package/src/components/global-styles/variations/variations-color.js +6 -1
- package/src/components/global-styles/variations/variations-typography.js +5 -1
- package/src/components/global-styles-sidebar/style.scss +0 -1
- package/src/components/layout/index.js +24 -70
- package/src/components/page/header.js +1 -0
- package/src/components/page/style.scss +6 -0
- package/src/components/page-patterns/header.js +8 -2
- package/src/components/page-patterns/style.scss +6 -0
- package/src/components/posts-app/index.js +39 -0
- package/src/components/sidebar/style.scss +4 -4
- package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -0
- package/src/hooks/commands/use-set-command-context.js +37 -0
- package/src/hooks/push-changes-to-global-styles/index.js +2 -2
- package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +1 -875
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +29 -117
- package/src/index.js +10 -2
- package/src/posts.js +29 -0
- package/src/posts.scss +46 -0
- package/build/components/block-editor/block-inspector-button.js +0 -57
- package/build/components/block-editor/block-inspector-button.js.map +0 -1
- package/build/components/block-editor/inserter-media-categories.js +0 -183
- package/build/components/block-editor/inserter-media-categories.js.map +0 -1
- package/build/components/template-part-converter/convert-to-regular.js +0 -38
- package/build/components/template-part-converter/convert-to-regular.js.map +0 -1
- package/build/components/template-part-converter/convert-to-template-part.js +0 -84
- package/build/components/template-part-converter/convert-to-template-part.js.map +0 -1
- package/build/components/template-part-converter/index.js +0 -67
- package/build/components/template-part-converter/index.js.map +0 -1
- package/build-module/components/block-editor/block-inspector-button.js +0 -50
- package/build-module/components/block-editor/block-inspector-button.js.map +0 -1
- package/build-module/components/block-editor/inserter-media-categories.js +0 -177
- package/build-module/components/block-editor/inserter-media-categories.js.map +0 -1
- package/build-module/components/template-part-converter/convert-to-regular.js +0 -31
- package/build-module/components/template-part-converter/convert-to-regular.js.map +0 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js +0 -79
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +0 -1
- package/build-module/components/template-part-converter/index.js +0 -59
- package/build-module/components/template-part-converter/index.js.map +0 -1
- package/src/components/block-editor/block-inspector-button.js +0 -60
- package/src/components/block-editor/inserter-media-categories.js +0 -225
- package/src/components/template-part-converter/convert-to-regular.js +0 -32
- package/src/components/template-part-converter/convert-to-template-part.js +0 -78
- package/src/components/template-part-converter/index.js +0 -59
|
@@ -459,8 +459,7 @@
|
|
|
459
459
|
line-height: 16px;
|
|
460
460
|
}
|
|
461
461
|
.dataviews-view-grid .dataviews-view-grid__fields:not(:empty) {
|
|
462
|
-
padding:
|
|
463
|
-
padding-top: 0;
|
|
462
|
+
padding: 0 0 12px;
|
|
464
463
|
}
|
|
465
464
|
.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field {
|
|
466
465
|
align-items: flex-start;
|
|
@@ -653,11 +652,6 @@
|
|
|
653
652
|
margin: 0;
|
|
654
653
|
}
|
|
655
654
|
|
|
656
|
-
.dataviews-filters__custom-menu-radio-item-prefix {
|
|
657
|
-
display: block;
|
|
658
|
-
width: 24px;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
655
|
.dataviews-bulk-edit-button.components-button {
|
|
662
656
|
flex-shrink: 0;
|
|
663
657
|
}
|
|
@@ -1187,11 +1181,6 @@
|
|
|
1187
1181
|
overflow: hidden;
|
|
1188
1182
|
}
|
|
1189
1183
|
|
|
1190
|
-
.edit-site-typography-panel__full-width-control {
|
|
1191
|
-
grid-column: 1/-1;
|
|
1192
|
-
max-width: 100%;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
1184
|
.edit-site-global-styles-screen {
|
|
1196
1185
|
margin: 12px 16px 16px;
|
|
1197
1186
|
}
|
|
@@ -1246,8 +1235,7 @@
|
|
|
1246
1235
|
color: #2f2f2f;
|
|
1247
1236
|
font-weight: 600;
|
|
1248
1237
|
line-height: 1.2;
|
|
1249
|
-
padding: 16px;
|
|
1250
|
-
padding-bottom: 0;
|
|
1238
|
+
padding: 16px 16px 0;
|
|
1251
1239
|
margin: 0;
|
|
1252
1240
|
}
|
|
1253
1241
|
|
|
@@ -1581,7 +1569,6 @@
|
|
|
1581
1569
|
font-weight: 500;
|
|
1582
1570
|
}
|
|
1583
1571
|
|
|
1584
|
-
.edit-site-typography-panel,
|
|
1585
1572
|
.edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings {
|
|
1586
1573
|
border: 0;
|
|
1587
1574
|
}
|
|
@@ -1656,6 +1643,11 @@
|
|
|
1656
1643
|
.edit-site-page-header .edit-site-page-header__page-title {
|
|
1657
1644
|
min-height: 40px;
|
|
1658
1645
|
}
|
|
1646
|
+
.edit-site-page-header .edit-site-page-header__page-title .components-heading {
|
|
1647
|
+
flex-grow: 1;
|
|
1648
|
+
flex-basis: 0;
|
|
1649
|
+
white-space: nowrap;
|
|
1650
|
+
}
|
|
1659
1651
|
.edit-site-page-header .edit-site-page-header__sub-title {
|
|
1660
1652
|
margin-bottom: 8px;
|
|
1661
1653
|
}
|
|
@@ -1823,6 +1815,11 @@
|
|
|
1823
1815
|
.edit-site-page-patterns-dataviews .edit-site-patterns__section-header .edit-site-patterns__title {
|
|
1824
1816
|
min-height: 40px;
|
|
1825
1817
|
}
|
|
1818
|
+
.edit-site-page-patterns-dataviews .edit-site-patterns__section-header .edit-site-patterns__title .components-heading {
|
|
1819
|
+
flex-grow: 1;
|
|
1820
|
+
flex-basis: 0;
|
|
1821
|
+
white-space: nowrap;
|
|
1822
|
+
}
|
|
1826
1823
|
.edit-site-page-patterns-dataviews .edit-site-patterns__section-header .edit-site-patterns__sub-title {
|
|
1827
1824
|
margin-bottom: 8px;
|
|
1828
1825
|
}
|
|
@@ -2346,7 +2343,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2346
2343
|
overflow-y: auto;
|
|
2347
2344
|
}
|
|
2348
2345
|
|
|
2349
|
-
@keyframes
|
|
2346
|
+
@keyframes _w89s1_slide-from-right {
|
|
2350
2347
|
from {
|
|
2351
2348
|
transform: translateX(-50px);
|
|
2352
2349
|
opacity: 0;
|
|
@@ -2356,7 +2353,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2356
2353
|
opacity: 1;
|
|
2357
2354
|
}
|
|
2358
2355
|
}
|
|
2359
|
-
@keyframes
|
|
2356
|
+
@keyframes _w89s1_slide-from-left {
|
|
2360
2357
|
from {
|
|
2361
2358
|
transform: translateX(50px);
|
|
2362
2359
|
opacity: 0;
|
|
@@ -2412,10 +2409,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2412
2409
|
}
|
|
2413
2410
|
}
|
|
2414
2411
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
2415
|
-
animation-name:
|
|
2412
|
+
animation-name: _w89s1_slide-from-left;
|
|
2416
2413
|
}
|
|
2417
2414
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
2418
|
-
animation-name:
|
|
2415
|
+
animation-name: _w89s1_slide-from-right;
|
|
2419
2416
|
}
|
|
2420
2417
|
|
|
2421
2418
|
.edit-site-sidebar-button {
|
package/build-style/style.css
CHANGED
|
@@ -459,8 +459,7 @@
|
|
|
459
459
|
line-height: 16px;
|
|
460
460
|
}
|
|
461
461
|
.dataviews-view-grid .dataviews-view-grid__fields:not(:empty) {
|
|
462
|
-
padding:
|
|
463
|
-
padding-top: 0;
|
|
462
|
+
padding: 0 0 12px;
|
|
464
463
|
}
|
|
465
464
|
.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field {
|
|
466
465
|
align-items: flex-start;
|
|
@@ -653,11 +652,6 @@
|
|
|
653
652
|
margin: 0;
|
|
654
653
|
}
|
|
655
654
|
|
|
656
|
-
.dataviews-filters__custom-menu-radio-item-prefix {
|
|
657
|
-
display: block;
|
|
658
|
-
width: 24px;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
655
|
.dataviews-bulk-edit-button.components-button {
|
|
662
656
|
flex-shrink: 0;
|
|
663
657
|
}
|
|
@@ -1187,11 +1181,6 @@
|
|
|
1187
1181
|
overflow: hidden;
|
|
1188
1182
|
}
|
|
1189
1183
|
|
|
1190
|
-
.edit-site-typography-panel__full-width-control {
|
|
1191
|
-
grid-column: 1/-1;
|
|
1192
|
-
max-width: 100%;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
1184
|
.edit-site-global-styles-screen {
|
|
1196
1185
|
margin: 12px 16px 16px;
|
|
1197
1186
|
}
|
|
@@ -1246,8 +1235,7 @@
|
|
|
1246
1235
|
color: #2f2f2f;
|
|
1247
1236
|
font-weight: 600;
|
|
1248
1237
|
line-height: 1.2;
|
|
1249
|
-
padding: 16px;
|
|
1250
|
-
padding-bottom: 0;
|
|
1238
|
+
padding: 16px 16px 0;
|
|
1251
1239
|
margin: 0;
|
|
1252
1240
|
}
|
|
1253
1241
|
|
|
@@ -1582,7 +1570,6 @@
|
|
|
1582
1570
|
font-weight: 500;
|
|
1583
1571
|
}
|
|
1584
1572
|
|
|
1585
|
-
.edit-site-typography-panel,
|
|
1586
1573
|
.edit-site-global-styles-sidebar .block-editor-panel-color-gradient-settings {
|
|
1587
1574
|
border: 0;
|
|
1588
1575
|
}
|
|
@@ -1657,6 +1644,11 @@
|
|
|
1657
1644
|
.edit-site-page-header .edit-site-page-header__page-title {
|
|
1658
1645
|
min-height: 40px;
|
|
1659
1646
|
}
|
|
1647
|
+
.edit-site-page-header .edit-site-page-header__page-title .components-heading {
|
|
1648
|
+
flex-grow: 1;
|
|
1649
|
+
flex-basis: 0;
|
|
1650
|
+
white-space: nowrap;
|
|
1651
|
+
}
|
|
1660
1652
|
.edit-site-page-header .edit-site-page-header__sub-title {
|
|
1661
1653
|
margin-bottom: 8px;
|
|
1662
1654
|
}
|
|
@@ -1824,6 +1816,11 @@
|
|
|
1824
1816
|
.edit-site-page-patterns-dataviews .edit-site-patterns__section-header .edit-site-patterns__title {
|
|
1825
1817
|
min-height: 40px;
|
|
1826
1818
|
}
|
|
1819
|
+
.edit-site-page-patterns-dataviews .edit-site-patterns__section-header .edit-site-patterns__title .components-heading {
|
|
1820
|
+
flex-grow: 1;
|
|
1821
|
+
flex-basis: 0;
|
|
1822
|
+
white-space: nowrap;
|
|
1823
|
+
}
|
|
1827
1824
|
.edit-site-page-patterns-dataviews .edit-site-patterns__section-header .edit-site-patterns__sub-title {
|
|
1828
1825
|
margin-bottom: 8px;
|
|
1829
1826
|
}
|
|
@@ -2347,7 +2344,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2347
2344
|
overflow-y: auto;
|
|
2348
2345
|
}
|
|
2349
2346
|
|
|
2350
|
-
@keyframes
|
|
2347
|
+
@keyframes _w89s1_slide-from-right {
|
|
2351
2348
|
from {
|
|
2352
2349
|
transform: translateX(50px);
|
|
2353
2350
|
opacity: 0;
|
|
@@ -2357,7 +2354,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2357
2354
|
opacity: 1;
|
|
2358
2355
|
}
|
|
2359
2356
|
}
|
|
2360
|
-
@keyframes
|
|
2357
|
+
@keyframes _w89s1_slide-from-left {
|
|
2361
2358
|
from {
|
|
2362
2359
|
transform: translateX(-50px);
|
|
2363
2360
|
opacity: 0;
|
|
@@ -2413,10 +2410,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2413
2410
|
}
|
|
2414
2411
|
}
|
|
2415
2412
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
2416
|
-
animation-name:
|
|
2413
|
+
animation-name: _w89s1_slide-from-left;
|
|
2417
2414
|
}
|
|
2418
2415
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
2419
|
-
animation-name:
|
|
2416
|
+
animation-name: _w89s1_slide-from-right;
|
|
2420
2417
|
}
|
|
2421
2418
|
|
|
2422
2419
|
.edit-site-sidebar-button {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -29,45 +29,45 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.16.0",
|
|
31
31
|
"@react-spring/web": "^9.4.5",
|
|
32
|
-
"@wordpress/a11y": "^4.0
|
|
33
|
-
"@wordpress/api-fetch": "^7.0
|
|
34
|
-
"@wordpress/blob": "^4.0
|
|
35
|
-
"@wordpress/block-editor": "^13.0
|
|
36
|
-
"@wordpress/block-library": "^9.0
|
|
37
|
-
"@wordpress/blocks": "^13.0
|
|
38
|
-
"@wordpress/commands": "^1.0
|
|
39
|
-
"@wordpress/components": "^28.0
|
|
40
|
-
"@wordpress/compose": "^7.0
|
|
41
|
-
"@wordpress/core-commands": "^1.0
|
|
42
|
-
"@wordpress/core-data": "^7.0
|
|
43
|
-
"@wordpress/data": "^10.0
|
|
44
|
-
"@wordpress/dataviews": "^2.0
|
|
45
|
-
"@wordpress/date": "^5.0
|
|
46
|
-
"@wordpress/deprecated": "^4.0
|
|
47
|
-
"@wordpress/dom": "^4.0
|
|
48
|
-
"@wordpress/editor": "^14.0
|
|
49
|
-
"@wordpress/element": "^6.0
|
|
50
|
-
"@wordpress/escape-html": "^3.0
|
|
51
|
-
"@wordpress/hooks": "^4.0
|
|
52
|
-
"@wordpress/html-entities": "^4.0
|
|
53
|
-
"@wordpress/i18n": "^5.0
|
|
54
|
-
"@wordpress/icons": "^10.0
|
|
55
|
-
"@wordpress/keyboard-shortcuts": "^5.0
|
|
56
|
-
"@wordpress/keycodes": "^4.0
|
|
57
|
-
"@wordpress/notices": "^5.0
|
|
58
|
-
"@wordpress/patterns": "^2.0
|
|
59
|
-
"@wordpress/plugins": "^7.0
|
|
60
|
-
"@wordpress/preferences": "^4.0
|
|
61
|
-
"@wordpress/primitives": "^4.0
|
|
62
|
-
"@wordpress/priority-queue": "^3.0
|
|
63
|
-
"@wordpress/private-apis": "^1.0
|
|
64
|
-
"@wordpress/reusable-blocks": "^5.0
|
|
65
|
-
"@wordpress/router": "^1.0
|
|
66
|
-
"@wordpress/style-engine": "^2.0
|
|
67
|
-
"@wordpress/url": "^4.0
|
|
68
|
-
"@wordpress/viewport": "^6.0
|
|
69
|
-
"@wordpress/widgets": "^4.0
|
|
70
|
-
"@wordpress/wordcount": "^4.0
|
|
32
|
+
"@wordpress/a11y": "^4.1.0",
|
|
33
|
+
"@wordpress/api-fetch": "^7.1.0",
|
|
34
|
+
"@wordpress/blob": "^4.1.0",
|
|
35
|
+
"@wordpress/block-editor": "^13.1.0",
|
|
36
|
+
"@wordpress/block-library": "^9.1.0",
|
|
37
|
+
"@wordpress/blocks": "^13.1.0",
|
|
38
|
+
"@wordpress/commands": "^1.1.0",
|
|
39
|
+
"@wordpress/components": "^28.1.0",
|
|
40
|
+
"@wordpress/compose": "^7.1.0",
|
|
41
|
+
"@wordpress/core-commands": "^1.1.0",
|
|
42
|
+
"@wordpress/core-data": "^7.1.0",
|
|
43
|
+
"@wordpress/data": "^10.1.0",
|
|
44
|
+
"@wordpress/dataviews": "^2.1.0",
|
|
45
|
+
"@wordpress/date": "^5.1.0",
|
|
46
|
+
"@wordpress/deprecated": "^4.1.0",
|
|
47
|
+
"@wordpress/dom": "^4.1.0",
|
|
48
|
+
"@wordpress/editor": "^14.1.0",
|
|
49
|
+
"@wordpress/element": "^6.1.0",
|
|
50
|
+
"@wordpress/escape-html": "^3.1.0",
|
|
51
|
+
"@wordpress/hooks": "^4.1.0",
|
|
52
|
+
"@wordpress/html-entities": "^4.1.0",
|
|
53
|
+
"@wordpress/i18n": "^5.1.0",
|
|
54
|
+
"@wordpress/icons": "^10.1.0",
|
|
55
|
+
"@wordpress/keyboard-shortcuts": "^5.1.0",
|
|
56
|
+
"@wordpress/keycodes": "^4.1.0",
|
|
57
|
+
"@wordpress/notices": "^5.1.0",
|
|
58
|
+
"@wordpress/patterns": "^2.1.0",
|
|
59
|
+
"@wordpress/plugins": "^7.1.0",
|
|
60
|
+
"@wordpress/preferences": "^4.1.0",
|
|
61
|
+
"@wordpress/primitives": "^4.1.0",
|
|
62
|
+
"@wordpress/priority-queue": "^3.1.0",
|
|
63
|
+
"@wordpress/private-apis": "^1.1.0",
|
|
64
|
+
"@wordpress/reusable-blocks": "^5.1.0",
|
|
65
|
+
"@wordpress/router": "^1.1.0",
|
|
66
|
+
"@wordpress/style-engine": "^2.1.0",
|
|
67
|
+
"@wordpress/url": "^4.1.0",
|
|
68
|
+
"@wordpress/viewport": "^6.1.0",
|
|
69
|
+
"@wordpress/widgets": "^4.1.0",
|
|
70
|
+
"@wordpress/wordcount": "^4.1.0",
|
|
71
71
|
"change-case": "^4.1.2",
|
|
72
72
|
"clsx": "^2.1.1",
|
|
73
73
|
"colord": "^2.9.2",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "66d3bf12e67d16deddc4b4a9ec42e1d0bed3479a"
|
|
86
86
|
}
|
|
@@ -13,6 +13,7 @@ import { useDispatch } from '@wordpress/data';
|
|
|
13
13
|
import { useState } from '@wordpress/element';
|
|
14
14
|
import { store as coreStore } from '@wordpress/core-data';
|
|
15
15
|
import { store as noticesStore } from '@wordpress/notices';
|
|
16
|
+
import { decodeEntities } from '@wordpress/html-entities';
|
|
16
17
|
|
|
17
18
|
export default function AddNewPageModal( { onSave, onClose } ) {
|
|
18
19
|
const [ isCreatingPage, setIsCreatingPage ] = useState( false );
|
|
@@ -47,7 +48,7 @@ export default function AddNewPageModal( { onSave, onClose } ) {
|
|
|
47
48
|
sprintf(
|
|
48
49
|
// translators: %s: Title of the created template e.g: "Category".
|
|
49
50
|
__( '"%s" successfully created.' ),
|
|
50
|
-
newPage.title?.rendered || title
|
|
51
|
+
decodeEntities( newPage.title?.rendered || title )
|
|
51
52
|
),
|
|
52
53
|
{
|
|
53
54
|
type: 'snackbar',
|
|
@@ -17,10 +17,26 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
|
17
17
|
*/
|
|
18
18
|
import Layout from '../layout';
|
|
19
19
|
import { unlock } from '../../lock-unlock';
|
|
20
|
+
import { useCommonCommands } from '../../hooks/commands/use-common-commands';
|
|
21
|
+
import { useEditModeCommands } from '../../hooks/commands/use-edit-mode-commands';
|
|
22
|
+
import useInitEditedEntityFromURL from '../sync-state-with-url/use-init-edited-entity-from-url';
|
|
23
|
+
import useLayoutAreas from '../layout/router';
|
|
24
|
+
import useSetCommandContext from '../../hooks/commands/use-set-command-context';
|
|
20
25
|
|
|
21
26
|
const { RouterProvider } = unlock( routerPrivateApis );
|
|
22
27
|
const { GlobalStylesProvider } = unlock( editorPrivateApis );
|
|
23
28
|
|
|
29
|
+
function AppLayout() {
|
|
30
|
+
// This ensures the edited entity id and type are initialized properly.
|
|
31
|
+
useInitEditedEntityFromURL();
|
|
32
|
+
useEditModeCommands();
|
|
33
|
+
useCommonCommands();
|
|
34
|
+
useSetCommandContext();
|
|
35
|
+
const route = useLayoutAreas();
|
|
36
|
+
|
|
37
|
+
return <Layout route={ route } />;
|
|
38
|
+
}
|
|
39
|
+
|
|
24
40
|
export default function App() {
|
|
25
41
|
const { createErrorNotice } = useDispatch( noticesStore );
|
|
26
42
|
|
|
@@ -41,7 +57,7 @@ export default function App() {
|
|
|
41
57
|
<GlobalStylesProvider>
|
|
42
58
|
<UnsavedChangesWarning />
|
|
43
59
|
<RouterProvider>
|
|
44
|
-
<
|
|
60
|
+
<AppLayout />
|
|
45
61
|
<PluginArea onError={ onPluginAreaError } />
|
|
46
62
|
</RouterProvider>
|
|
47
63
|
</GlobalStylesProvider>
|
|
@@ -21,6 +21,7 @@ import { useCallback, useMemo } from '@wordpress/element';
|
|
|
21
21
|
import { store as noticesStore } from '@wordpress/notices';
|
|
22
22
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
23
23
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
24
|
+
import { decodeEntities } from '@wordpress/html-entities';
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Internal dependencies
|
|
@@ -30,7 +31,6 @@ import { store as editSiteStore } from '../../store';
|
|
|
30
31
|
import { GlobalStylesRenderer } from '../global-styles-renderer';
|
|
31
32
|
import CanvasLoader from '../canvas-loader';
|
|
32
33
|
import { unlock } from '../../lock-unlock';
|
|
33
|
-
import TemplatePartConverter from '../template-part-converter';
|
|
34
34
|
import { useSpecificEditorSettings } from '../block-editor/use-site-editor-settings';
|
|
35
35
|
import PluginTemplateSettingPanel from '../plugin-template-setting-panel';
|
|
36
36
|
import GlobalStylesSidebar from '../global-styles-sidebar';
|
|
@@ -55,7 +55,6 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
55
55
|
editedPostId,
|
|
56
56
|
contextPostType,
|
|
57
57
|
contextPostId,
|
|
58
|
-
editorMode,
|
|
59
58
|
canvasMode,
|
|
60
59
|
isEditingPage,
|
|
61
60
|
supportsGlobalStyles,
|
|
@@ -72,7 +71,6 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
72
71
|
} = unlock( select( editSiteStore ) );
|
|
73
72
|
const { get } = select( preferencesStore );
|
|
74
73
|
const { getCurrentTheme } = select( coreDataStore );
|
|
75
|
-
const { getEditorMode } = select( editorStore );
|
|
76
74
|
const _context = getEditedPostContext();
|
|
77
75
|
|
|
78
76
|
// The currently selected entity to display.
|
|
@@ -82,7 +80,6 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
82
80
|
editedPostId: getEditedPostId(),
|
|
83
81
|
contextPostType: _context?.postId ? _context.postType : undefined,
|
|
84
82
|
contextPostId: _context?.postId ? _context.postId : undefined,
|
|
85
|
-
editorMode: getEditorMode(),
|
|
86
83
|
canvasMode: getCanvasMode(),
|
|
87
84
|
isEditingPage: isPage(),
|
|
88
85
|
supportsGlobalStyles: getCurrentTheme()?.is_block_theme,
|
|
@@ -99,9 +96,7 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
99
96
|
const _isPreviewingTheme = isPreviewingTheme();
|
|
100
97
|
const hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();
|
|
101
98
|
const iframeProps = useEditorIframeProps();
|
|
102
|
-
const isViewMode = canvasMode === 'view';
|
|
103
99
|
const isEditMode = canvasMode === 'edit';
|
|
104
|
-
const showVisualEditor = isViewMode || editorMode === 'visual';
|
|
105
100
|
const postWithTemplate = !! contextPostId;
|
|
106
101
|
const loadingProgressId = useInstanceId(
|
|
107
102
|
CanvasLoader,
|
|
@@ -152,7 +147,7 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
152
147
|
sprintf(
|
|
153
148
|
// translators: %s: Title of the created post e.g: "Post 1".
|
|
154
149
|
__( '"%s" successfully created.' ),
|
|
155
|
-
_title
|
|
150
|
+
decodeEntities( _title )
|
|
156
151
|
),
|
|
157
152
|
{
|
|
158
153
|
type: 'snackbar',
|
|
@@ -185,7 +180,6 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
185
180
|
<GlobalStylesRenderer />
|
|
186
181
|
<EditorKeyboardShortcutsRegister />
|
|
187
182
|
{ isEditMode && <BlockKeyboardShortcuts /> }
|
|
188
|
-
{ showVisualEditor && <TemplatePartConverter /> }
|
|
189
183
|
{ ! isReady ? <CanvasLoader id={ loadingProgressId } /> : null }
|
|
190
184
|
{ isEditMode && <WelcomeGuide /> }
|
|
191
185
|
{ isReady && (
|
|
@@ -81,28 +81,11 @@ function ScreenRevisions() {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
const restoreRevision = ( revision ) => {
|
|
84
|
-
setUserConfig( () =>
|
|
85
|
-
styles: revision?.styles,
|
|
86
|
-
settings: revision?.settings,
|
|
87
|
-
_links: revision?._links,
|
|
88
|
-
} ) );
|
|
84
|
+
setUserConfig( () => revision );
|
|
89
85
|
setIsLoadingRevisionWithUnsavedChanges( false );
|
|
90
86
|
onCloseRevisions();
|
|
91
87
|
};
|
|
92
88
|
|
|
93
|
-
const selectRevision = ( revision ) => {
|
|
94
|
-
setCurrentlySelectedRevision( {
|
|
95
|
-
/*
|
|
96
|
-
* The default must be an empty object so that
|
|
97
|
-
* `mergeBaseAndUserConfigs()` can merge them correctly.
|
|
98
|
-
*/
|
|
99
|
-
styles: revision?.styles || {},
|
|
100
|
-
settings: revision?.settings || {},
|
|
101
|
-
_links: revision?._links || {},
|
|
102
|
-
id: revision?.id,
|
|
103
|
-
} );
|
|
104
|
-
};
|
|
105
|
-
|
|
106
89
|
useEffect( () => {
|
|
107
90
|
if (
|
|
108
91
|
! editorCanvasContainerView ||
|
|
@@ -134,11 +117,7 @@ function ScreenRevisions() {
|
|
|
134
117
|
* See: https://github.com/WordPress/gutenberg/issues/55866
|
|
135
118
|
*/
|
|
136
119
|
if ( shouldSelectFirstItem ) {
|
|
137
|
-
setCurrentlySelectedRevision(
|
|
138
|
-
styles: firstRevision?.styles || {},
|
|
139
|
-
settings: firstRevision?.settings || {},
|
|
140
|
-
id: firstRevision?.id,
|
|
141
|
-
} );
|
|
120
|
+
setCurrentlySelectedRevision( firstRevision );
|
|
142
121
|
}
|
|
143
122
|
}, [ shouldSelectFirstItem, firstRevision ] );
|
|
144
123
|
|
|
@@ -186,7 +165,7 @@ function ScreenRevisions() {
|
|
|
186
165
|
/>
|
|
187
166
|
) ) }
|
|
188
167
|
<RevisionsButtons
|
|
189
|
-
onChange={
|
|
168
|
+
onChange={ setCurrentlySelectedRevision }
|
|
190
169
|
selectedRevisionId={ currentlySelectedRevisionId }
|
|
191
170
|
userRevisions={ currentRevisions }
|
|
192
171
|
canApplyRevision={ isLoadButtonEnabled }
|
|
@@ -219,6 +198,7 @@ function ScreenRevisions() {
|
|
|
219
198
|
onCancel={ () =>
|
|
220
199
|
setIsLoadingRevisionWithUnsavedChanges( false )
|
|
221
200
|
}
|
|
201
|
+
size="medium"
|
|
222
202
|
>
|
|
223
203
|
{ __(
|
|
224
204
|
'Are you sure you want to apply this revision? Any unsaved changes will be lost.'
|
|
@@ -23,11 +23,6 @@
|
|
|
23
23
|
overflow: hidden;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.edit-site-typography-panel__full-width-control {
|
|
27
|
-
grid-column: 1 / -1;
|
|
28
|
-
max-width: 100%;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
26
|
.edit-site-global-styles-screen {
|
|
32
27
|
margin: $grid-unit-15 $grid-unit-20 $grid-unit-20;
|
|
33
28
|
}
|
|
@@ -84,8 +79,7 @@
|
|
|
84
79
|
color: $gray-800;
|
|
85
80
|
font-weight: 600;
|
|
86
81
|
line-height: 1.2;
|
|
87
|
-
padding: $grid-unit-20;
|
|
88
|
-
padding-bottom: 0;
|
|
82
|
+
padding: $grid-unit-20 $grid-unit-20 0;
|
|
89
83
|
margin: 0;
|
|
90
84
|
}
|
|
91
85
|
|
|
@@ -15,6 +15,7 @@ import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
|
15
15
|
/**
|
|
16
16
|
* Internal dependencies
|
|
17
17
|
*/
|
|
18
|
+
import { filterObjectByProperty } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
|
|
18
19
|
import { unlock } from '../../../lock-unlock';
|
|
19
20
|
|
|
20
21
|
const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
|
|
@@ -22,30 +23,24 @@ const { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(
|
|
|
22
23
|
blockEditorPrivateApis
|
|
23
24
|
);
|
|
24
25
|
|
|
25
|
-
export default function Variation( { variation, children, isPill } ) {
|
|
26
|
+
export default function Variation( { variation, children, isPill, property } ) {
|
|
26
27
|
const [ isFocused, setIsFocused ] = useState( false );
|
|
27
28
|
const { base, user, setUserConfig } = useContext( GlobalStylesContext );
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
|
|
30
|
+
const context = useMemo( () => {
|
|
31
|
+
let merged = mergeBaseAndUserConfigs( base, variation );
|
|
32
|
+
if ( property ) {
|
|
33
|
+
merged = filterObjectByProperty( merged, property );
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
user: variation,
|
|
35
37
|
base,
|
|
36
|
-
merged
|
|
38
|
+
merged,
|
|
37
39
|
setUserConfig: () => {},
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
);
|
|
40
|
+
};
|
|
41
|
+
}, [ variation, base, property ] );
|
|
41
42
|
|
|
42
|
-
const selectVariation = () =>
|
|
43
|
-
setUserConfig( () => ( {
|
|
44
|
-
settings: variation.settings,
|
|
45
|
-
styles: variation.styles,
|
|
46
|
-
_links: variation._links,
|
|
47
|
-
} ) );
|
|
48
|
-
};
|
|
43
|
+
const selectVariation = () => setUserConfig( variation );
|
|
49
44
|
|
|
50
45
|
const selectOnEnter = ( event ) => {
|
|
51
46
|
if ( event.keyCode === ENTER ) {
|
|
@@ -27,7 +27,12 @@ export default function ColorVariations( { title, gap = 2 } ) {
|
|
|
27
27
|
{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }
|
|
28
28
|
<Grid spacing={ gap }>
|
|
29
29
|
{ colorVariations.map( ( variation, index ) => (
|
|
30
|
-
<Variation
|
|
30
|
+
<Variation
|
|
31
|
+
key={ index }
|
|
32
|
+
variation={ variation }
|
|
33
|
+
isPill
|
|
34
|
+
property="color"
|
|
35
|
+
>
|
|
31
36
|
{ () => <StylesPreviewColors /> }
|
|
32
37
|
</Variation>
|
|
33
38
|
) ) }
|
|
@@ -35,7 +35,11 @@ export default function TypographyVariations( { title, gap = 2 } ) {
|
|
|
35
35
|
{ typographyVariations &&
|
|
36
36
|
typographyVariations.length &&
|
|
37
37
|
typographyVariations.map( ( variation, index ) => (
|
|
38
|
-
<Variation
|
|
38
|
+
<Variation
|
|
39
|
+
key={ index }
|
|
40
|
+
variation={ variation }
|
|
41
|
+
property="typography"
|
|
42
|
+
>
|
|
39
43
|
{ ( isFocused ) => (
|
|
40
44
|
<PreviewIframe
|
|
41
45
|
label={ variation?.title }
|