@wordpress/edit-site 6.47.0 → 6.48.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/CHANGELOG.md +8 -0
- package/build/components/layout/index.cjs +27 -9
- package/build/components/layout/index.cjs.map +3 -3
- package/build/components/post-list/quick-edit-modal.cjs +0 -1
- package/build/components/post-list/quick-edit-modal.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen/index.cjs +0 -1
- package/build/components/sidebar-navigation-screen/index.cjs.map +2 -2
- package/build/components/site-editor-routes/home.cjs +1 -1
- package/build/components/site-editor-routes/home.cjs.map +2 -2
- package/build/components/site-editor-routes/identity.cjs +1 -12
- package/build/components/site-editor-routes/identity.cjs.map +3 -3
- package/build/components/site-editor-routes/navigation-item.cjs +2 -10
- package/build/components/site-editor-routes/navigation-item.cjs.map +3 -3
- package/build/components/site-editor-routes/navigation.cjs +2 -10
- package/build/components/site-editor-routes/navigation.cjs.map +3 -3
- package/build/components/site-editor-routes/notfound.cjs +1 -1
- package/build/components/site-editor-routes/notfound.cjs.map +2 -2
- package/build/components/site-editor-routes/page-item.cjs +1 -6
- package/build/components/site-editor-routes/page-item.cjs.map +2 -2
- package/build/components/site-editor-routes/pages.cjs +6 -9
- package/build/components/site-editor-routes/pages.cjs.map +3 -3
- package/build/components/site-editor-routes/pattern-item.cjs +1 -1
- package/build/components/site-editor-routes/pattern-item.cjs.map +2 -2
- package/build/components/site-editor-routes/patterns.cjs +8 -3
- package/build/components/site-editor-routes/patterns.cjs.map +2 -2
- package/build/components/site-editor-routes/stylebook.cjs +1 -1
- package/build/components/site-editor-routes/stylebook.cjs.map +2 -2
- package/build/components/site-editor-routes/styles.cjs +1 -9
- package/build/components/site-editor-routes/styles.cjs.map +2 -2
- package/build/components/site-editor-routes/template-item.cjs +1 -6
- package/build/components/site-editor-routes/template-item.cjs.map +2 -2
- package/build/components/site-editor-routes/template-part-item.cjs +1 -1
- package/build/components/site-editor-routes/template-part-item.cjs.map +2 -2
- package/build/components/site-editor-routes/templates.cjs +8 -1
- package/build/components/site-editor-routes/templates.cjs.map +2 -2
- package/build/store/selectors.cjs +2 -4
- package/build/store/selectors.cjs.map +2 -2
- package/build-module/components/layout/index.mjs +29 -11
- package/build-module/components/layout/index.mjs.map +2 -2
- package/build-module/components/post-list/quick-edit-modal.mjs +0 -1
- package/build-module/components/post-list/quick-edit-modal.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen/index.mjs +0 -1
- package/build-module/components/sidebar-navigation-screen/index.mjs.map +2 -2
- package/build-module/components/site-editor-routes/home.mjs +1 -1
- package/build-module/components/site-editor-routes/home.mjs.map +2 -2
- package/build-module/components/site-editor-routes/identity.mjs +1 -12
- package/build-module/components/site-editor-routes/identity.mjs.map +2 -2
- package/build-module/components/site-editor-routes/navigation-item.mjs +2 -10
- package/build-module/components/site-editor-routes/navigation-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/navigation.mjs +2 -10
- package/build-module/components/site-editor-routes/navigation.mjs.map +2 -2
- package/build-module/components/site-editor-routes/notfound.mjs +1 -1
- package/build-module/components/site-editor-routes/notfound.mjs.map +2 -2
- package/build-module/components/site-editor-routes/page-item.mjs +2 -7
- package/build-module/components/site-editor-routes/page-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/pages.mjs +6 -9
- package/build-module/components/site-editor-routes/pages.mjs.map +2 -2
- package/build-module/components/site-editor-routes/pattern-item.mjs +1 -1
- package/build-module/components/site-editor-routes/pattern-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/patterns.mjs +8 -3
- package/build-module/components/site-editor-routes/patterns.mjs.map +2 -2
- package/build-module/components/site-editor-routes/stylebook.mjs +1 -1
- package/build-module/components/site-editor-routes/stylebook.mjs.map +2 -2
- package/build-module/components/site-editor-routes/styles.mjs +1 -9
- package/build-module/components/site-editor-routes/styles.mjs.map +2 -2
- package/build-module/components/site-editor-routes/template-item.mjs +2 -7
- package/build-module/components/site-editor-routes/template-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/template-part-item.mjs +1 -1
- package/build-module/components/site-editor-routes/template-part-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/templates.mjs +8 -1
- package/build-module/components/site-editor-routes/templates.mjs.map +2 -2
- package/build-module/store/selectors.mjs +2 -4
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-style/experimental-admin-bar-in-editor-rtl.css +3 -1
- package/build-style/experimental-admin-bar-in-editor.css +3 -1
- package/build-style/style-rtl.css +312 -65
- package/build-style/style.css +312 -66
- package/package.json +51 -51
- package/src/components/layout/index.js +50 -15
- package/src/components/layout/style.scss +19 -11
- package/src/components/page-patterns/style.scss +1 -2
- package/src/components/post-list/quick-edit-modal.js +0 -1
- package/src/components/save-hub/style.scss +4 -4
- package/src/components/sidebar-button/style.scss +2 -4
- package/src/components/sidebar-dataviews/style.scss +0 -1
- package/src/components/sidebar-global-styles/style.scss +1 -2
- package/src/components/sidebar-navigation-item/style.scss +6 -7
- package/src/components/sidebar-navigation-screen/index.js +0 -1
- package/src/components/sidebar-navigation-screen/style.scss +9 -9
- package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +2 -4
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +15 -5
- package/src/components/sidebar-navigation-screen-patterns/style.scss +2 -3
- package/src/components/site-editor-routes/README.md +4 -4
- package/src/components/site-editor-routes/home.js +1 -1
- package/src/components/site-editor-routes/identity.js +1 -20
- package/src/components/site-editor-routes/navigation-item.js +2 -21
- package/src/components/site-editor-routes/navigation.js +2 -21
- package/src/components/site-editor-routes/notfound.js +1 -1
- package/src/components/site-editor-routes/page-item.js +1 -10
- package/src/components/site-editor-routes/pages.js +6 -14
- package/src/components/site-editor-routes/pattern-item.js +1 -1
- package/src/components/site-editor-routes/patterns.js +8 -7
- package/src/components/site-editor-routes/stylebook.js +1 -1
- package/src/components/site-editor-routes/styles.js +1 -12
- package/src/components/site-editor-routes/template-item.js +1 -10
- package/src/components/site-editor-routes/template-part-item.js +1 -1
- package/src/components/site-editor-routes/templates.js +8 -1
- package/src/components/site-hub/style.scss +5 -6
- package/src/experimental-admin-bar-in-editor.scss +3 -1
- package/src/store/selectors.js +3 -7
- package/src/style.scss +1 -2
|
@@ -6,15 +6,15 @@ When `canvasMode` is not `edit`, the areas available to use are:
|
|
|
6
6
|
|
|
7
7
|
| Area | Non-mobile viewport | Mobile viewport |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| `sidebar` | Always rendered. | Only if
|
|
9
|
+
| `sidebar` | Always rendered. | Only if no mobile area (`mobileSidebar`, `mobileContent`, or `preview`) is provided. |
|
|
10
10
|
| `content` | Rendered if provided. | Not rendered. |
|
|
11
11
|
| `preview` | Rendered if provided. | Not rendered. |
|
|
12
12
|
| `edit` | Rendered if provided. | Not rendered. |
|
|
13
|
-
| `
|
|
13
|
+
| `mobileSidebar` | Not rendered | Rendered as full-screen (with the themed sidebar background), if provided and `mobileContent` is not provided. |
|
|
14
|
+
| `mobileContent` | Not rendered | Rendered as full-screen (with the white content background), if provided. |
|
|
14
15
|
|
|
15
16
|
When `canvasMode` is `edit`, the areas available to use are:
|
|
16
17
|
|
|
17
18
|
| Area | Non-mobile viewport | Mobile viewport |
|
|
18
19
|
| --- | --- | --- |
|
|
19
|
-
| `preview` | Rendered as full-screen, if provided. Otherwise, it'll display an empty blank sidebar. |
|
|
20
|
-
| `mobile` | Not rendered | Rendered as full-screen, if provided. Otherwise, it'll display an empty blank sidebar. |
|
|
20
|
+
| `preview` | Rendered as full-screen, if provided. Otherwise, it'll display an empty blank sidebar. | Rendered as full-screen, if provided. Otherwise, it'll display an empty blank sidebar. |
|
|
@@ -1,29 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* Internal dependencies
|
|
8
3
|
*/
|
|
9
4
|
import Editor from '../editor';
|
|
10
|
-
import { unlock } from '../../lock-unlock';
|
|
11
5
|
import SidebarNavigationScreenIdentity from '../sidebar-navigation-screen-identity';
|
|
12
6
|
import SidebarIdentity from '../sidebar-identity';
|
|
13
7
|
|
|
14
|
-
const { useLocation } = unlock( routerPrivateApis );
|
|
15
|
-
|
|
16
|
-
function MobileIdentityView() {
|
|
17
|
-
const { query = {} } = useLocation();
|
|
18
|
-
const { canvas } = query;
|
|
19
|
-
|
|
20
|
-
if ( canvas === 'edit' ) {
|
|
21
|
-
return <Editor />;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return <SidebarIdentity />;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
8
|
export const identityRoute = {
|
|
28
9
|
name: 'identity',
|
|
29
10
|
path: '/identity',
|
|
@@ -31,7 +12,7 @@ export const identityRoute = {
|
|
|
31
12
|
sidebar: <SidebarNavigationScreenIdentity />,
|
|
32
13
|
content: <SidebarIdentity />,
|
|
33
14
|
preview: <Editor />,
|
|
34
|
-
|
|
15
|
+
mobileContent: <SidebarIdentity />,
|
|
35
16
|
},
|
|
36
17
|
widths: {
|
|
37
18
|
content: 380,
|
|
@@ -1,30 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* Internal dependencies
|
|
8
3
|
*/
|
|
9
4
|
import Editor from '../editor';
|
|
10
5
|
import SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';
|
|
11
6
|
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
12
|
-
import { unlock } from '../../lock-unlock';
|
|
13
7
|
import { isThemeDataLoaded } from './utils';
|
|
14
8
|
|
|
15
|
-
const { useLocation } = unlock( routerPrivateApis );
|
|
16
|
-
|
|
17
|
-
function MobileNavigationItemView() {
|
|
18
|
-
const { query = {} } = useLocation();
|
|
19
|
-
const { canvas = 'view' } = query;
|
|
20
|
-
|
|
21
|
-
return canvas === 'edit' ? (
|
|
22
|
-
<Editor />
|
|
23
|
-
) : (
|
|
24
|
-
<SidebarNavigationScreenNavigationMenu backPath="/navigation" />
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
9
|
export const navigationItemRoute = {
|
|
29
10
|
name: 'navigation-item',
|
|
30
11
|
path: '/wp_navigation/:postId',
|
|
@@ -49,12 +30,12 @@ export const navigationItemRoute = {
|
|
|
49
30
|
<SidebarNavigationScreenUnsupported />
|
|
50
31
|
);
|
|
51
32
|
},
|
|
52
|
-
|
|
33
|
+
mobileSidebar( { siteData } ) {
|
|
53
34
|
if ( ! isThemeDataLoaded( siteData ) ) {
|
|
54
35
|
return <></>;
|
|
55
36
|
}
|
|
56
37
|
return siteData.currentTheme.is_block_theme ? (
|
|
57
|
-
<
|
|
38
|
+
<SidebarNavigationScreenNavigationMenu backPath="/navigation" />
|
|
58
39
|
) : (
|
|
59
40
|
<SidebarNavigationScreenUnsupported />
|
|
60
41
|
);
|
|
@@ -1,30 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* Internal dependencies
|
|
8
3
|
*/
|
|
9
4
|
import Editor from '../editor';
|
|
10
5
|
import SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';
|
|
11
6
|
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
12
|
-
import { unlock } from '../../lock-unlock';
|
|
13
7
|
import { isThemeDataLoaded } from './utils';
|
|
14
8
|
|
|
15
|
-
const { useLocation } = unlock( routerPrivateApis );
|
|
16
|
-
|
|
17
|
-
function MobileNavigationView() {
|
|
18
|
-
const { query = {} } = useLocation();
|
|
19
|
-
const { canvas = 'view' } = query;
|
|
20
|
-
|
|
21
|
-
return canvas === 'edit' ? (
|
|
22
|
-
<Editor />
|
|
23
|
-
) : (
|
|
24
|
-
<SidebarNavigationScreenNavigationMenus backPath="/" />
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
9
|
export const navigationRoute = {
|
|
29
10
|
name: 'navigation',
|
|
30
11
|
path: '/navigation',
|
|
@@ -43,12 +24,12 @@ export const navigationRoute = {
|
|
|
43
24
|
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
44
25
|
return isBlockTheme ? <Editor /> : undefined;
|
|
45
26
|
},
|
|
46
|
-
|
|
27
|
+
mobileSidebar( { siteData } ) {
|
|
47
28
|
if ( ! isThemeDataLoaded( siteData ) ) {
|
|
48
29
|
return <></>;
|
|
49
30
|
}
|
|
50
31
|
return siteData.currentTheme.is_block_theme ? (
|
|
51
|
-
<
|
|
32
|
+
<SidebarNavigationScreenNavigationMenus backPath="/" />
|
|
52
33
|
) : (
|
|
53
34
|
<SidebarNavigationScreenUnsupported />
|
|
54
35
|
);
|
|
@@ -30,16 +30,7 @@ export const pageItemRoute = {
|
|
|
30
30
|
<SidebarNavigationScreenUnsupported />
|
|
31
31
|
);
|
|
32
32
|
},
|
|
33
|
-
mobile
|
|
34
|
-
if ( ! isThemeDataLoaded( siteData ) ) {
|
|
35
|
-
return <></>;
|
|
36
|
-
}
|
|
37
|
-
return siteData.currentTheme.is_block_theme ? (
|
|
38
|
-
<Editor />
|
|
39
|
-
) : (
|
|
40
|
-
<SidebarNavigationScreenUnsupported />
|
|
41
|
-
);
|
|
42
|
-
},
|
|
33
|
+
// Also rendered on mobile, where this route is only reached at canvas=edit.
|
|
43
34
|
preview( { siteData } ) {
|
|
44
35
|
if ( ! isThemeDataLoaded( siteData ) ) {
|
|
45
36
|
return null;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
5
4
|
import { __ } from '@wordpress/i18n';
|
|
6
5
|
import { resolveSelect } from '@wordpress/data';
|
|
7
6
|
import { store as coreStore } from '@wordpress/core-data';
|
|
@@ -18,8 +17,6 @@ import PostList from '../post-list';
|
|
|
18
17
|
import { unlock } from '../../lock-unlock';
|
|
19
18
|
import { isThemeDataLoaded } from './utils';
|
|
20
19
|
|
|
21
|
-
const { useLocation } = unlock( routerPrivateApis );
|
|
22
|
-
|
|
23
20
|
async function isListView( query ) {
|
|
24
21
|
const { activeView = 'all' } = query;
|
|
25
22
|
const config = await unlock( resolveSelect( coreStore ) ).getViewConfig(
|
|
@@ -40,13 +37,6 @@ async function isListView( query ) {
|
|
|
40
37
|
return view.type === 'list';
|
|
41
38
|
}
|
|
42
39
|
|
|
43
|
-
function MobilePagesView() {
|
|
44
|
-
const { query = {} } = useLocation();
|
|
45
|
-
const { canvas = 'view' } = query;
|
|
46
|
-
|
|
47
|
-
return canvas === 'edit' ? <Editor /> : <PostList postType="page" />;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
40
|
export const pagesRoute = {
|
|
51
41
|
name: 'pages',
|
|
52
42
|
path: '/page',
|
|
@@ -77,16 +67,18 @@ export const pagesRoute = {
|
|
|
77
67
|
const isList = await isListView( query );
|
|
78
68
|
return isList ? <Editor /> : undefined;
|
|
79
69
|
},
|
|
80
|
-
|
|
70
|
+
mobileSidebar( { siteData } ) {
|
|
81
71
|
if ( ! isThemeDataLoaded( siteData ) ) {
|
|
82
72
|
return <></>;
|
|
83
73
|
}
|
|
84
|
-
return siteData.currentTheme.is_block_theme ? (
|
|
85
|
-
<MobilePagesView />
|
|
86
|
-
) : (
|
|
74
|
+
return siteData.currentTheme.is_block_theme ? undefined : (
|
|
87
75
|
<SidebarNavigationScreenUnsupported />
|
|
88
76
|
);
|
|
89
77
|
},
|
|
78
|
+
mobileContent( { siteData } ) {
|
|
79
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
80
|
+
return isBlockTheme ? <PostList postType="page" /> : undefined;
|
|
81
|
+
},
|
|
90
82
|
},
|
|
91
83
|
widths: {
|
|
92
84
|
async content( { query } ) {
|
|
@@ -17,7 +17,7 @@ export const patternItemRoute = {
|
|
|
17
17
|
: undefined;
|
|
18
18
|
return <SidebarNavigationScreenPatterns backPath={ backPath } />;
|
|
19
19
|
},
|
|
20
|
-
mobile
|
|
20
|
+
// Also rendered on mobile, where this route is only reached at canvas=edit.
|
|
21
21
|
preview: <Editor />,
|
|
22
22
|
},
|
|
23
23
|
};
|
|
@@ -18,18 +18,19 @@ export const patternsRoute = {
|
|
|
18
18
|
return <SidebarNavigationScreenPatterns backPath={ backPath } />;
|
|
19
19
|
},
|
|
20
20
|
content: <PagePatterns />,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
mobileSidebar( { siteData, query } ) {
|
|
22
|
+
if ( query.categoryId ) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
23
25
|
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
24
26
|
const backPath =
|
|
25
27
|
isBlockTheme || isClassicThemeWithStyleBookSupport( siteData )
|
|
26
28
|
? '/'
|
|
27
29
|
: undefined;
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
);
|
|
30
|
+
return <SidebarNavigationScreenPatterns backPath={ backPath } />;
|
|
31
|
+
},
|
|
32
|
+
mobileContent( { query } ) {
|
|
33
|
+
return query.categoryId ? <PagePatterns /> : undefined;
|
|
33
34
|
},
|
|
34
35
|
},
|
|
35
36
|
};
|
|
@@ -16,17 +16,6 @@ import SidebarGlobalStyles from '../sidebar-global-styles';
|
|
|
16
16
|
const { useLocation, useHistory } = unlock( routerPrivateApis );
|
|
17
17
|
const { StyleBookPreview } = unlock( editorPrivateApis );
|
|
18
18
|
|
|
19
|
-
function MobileGlobalStylesUI() {
|
|
20
|
-
const { query = {} } = useLocation();
|
|
21
|
-
const { canvas } = query;
|
|
22
|
-
|
|
23
|
-
if ( canvas === 'edit' ) {
|
|
24
|
-
return <Editor />;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return <SidebarGlobalStyles />;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
19
|
function StylesPreviewArea() {
|
|
31
20
|
const { path, query } = useLocation();
|
|
32
21
|
const history = useHistory();
|
|
@@ -61,7 +50,7 @@ export const stylesRoute = {
|
|
|
61
50
|
content: <SidebarGlobalStyles />,
|
|
62
51
|
sidebar: <SidebarNavigationScreenGlobalStyles backPath="/" />,
|
|
63
52
|
preview: <StylesPreviewArea />,
|
|
64
|
-
|
|
53
|
+
mobileContent: <SidebarGlobalStyles />,
|
|
65
54
|
},
|
|
66
55
|
widths: {
|
|
67
56
|
content: 380,
|
|
@@ -17,16 +17,7 @@ const areas = {
|
|
|
17
17
|
<SidebarNavigationScreenUnsupported />
|
|
18
18
|
);
|
|
19
19
|
},
|
|
20
|
-
mobile
|
|
21
|
-
if ( ! isThemeDataLoaded( siteData ) ) {
|
|
22
|
-
return <></>;
|
|
23
|
-
}
|
|
24
|
-
return siteData.currentTheme.is_block_theme ? (
|
|
25
|
-
<Editor />
|
|
26
|
-
) : (
|
|
27
|
-
<SidebarNavigationScreenUnsupported />
|
|
28
|
-
);
|
|
29
|
-
},
|
|
20
|
+
// Also rendered on mobile, where this route is only reached at canvas=edit.
|
|
30
21
|
preview( { siteData } ) {
|
|
31
22
|
if ( ! isThemeDataLoaded( siteData ) ) {
|
|
32
23
|
return null;
|
|
@@ -9,7 +9,7 @@ export const templatePartItemRoute = {
|
|
|
9
9
|
path: '/wp_template_part/*postId',
|
|
10
10
|
areas: {
|
|
11
11
|
sidebar: <SidebarNavigationScreenPatterns backPath="/" />,
|
|
12
|
-
mobile
|
|
12
|
+
// Also rendered on mobile, where this route is only reached at canvas=edit.
|
|
13
13
|
preview: <Editor />,
|
|
14
14
|
},
|
|
15
15
|
};
|
|
@@ -70,13 +70,20 @@ export const templatesRoute = {
|
|
|
70
70
|
const isListView = await isTemplateListView( query );
|
|
71
71
|
return isListView ? <Editor /> : undefined;
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
mobileSidebar( { siteData } ) {
|
|
74
74
|
if ( ! isThemeDataLoaded( siteData ) ) {
|
|
75
75
|
return <></>;
|
|
76
76
|
}
|
|
77
77
|
if ( ! siteData.currentTheme.is_block_theme ) {
|
|
78
78
|
return <SidebarNavigationScreenUnsupported />;
|
|
79
79
|
}
|
|
80
|
+
return undefined;
|
|
81
|
+
},
|
|
82
|
+
mobileContent( { siteData } ) {
|
|
83
|
+
const isBlockTheme = siteData.currentTheme?.is_block_theme;
|
|
84
|
+
if ( ! isBlockTheme ) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
80
87
|
// Check if the template activation experiment is enabled.
|
|
81
88
|
const isTemplateActivateEnabled =
|
|
82
89
|
typeof window !== 'undefined' &&
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use "@wordpress/base-styles/colors" as *;
|
|
2
1
|
@use "@wordpress/base-styles/variables" as *;
|
|
3
2
|
|
|
4
3
|
.edit-site-site-hub {
|
|
@@ -25,7 +24,7 @@
|
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
.edit-site-site-hub__title .components-button {
|
|
28
|
-
color:
|
|
27
|
+
color: var(--wpds-color-fg-interactive-neutral);
|
|
29
28
|
display: block;
|
|
30
29
|
flex-grow: 1;
|
|
31
30
|
font-size: 15px;
|
|
@@ -44,7 +43,7 @@
|
|
|
44
43
|
&:hover,
|
|
45
44
|
&:focus,
|
|
46
45
|
&:active {
|
|
47
|
-
color:
|
|
46
|
+
color: var(--wpds-color-fg-interactive-neutral);
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
&:focus {
|
|
@@ -55,7 +54,7 @@
|
|
|
55
54
|
|
|
56
55
|
&:focus-visible {
|
|
57
56
|
// Push the shadow away from the title.
|
|
58
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus)
|
|
57
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wpds-color-bg-surface-neutral-weak), 0 0 0 calc(2 * var(--wp-admin-border-width-focus)) var(--wp-admin-theme-color);
|
|
59
58
|
|
|
60
59
|
// Windows High Contrast mode will show this outline, but not the box-shadow.
|
|
61
60
|
outline: 2px solid transparent;
|
|
@@ -82,12 +81,12 @@
|
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
.edit-site-site-hub_toggle-command-center {
|
|
85
|
-
color:
|
|
84
|
+
color: var(--wpds-color-fg-interactive-neutral);
|
|
86
85
|
|
|
87
86
|
&:hover,
|
|
88
87
|
&:active {
|
|
89
88
|
svg {
|
|
90
|
-
fill:
|
|
89
|
+
fill: var(--wpds-color-fg-interactive-neutral-active);
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
}
|
|
@@ -56,7 +56,9 @@ body.has-admin-bar-in-editor {
|
|
|
56
56
|
|
|
57
57
|
&.is-fullscreen-mode {
|
|
58
58
|
.is-entity-save-view-open .interface-interface-skeleton__actions:focus,
|
|
59
|
-
.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within
|
|
59
|
+
.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within,
|
|
60
|
+
.edit-site-layout__actions.is-entity-save-view-open:focus,
|
|
61
|
+
.edit-site-layout__actions.is-entity-save-view-open:focus-within {
|
|
60
62
|
top: var(--wp-admin--admin-bar--height, 0);
|
|
61
63
|
}
|
|
62
64
|
|
package/src/store/selectors.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import { store as coreDataStore } from '@wordpress/core-data';
|
|
5
5
|
import { createRegistrySelector, createSelector } from '@wordpress/data';
|
|
6
6
|
import deprecated from '@wordpress/deprecated';
|
|
7
|
-
import { Platform } from '@wordpress/element';
|
|
8
7
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
9
8
|
import { store as editorStore } from '@wordpress/editor';
|
|
10
9
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
@@ -100,12 +99,9 @@ export const getReusableBlocks = createRegistrySelector( ( select ) => () => {
|
|
|
100
99
|
version: '6.8',
|
|
101
100
|
alternative: `select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )`,
|
|
102
101
|
} );
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
per_page: -1,
|
|
107
|
-
} )
|
|
108
|
-
: [];
|
|
102
|
+
return select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {
|
|
103
|
+
per_page: -1,
|
|
104
|
+
} );
|
|
109
105
|
} );
|
|
110
106
|
|
|
111
107
|
/**
|
package/src/style.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use "@wordpress/base-styles/colors" as *;
|
|
2
1
|
@use "@wordpress/base-styles/mixins" as *;
|
|
3
2
|
@use "@wordpress/base-styles/variables" as *;
|
|
4
3
|
@use "@wordpress/base-styles/default-custom-properties";
|
|
@@ -62,7 +61,7 @@ body.js.site-editor-php {
|
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
body.js.site-editor-php {
|
|
65
|
-
background:
|
|
64
|
+
background: var(--wpds-color-bg-surface-neutral-weak);
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
.edit-site {
|