@wordpress/edit-site 6.19.0 → 6.19.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/add-new-template/utils.js +1 -1
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +19 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/editor/use-editor-title.js +3 -2
- package/build/components/editor/use-editor-title.js.map +1 -1
- package/build/components/layout/index.js +23 -15
- package/build/components/layout/index.js.map +1 -1
- package/build/components/page-patterns/header.js +1 -1
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +3 -2
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/sidebar/index.js +17 -11
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +1 -0
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/sidebar-navigation-screen-unsupported/index.js +24 -0
- package/build/components/sidebar-navigation-screen-unsupported/index.js.map +1 -0
- package/build/components/site-editor-routes/home.js +22 -5
- package/build/components/site-editor-routes/home.js.map +1 -1
- package/build/components/site-editor-routes/navigation-item.js +21 -5
- package/build/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build/components/site-editor-routes/navigation.js +21 -5
- package/build/components/site-editor-routes/navigation.js.map +1 -1
- package/build/components/site-editor-routes/page-item.js +25 -9
- package/build/components/site-editor-routes/page-item.js.map +1 -1
- package/build/components/site-editor-routes/pages.js +32 -11
- package/build/components/site-editor-routes/pages.js.map +1 -1
- package/build/components/site-editor-routes/pattern-item.js +10 -3
- package/build/components/site-editor-routes/pattern-item.js.map +1 -1
- package/build/components/site-editor-routes/patterns.js +23 -24
- package/build/components/site-editor-routes/patterns.js.map +1 -1
- package/build/components/site-editor-routes/stylebook.js +25 -11
- package/build/components/site-editor-routes/stylebook.js.map +1 -1
- package/build/components/site-editor-routes/template-item.js +21 -5
- package/build/components/site-editor-routes/template-item.js.map +1 -1
- package/build/components/site-editor-routes/templates.js +27 -6
- package/build/components/site-editor-routes/templates.js.map +1 -1
- package/build/components/site-editor-routes/utils.js +20 -0
- package/build/components/site-editor-routes/utils.js.map +1 -0
- package/build/components/site-hub/index.js +37 -15
- package/build/components/site-hub/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +1 -1
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +20 -3
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +3 -2
- package/build-module/components/editor/use-editor-title.js.map +1 -1
- package/build-module/components/layout/index.js +23 -15
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/page-patterns/header.js +1 -1
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +3 -2
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/sidebar/index.js +15 -10
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js +17 -0
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js.map +1 -0
- package/build-module/components/site-editor-routes/home.js +22 -5
- package/build-module/components/site-editor-routes/home.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation-item.js +21 -5
- package/build-module/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation.js +21 -5
- package/build-module/components/site-editor-routes/navigation.js.map +1 -1
- package/build-module/components/site-editor-routes/page-item.js +25 -9
- package/build-module/components/site-editor-routes/page-item.js.map +1 -1
- package/build-module/components/site-editor-routes/pages.js +32 -11
- package/build-module/components/site-editor-routes/pages.js.map +1 -1
- package/build-module/components/site-editor-routes/pattern-item.js +10 -3
- package/build-module/components/site-editor-routes/pattern-item.js.map +1 -1
- package/build-module/components/site-editor-routes/patterns.js +23 -24
- package/build-module/components/site-editor-routes/patterns.js.map +1 -1
- package/build-module/components/site-editor-routes/stylebook.js +25 -11
- package/build-module/components/site-editor-routes/stylebook.js.map +1 -1
- package/build-module/components/site-editor-routes/template-item.js +21 -5
- package/build-module/components/site-editor-routes/template-item.js.map +1 -1
- package/build-module/components/site-editor-routes/templates.js +27 -6
- package/build-module/components/site-editor-routes/templates.js.map +1 -1
- package/build-module/components/site-editor-routes/utils.js +14 -0
- package/build-module/components/site-editor-routes/utils.js.map +1 -0
- package/build-module/components/site-hub/index.js +37 -15
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-style/posts-rtl.css +7 -10
- package/build-style/posts.css +7 -10
- package/build-style/style-rtl.css +7 -10
- package/build-style/style.css +7 -10
- package/package.json +42 -42
- package/src/components/add-new-template/utils.js +1 -2
- package/src/components/app/index.js +18 -3
- package/src/components/editor/use-editor-title.js +6 -6
- package/src/components/layout/index.js +34 -22
- package/src/components/layout/style.scss +2 -0
- package/src/components/page/style.scss +1 -5
- package/src/components/page-patterns/header.js +1 -1
- package/src/components/page-patterns/use-patterns.js +7 -7
- package/src/components/sidebar/index.js +15 -13
- package/src/components/sidebar-navigation-screen-patterns/index.js +1 -0
- package/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +1 -1
- package/src/components/sidebar-navigation-screen-unsupported/index.js +17 -0
- package/src/components/site-editor-routes/home.js +27 -3
- package/src/components/site-editor-routes/navigation-item.js +25 -5
- package/src/components/site-editor-routes/navigation.js +21 -3
- package/src/components/site-editor-routes/page-item.js +29 -9
- package/src/components/site-editor-routes/pages.js +30 -10
- package/src/components/site-editor-routes/pattern-item.js +9 -1
- package/src/components/site-editor-routes/patterns.js +22 -21
- package/src/components/site-editor-routes/stylebook.js +25 -11
- package/src/components/site-editor-routes/template-item.js +25 -3
- package/src/components/site-editor-routes/templates.js +26 -4
- package/src/components/site-editor-routes/utils.js +14 -0
- package/src/components/site-hub/index.js +49 -16
- package/tsconfig.tsbuildinfo +1 -1
package/build-style/posts.css
CHANGED
|
@@ -1289,6 +1289,8 @@ div.dataviews-view-list {
|
|
|
1289
1289
|
position: relative;
|
|
1290
1290
|
width: 100%;
|
|
1291
1291
|
z-index: 2;
|
|
1292
|
+
display: flex;
|
|
1293
|
+
flex-direction: column;
|
|
1292
1294
|
/*
|
|
1293
1295
|
* The SiteHubMobile component is displayed
|
|
1294
1296
|
* for pages that do not have a sidebar,
|
|
@@ -1493,7 +1495,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1493
1495
|
.edit-site-page {
|
|
1494
1496
|
color: #2f2f2f;
|
|
1495
1497
|
background: #fff;
|
|
1496
|
-
height:
|
|
1498
|
+
height: 100%;
|
|
1497
1499
|
/* stylelint-disable-next-line property-no-unknown -- '@container' not globally permitted */
|
|
1498
1500
|
container: edit-site-page/inline-size;
|
|
1499
1501
|
}
|
|
@@ -1502,11 +1504,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1502
1504
|
transition: width ease-out 0.2s;
|
|
1503
1505
|
}
|
|
1504
1506
|
}
|
|
1505
|
-
@media (min-width: 782px) {
|
|
1506
|
-
.edit-site-page {
|
|
1507
|
-
height: 100%;
|
|
1508
|
-
}
|
|
1509
|
-
}
|
|
1510
1507
|
|
|
1511
1508
|
.edit-site-page-header {
|
|
1512
1509
|
padding: 16px 48px;
|
|
@@ -1585,7 +1582,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1585
1582
|
contain: content;
|
|
1586
1583
|
}
|
|
1587
1584
|
|
|
1588
|
-
@keyframes
|
|
1585
|
+
@keyframes _fwjws_slide-from-right {
|
|
1589
1586
|
from {
|
|
1590
1587
|
transform: translateX(50px);
|
|
1591
1588
|
opacity: 0;
|
|
@@ -1595,7 +1592,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1595
1592
|
opacity: 1;
|
|
1596
1593
|
}
|
|
1597
1594
|
}
|
|
1598
|
-
@keyframes
|
|
1595
|
+
@keyframes _fwjws_slide-from-left {
|
|
1599
1596
|
from {
|
|
1600
1597
|
transform: translateX(-50px);
|
|
1601
1598
|
opacity: 0;
|
|
@@ -1651,10 +1648,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1651
1648
|
}
|
|
1652
1649
|
}
|
|
1653
1650
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
1654
|
-
animation-name:
|
|
1651
|
+
animation-name: _fwjws_slide-from-left;
|
|
1655
1652
|
}
|
|
1656
1653
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
1657
|
-
animation-name:
|
|
1654
|
+
animation-name: _fwjws_slide-from-right;
|
|
1658
1655
|
}
|
|
1659
1656
|
|
|
1660
1657
|
.edit-site-site-hub {
|
|
@@ -2114,7 +2114,7 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
2114
2114
|
.edit-site-page {
|
|
2115
2115
|
color: #2f2f2f;
|
|
2116
2116
|
background: #fff;
|
|
2117
|
-
height:
|
|
2117
|
+
height: 100%;
|
|
2118
2118
|
/* stylelint-disable-next-line property-no-unknown -- '@container' not globally permitted */
|
|
2119
2119
|
container: edit-site-page/inline-size;
|
|
2120
2120
|
}
|
|
@@ -2123,11 +2123,6 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
2123
2123
|
transition: width ease-out 0.2s;
|
|
2124
2124
|
}
|
|
2125
2125
|
}
|
|
2126
|
-
@media (min-width: 782px) {
|
|
2127
|
-
.edit-site-page {
|
|
2128
|
-
height: 100%;
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
2126
|
|
|
2132
2127
|
.edit-site-page-header {
|
|
2133
2128
|
padding: 16px 48px;
|
|
@@ -2533,6 +2528,8 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
2533
2528
|
position: relative;
|
|
2534
2529
|
width: 100%;
|
|
2535
2530
|
z-index: 2;
|
|
2531
|
+
display: flex;
|
|
2532
|
+
flex-direction: column;
|
|
2536
2533
|
/*
|
|
2537
2534
|
* The SiteHubMobile component is displayed
|
|
2538
2535
|
* for pages that do not have a sidebar,
|
|
@@ -2770,7 +2767,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2770
2767
|
contain: content;
|
|
2771
2768
|
}
|
|
2772
2769
|
|
|
2773
|
-
@keyframes
|
|
2770
|
+
@keyframes _x51ri_slide-from-right {
|
|
2774
2771
|
from {
|
|
2775
2772
|
transform: translateX(-50px);
|
|
2776
2773
|
opacity: 0;
|
|
@@ -2780,7 +2777,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2780
2777
|
opacity: 1;
|
|
2781
2778
|
}
|
|
2782
2779
|
}
|
|
2783
|
-
@keyframes
|
|
2780
|
+
@keyframes _x51ri_slide-from-left {
|
|
2784
2781
|
from {
|
|
2785
2782
|
transform: translateX(50px);
|
|
2786
2783
|
opacity: 0;
|
|
@@ -2836,10 +2833,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2836
2833
|
}
|
|
2837
2834
|
}
|
|
2838
2835
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
2839
|
-
animation-name:
|
|
2836
|
+
animation-name: _x51ri_slide-from-left;
|
|
2840
2837
|
}
|
|
2841
2838
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
2842
|
-
animation-name:
|
|
2839
|
+
animation-name: _x51ri_slide-from-right;
|
|
2843
2840
|
}
|
|
2844
2841
|
|
|
2845
2842
|
.edit-site-sidebar-button {
|
package/build-style/style.css
CHANGED
|
@@ -2115,7 +2115,7 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
2115
2115
|
.edit-site-page {
|
|
2116
2116
|
color: #2f2f2f;
|
|
2117
2117
|
background: #fff;
|
|
2118
|
-
height:
|
|
2118
|
+
height: 100%;
|
|
2119
2119
|
/* stylelint-disable-next-line property-no-unknown -- '@container' not globally permitted */
|
|
2120
2120
|
container: edit-site-page/inline-size;
|
|
2121
2121
|
}
|
|
@@ -2124,11 +2124,6 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
2124
2124
|
transition: width ease-out 0.2s;
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
|
-
@media (min-width: 782px) {
|
|
2128
|
-
.edit-site-page {
|
|
2129
|
-
height: 100%;
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
2127
|
|
|
2133
2128
|
.edit-site-page-header {
|
|
2134
2129
|
padding: 16px 48px;
|
|
@@ -2534,6 +2529,8 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
2534
2529
|
position: relative;
|
|
2535
2530
|
width: 100%;
|
|
2536
2531
|
z-index: 2;
|
|
2532
|
+
display: flex;
|
|
2533
|
+
flex-direction: column;
|
|
2537
2534
|
/*
|
|
2538
2535
|
* The SiteHubMobile component is displayed
|
|
2539
2536
|
* for pages that do not have a sidebar,
|
|
@@ -2771,7 +2768,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2771
2768
|
contain: content;
|
|
2772
2769
|
}
|
|
2773
2770
|
|
|
2774
|
-
@keyframes
|
|
2771
|
+
@keyframes _x51ri_slide-from-right {
|
|
2775
2772
|
from {
|
|
2776
2773
|
transform: translateX(50px);
|
|
2777
2774
|
opacity: 0;
|
|
@@ -2781,7 +2778,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2781
2778
|
opacity: 1;
|
|
2782
2779
|
}
|
|
2783
2780
|
}
|
|
2784
|
-
@keyframes
|
|
2781
|
+
@keyframes _x51ri_slide-from-left {
|
|
2785
2782
|
from {
|
|
2786
2783
|
transform: translateX(-50px);
|
|
2787
2784
|
opacity: 0;
|
|
@@ -2837,10 +2834,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2837
2834
|
}
|
|
2838
2835
|
}
|
|
2839
2836
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
2840
|
-
animation-name:
|
|
2837
|
+
animation-name: _x51ri_slide-from-left;
|
|
2841
2838
|
}
|
|
2842
2839
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
2843
|
-
animation-name:
|
|
2840
|
+
animation-name: _x51ri_slide-from-right;
|
|
2844
2841
|
}
|
|
2845
2842
|
|
|
2846
2843
|
.edit-site-sidebar-button {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "6.19.
|
|
3
|
+
"version": "6.19.1",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,46 +30,46 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "7.25.7",
|
|
32
32
|
"@react-spring/web": "^9.4.5",
|
|
33
|
-
"@wordpress/a11y": "^4.19.
|
|
34
|
-
"@wordpress/api-fetch": "^7.19.
|
|
35
|
-
"@wordpress/blob": "^4.19.
|
|
36
|
-
"@wordpress/block-editor": "^14.14.
|
|
37
|
-
"@wordpress/block-library": "^9.19.
|
|
38
|
-
"@wordpress/blocks": "^14.8.
|
|
39
|
-
"@wordpress/commands": "^1.19.
|
|
40
|
-
"@wordpress/components": "^29.5.
|
|
41
|
-
"@wordpress/compose": "^7.19.
|
|
42
|
-
"@wordpress/core-commands": "^1.19.
|
|
43
|
-
"@wordpress/core-data": "^7.19.
|
|
44
|
-
"@wordpress/data": "^10.19.
|
|
45
|
-
"@wordpress/dataviews": "^4.15.
|
|
46
|
-
"@wordpress/date": "^5.19.
|
|
47
|
-
"@wordpress/deprecated": "^4.19.
|
|
48
|
-
"@wordpress/dom": "^4.19.
|
|
49
|
-
"@wordpress/editor": "^14.19.
|
|
50
|
-
"@wordpress/element": "^6.19.
|
|
51
|
-
"@wordpress/escape-html": "^3.19.
|
|
52
|
-
"@wordpress/fields": "^0.11.
|
|
53
|
-
"@wordpress/hooks": "^4.19.
|
|
54
|
-
"@wordpress/html-entities": "^4.19.
|
|
55
|
-
"@wordpress/i18n": "^5.19.
|
|
56
|
-
"@wordpress/icons": "^10.19.
|
|
57
|
-
"@wordpress/keyboard-shortcuts": "^5.19.
|
|
58
|
-
"@wordpress/keycodes": "^4.19.
|
|
59
|
-
"@wordpress/media-utils": "^5.19.
|
|
60
|
-
"@wordpress/notices": "^5.19.
|
|
61
|
-
"@wordpress/patterns": "^2.19.
|
|
62
|
-
"@wordpress/plugins": "^7.19.
|
|
63
|
-
"@wordpress/preferences": "^4.19.
|
|
64
|
-
"@wordpress/primitives": "^4.19.
|
|
65
|
-
"@wordpress/private-apis": "^1.19.
|
|
66
|
-
"@wordpress/reusable-blocks": "^5.19.
|
|
67
|
-
"@wordpress/router": "^1.19.
|
|
68
|
-
"@wordpress/style-engine": "^2.19.
|
|
69
|
-
"@wordpress/url": "^4.19.
|
|
70
|
-
"@wordpress/viewport": "^6.19.
|
|
71
|
-
"@wordpress/widgets": "^4.19.
|
|
72
|
-
"@wordpress/wordcount": "^4.19.
|
|
33
|
+
"@wordpress/a11y": "^4.19.1",
|
|
34
|
+
"@wordpress/api-fetch": "^7.19.1",
|
|
35
|
+
"@wordpress/blob": "^4.19.1",
|
|
36
|
+
"@wordpress/block-editor": "^14.14.1",
|
|
37
|
+
"@wordpress/block-library": "^9.19.1",
|
|
38
|
+
"@wordpress/blocks": "^14.8.1",
|
|
39
|
+
"@wordpress/commands": "^1.19.1",
|
|
40
|
+
"@wordpress/components": "^29.5.1",
|
|
41
|
+
"@wordpress/compose": "^7.19.1",
|
|
42
|
+
"@wordpress/core-commands": "^1.19.1",
|
|
43
|
+
"@wordpress/core-data": "^7.19.1",
|
|
44
|
+
"@wordpress/data": "^10.19.1",
|
|
45
|
+
"@wordpress/dataviews": "^4.15.1",
|
|
46
|
+
"@wordpress/date": "^5.19.1",
|
|
47
|
+
"@wordpress/deprecated": "^4.19.1",
|
|
48
|
+
"@wordpress/dom": "^4.19.1",
|
|
49
|
+
"@wordpress/editor": "^14.19.1",
|
|
50
|
+
"@wordpress/element": "^6.19.1",
|
|
51
|
+
"@wordpress/escape-html": "^3.19.1",
|
|
52
|
+
"@wordpress/fields": "^0.11.1",
|
|
53
|
+
"@wordpress/hooks": "^4.19.1",
|
|
54
|
+
"@wordpress/html-entities": "^4.19.1",
|
|
55
|
+
"@wordpress/i18n": "^5.19.1",
|
|
56
|
+
"@wordpress/icons": "^10.19.1",
|
|
57
|
+
"@wordpress/keyboard-shortcuts": "^5.19.1",
|
|
58
|
+
"@wordpress/keycodes": "^4.19.1",
|
|
59
|
+
"@wordpress/media-utils": "^5.19.1",
|
|
60
|
+
"@wordpress/notices": "^5.19.1",
|
|
61
|
+
"@wordpress/patterns": "^2.19.1",
|
|
62
|
+
"@wordpress/plugins": "^7.19.1",
|
|
63
|
+
"@wordpress/preferences": "^4.19.1",
|
|
64
|
+
"@wordpress/primitives": "^4.19.1",
|
|
65
|
+
"@wordpress/private-apis": "^1.19.1",
|
|
66
|
+
"@wordpress/reusable-blocks": "^5.19.1",
|
|
67
|
+
"@wordpress/router": "^1.19.1",
|
|
68
|
+
"@wordpress/style-engine": "^2.19.1",
|
|
69
|
+
"@wordpress/url": "^4.19.1",
|
|
70
|
+
"@wordpress/viewport": "^6.19.1",
|
|
71
|
+
"@wordpress/widgets": "^4.19.1",
|
|
72
|
+
"@wordpress/wordcount": "^4.19.1",
|
|
73
73
|
"change-case": "^4.1.2",
|
|
74
74
|
"clsx": "^2.1.1",
|
|
75
75
|
"colord": "^2.9.2",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"publishConfig": {
|
|
85
85
|
"access": "public"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "6f49fee89f840761f7fedf662713cbd4a71723e9"
|
|
88
88
|
}
|
|
@@ -68,8 +68,7 @@ export const useExistingTemplates = () => {
|
|
|
68
68
|
export const useDefaultTemplateTypes = () => {
|
|
69
69
|
return useSelect(
|
|
70
70
|
( select ) =>
|
|
71
|
-
select( coreStore ).
|
|
72
|
-
?.default_template_types || [],
|
|
71
|
+
select( coreStore ).getCurrentTheme()?.default_template_types || [],
|
|
73
72
|
[]
|
|
74
73
|
);
|
|
75
74
|
};
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useSelect } from '@wordpress/data';
|
|
5
5
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
6
|
-
import { useCallback } from '@wordpress/element';
|
|
6
|
+
import { useCallback, useMemo } from '@wordpress/element';
|
|
7
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Internal dependencies
|
|
@@ -30,9 +31,15 @@ function AppLayout() {
|
|
|
30
31
|
|
|
31
32
|
export default function App() {
|
|
32
33
|
useRegisterSiteEditorRoutes();
|
|
33
|
-
const routes = useSelect( ( select ) => {
|
|
34
|
-
return
|
|
34
|
+
const { routes, currentTheme, editorSettings } = useSelect( ( select ) => {
|
|
35
|
+
return {
|
|
36
|
+
routes: unlock( select( editSiteStore ) ).getRoutes(),
|
|
37
|
+
currentTheme: select( coreStore ).getCurrentTheme(),
|
|
38
|
+
// This is a temp solution until the has_theme_json value is available for the current theme.
|
|
39
|
+
editorSettings: select( editSiteStore ).getSettings(),
|
|
40
|
+
};
|
|
35
41
|
}, [] );
|
|
42
|
+
|
|
36
43
|
const beforeNavigate = useCallback( ( { path, query } ) => {
|
|
37
44
|
if ( ! isPreviewingTheme() ) {
|
|
38
45
|
return { path, query };
|
|
@@ -50,11 +57,19 @@ export default function App() {
|
|
|
50
57
|
};
|
|
51
58
|
}, [] );
|
|
52
59
|
|
|
60
|
+
const matchResolverArgsValue = useMemo(
|
|
61
|
+
() => ( {
|
|
62
|
+
siteData: { currentTheme, editorSettings },
|
|
63
|
+
} ),
|
|
64
|
+
[ currentTheme, editorSettings ]
|
|
65
|
+
);
|
|
66
|
+
|
|
53
67
|
return (
|
|
54
68
|
<RouterProvider
|
|
55
69
|
routes={ routes }
|
|
56
70
|
pathArg="p"
|
|
57
71
|
beforeNavigate={ beforeNavigate }
|
|
72
|
+
matchResolverArgs={ matchResolverArgsValue }
|
|
58
73
|
>
|
|
59
74
|
<AppLayout />
|
|
60
75
|
</RouterProvider>
|
|
@@ -19,8 +19,11 @@ const { getTemplateInfo } = unlock( editorPrivateApis );
|
|
|
19
19
|
function useEditorTitle( postType, postId ) {
|
|
20
20
|
const { title, isLoaded } = useSelect(
|
|
21
21
|
( select ) => {
|
|
22
|
-
const {
|
|
23
|
-
|
|
22
|
+
const {
|
|
23
|
+
getEditedEntityRecord,
|
|
24
|
+
getCurrentTheme,
|
|
25
|
+
hasFinishedResolution,
|
|
26
|
+
} = select( coreStore );
|
|
24
27
|
|
|
25
28
|
if ( ! postId ) {
|
|
26
29
|
return { isLoaded: false };
|
|
@@ -33,10 +36,7 @@ function useEditorTitle( postType, postId ) {
|
|
|
33
36
|
);
|
|
34
37
|
|
|
35
38
|
const { default_template_types: templateTypes = [] } =
|
|
36
|
-
|
|
37
|
-
'root',
|
|
38
|
-
'__unstableBase'
|
|
39
|
-
) ?? {};
|
|
39
|
+
getCurrentTheme() ?? {};
|
|
40
40
|
|
|
41
41
|
const templateInfo = getTemplateInfo( {
|
|
42
42
|
template: _record,
|
|
@@ -44,7 +44,7 @@ import { unlock } from '../../lock-unlock';
|
|
|
44
44
|
import SaveKeyboardShortcut from '../save-keyboard-shortcut';
|
|
45
45
|
import { useIsSiteEditorLoading } from './hooks';
|
|
46
46
|
import useMovingAnimation from './animation';
|
|
47
|
-
import SidebarContent from '../sidebar';
|
|
47
|
+
import { SidebarContent, SidebarNavigationProvider } from '../sidebar';
|
|
48
48
|
import SaveHub from '../save-hub';
|
|
49
49
|
import SavePanel from '../save-panel';
|
|
50
50
|
|
|
@@ -141,16 +141,18 @@ function Layout() {
|
|
|
141
141
|
isResizableFrameOversized
|
|
142
142
|
}
|
|
143
143
|
/>
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
144
|
+
<SidebarNavigationProvider>
|
|
145
|
+
<SidebarContent
|
|
146
|
+
shouldAnimate={
|
|
147
|
+
routeKey !== 'styles'
|
|
148
|
+
}
|
|
149
|
+
routeKey={ routeKey }
|
|
150
|
+
>
|
|
151
|
+
<ErrorBoundary>
|
|
152
|
+
{ areas.sidebar }
|
|
153
|
+
</ErrorBoundary>
|
|
154
|
+
</SidebarContent>
|
|
155
|
+
</SidebarNavigationProvider>
|
|
154
156
|
<SaveHub />
|
|
155
157
|
<SavePanel />
|
|
156
158
|
</motion.div>
|
|
@@ -163,17 +165,27 @@ function Layout() {
|
|
|
163
165
|
|
|
164
166
|
{ isMobileViewport && areas.mobile && (
|
|
165
167
|
<div className="edit-site-layout__mobile">
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
168
|
+
<SidebarNavigationProvider>
|
|
169
|
+
{ canvas !== 'edit' ? (
|
|
170
|
+
<>
|
|
171
|
+
<SiteHubMobile
|
|
172
|
+
ref={ toggleRef }
|
|
173
|
+
isTransparent={
|
|
174
|
+
isResizableFrameOversized
|
|
175
|
+
}
|
|
176
|
+
/>
|
|
177
|
+
<SidebarContent routeKey={ routeKey }>
|
|
178
|
+
<ErrorBoundary>
|
|
179
|
+
{ areas.mobile }
|
|
180
|
+
</ErrorBoundary>
|
|
181
|
+
</SidebarContent>
|
|
182
|
+
</>
|
|
183
|
+
) : (
|
|
184
|
+
<ErrorBoundary>
|
|
185
|
+
{ areas.mobile }
|
|
186
|
+
</ErrorBoundary>
|
|
187
|
+
) }
|
|
188
|
+
</SidebarNavigationProvider>
|
|
177
189
|
</div>
|
|
178
190
|
) }
|
|
179
191
|
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
.edit-site-page {
|
|
2
2
|
color: $gray-800;
|
|
3
3
|
background: $white;
|
|
4
|
-
height:
|
|
4
|
+
height: 100%;
|
|
5
5
|
/* stylelint-disable-next-line property-no-unknown -- '@container' not globally permitted */
|
|
6
6
|
container: edit-site-page / inline-size;
|
|
7
7
|
|
|
8
8
|
@media not (prefers-reduced-motion) {
|
|
9
9
|
transition: width ease-out 0.2s;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
@include break-medium() {
|
|
13
|
-
height: 100%;
|
|
14
|
-
}
|
|
15
11
|
}
|
|
16
12
|
|
|
17
13
|
.edit-site-page-header {
|
|
@@ -32,7 +32,7 @@ export default function PatternsHeader( {
|
|
|
32
32
|
const { patternCategories } = usePatternCategories();
|
|
33
33
|
const templatePartAreas = useSelect(
|
|
34
34
|
( select ) =>
|
|
35
|
-
select( coreStore ).
|
|
35
|
+
select( coreStore ).getCurrentTheme()
|
|
36
36
|
?.default_template_part_areas || [],
|
|
37
37
|
[]
|
|
38
38
|
);
|
|
@@ -25,8 +25,11 @@ const EMPTY_PATTERN_LIST = [];
|
|
|
25
25
|
|
|
26
26
|
const selectTemplateParts = createSelector(
|
|
27
27
|
( select, categoryId, search = '' ) => {
|
|
28
|
-
const {
|
|
29
|
-
|
|
28
|
+
const {
|
|
29
|
+
getEntityRecords,
|
|
30
|
+
getCurrentTheme,
|
|
31
|
+
isResolving: isResolvingSelector,
|
|
32
|
+
} = select( coreStore );
|
|
30
33
|
|
|
31
34
|
const query = { per_page: -1 };
|
|
32
35
|
const templateParts =
|
|
@@ -36,9 +39,7 @@ const selectTemplateParts = createSelector(
|
|
|
36
39
|
// In the case where a custom template part area has been removed we need
|
|
37
40
|
// the current list of areas to cross check against so orphaned template
|
|
38
41
|
// parts can be treated as uncategorized.
|
|
39
|
-
const knownAreas =
|
|
40
|
-
select( coreStore ).getEntityRecord( 'root', '__unstableBase' )
|
|
41
|
-
?.default_template_part_areas || [];
|
|
42
|
+
const knownAreas = getCurrentTheme()?.default_template_part_areas || [];
|
|
42
43
|
|
|
43
44
|
const templatePartAreas = knownAreas.map( ( area ) => area.area );
|
|
44
45
|
|
|
@@ -79,8 +80,7 @@ const selectTemplateParts = createSelector(
|
|
|
79
80
|
TEMPLATE_PART_POST_TYPE,
|
|
80
81
|
{ per_page: -1 },
|
|
81
82
|
] ),
|
|
82
|
-
select( coreStore ).
|
|
83
|
-
?.default_template_part_areas,
|
|
83
|
+
select( coreStore ).getCurrentTheme()?.default_template_part_areas,
|
|
84
84
|
]
|
|
85
85
|
);
|
|
86
86
|
|
|
@@ -87,23 +87,25 @@ function SidebarContentWrapper( { children, shouldAnimate } ) {
|
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export
|
|
91
|
-
routeKey,
|
|
92
|
-
shouldAnimate,
|
|
93
|
-
children,
|
|
94
|
-
} ) {
|
|
90
|
+
export function SidebarNavigationProvider( { children } ) {
|
|
95
91
|
const [ navState ] = useState( createNavState );
|
|
96
92
|
|
|
97
93
|
return (
|
|
98
94
|
<SidebarNavigationContext.Provider value={ navState }>
|
|
99
|
-
|
|
100
|
-
<SidebarContentWrapper
|
|
101
|
-
shouldAnimate={ shouldAnimate }
|
|
102
|
-
key={ routeKey }
|
|
103
|
-
>
|
|
104
|
-
{ children }
|
|
105
|
-
</SidebarContentWrapper>
|
|
106
|
-
</div>
|
|
95
|
+
{ children }
|
|
107
96
|
</SidebarNavigationContext.Provider>
|
|
108
97
|
);
|
|
109
98
|
}
|
|
99
|
+
|
|
100
|
+
export function SidebarContent( { routeKey, shouldAnimate, children } ) {
|
|
101
|
+
return (
|
|
102
|
+
<div className="edit-site-sidebar__content">
|
|
103
|
+
<SidebarContentWrapper
|
|
104
|
+
shouldAnimate={ shouldAnimate }
|
|
105
|
+
key={ routeKey }
|
|
106
|
+
>
|
|
107
|
+
{ children }
|
|
108
|
+
</SidebarContentWrapper>
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
@@ -17,7 +17,7 @@ const useTemplatePartsGroupedByArea = ( items ) => {
|
|
|
17
17
|
|
|
18
18
|
const templatePartAreas = useSelect(
|
|
19
19
|
( select ) =>
|
|
20
|
-
select( coreStore ).
|
|
20
|
+
select( coreStore ).getCurrentTheme()
|
|
21
21
|
?.default_template_part_areas || [],
|
|
22
22
|
[]
|
|
23
23
|
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { Notice, __experimentalSpacer as Spacer } from '@wordpress/components';
|
|
6
|
+
|
|
7
|
+
export default function SidebarNavigationScreenUnsupported() {
|
|
8
|
+
return (
|
|
9
|
+
<Spacer padding={ 3 }>
|
|
10
|
+
<Notice status="warning" isDismissible={ false }>
|
|
11
|
+
{ __(
|
|
12
|
+
'The theme you are currently using does not support this screen.'
|
|
13
|
+
) }
|
|
14
|
+
</Notice>
|
|
15
|
+
</Spacer>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -2,14 +2,38 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';
|
|
5
|
+
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
5
6
|
import Editor from '../editor';
|
|
7
|
+
import { isClassicThemeWithStyleBookSupport } from './utils';
|
|
6
8
|
|
|
7
9
|
export const homeRoute = {
|
|
8
10
|
name: 'home',
|
|
9
11
|
path: '/',
|
|
10
12
|
areas: {
|
|
11
|
-
sidebar
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
sidebar( { siteData } ) {
|
|
14
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
15
|
+
return isBlockTheme ||
|
|
16
|
+
isClassicThemeWithStyleBookSupport( siteData ) ? (
|
|
17
|
+
<SidebarNavigationScreenMain />
|
|
18
|
+
) : (
|
|
19
|
+
<SidebarNavigationScreenUnsupported />
|
|
20
|
+
);
|
|
21
|
+
},
|
|
22
|
+
preview( { siteData } ) {
|
|
23
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
24
|
+
return isBlockTheme ||
|
|
25
|
+
isClassicThemeWithStyleBookSupport( siteData ) ? (
|
|
26
|
+
<Editor isHomeRoute />
|
|
27
|
+
) : undefined;
|
|
28
|
+
},
|
|
29
|
+
mobile( { siteData } ) {
|
|
30
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
31
|
+
return isBlockTheme ||
|
|
32
|
+
isClassicThemeWithStyleBookSupport( siteData ) ? (
|
|
33
|
+
<SidebarNavigationScreenMain />
|
|
34
|
+
) : (
|
|
35
|
+
<SidebarNavigationScreenUnsupported />
|
|
36
|
+
);
|
|
37
|
+
},
|
|
14
38
|
},
|
|
15
39
|
};
|