@wordpress/edit-site 6.0.4 → 6.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/build/components/editor/index.js +2 -0
- package/build/components/editor/index.js.map +1 -1
- package/build/components/layout/index.js +5 -5
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +15 -10
- package/build/components/layout/router.js.map +1 -1
- package/build/components/revisions/index.js +10 -7
- package/build/components/revisions/index.js.map +1 -1
- package/build/store/private-actions.js +7 -2
- package/build/store/private-actions.js.map +1 -1
- package/build-module/components/editor/index.js +2 -0
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/layout/index.js +5 -5
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +15 -10
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/revisions/index.js +10 -7
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/store/private-actions.js +7 -2
- package/build-module/store/private-actions.js.map +1 -1
- package/build-style/style-rtl.css +4 -13
- package/build-style/style.css +4 -13
- package/package.json +11 -11
- package/src/components/editor/index.js +2 -0
- package/src/components/layout/index.js +2 -3
- package/src/components/layout/router.js +23 -15
- package/src/components/page-pages/style.scss +1 -1
- package/src/components/page-patterns/style.scss +1 -8
- package/src/components/page-templates/style.scss +1 -6
- package/src/components/revisions/index.js +9 -1
- package/src/store/private-actions.js +7 -3
package/build-style/style.css
CHANGED
|
@@ -434,7 +434,6 @@
|
|
|
434
434
|
aspect-ratio: 1/1;
|
|
435
435
|
background-color: #f0f0f0;
|
|
436
436
|
border-radius: 4px;
|
|
437
|
-
overflow: hidden;
|
|
438
437
|
position: relative;
|
|
439
438
|
}
|
|
440
439
|
.dataviews-view-grid .dataviews-view-grid__media img {
|
|
@@ -826,7 +825,7 @@
|
|
|
826
825
|
padding: 0 12px;
|
|
827
826
|
height: 32px;
|
|
828
827
|
background: #f0f0f0;
|
|
829
|
-
color: #
|
|
828
|
+
color: #2f2f2f;
|
|
830
829
|
position: relative;
|
|
831
830
|
display: flex;
|
|
832
831
|
align-items: center;
|
|
@@ -1705,7 +1704,7 @@
|
|
|
1705
1704
|
overflow: hidden;
|
|
1706
1705
|
height: 100%;
|
|
1707
1706
|
width: 100%;
|
|
1708
|
-
border-radius:
|
|
1707
|
+
border-radius: 4px;
|
|
1709
1708
|
}
|
|
1710
1709
|
.page-pages-preview-field__button:focus-visible {
|
|
1711
1710
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
@@ -1755,10 +1754,6 @@
|
|
|
1755
1754
|
display: flex;
|
|
1756
1755
|
flex-direction: column;
|
|
1757
1756
|
height: 100%;
|
|
1758
|
-
border-radius: 3px 3px 0 0;
|
|
1759
|
-
}
|
|
1760
|
-
.edit-site-page-patterns-dataviews .page-patterns-preview-field.is-viewtype-grid .block-editor-block-preview__container {
|
|
1761
|
-
border-radius: 3px 3px 0 0;
|
|
1762
1757
|
}
|
|
1763
1758
|
.edit-site-page-patterns-dataviews .page-patterns-preview-field.is-viewtype-table {
|
|
1764
1759
|
width: 96px;
|
|
@@ -1777,7 +1772,7 @@
|
|
|
1777
1772
|
cursor: pointer;
|
|
1778
1773
|
overflow: hidden;
|
|
1779
1774
|
height: 100%;
|
|
1780
|
-
border-radius:
|
|
1775
|
+
border-radius: 4px;
|
|
1781
1776
|
}
|
|
1782
1777
|
.edit-site-page-patterns-dataviews .page-patterns-preview-field .page-patterns-preview-field__button:focus-visible {
|
|
1783
1778
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
@@ -1869,7 +1864,6 @@
|
|
|
1869
1864
|
display: flex;
|
|
1870
1865
|
flex-direction: column;
|
|
1871
1866
|
height: 100%;
|
|
1872
|
-
border-radius: 3px 3px 0 0;
|
|
1873
1867
|
}
|
|
1874
1868
|
.page-templates-preview-field .page-templates-preview-field__button {
|
|
1875
1869
|
box-shadow: none;
|
|
@@ -1880,7 +1874,7 @@
|
|
|
1880
1874
|
cursor: pointer;
|
|
1881
1875
|
overflow: hidden;
|
|
1882
1876
|
height: 100%;
|
|
1883
|
-
border-radius:
|
|
1877
|
+
border-radius: 4px;
|
|
1884
1878
|
}
|
|
1885
1879
|
.page-templates-preview-field .page-templates-preview-field__button:focus-visible {
|
|
1886
1880
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
@@ -1892,9 +1886,6 @@
|
|
|
1892
1886
|
.page-templates-preview-field.is-viewtype-grid .block-editor-block-preview__container {
|
|
1893
1887
|
height: 100%;
|
|
1894
1888
|
}
|
|
1895
|
-
.page-templates-preview-field.is-viewtype-grid .page-templates-preview-field__button {
|
|
1896
|
-
border-radius: 3px 3px 0 0;
|
|
1897
|
-
}
|
|
1898
1889
|
.page-templates-preview-field.is-viewtype-table {
|
|
1899
1890
|
border-radius: 2px;
|
|
1900
1891
|
position: relative;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.5",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"@wordpress/a11y": "^4.0.1",
|
|
33
33
|
"@wordpress/api-fetch": "^7.0.1",
|
|
34
34
|
"@wordpress/blob": "^4.0.1",
|
|
35
|
-
"@wordpress/block-editor": "^13.0.
|
|
36
|
-
"@wordpress/block-library": "^9.0.
|
|
35
|
+
"@wordpress/block-editor": "^13.0.4",
|
|
36
|
+
"@wordpress/block-library": "^9.0.5",
|
|
37
37
|
"@wordpress/blocks": "^13.0.3",
|
|
38
38
|
"@wordpress/commands": "^1.0.3",
|
|
39
39
|
"@wordpress/components": "^28.0.3",
|
|
40
40
|
"@wordpress/compose": "^7.0.1",
|
|
41
|
-
"@wordpress/core-commands": "^1.0.
|
|
42
|
-
"@wordpress/core-data": "^7.0.
|
|
41
|
+
"@wordpress/core-commands": "^1.0.4",
|
|
42
|
+
"@wordpress/core-data": "^7.0.4",
|
|
43
43
|
"@wordpress/data": "^10.0.2",
|
|
44
|
-
"@wordpress/dataviews": "^2.0.
|
|
44
|
+
"@wordpress/dataviews": "^2.0.4",
|
|
45
45
|
"@wordpress/date": "^5.0.1",
|
|
46
46
|
"@wordpress/deprecated": "^4.0.1",
|
|
47
47
|
"@wordpress/dom": "^4.0.1",
|
|
48
|
-
"@wordpress/editor": "^14.0.
|
|
48
|
+
"@wordpress/editor": "^14.0.4",
|
|
49
49
|
"@wordpress/element": "^6.0.1",
|
|
50
50
|
"@wordpress/escape-html": "^3.0.1",
|
|
51
51
|
"@wordpress/hooks": "^4.0.1",
|
|
@@ -55,18 +55,18 @@
|
|
|
55
55
|
"@wordpress/keyboard-shortcuts": "^5.0.2",
|
|
56
56
|
"@wordpress/keycodes": "^4.0.1",
|
|
57
57
|
"@wordpress/notices": "^5.0.2",
|
|
58
|
-
"@wordpress/patterns": "^2.0.
|
|
58
|
+
"@wordpress/patterns": "^2.0.4",
|
|
59
59
|
"@wordpress/plugins": "^7.0.3",
|
|
60
60
|
"@wordpress/preferences": "^4.0.3",
|
|
61
61
|
"@wordpress/primitives": "^4.0.1",
|
|
62
62
|
"@wordpress/priority-queue": "^3.0.1",
|
|
63
63
|
"@wordpress/private-apis": "^1.0.2",
|
|
64
|
-
"@wordpress/reusable-blocks": "^5.0.
|
|
64
|
+
"@wordpress/reusable-blocks": "^5.0.4",
|
|
65
65
|
"@wordpress/router": "^1.0.2",
|
|
66
66
|
"@wordpress/style-engine": "^2.0.2",
|
|
67
67
|
"@wordpress/url": "^4.0.1",
|
|
68
68
|
"@wordpress/viewport": "^6.0.2",
|
|
69
|
-
"@wordpress/widgets": "^4.0.
|
|
69
|
+
"@wordpress/widgets": "^4.0.4",
|
|
70
70
|
"@wordpress/wordcount": "^4.0.1",
|
|
71
71
|
"change-case": "^4.1.2",
|
|
72
72
|
"clsx": "^2.1.1",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "85486692a3e48b7d863226cf895a21d787434921"
|
|
86
86
|
}
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
useHasEditorCanvasContainer,
|
|
42
42
|
} from '../editor-canvas-container';
|
|
43
43
|
import SaveButton from '../save-button';
|
|
44
|
+
import SavePanel from '../save-panel';
|
|
44
45
|
import SiteEditorMoreMenu from '../more-menu';
|
|
45
46
|
import SiteIcon from '../site-icon';
|
|
46
47
|
import useEditorIframeProps from '../block-editor/use-editor-iframe-props';
|
|
@@ -205,6 +206,7 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
205
206
|
customSaveButton={
|
|
206
207
|
_isPreviewingTheme && <SaveButton size="compact" />
|
|
207
208
|
}
|
|
209
|
+
customSavePanel={ _isPreviewingTheme && <SavePanel /> }
|
|
208
210
|
forceDisableBlockTools={ ! hasDefaultEditorCanvasView }
|
|
209
211
|
title={
|
|
210
212
|
! hasDefaultEditorCanvasView
|
|
@@ -46,7 +46,6 @@ import SiteHub from '../site-hub';
|
|
|
46
46
|
import ResizableFrame from '../resizable-frame';
|
|
47
47
|
import useSyncCanvasModeWithURL from '../sync-state-with-url/use-sync-canvas-mode-with-url';
|
|
48
48
|
import { unlock } from '../../lock-unlock';
|
|
49
|
-
import SavePanel from '../save-panel';
|
|
50
49
|
import KeyboardShortcutsRegister from '../keyboard-shortcuts/register';
|
|
51
50
|
import KeyboardShortcutsGlobal from '../keyboard-shortcuts/global';
|
|
52
51
|
import { useCommonCommands } from '../../hooks/commands/use-common-commands';
|
|
@@ -56,6 +55,7 @@ import useLayoutAreas from './router';
|
|
|
56
55
|
import useMovingAnimation from './animation';
|
|
57
56
|
import SidebarContent from '../sidebar';
|
|
58
57
|
import SaveHub from '../save-hub';
|
|
58
|
+
import SavePanel from '../save-panel';
|
|
59
59
|
|
|
60
60
|
const { useCommands } = unlock( coreCommandsPrivateApis );
|
|
61
61
|
const { useCommandContext } = unlock( commandsPrivateApis );
|
|
@@ -209,6 +209,7 @@ export default function Layout() {
|
|
|
209
209
|
{ areas.sidebar }
|
|
210
210
|
</SidebarContent>
|
|
211
211
|
<SaveHub />
|
|
212
|
+
<SavePanel />
|
|
212
213
|
</motion.div>
|
|
213
214
|
) }
|
|
214
215
|
</AnimatePresence>
|
|
@@ -282,8 +283,6 @@ export default function Layout() {
|
|
|
282
283
|
</div>
|
|
283
284
|
) }
|
|
284
285
|
</div>
|
|
285
|
-
|
|
286
|
-
<SavePanel />
|
|
287
286
|
</div>
|
|
288
287
|
</>
|
|
289
288
|
);
|
|
@@ -77,6 +77,7 @@ export default function useLayoutAreas() {
|
|
|
77
77
|
const isSiteEditorLoading = useIsSiteEditorLoading();
|
|
78
78
|
const { params } = useLocation();
|
|
79
79
|
const { postType, postId, path, layout, isCustom, canvas } = params;
|
|
80
|
+
const hasEditCanvasMode = canvas === 'edit';
|
|
80
81
|
useRedirectOldPaths();
|
|
81
82
|
|
|
82
83
|
// Page list
|
|
@@ -93,15 +94,14 @@ export default function useLayoutAreas() {
|
|
|
93
94
|
/>
|
|
94
95
|
),
|
|
95
96
|
content: <PagePages />,
|
|
96
|
-
preview: ( isListLayout ||
|
|
97
|
+
preview: ( isListLayout || hasEditCanvasMode ) && (
|
|
97
98
|
<Editor isLoading={ isSiteEditorLoading } />
|
|
98
99
|
),
|
|
99
|
-
mobile:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
),
|
|
100
|
+
mobile: hasEditCanvasMode ? (
|
|
101
|
+
<Editor isLoading={ isSiteEditorLoading } />
|
|
102
|
+
) : (
|
|
103
|
+
<PagePages />
|
|
104
|
+
),
|
|
105
105
|
},
|
|
106
106
|
widths: {
|
|
107
107
|
content: isListLayout ? 380 : undefined,
|
|
@@ -119,10 +119,14 @@ export default function useLayoutAreas() {
|
|
|
119
119
|
<SidebarNavigationScreenTemplatesBrowse backPath={ {} } />
|
|
120
120
|
),
|
|
121
121
|
content: <PageTemplates />,
|
|
122
|
-
preview: ( isListLayout ||
|
|
122
|
+
preview: ( isListLayout || hasEditCanvasMode ) && (
|
|
123
123
|
<Editor isLoading={ isSiteEditorLoading } />
|
|
124
124
|
),
|
|
125
|
-
mobile:
|
|
125
|
+
mobile: hasEditCanvasMode ? (
|
|
126
|
+
<Editor isLoading={ isSiteEditorLoading } />
|
|
127
|
+
) : (
|
|
128
|
+
<PageTemplates />
|
|
129
|
+
),
|
|
126
130
|
},
|
|
127
131
|
widths: {
|
|
128
132
|
content: isListLayout ? 380 : undefined,
|
|
@@ -139,8 +143,12 @@ export default function useLayoutAreas() {
|
|
|
139
143
|
areas: {
|
|
140
144
|
sidebar: <SidebarNavigationScreenPatterns backPath={ {} } />,
|
|
141
145
|
content: <PagePatterns />,
|
|
142
|
-
mobile:
|
|
143
|
-
|
|
146
|
+
mobile: hasEditCanvasMode ? (
|
|
147
|
+
<Editor isLoading={ isSiteEditorLoading } />
|
|
148
|
+
) : (
|
|
149
|
+
<PagePatterns />
|
|
150
|
+
),
|
|
151
|
+
preview: hasEditCanvasMode && (
|
|
144
152
|
<Editor isLoading={ isSiteEditorLoading } />
|
|
145
153
|
),
|
|
146
154
|
},
|
|
@@ -156,7 +164,7 @@ export default function useLayoutAreas() {
|
|
|
156
164
|
<SidebarNavigationScreenGlobalStyles backPath={ {} } />
|
|
157
165
|
),
|
|
158
166
|
preview: <Editor isLoading={ isSiteEditorLoading } />,
|
|
159
|
-
mobile:
|
|
167
|
+
mobile: hasEditCanvasMode && (
|
|
160
168
|
<Editor isLoading={ isSiteEditorLoading } />
|
|
161
169
|
),
|
|
162
170
|
},
|
|
@@ -175,7 +183,7 @@ export default function useLayoutAreas() {
|
|
|
175
183
|
/>
|
|
176
184
|
),
|
|
177
185
|
preview: <Editor isLoading={ isSiteEditorLoading } />,
|
|
178
|
-
mobile:
|
|
186
|
+
mobile: hasEditCanvasMode && (
|
|
179
187
|
<Editor isLoading={ isSiteEditorLoading } />
|
|
180
188
|
),
|
|
181
189
|
},
|
|
@@ -188,7 +196,7 @@ export default function useLayoutAreas() {
|
|
|
188
196
|
<SidebarNavigationScreenNavigationMenus backPath={ {} } />
|
|
189
197
|
),
|
|
190
198
|
preview: <Editor isLoading={ isSiteEditorLoading } />,
|
|
191
|
-
mobile:
|
|
199
|
+
mobile: hasEditCanvasMode && (
|
|
192
200
|
<Editor isLoading={ isSiteEditorLoading } />
|
|
193
201
|
),
|
|
194
202
|
},
|
|
@@ -201,7 +209,7 @@ export default function useLayoutAreas() {
|
|
|
201
209
|
areas: {
|
|
202
210
|
sidebar: <SidebarNavigationScreenMain />,
|
|
203
211
|
preview: <Editor isLoading={ isSiteEditorLoading } />,
|
|
204
|
-
mobile:
|
|
212
|
+
mobile: hasEditCanvasMode && (
|
|
205
213
|
<Editor isLoading={ isSiteEditorLoading } />
|
|
206
214
|
),
|
|
207
215
|
},
|
|
@@ -35,13 +35,6 @@
|
|
|
35
35
|
display: flex;
|
|
36
36
|
flex-direction: column;
|
|
37
37
|
height: 100%;
|
|
38
|
-
border-radius: 3px 3px 0 0;
|
|
39
|
-
|
|
40
|
-
&.is-viewtype-grid {
|
|
41
|
-
.block-editor-block-preview__container {
|
|
42
|
-
border-radius: 3px 3px 0 0;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
38
|
|
|
46
39
|
&.is-viewtype-table {
|
|
47
40
|
width: 96px;
|
|
@@ -62,7 +55,7 @@
|
|
|
62
55
|
cursor: pointer;
|
|
63
56
|
overflow: hidden;
|
|
64
57
|
height: 100%;
|
|
65
|
-
border-radius:
|
|
58
|
+
border-radius: $grid-unit-05;
|
|
66
59
|
|
|
67
60
|
&:focus-visible {
|
|
68
61
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
height: 100%;
|
|
5
|
-
border-radius: 3px 3px 0 0;
|
|
6
5
|
|
|
7
6
|
.page-templates-preview-field__button {
|
|
8
7
|
box-shadow: none;
|
|
@@ -13,7 +12,7 @@
|
|
|
13
12
|
cursor: pointer;
|
|
14
13
|
overflow: hidden;
|
|
15
14
|
height: 100%;
|
|
16
|
-
border-radius:
|
|
15
|
+
border-radius: $grid-unit-05;
|
|
17
16
|
|
|
18
17
|
&:focus-visible {
|
|
19
18
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
@@ -32,10 +31,6 @@
|
|
|
32
31
|
.block-editor-block-preview__container {
|
|
33
32
|
height: 100%;
|
|
34
33
|
}
|
|
35
|
-
|
|
36
|
-
.page-templates-preview-field__button {
|
|
37
|
-
border-radius: 3px 3px 0 0;
|
|
38
|
-
}
|
|
39
34
|
}
|
|
40
35
|
|
|
41
36
|
&.is-viewtype-table {
|
|
@@ -25,6 +25,7 @@ const {
|
|
|
25
25
|
ExperimentalBlockEditorProvider,
|
|
26
26
|
GlobalStylesContext,
|
|
27
27
|
useGlobalStylesOutputWithConfig,
|
|
28
|
+
__unstableBlockStyleVariationOverridesWithConfig,
|
|
28
29
|
} = unlock( blockEditorPrivateApis );
|
|
29
30
|
const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
|
|
30
31
|
|
|
@@ -74,7 +75,6 @@ function Revisions( { userConfig, blocks } ) {
|
|
|
74
75
|
name="revisions"
|
|
75
76
|
tabIndex={ 0 }
|
|
76
77
|
>
|
|
77
|
-
<EditorStyles styles={ editorStyles } />
|
|
78
78
|
<style>
|
|
79
79
|
{
|
|
80
80
|
// Forming a "block formatting context" to prevent margin collapsing.
|
|
@@ -88,6 +88,14 @@ function Revisions( { userConfig, blocks } ) {
|
|
|
88
88
|
settings={ settings }
|
|
89
89
|
>
|
|
90
90
|
<BlockList renderAppender={ false } />
|
|
91
|
+
{ /*
|
|
92
|
+
* Styles are printed inside the block editor provider,
|
|
93
|
+
* so they can access any registered style overrides.
|
|
94
|
+
*/ }
|
|
95
|
+
<EditorStyles styles={ editorStyles } />
|
|
96
|
+
<__unstableBlockStyleVariationOverridesWithConfig
|
|
97
|
+
config={ mergedConfig }
|
|
98
|
+
/>
|
|
91
99
|
</ExperimentalBlockEditorProvider>
|
|
92
100
|
</Disabled>
|
|
93
101
|
</Iframe>
|
|
@@ -13,10 +13,10 @@ import { store as editorStore } from '@wordpress/editor';
|
|
|
13
13
|
export const setCanvasMode =
|
|
14
14
|
( mode ) =>
|
|
15
15
|
( { registry, dispatch } ) => {
|
|
16
|
+
const isMediumOrBigger =
|
|
17
|
+
window.matchMedia( '(min-width: 782px)' ).matches;
|
|
16
18
|
const switchCanvasMode = () => {
|
|
17
19
|
registry.batch( () => {
|
|
18
|
-
const isMediumOrBigger =
|
|
19
|
-
window.matchMedia( '(min-width: 782px)' ).matches;
|
|
20
20
|
registry.dispatch( blockEditorStore ).clearSelectedBlock();
|
|
21
21
|
registry.dispatch( editorStore ).setDeviceType( 'Desktop' );
|
|
22
22
|
registry
|
|
@@ -59,7 +59,11 @@ export const setCanvasMode =
|
|
|
59
59
|
} );
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
/*
|
|
63
|
+
* Skip transition in mobile, otherwise it crashes the browser.
|
|
64
|
+
* See: https://github.com/WordPress/gutenberg/pull/63002.
|
|
65
|
+
*/
|
|
66
|
+
if ( ! isMediumOrBigger || ! document.startViewTransition ) {
|
|
63
67
|
switchCanvasMode();
|
|
64
68
|
} else {
|
|
65
69
|
document.documentElement.classList.add(
|