@wordpress/edit-site 6.0.0 → 6.0.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/block-editor/inserter-media-categories.js +1 -1
- package/build/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build/components/editor/index.js +52 -59
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor/use-editor-title.js +39 -0
- package/build/components/editor/use-editor-title.js.map +1 -0
- package/build/components/global-styles/screen-css.js +1 -1
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js +1 -1
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles-sidebar/index.js +2 -0
- package/build/components/global-styles-sidebar/index.js.map +1 -1
- package/build/components/layout/index.js +16 -59
- package/build/components/layout/index.js.map +1 -1
- package/build/components/page-patterns/index.js +5 -5
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/pagination/index.js +17 -8
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js +6 -2
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +1 -1
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/site-hub/index.js +38 -128
- package/build/components/site-hub/index.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +1 -0
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/store/private-actions.js +33 -18
- package/build/store/private-actions.js.map +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build-module/components/editor/index.js +52 -59
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +31 -0
- package/build-module/components/editor/use-editor-title.js.map +1 -0
- package/build-module/components/global-styles/screen-css.js +1 -1
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +2 -2
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles-sidebar/index.js +2 -0
- package/build-module/components/global-styles-sidebar/index.js.map +1 -1
- package/build-module/components/layout/index.js +18 -61
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/page-patterns/index.js +5 -5
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/pagination/index.js +17 -8
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +6 -2
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +40 -130
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +1 -0
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/store/private-actions.js +33 -18
- package/build-module/store/private-actions.js.map +1 -1
- package/build-style/style-rtl.css +43 -85
- package/build-style/style.css +43 -85
- package/package.json +41 -41
- package/src/components/block-editor/inserter-media-categories.js +1 -3
- package/src/components/block-editor/style.scss +11 -0
- package/src/components/editor/index.js +67 -95
- package/src/components/editor/style.scss +1 -5
- package/src/components/editor/use-editor-title.js +35 -0
- package/src/components/global-styles/screen-css.js +1 -1
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/src/components/global-styles/screen-revisions/style.scss +4 -8
- package/src/components/global-styles/variations/variations-color.js +6 -3
- package/src/components/global-styles-sidebar/index.js +2 -0
- package/src/components/layout/index.js +17 -67
- package/src/components/layout/style.scss +18 -58
- package/src/components/page-patterns/index.js +15 -12
- package/src/components/pagination/index.js +21 -16
- package/src/components/sidebar-dataviews/dataview-item.js +6 -2
- package/src/components/sidebar-navigation-screen/index.js +1 -1
- package/src/components/sidebar-navigation-screen/style.scss +2 -2
- package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
- package/src/components/sidebar-navigation-screen-patterns/category-item.js +11 -2
- package/src/components/sidebar-navigation-screen-patterns/index.js +5 -1
- package/src/components/site-hub/index.js +55 -146
- package/src/components/site-hub/style.scss +1 -4
- package/src/components/site-icon/style.scss +0 -4
- package/src/hooks/push-changes-to-global-styles/index.js +1 -0
- package/src/store/private-actions.js +58 -30
package/build-style/style.css
CHANGED
|
@@ -513,6 +513,7 @@
|
|
|
513
513
|
.dataviews-view-list li .dataviews-view-list__item-actions .components-button {
|
|
514
514
|
opacity: 0;
|
|
515
515
|
position: fixed;
|
|
516
|
+
right: 0;
|
|
516
517
|
}
|
|
517
518
|
.dataviews-view-list li.is-selected .dataviews-view-list__item-actions, .dataviews-view-list li.is-hovered .dataviews-view-list__item-actions, .dataviews-view-list li:focus-within .dataviews-view-list__item-actions {
|
|
518
519
|
padding-right: 32px;
|
|
@@ -928,12 +929,15 @@
|
|
|
928
929
|
}
|
|
929
930
|
|
|
930
931
|
.dataviews-bulk-actions {
|
|
931
|
-
position:
|
|
932
|
+
position: sticky;
|
|
932
933
|
display: flex;
|
|
933
934
|
flex-direction: column;
|
|
934
935
|
align-content: center;
|
|
935
936
|
flex-wrap: wrap;
|
|
936
|
-
width:
|
|
937
|
+
width: -moz-fit-content;
|
|
938
|
+
width: fit-content;
|
|
939
|
+
margin-left: auto;
|
|
940
|
+
margin-right: auto;
|
|
937
941
|
bottom: 24px;
|
|
938
942
|
z-index: 2;
|
|
939
943
|
}
|
|
@@ -1110,6 +1114,18 @@
|
|
|
1110
1114
|
align-items: flex-start;
|
|
1111
1115
|
}
|
|
1112
1116
|
|
|
1117
|
+
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
1118
|
+
::view-transition-old(frame),
|
|
1119
|
+
::view-transition-new(frame) {
|
|
1120
|
+
animation-duration: 0;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/* stylelint-enable */
|
|
1124
|
+
.edit-site-visual-editor__editor-canvas {
|
|
1125
|
+
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
1126
|
+
view-transition-name: frame;
|
|
1127
|
+
/* stylelint-enable */
|
|
1128
|
+
}
|
|
1113
1129
|
.edit-site-visual-editor__editor-canvas.is-focused {
|
|
1114
1130
|
outline: calc(2 * var(--wp-admin-border-width-focus)) solid var(--wp-admin-theme-color);
|
|
1115
1131
|
outline-offset: calc(-2 * var(--wp-admin-border-width-focus));
|
|
@@ -1505,18 +1521,12 @@
|
|
|
1505
1521
|
will-change: opacity;
|
|
1506
1522
|
}
|
|
1507
1523
|
.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary {
|
|
1508
|
-
font-size: 28px;
|
|
1509
|
-
font-weight: 200;
|
|
1510
1524
|
color: #1e1e1e;
|
|
1511
|
-
margin-bottom: 4px;
|
|
1512
|
-
line-height: 1.2;
|
|
1513
1525
|
}
|
|
1514
|
-
.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled
|
|
1526
|
+
.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:disabled,
|
|
1527
|
+
.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true] {
|
|
1515
1528
|
color: #949494;
|
|
1516
1529
|
}
|
|
1517
|
-
.edit-site-global-styles-screen-revisions__pagination.edit-site-global-styles-screen-revisions__pagination .components-button.is-tertiary:hover {
|
|
1518
|
-
background: transparent;
|
|
1519
|
-
}
|
|
1520
1530
|
|
|
1521
1531
|
.edit-site-global-styles-screen-revisions__footer {
|
|
1522
1532
|
height: 56px;
|
|
@@ -2012,17 +2022,17 @@
|
|
|
2012
2022
|
border-bottom: 1px solid #f0f0f0;
|
|
2013
2023
|
}
|
|
2014
2024
|
|
|
2015
|
-
.edit-site-
|
|
2025
|
+
.edit-site-editor__editor-interface {
|
|
2016
2026
|
opacity: 1;
|
|
2017
2027
|
transition: opacity 0.1s ease-out;
|
|
2018
2028
|
}
|
|
2019
2029
|
@media (prefers-reduced-motion: reduce) {
|
|
2020
|
-
.edit-site-
|
|
2030
|
+
.edit-site-editor__editor-interface {
|
|
2021
2031
|
transition-duration: 0s;
|
|
2022
2032
|
transition-delay: 0s;
|
|
2023
2033
|
}
|
|
2024
2034
|
}
|
|
2025
|
-
.edit-site-
|
|
2035
|
+
.edit-site-editor__editor-interface.is-loading {
|
|
2026
2036
|
opacity: 0;
|
|
2027
2037
|
}
|
|
2028
2038
|
|
|
@@ -2036,10 +2046,6 @@
|
|
|
2036
2046
|
justify-content: center;
|
|
2037
2047
|
}
|
|
2038
2048
|
|
|
2039
|
-
.editor-header {
|
|
2040
|
-
padding-left: 60px;
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
2049
|
.edit-site-welcome-guide {
|
|
2044
2050
|
width: 312px;
|
|
2045
2051
|
}
|
|
@@ -2090,38 +2096,8 @@
|
|
|
2090
2096
|
display: flex;
|
|
2091
2097
|
flex-direction: column;
|
|
2092
2098
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
position: fixed;
|
|
2096
|
-
top: 0;
|
|
2097
|
-
left: 0;
|
|
2098
|
-
width: calc(100vw - 32px);
|
|
2099
|
-
height: 60px;
|
|
2100
|
-
z-index: 3;
|
|
2101
|
-
}
|
|
2102
|
-
@media (min-width: 782px) {
|
|
2103
|
-
.edit-site-layout__hub {
|
|
2104
|
-
width: calc(360px - 12px);
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
.edit-site-layout.is-full-canvas .edit-site-layout__hub {
|
|
2108
|
-
padding-right: 0;
|
|
2109
|
-
border-radius: 0;
|
|
2110
|
-
width: 60px;
|
|
2111
|
-
box-shadow: none;
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2114
|
-
.edit-site-layout__header-container:has(+ .edit-site-layout__content > .edit-site-layout__mobile > .edit-site-page) {
|
|
2115
|
-
margin-bottom: 60px;
|
|
2116
|
-
}
|
|
2117
|
-
@media (min-width: 782px) {
|
|
2118
|
-
.edit-site-layout__header-container:has(+ .edit-site-layout__content > .edit-site-layout__mobile > .edit-site-page) {
|
|
2119
|
-
margin-bottom: 0;
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
.edit-site-layout__header-container {
|
|
2124
|
-
z-index: 4;
|
|
2099
|
+
.edit-site-layout:not(.is-full-canvas) .editor-visual-editor {
|
|
2100
|
+
background: #1e1e1e;
|
|
2125
2101
|
}
|
|
2126
2102
|
|
|
2127
2103
|
.edit-site-layout__content {
|
|
@@ -2232,10 +2208,22 @@
|
|
|
2232
2208
|
height: 100%;
|
|
2233
2209
|
}
|
|
2234
2210
|
|
|
2211
|
+
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
2212
|
+
html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
2213
|
+
animation-delay: 255ms;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
/* stylelint-enable */
|
|
2217
|
+
.edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle {
|
|
2218
|
+
display: none;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2235
2221
|
.edit-site-layout__view-mode-toggle.components-button {
|
|
2222
|
+
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
2223
|
+
view-transition-name: toggle;
|
|
2224
|
+
/* stylelint-enable */
|
|
2236
2225
|
position: relative;
|
|
2237
2226
|
color: #fff;
|
|
2238
|
-
border-radius: 0;
|
|
2239
2227
|
height: 60px;
|
|
2240
2228
|
width: 60px;
|
|
2241
2229
|
overflow: hidden;
|
|
@@ -2243,6 +2231,8 @@
|
|
|
2243
2231
|
display: flex;
|
|
2244
2232
|
align-items: center;
|
|
2245
2233
|
justify-content: center;
|
|
2234
|
+
background: #1e1e1e;
|
|
2235
|
+
border-radius: 0;
|
|
2246
2236
|
}
|
|
2247
2237
|
.edit-site-layout__view-mode-toggle.components-button:hover, .edit-site-layout__view-mode-toggle.components-button:active {
|
|
2248
2238
|
color: #fff;
|
|
@@ -2273,7 +2263,6 @@
|
|
|
2273
2263
|
}
|
|
2274
2264
|
.edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon {
|
|
2275
2265
|
display: flex;
|
|
2276
|
-
border-radius: 2px;
|
|
2277
2266
|
height: 64px;
|
|
2278
2267
|
width: 64px;
|
|
2279
2268
|
justify-content: center;
|
|
@@ -2304,27 +2293,6 @@
|
|
|
2304
2293
|
}
|
|
2305
2294
|
}
|
|
2306
2295
|
|
|
2307
|
-
.edit-site-layout.is-distraction-free .edit-site-layout__header-container {
|
|
2308
|
-
height: 60px;
|
|
2309
|
-
position: absolute;
|
|
2310
|
-
top: 0;
|
|
2311
|
-
left: 0;
|
|
2312
|
-
right: 0;
|
|
2313
|
-
z-index: 4;
|
|
2314
|
-
width: 100%;
|
|
2315
|
-
}
|
|
2316
|
-
.edit-site-layout.is-distraction-free .edit-site-layout__header-container:focus-within {
|
|
2317
|
-
opacity: 1 !important;
|
|
2318
|
-
}
|
|
2319
|
-
.edit-site-layout.is-distraction-free .edit-site-layout__header-container:focus-within div {
|
|
2320
|
-
transform: translateX(0) translateY(0) translateZ(0) !important;
|
|
2321
|
-
}
|
|
2322
|
-
.edit-site-layout.is-distraction-free .edit-site-site-hub {
|
|
2323
|
-
position: absolute;
|
|
2324
|
-
top: 0;
|
|
2325
|
-
z-index: 3;
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2328
2296
|
.edit-site-layout__area {
|
|
2329
2297
|
flex-grow: 1;
|
|
2330
2298
|
margin: 0;
|
|
@@ -2550,7 +2518,7 @@
|
|
|
2550
2518
|
position: sticky;
|
|
2551
2519
|
top: 0;
|
|
2552
2520
|
background: #1e1e1e;
|
|
2553
|
-
padding-top:
|
|
2521
|
+
padding-top: 48px;
|
|
2554
2522
|
margin-bottom: 8px;
|
|
2555
2523
|
padding-bottom: 8px;
|
|
2556
2524
|
z-index: 1;
|
|
@@ -2558,8 +2526,8 @@
|
|
|
2558
2526
|
|
|
2559
2527
|
.edit-site-sidebar-navigation-screen__title {
|
|
2560
2528
|
flex-grow: 1;
|
|
2561
|
-
padding: 6px 0 0 0;
|
|
2562
2529
|
overflow-wrap: break-word;
|
|
2530
|
+
padding: 2px 0 0 0;
|
|
2563
2531
|
}
|
|
2564
2532
|
|
|
2565
2533
|
.edit-site-sidebar-navigation-screen__actions {
|
|
@@ -2728,6 +2696,7 @@
|
|
|
2728
2696
|
align-items: center;
|
|
2729
2697
|
justify-content: space-between;
|
|
2730
2698
|
gap: 8px;
|
|
2699
|
+
margin-right: 12px;
|
|
2731
2700
|
}
|
|
2732
2701
|
|
|
2733
2702
|
.edit-site-site-hub__actions {
|
|
@@ -2739,9 +2708,6 @@
|
|
|
2739
2708
|
width: 60px;
|
|
2740
2709
|
flex-shrink: 0;
|
|
2741
2710
|
}
|
|
2742
|
-
.edit-site-site-hub__view-mode-toggle-container .edit-site-layout__view-mode-toggle-icon {
|
|
2743
|
-
background: #1e1e1e;
|
|
2744
|
-
}
|
|
2745
2711
|
.edit-site-site-hub__view-mode-toggle-container.has-transparent-background .edit-site-layout__view-mode-toggle-icon {
|
|
2746
2712
|
background: transparent;
|
|
2747
2713
|
}
|
|
@@ -2831,13 +2797,6 @@
|
|
|
2831
2797
|
|
|
2832
2798
|
.edit-site-site-icon__icon {
|
|
2833
2799
|
fill: currentColor;
|
|
2834
|
-
transition: padding 0.3s ease-out;
|
|
2835
|
-
}
|
|
2836
|
-
@media (prefers-reduced-motion: reduce) {
|
|
2837
|
-
.edit-site-site-icon__icon {
|
|
2838
|
-
transition-duration: 0s;
|
|
2839
|
-
transition-delay: 0s;
|
|
2840
|
-
}
|
|
2841
2800
|
}
|
|
2842
2801
|
.edit-site-layout.is-full-canvas .edit-site-site-icon__icon {
|
|
2843
2802
|
padding: 6px;
|
|
@@ -2846,7 +2805,6 @@
|
|
|
2846
2805
|
.edit-site-site-icon__image {
|
|
2847
2806
|
width: 100%;
|
|
2848
2807
|
height: 100%;
|
|
2849
|
-
border-radius: 4px;
|
|
2850
2808
|
object-fit: cover;
|
|
2851
2809
|
background: #333;
|
|
2852
2810
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
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.0.1",
|
|
33
|
+
"@wordpress/api-fetch": "^7.0.1",
|
|
34
|
+
"@wordpress/blob": "^4.0.1",
|
|
35
|
+
"@wordpress/block-editor": "^13.0.1",
|
|
36
|
+
"@wordpress/block-library": "^9.0.1",
|
|
37
|
+
"@wordpress/blocks": "^13.0.1",
|
|
38
|
+
"@wordpress/commands": "^1.0.1",
|
|
39
|
+
"@wordpress/components": "^28.0.1",
|
|
40
|
+
"@wordpress/compose": "^7.0.1",
|
|
41
|
+
"@wordpress/core-commands": "^1.0.1",
|
|
42
|
+
"@wordpress/core-data": "^7.0.1",
|
|
43
|
+
"@wordpress/data": "^10.0.1",
|
|
44
|
+
"@wordpress/dataviews": "^2.0.1",
|
|
45
|
+
"@wordpress/date": "^5.0.1",
|
|
46
|
+
"@wordpress/deprecated": "^4.0.1",
|
|
47
|
+
"@wordpress/dom": "^4.0.1",
|
|
48
|
+
"@wordpress/editor": "^14.0.1",
|
|
49
|
+
"@wordpress/element": "^6.0.1",
|
|
50
|
+
"@wordpress/escape-html": "^3.0.1",
|
|
51
|
+
"@wordpress/hooks": "^4.0.1",
|
|
52
|
+
"@wordpress/html-entities": "^4.0.1",
|
|
53
|
+
"@wordpress/i18n": "^5.0.1",
|
|
54
|
+
"@wordpress/icons": "^10.0.1",
|
|
55
|
+
"@wordpress/keyboard-shortcuts": "^5.0.1",
|
|
56
|
+
"@wordpress/keycodes": "^4.0.1",
|
|
57
|
+
"@wordpress/notices": "^5.0.1",
|
|
58
|
+
"@wordpress/patterns": "^2.0.1",
|
|
59
|
+
"@wordpress/plugins": "^7.0.1",
|
|
60
|
+
"@wordpress/preferences": "^4.0.1",
|
|
61
|
+
"@wordpress/primitives": "^4.0.1",
|
|
62
|
+
"@wordpress/priority-queue": "^3.0.1",
|
|
63
|
+
"@wordpress/private-apis": "^1.0.1",
|
|
64
|
+
"@wordpress/reusable-blocks": "^5.0.1",
|
|
65
|
+
"@wordpress/router": "^1.0.1",
|
|
66
|
+
"@wordpress/style-engine": "^2.0.1",
|
|
67
|
+
"@wordpress/url": "^4.0.1",
|
|
68
|
+
"@wordpress/viewport": "^6.0.1",
|
|
69
|
+
"@wordpress/widgets": "^4.0.1",
|
|
70
|
+
"@wordpress/wordcount": "^4.0.1",
|
|
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": "0e973525f7787401b5a544e0727774d52a78639f"
|
|
86
86
|
}
|
|
@@ -191,9 +191,7 @@ const inserterMediaCategories = [
|
|
|
191
191
|
per_page: 'page_size',
|
|
192
192
|
search: 'q',
|
|
193
193
|
};
|
|
194
|
-
const url = new URL(
|
|
195
|
-
'https://api.openverse.engineering/v1/images/'
|
|
196
|
-
);
|
|
194
|
+
const url = new URL( 'https://api.openverse.org/v1/images/' );
|
|
197
195
|
Object.entries( finalQuery ).forEach( ( [ key, value ] ) => {
|
|
198
196
|
const queryKey = mapFromInserterMediaRequest[ key ] || key;
|
|
199
197
|
url.searchParams.set( queryKey, value );
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
+
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
2
|
+
::view-transition-old(frame),
|
|
3
|
+
::view-transition-new(frame) {
|
|
4
|
+
animation-duration: 0;
|
|
5
|
+
}
|
|
6
|
+
/* stylelint-enable */
|
|
7
|
+
|
|
1
8
|
.edit-site-visual-editor__editor-canvas {
|
|
9
|
+
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
10
|
+
view-transition-name: frame;
|
|
11
|
+
/* stylelint-enable */
|
|
12
|
+
|
|
2
13
|
&.is-focused {
|
|
3
14
|
outline: calc(2 * var(--wp-admin-border-width-focus)) solid var(--wp-admin-theme-color);
|
|
4
15
|
outline-offset: calc(-2 * var(--wp-admin-border-width-focus));
|
|
@@ -7,7 +7,7 @@ import clsx from 'clsx';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
10
|
-
import {
|
|
10
|
+
import { Button } from '@wordpress/components';
|
|
11
11
|
import { useInstanceId } from '@wordpress/compose';
|
|
12
12
|
import {
|
|
13
13
|
EditorKeyboardShortcutsRegister,
|
|
@@ -28,11 +28,8 @@ import { store as preferencesStore } from '@wordpress/preferences';
|
|
|
28
28
|
import WelcomeGuide from '../welcome-guide';
|
|
29
29
|
import { store as editSiteStore } from '../../store';
|
|
30
30
|
import { GlobalStylesRenderer } from '../global-styles-renderer';
|
|
31
|
-
import useTitle from '../routes/use-title';
|
|
32
31
|
import CanvasLoader from '../canvas-loader';
|
|
33
32
|
import { unlock } from '../../lock-unlock';
|
|
34
|
-
import useEditedEntityRecord from '../use-edited-entity-record';
|
|
35
|
-
import { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';
|
|
36
33
|
import TemplatePartConverter from '../template-part-converter';
|
|
37
34
|
import { useSpecificEditorSettings } from '../block-editor/use-site-editor-settings';
|
|
38
35
|
import PluginTemplateSettingPanel from '../plugin-template-setting-panel';
|
|
@@ -44,26 +41,20 @@ import {
|
|
|
44
41
|
} from '../editor-canvas-container';
|
|
45
42
|
import SaveButton from '../save-button';
|
|
46
43
|
import SiteEditorMoreMenu from '../more-menu';
|
|
44
|
+
import SiteIcon from '../site-icon';
|
|
47
45
|
import useEditorIframeProps from '../block-editor/use-editor-iframe-props';
|
|
46
|
+
import useEditorTitle from './use-editor-title';
|
|
48
47
|
|
|
49
|
-
const {
|
|
50
|
-
EditorInterface,
|
|
51
|
-
ExperimentalEditorProvider: EditorProvider,
|
|
52
|
-
Sidebar,
|
|
53
|
-
} = unlock( editorPrivateApis );
|
|
48
|
+
const { Editor, BackButton } = unlock( editorPrivateApis );
|
|
54
49
|
const { useHistory } = unlock( routerPrivateApis );
|
|
55
50
|
const { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );
|
|
56
51
|
|
|
57
|
-
export default function
|
|
52
|
+
export default function EditSiteEditor( { isLoading } ) {
|
|
58
53
|
const {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const { type: editedPostType } = editedPost;
|
|
64
|
-
const {
|
|
65
|
-
context,
|
|
66
|
-
contextPost,
|
|
54
|
+
editedPostType,
|
|
55
|
+
editedPostId,
|
|
56
|
+
contextPostType,
|
|
57
|
+
contextPostId,
|
|
67
58
|
editorMode,
|
|
68
59
|
canvasMode,
|
|
69
60
|
isEditingPage,
|
|
@@ -72,25 +63,25 @@ export default function Editor( { isLoading } ) {
|
|
|
72
63
|
editorCanvasView,
|
|
73
64
|
currentPostIsTrashed,
|
|
74
65
|
} = useSelect( ( select ) => {
|
|
75
|
-
const {
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
const {
|
|
67
|
+
getEditedPostContext,
|
|
68
|
+
getCanvasMode,
|
|
69
|
+
isPage,
|
|
70
|
+
getEditedPostType,
|
|
71
|
+
getEditedPostId,
|
|
72
|
+
} = unlock( select( editSiteStore ) );
|
|
78
73
|
const { get } = select( preferencesStore );
|
|
79
|
-
const {
|
|
74
|
+
const { getCurrentTheme } = select( coreDataStore );
|
|
80
75
|
const { getEditorMode } = select( editorStore );
|
|
81
76
|
const _context = getEditedPostContext();
|
|
82
77
|
|
|
83
78
|
// The currently selected entity to display.
|
|
84
79
|
// Typically template or template part in the site editor.
|
|
85
80
|
return {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
_context.postType,
|
|
91
|
-
_context.postId
|
|
92
|
-
)
|
|
93
|
-
: undefined,
|
|
81
|
+
editedPostType: getEditedPostType(),
|
|
82
|
+
editedPostId: getEditedPostId(),
|
|
83
|
+
contextPostType: _context?.postId ? _context.postType : undefined,
|
|
84
|
+
contextPostId: _context?.postId ? _context.postId : undefined,
|
|
94
85
|
editorMode: getEditorMode(),
|
|
95
86
|
canvasMode: getCanvasMode(),
|
|
96
87
|
isEditingPage: isPage(),
|
|
@@ -104,30 +95,14 @@ export default function Editor( { isLoading } ) {
|
|
|
104
95
|
'trash',
|
|
105
96
|
};
|
|
106
97
|
}, [] );
|
|
98
|
+
useEditorTitle();
|
|
107
99
|
const _isPreviewingTheme = isPreviewingTheme();
|
|
108
100
|
const hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();
|
|
109
101
|
const iframeProps = useEditorIframeProps();
|
|
110
|
-
|
|
111
102
|
const isViewMode = canvasMode === 'view';
|
|
112
103
|
const isEditMode = canvasMode === 'edit';
|
|
113
104
|
const showVisualEditor = isViewMode || editorMode === 'visual';
|
|
114
|
-
const postWithTemplate = !!
|
|
115
|
-
|
|
116
|
-
let title;
|
|
117
|
-
if ( hasLoadedPost ) {
|
|
118
|
-
title = sprintf(
|
|
119
|
-
// translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).
|
|
120
|
-
__( '%1$s ‹ %2$s' ),
|
|
121
|
-
getTitle(),
|
|
122
|
-
POST_TYPE_LABELS[ editedPostType ] ??
|
|
123
|
-
POST_TYPE_LABELS[ TEMPLATE_POST_TYPE ]
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// Only announce the title once the editor is ready to prevent "Replace"
|
|
128
|
-
// action in <URLQueryController> from double-announcing.
|
|
129
|
-
useTitle( hasLoadedPost && title );
|
|
130
|
-
|
|
105
|
+
const postWithTemplate = !! contextPostId;
|
|
131
106
|
const loadingProgressId = useInstanceId(
|
|
132
107
|
CanvasLoader,
|
|
133
108
|
'edit-site-editor__loading-progress'
|
|
@@ -152,6 +127,7 @@ export default function Editor( { isLoading } ) {
|
|
|
152
127
|
],
|
|
153
128
|
[ settings.styles, canvasMode, currentPostIsTrashed ]
|
|
154
129
|
);
|
|
130
|
+
const { setCanvasMode } = unlock( useDispatch( editSiteStore ) );
|
|
155
131
|
const { createSuccessNotice } = useDispatch( noticesStore );
|
|
156
132
|
const history = useHistory();
|
|
157
133
|
const onActionPerformed = useCallback(
|
|
@@ -202,10 +178,7 @@ export default function Editor( { isLoading } ) {
|
|
|
202
178
|
[ history, createSuccessNotice ]
|
|
203
179
|
);
|
|
204
180
|
|
|
205
|
-
const isReady =
|
|
206
|
-
! isLoading &&
|
|
207
|
-
( ( postWithTemplate && !! contextPost && !! editedPost ) ||
|
|
208
|
-
( ! postWithTemplate && !! editedPost ) );
|
|
181
|
+
const isReady = ! isLoading;
|
|
209
182
|
|
|
210
183
|
return (
|
|
211
184
|
<>
|
|
@@ -215,55 +188,54 @@ export default function Editor( { isLoading } ) {
|
|
|
215
188
|
{ showVisualEditor && <TemplatePartConverter /> }
|
|
216
189
|
{ ! isReady ? <CanvasLoader id={ loadingProgressId } /> : null }
|
|
217
190
|
{ isEditMode && <WelcomeGuide /> }
|
|
218
|
-
{ hasLoadedPost && ! editedPost && (
|
|
219
|
-
<Notice status="warning" isDismissible={ false }>
|
|
220
|
-
{ __(
|
|
221
|
-
"You attempted to edit an item that doesn't exist. Perhaps it was deleted?"
|
|
222
|
-
) }
|
|
223
|
-
</Notice>
|
|
224
|
-
) }
|
|
225
191
|
{ isReady && (
|
|
226
|
-
<
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
postWithTemplate ? editedPost : undefined
|
|
192
|
+
<Editor
|
|
193
|
+
postType={
|
|
194
|
+
postWithTemplate ? contextPostType : editedPostType
|
|
230
195
|
}
|
|
196
|
+
postId={ postWithTemplate ? contextPostId : editedPostId }
|
|
197
|
+
templateId={ postWithTemplate ? editedPostId : undefined }
|
|
231
198
|
settings={ settings }
|
|
232
|
-
|
|
199
|
+
className={ clsx( 'edit-site-editor__editor-interface', {
|
|
200
|
+
'show-icon-labels': showIconLabels,
|
|
201
|
+
} ) }
|
|
202
|
+
styles={ styles }
|
|
203
|
+
enableRegionNavigation={ false }
|
|
204
|
+
customSaveButton={
|
|
205
|
+
_isPreviewingTheme && <SaveButton size="compact" />
|
|
206
|
+
}
|
|
207
|
+
forceDisableBlockTools={ ! hasDefaultEditorCanvasView }
|
|
208
|
+
title={
|
|
209
|
+
! hasDefaultEditorCanvasView
|
|
210
|
+
? getEditorCanvasContainerTitle( editorCanvasView )
|
|
211
|
+
: undefined
|
|
212
|
+
}
|
|
213
|
+
iframeProps={ iframeProps }
|
|
214
|
+
onActionPerformed={ onActionPerformed }
|
|
215
|
+
extraSidebarPanels={
|
|
216
|
+
! isEditingPage && <PluginTemplateSettingPanel.Slot />
|
|
217
|
+
}
|
|
233
218
|
>
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
219
|
+
{ isEditMode && (
|
|
220
|
+
<BackButton>
|
|
221
|
+
{ ( { length } ) =>
|
|
222
|
+
length <= 1 && (
|
|
223
|
+
<Button
|
|
224
|
+
label={ __( 'Open Navigation' ) }
|
|
225
|
+
className="edit-site-layout__view-mode-toggle"
|
|
226
|
+
onClick={ () =>
|
|
227
|
+
setCanvasMode( 'view' )
|
|
228
|
+
}
|
|
229
|
+
>
|
|
230
|
+
<SiteIcon className="edit-site-layout__view-mode-toggle-icon" />
|
|
231
|
+
</Button>
|
|
232
|
+
)
|
|
240
233
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
customSaveButton={
|
|
245
|
-
_isPreviewingTheme && <SaveButton size="compact" />
|
|
246
|
-
}
|
|
247
|
-
forceDisableBlockTools={ ! hasDefaultEditorCanvasView }
|
|
248
|
-
title={
|
|
249
|
-
! hasDefaultEditorCanvasView
|
|
250
|
-
? getEditorCanvasContainerTitle(
|
|
251
|
-
editorCanvasView
|
|
252
|
-
)
|
|
253
|
-
: undefined
|
|
254
|
-
}
|
|
255
|
-
iframeProps={ iframeProps }
|
|
256
|
-
/>
|
|
257
|
-
<Sidebar
|
|
258
|
-
onActionPerformed={ onActionPerformed }
|
|
259
|
-
extraPanels={
|
|
260
|
-
! isEditingPage && (
|
|
261
|
-
<PluginTemplateSettingPanel.Slot />
|
|
262
|
-
)
|
|
263
|
-
}
|
|
264
|
-
/>
|
|
234
|
+
</BackButton>
|
|
235
|
+
) }
|
|
236
|
+
<SiteEditorMoreMenu />
|
|
265
237
|
{ supportsGlobalStyles && <GlobalStylesSidebar /> }
|
|
266
|
-
</
|
|
238
|
+
</Editor>
|
|
267
239
|
) }
|
|
268
240
|
</>
|
|
269
241
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.edit-site-
|
|
1
|
+
.edit-site-editor__editor-interface {
|
|
2
2
|
opacity: 1;
|
|
3
3
|
transition: opacity 0.1s ease-out;
|
|
4
4
|
@include reduce-motion("transition");
|
|
@@ -17,7 +17,3 @@
|
|
|
17
17
|
display: flex;
|
|
18
18
|
justify-content: center;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
.editor-header {
|
|
22
|
-
padding-left: $header-height;
|
|
23
|
-
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import useEditedEntityRecord from '../use-edited-entity-record';
|
|
10
|
+
import useTitle from '../routes/use-title';
|
|
11
|
+
import { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';
|
|
12
|
+
|
|
13
|
+
function useEditorTitle() {
|
|
14
|
+
const {
|
|
15
|
+
record: editedPost,
|
|
16
|
+
getTitle,
|
|
17
|
+
isLoaded: hasLoadedPost,
|
|
18
|
+
} = useEditedEntityRecord();
|
|
19
|
+
let title;
|
|
20
|
+
if ( hasLoadedPost ) {
|
|
21
|
+
title = sprintf(
|
|
22
|
+
// translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).
|
|
23
|
+
__( '%1$s ‹ %2$s' ),
|
|
24
|
+
getTitle(),
|
|
25
|
+
POST_TYPE_LABELS[ editedPost.type ] ??
|
|
26
|
+
POST_TYPE_LABELS[ TEMPLATE_POST_TYPE ]
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Only announce the title once the editor is ready to prevent "Replace"
|
|
31
|
+
// action in <URLQueryController> from double-announcing.
|
|
32
|
+
useTitle( hasLoadedPost && title );
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default useEditorTitle;
|