@wordpress/edit-site 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/build/components/block-editor/index.js +3 -2
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/editor/index.js +4 -16
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +20 -5
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +0 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/custom-css.js +1 -0
- package/build/components/global-styles/custom-css.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +3 -2
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/screen-background-color.js +0 -1
- package/build/components/global-styles/screen-background-color.js.map +1 -1
- package/build/components/global-styles/screen-block.js +2 -6
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-border.js +4 -0
- package/build/components/global-styles/screen-border.js.map +1 -1
- package/build/components/global-styles/screen-button-color.js +0 -2
- package/build/components/global-styles/screen-button-color.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +4 -0
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-heading-color.js +1 -3
- package/build/components/global-styles/screen-heading-color.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +4 -0
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-link-color.js +0 -1
- package/build/components/global-styles/screen-link-color.js.map +1 -1
- package/build/components/global-styles/screen-root.js +7 -2
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-text-color.js +0 -1
- package/build/components/global-styles/screen-text-color.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +4 -0
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/typography-utils.js +17 -5
- package/build/components/global-styles/typography-utils.js.map +1 -1
- package/build/components/global-styles/utils.js +11 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/header-edit-mode/document-actions/index.js +10 -41
- package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build/components/layout/index.js +52 -83
- package/build/components/layout/index.js.map +1 -1
- package/build/components/sidebar/index.js +5 -1
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +3 -1
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js +10 -0
- package/build/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +1 -31
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates/index.js +3 -22
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/site-hub/index.js +149 -0
- package/build/components/site-hub/index.js.map +1 -0
- package/build/components/use-edited-entity-record/index.js +60 -0
- package/build/components/use-edited-entity-record/index.js.map +1 -0
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +144 -0
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -0
- package/build/index.js +5 -0
- package/build/index.js.map +1 -1
- package/build-module/components/block-editor/index.js +3 -2
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/editor/index.js +1 -12
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +19 -5
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +0 -1
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/custom-css.js +1 -0
- package/build-module/components/global-styles/custom-css.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +3 -2
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/screen-background-color.js +0 -1
- package/build-module/components/global-styles/screen-background-color.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +2 -5
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-border.js +3 -0
- package/build-module/components/global-styles/screen-border.js.map +1 -1
- package/build-module/components/global-styles/screen-button-color.js +0 -2
- package/build-module/components/global-styles/screen-button-color.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +3 -0
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-heading-color.js +1 -3
- package/build-module/components/global-styles/screen-heading-color.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +3 -0
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-link-color.js +0 -1
- package/build-module/components/global-styles/screen-link-color.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +8 -3
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-text-color.js +0 -1
- package/build-module/components/global-styles/screen-text-color.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +3 -0
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/typography-utils.js +17 -5
- package/build-module/components/global-styles/typography-utils.js.map +1 -1
- package/build-module/components/global-styles/utils.js +9 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/header-edit-mode/document-actions/index.js +10 -38
- package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build-module/components/layout/index.js +51 -81
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +4 -1
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +3 -1
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js +11 -1
- package/build-module/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +2 -27
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates/index.js +5 -23
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +126 -0
- package/build-module/components/site-hub/index.js.map +1 -0
- package/build-module/components/use-edited-entity-record/index.js +48 -0
- package/build-module/components/use-edited-entity-record/index.js.map +1 -0
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +132 -0
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -0
- package/build-module/index.js +4 -0
- package/build-module/index.js.map +1 -1
- package/build-style/style-rtl.css +106 -113
- package/build-style/style.css +106 -113
- package/package.json +30 -29
- package/src/components/block-editor/index.js +3 -5
- package/src/components/editor/index.js +1 -16
- package/src/components/global-styles/block-preview-panel.js +24 -9
- package/src/components/global-styles/border-panel.js +0 -1
- package/src/components/global-styles/custom-css.js +1 -0
- package/src/components/global-styles/global-styles-provider.js +11 -5
- package/src/components/global-styles/screen-background-color.js +0 -1
- package/src/components/global-styles/screen-block.js +1 -4
- package/src/components/global-styles/screen-border.js +2 -0
- package/src/components/global-styles/screen-button-color.js +0 -2
- package/src/components/global-styles/screen-colors.js +3 -0
- package/src/components/global-styles/screen-heading-color.js +1 -3
- package/src/components/global-styles/screen-layout.js +2 -0
- package/src/components/global-styles/screen-link-color.js +0 -1
- package/src/components/global-styles/screen-root.js +34 -27
- package/src/components/global-styles/screen-text-color.js +0 -1
- package/src/components/global-styles/screen-typography.js +3 -0
- package/src/components/global-styles/test/typography-utils.js +72 -23
- package/src/components/global-styles/typography-utils.js +24 -4
- package/src/components/global-styles/utils.js +10 -1
- package/src/components/header-edit-mode/document-actions/index.js +18 -37
- package/src/components/header-edit-mode/style.scss +1 -0
- package/src/components/layout/index.js +122 -165
- package/src/components/layout/style.scss +70 -63
- package/src/components/list/style.scss +1 -8
- package/src/components/sidebar/index.js +4 -1
- package/src/components/sidebar-edit-mode/index.js +1 -1
- package/src/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js +10 -0
- package/src/components/sidebar-navigation-screen/style.scss +2 -4
- package/src/components/sidebar-navigation-screen-main/index.js +1 -29
- package/src/components/sidebar-navigation-screen-templates/index.js +9 -27
- package/src/components/site-hub/index.js +150 -0
- package/src/components/site-hub/style.scss +31 -0
- package/src/components/use-edited-entity-record/index.js +37 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/push-changes-to-global-styles/index.js +162 -0
- package/src/hooks/push-changes-to-global-styles/style.scss +4 -0
- package/src/index.js +2 -0
- package/src/style.scss +2 -0
- package/build/components/site-title/index.js +0 -55
- package/build/components/site-title/index.js.map +0 -1
- package/build-module/components/site-title/index.js +0 -43
- package/build-module/components/site-title/index.js.map +0 -1
- package/src/components/site-title/index.js +0 -39
package/build-style/style.css
CHANGED
|
@@ -58,15 +58,15 @@
|
|
|
58
58
|
* @param {string} hex - the hexadecimal value to convert
|
|
59
59
|
* @return {string} comma separated rgb values
|
|
60
60
|
*/
|
|
61
|
-
/**
|
|
62
|
-
* Breakpoint mixins
|
|
63
|
-
*/
|
|
64
61
|
/**
|
|
65
62
|
* Long content fade mixin
|
|
66
63
|
*
|
|
67
64
|
* Creates a fading overlay to signify that the content is longer
|
|
68
65
|
* than the space allows.
|
|
69
66
|
*/
|
|
67
|
+
/**
|
|
68
|
+
* Breakpoint mixins
|
|
69
|
+
*/
|
|
70
70
|
/**
|
|
71
71
|
* Focus styles.
|
|
72
72
|
*/
|
|
@@ -320,11 +320,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
320
320
|
overflow: auto;
|
|
321
321
|
z-index: 20;
|
|
322
322
|
}
|
|
323
|
-
.interface-interface-skeleton__content .interface-navigable-region__stacker {
|
|
324
|
-
flex-grow: 1;
|
|
325
|
-
display: flex;
|
|
326
|
-
flex-direction: column;
|
|
327
|
-
}
|
|
328
323
|
|
|
329
324
|
.interface-interface-skeleton__secondary-sidebar,
|
|
330
325
|
.interface-interface-skeleton__sidebar {
|
|
@@ -359,9 +354,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
359
354
|
}
|
|
360
355
|
}
|
|
361
356
|
|
|
362
|
-
.interface-interface-skeleton__secondary-sidebar .interface-navigable-region__stacker {
|
|
363
|
-
height: 100%;
|
|
364
|
-
}
|
|
365
357
|
@media (min-width: 782px) {
|
|
366
358
|
.interface-interface-skeleton__secondary-sidebar {
|
|
367
359
|
border-right: 1px solid #e0e0e0;
|
|
@@ -885,6 +877,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
885
877
|
width: 100%;
|
|
886
878
|
justify-content: space-between;
|
|
887
879
|
border-bottom: 1px solid #e0e0e0;
|
|
880
|
+
padding-left: 60px;
|
|
888
881
|
}
|
|
889
882
|
.edit-site-header-edit-mode .edit-site-header-edit-mode__start {
|
|
890
883
|
display: flex;
|
|
@@ -1154,8 +1147,6 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1154
1147
|
.edit-site .edit-site-list .interface-interface-skeleton__content {
|
|
1155
1148
|
background: #fff;
|
|
1156
1149
|
padding: 16px;
|
|
1157
|
-
}
|
|
1158
|
-
.edit-site .edit-site-list .interface-interface-skeleton__content .interface-navigable-region__stacker {
|
|
1159
1150
|
align-items: center;
|
|
1160
1151
|
}
|
|
1161
1152
|
@media (min-width: 782px) {
|
|
@@ -1163,9 +1154,6 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1163
1154
|
padding: 72px;
|
|
1164
1155
|
}
|
|
1165
1156
|
}
|
|
1166
|
-
.edit-site .edit-site-list .interface-interface-skeleton__content > .interface-navigable-region__stacker {
|
|
1167
|
-
height: auto;
|
|
1168
|
-
}
|
|
1169
1157
|
|
|
1170
1158
|
.edit-site-list-table {
|
|
1171
1159
|
min-width: 100%;
|
|
@@ -1224,7 +1212,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1224
1212
|
|
|
1225
1213
|
@media (min-width: 782px) {
|
|
1226
1214
|
.edit-site-list.is-navigation-open .components-snackbar-list {
|
|
1227
|
-
margin-left:
|
|
1215
|
+
margin-left: 360px;
|
|
1228
1216
|
}
|
|
1229
1217
|
}
|
|
1230
1218
|
|
|
@@ -2016,51 +2004,72 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2016
2004
|
}
|
|
2017
2005
|
|
|
2018
2006
|
.edit-site-layout {
|
|
2019
|
-
|
|
2007
|
+
height: 100%;
|
|
2020
2008
|
background: #1e1e1e;
|
|
2021
2009
|
color: #fff;
|
|
2022
2010
|
display: flex;
|
|
2023
2011
|
flex-direction: column;
|
|
2024
2012
|
}
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2013
|
+
|
|
2014
|
+
.edit-site-layout__hub {
|
|
2015
|
+
position: fixed;
|
|
2016
|
+
top: 24px;
|
|
2017
|
+
left: 24px;
|
|
2018
|
+
width: calc(100vw - 48px);
|
|
2019
|
+
height: 68px;
|
|
2020
|
+
z-index: 3;
|
|
2021
|
+
background: #000;
|
|
2022
|
+
padding: 16px;
|
|
2023
|
+
padding-left: 0;
|
|
2024
|
+
border-radius: 8px;
|
|
2025
|
+
box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.15), 0 2.7px 3.8px -0.2px rgba(0, 0, 0, 0.15), 0 5.5px 7.8px -0.3px rgba(0, 0, 0, 0.15), 0.1px 11.5px 16.4px -0.5px rgba(0, 0, 0, 0.15);
|
|
2026
|
+
}
|
|
2027
|
+
.edit-site-layout.is-full-canvas .edit-site-layout__hub {
|
|
2028
|
+
top: 0;
|
|
2029
|
+
left: 0;
|
|
2030
|
+
padding: 0;
|
|
2031
|
+
padding-right: 16px;
|
|
2032
|
+
height: 60px;
|
|
2033
|
+
border-radius: 0;
|
|
2034
|
+
width: 100vw;
|
|
2035
|
+
box-shadow: none;
|
|
2036
|
+
}
|
|
2037
|
+
@media (min-width: 782px) {
|
|
2038
|
+
.edit-site-layout.is-full-canvas .edit-site-layout__hub {
|
|
2039
|
+
width: auto;
|
|
2040
|
+
padding-right: 0;
|
|
2031
2041
|
}
|
|
2032
|
-
|
|
2033
|
-
|
|
2042
|
+
}
|
|
2043
|
+
.edit-site-layout.is-full-canvas.is-edit-mode .edit-site-layout__hub {
|
|
2044
|
+
width: auto;
|
|
2045
|
+
padding-right: 0;
|
|
2046
|
+
}
|
|
2047
|
+
@media (min-width: 782px) {
|
|
2048
|
+
.edit-site-layout__hub {
|
|
2049
|
+
width: calc(360px - 48px);
|
|
2034
2050
|
}
|
|
2035
2051
|
}
|
|
2036
2052
|
|
|
2037
2053
|
.edit-site-layout__header {
|
|
2038
|
-
grid-area: header;
|
|
2039
2054
|
height: 60px;
|
|
2040
2055
|
display: flex;
|
|
2056
|
+
z-index: 2;
|
|
2041
2057
|
}
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
height: 60px;
|
|
2046
|
-
display: flex;
|
|
2047
|
-
justify-content: space-between;
|
|
2048
|
-
}
|
|
2049
|
-
.edit-site-layout__logo .components-button {
|
|
2050
|
-
color: currentColor;
|
|
2058
|
+
.edit-site-layout:not(.is-full-canvas) .edit-site-layout__header {
|
|
2059
|
+
position: fixed;
|
|
2060
|
+
width: 100vw;
|
|
2051
2061
|
}
|
|
2052
2062
|
|
|
2053
|
-
.edit-site-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2063
|
+
.edit-site-layout__content {
|
|
2064
|
+
flex-grow: 1;
|
|
2065
|
+
display: flex;
|
|
2066
|
+
overflow: hidden;
|
|
2057
2067
|
}
|
|
2058
2068
|
|
|
2059
2069
|
.edit-site-layout__sidebar {
|
|
2060
|
-
grid-area: sidebar;
|
|
2061
2070
|
z-index: 1;
|
|
2062
2071
|
overflow-y: auto;
|
|
2063
|
-
|
|
2072
|
+
width: 100vw;
|
|
2064
2073
|
visibility: hidden;
|
|
2065
2074
|
scrollbar-color: #757575 #1e1e1e;
|
|
2066
2075
|
scrollbar-width: thin;
|
|
@@ -2082,70 +2091,24 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2082
2091
|
.edit-site-layout__sidebar:hover, .edit-site-layout__sidebar:focus, .edit-site-layout__sidebar > * {
|
|
2083
2092
|
visibility: visible;
|
|
2084
2093
|
}
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
@media (min-width: 600px) {
|
|
2089
|
-
.edit-site-layout.is-full-canvas .edit-site-layout__sidebar {
|
|
2090
|
-
display: block;
|
|
2091
|
-
grid-area: header;
|
|
2092
|
-
position: absolute;
|
|
2093
|
-
top: 60px;
|
|
2094
|
+
@media (min-width: 782px) {
|
|
2095
|
+
.edit-site-layout__sidebar {
|
|
2096
|
+
width: 360px;
|
|
2094
2097
|
}
|
|
2095
2098
|
}
|
|
2096
|
-
|
|
2097
|
-
.edit-site-layout__editor-header {
|
|
2098
|
-
flex-grow: 1;
|
|
2099
|
-
}
|
|
2100
|
-
.edit-site-layout:not(.is-full-canvas) .edit-site-layout__editor-header {
|
|
2099
|
+
.edit-site-layout.is-full-canvas .edit-site-layout__sidebar {
|
|
2101
2100
|
position: fixed;
|
|
2102
|
-
|
|
2103
|
-
|
|
2101
|
+
height: 100vh;
|
|
2102
|
+
left: 0;
|
|
2103
|
+
top: 0;
|
|
2104
2104
|
}
|
|
2105
2105
|
|
|
2106
2106
|
.edit-site-layout__canvas-container {
|
|
2107
|
-
grid-area: canvas;
|
|
2108
2107
|
position: relative;
|
|
2109
2108
|
flex-grow: 1;
|
|
2110
2109
|
z-index: 2;
|
|
2111
2110
|
}
|
|
2112
2111
|
|
|
2113
|
-
@media (min-width: 600px) {
|
|
2114
|
-
.edit-site-layout__header {
|
|
2115
|
-
-ms-grid-row: 1;
|
|
2116
|
-
-ms-grid-column: 1;
|
|
2117
|
-
}
|
|
2118
|
-
.edit-site-layout.is-full-canvas > .edit-site-layout__header {
|
|
2119
|
-
-ms-grid-row: 1;
|
|
2120
|
-
-ms-grid-column: 1;
|
|
2121
|
-
-ms-grid-column-span: 2;
|
|
2122
|
-
}
|
|
2123
|
-
.edit-site-layout__sidebar {
|
|
2124
|
-
-ms-grid-row: 2;
|
|
2125
|
-
-ms-grid-column: 1;
|
|
2126
|
-
}
|
|
2127
|
-
.edit-site-layout.is-full-canvas .edit-site-layout__sidebar {
|
|
2128
|
-
-ms-grid-row: 1;
|
|
2129
|
-
-ms-grid-column: 1;
|
|
2130
|
-
}
|
|
2131
|
-
.edit-site-layout.is-full-canvas > .edit-site-layout__sidebar {
|
|
2132
|
-
-ms-grid-row: 1;
|
|
2133
|
-
-ms-grid-column: 1;
|
|
2134
|
-
-ms-grid-column-span: 2;
|
|
2135
|
-
}
|
|
2136
|
-
.edit-site-layout__canvas-container {
|
|
2137
|
-
-ms-grid-row: 1;
|
|
2138
|
-
-ms-grid-row-span: 2;
|
|
2139
|
-
-ms-grid-column: 2;
|
|
2140
|
-
}
|
|
2141
|
-
.edit-site-layout.is-full-canvas > .edit-site-layout__canvas-container {
|
|
2142
|
-
-ms-grid-row: 2;
|
|
2143
|
-
-ms-grid-row-span: 1;
|
|
2144
|
-
-ms-grid-column: 1;
|
|
2145
|
-
-ms-grid-column-span: 2;
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
|
|
2149
2112
|
.edit-site-layout__canvas {
|
|
2150
2113
|
position: absolute;
|
|
2151
2114
|
top: 0;
|
|
@@ -2158,7 +2121,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2158
2121
|
color: #1e1e1e;
|
|
2159
2122
|
background: #fff;
|
|
2160
2123
|
}
|
|
2161
|
-
@media (min-width:
|
|
2124
|
+
@media (min-width: 782px) {
|
|
2162
2125
|
.edit-site-layout__canvas {
|
|
2163
2126
|
top: 24px;
|
|
2164
2127
|
bottom: 24px;
|
|
@@ -2185,11 +2148,14 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2185
2148
|
|
|
2186
2149
|
.edit-site-layout__view-mode-toggle.components-button {
|
|
2187
2150
|
position: relative;
|
|
2188
|
-
background: #1e1e1e;
|
|
2189
2151
|
color: #fff;
|
|
2190
|
-
height:
|
|
2191
|
-
|
|
2192
|
-
|
|
2152
|
+
height: 100%;
|
|
2153
|
+
width: 100%;
|
|
2154
|
+
border-radius: 2px;
|
|
2155
|
+
padding: 0;
|
|
2156
|
+
display: flex;
|
|
2157
|
+
align-items: center;
|
|
2158
|
+
justify-content: center;
|
|
2193
2159
|
}
|
|
2194
2160
|
.edit-site-layout__view-mode-toggle.components-button:hover, .edit-site-layout__view-mode-toggle.components-button:active {
|
|
2195
2161
|
color: #fff;
|
|
@@ -2207,7 +2173,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2207
2173
|
bottom: 9px;
|
|
2208
2174
|
left: 9px;
|
|
2209
2175
|
border-radius: 4px;
|
|
2210
|
-
box-shadow:
|
|
2176
|
+
box-shadow: none;
|
|
2211
2177
|
}
|
|
2212
2178
|
@media (prefers-reduced-motion: reduce) {
|
|
2213
2179
|
.edit-site-layout__view-mode-toggle.components-button::before {
|
|
@@ -2215,19 +2181,12 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2215
2181
|
transition-delay: 0s;
|
|
2216
2182
|
}
|
|
2217
2183
|
}
|
|
2218
|
-
.edit-site-layout__view-mode-toggle.components-button:hover::before {
|
|
2219
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #757575;
|
|
2220
|
-
}
|
|
2221
|
-
.edit-site-layout__view-mode-toggle.components-button.has-icon:hover::before {
|
|
2222
|
-
box-shadow: none;
|
|
2223
|
-
}
|
|
2224
2184
|
.edit-site-layout__view-mode-toggle.components-button:focus::before {
|
|
2225
2185
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) rgba(255, 255, 255, 0.1), inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
2226
2186
|
}
|
|
2227
2187
|
.edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon {
|
|
2188
|
+
display: flex;
|
|
2228
2189
|
border-radius: 2px;
|
|
2229
|
-
-o-object-fit: cover;
|
|
2230
|
-
object-fit: cover;
|
|
2231
2190
|
}
|
|
2232
2191
|
|
|
2233
2192
|
.edit-site-sidebar__content.edit-site-sidebar__content {
|
|
@@ -2261,16 +2220,14 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2261
2220
|
}
|
|
2262
2221
|
|
|
2263
2222
|
.edit-site-sidebar-navigation-screen__content {
|
|
2264
|
-
margin: 0 16px
|
|
2265
|
-
flex-grow: 1;
|
|
2266
|
-
overflow-y: auto;
|
|
2223
|
+
margin: 0 16px 16px 36px;
|
|
2267
2224
|
}
|
|
2268
2225
|
|
|
2269
2226
|
.edit-site-sidebar-navigation-screen__title-icon {
|
|
2270
2227
|
position: sticky;
|
|
2271
2228
|
top: 0;
|
|
2272
2229
|
background: #1e1e1e;
|
|
2273
|
-
padding-top:
|
|
2230
|
+
padding-top: 164px;
|
|
2274
2231
|
box-shadow: 0 8px 16px #1e1e1e;
|
|
2275
2232
|
margin-bottom: 8px;
|
|
2276
2233
|
padding-bottom: 8px;
|
|
@@ -2304,6 +2261,37 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2304
2261
|
color: inherit !important;
|
|
2305
2262
|
}
|
|
2306
2263
|
|
|
2264
|
+
.edit-site-site-hub {
|
|
2265
|
+
display: flex;
|
|
2266
|
+
align-items: center;
|
|
2267
|
+
justify-content: space-between;
|
|
2268
|
+
gap: 8px;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
.edit-site-site-hub__edit-button {
|
|
2272
|
+
height: 32px;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
.edit-site-site-hub__post-type {
|
|
2276
|
+
opacity: 0.6;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
.edit-site-site-hub__view-mode-toggle-container {
|
|
2280
|
+
height: 60px;
|
|
2281
|
+
width: 60px;
|
|
2282
|
+
flex-shrink: 0;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
.edit-site-site-hub__text-content {
|
|
2286
|
+
overflow: hidden;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
.edit-site-site-hub__title {
|
|
2290
|
+
text-overflow: ellipsis;
|
|
2291
|
+
white-space: nowrap;
|
|
2292
|
+
overflow: hidden;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2307
2295
|
.edit-site-site-icon__icon {
|
|
2308
2296
|
fill: currentColor;
|
|
2309
2297
|
}
|
|
@@ -2389,6 +2377,11 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2389
2377
|
width: 100%;
|
|
2390
2378
|
}
|
|
2391
2379
|
|
|
2380
|
+
.edit-site-push-changes-to-global-styles-control .components-button {
|
|
2381
|
+
justify-content: center;
|
|
2382
|
+
width: 100%;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2392
2385
|
html #wpadminbar {
|
|
2393
2386
|
display: none;
|
|
2394
2387
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,33 +27,34 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/a11y": "^3.
|
|
31
|
-
"@wordpress/api-fetch": "^6.
|
|
32
|
-
"@wordpress/block-editor": "^11.
|
|
33
|
-
"@wordpress/block-library": "^8.
|
|
34
|
-
"@wordpress/blocks": "^12.
|
|
35
|
-
"@wordpress/components": "^23.
|
|
36
|
-
"@wordpress/compose": "^6.
|
|
37
|
-
"@wordpress/core-data": "^6.
|
|
38
|
-
"@wordpress/data": "^8.
|
|
39
|
-
"@wordpress/deprecated": "^3.
|
|
40
|
-
"@wordpress/editor": "^13.
|
|
41
|
-
"@wordpress/element": "^5.
|
|
42
|
-
"@wordpress/hooks": "^3.
|
|
43
|
-
"@wordpress/html-entities": "^3.
|
|
44
|
-
"@wordpress/i18n": "^4.
|
|
45
|
-
"@wordpress/icons": "^9.
|
|
46
|
-
"@wordpress/interface": "^5.
|
|
47
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
48
|
-
"@wordpress/keycodes": "^3.
|
|
49
|
-
"@wordpress/media-utils": "^4.
|
|
50
|
-
"@wordpress/notices": "^3.
|
|
51
|
-
"@wordpress/plugins": "^5.
|
|
52
|
-
"@wordpress/preferences": "^3.
|
|
53
|
-
"@wordpress/reusable-blocks": "^4.
|
|
54
|
-
"@wordpress/style-engine": "^1.
|
|
55
|
-
"@wordpress/url": "^3.
|
|
56
|
-
"@wordpress/viewport": "^5.
|
|
30
|
+
"@wordpress/a11y": "^3.24.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.21.0",
|
|
32
|
+
"@wordpress/block-editor": "^11.1.0",
|
|
33
|
+
"@wordpress/block-library": "^8.1.0",
|
|
34
|
+
"@wordpress/blocks": "^12.1.0",
|
|
35
|
+
"@wordpress/components": "^23.1.0",
|
|
36
|
+
"@wordpress/compose": "^6.1.0",
|
|
37
|
+
"@wordpress/core-data": "^6.1.0",
|
|
38
|
+
"@wordpress/data": "^8.1.0",
|
|
39
|
+
"@wordpress/deprecated": "^3.24.0",
|
|
40
|
+
"@wordpress/editor": "^13.1.0",
|
|
41
|
+
"@wordpress/element": "^5.1.0",
|
|
42
|
+
"@wordpress/hooks": "^3.24.0",
|
|
43
|
+
"@wordpress/html-entities": "^3.24.0",
|
|
44
|
+
"@wordpress/i18n": "^4.24.0",
|
|
45
|
+
"@wordpress/icons": "^9.15.0",
|
|
46
|
+
"@wordpress/interface": "^5.1.0",
|
|
47
|
+
"@wordpress/keyboard-shortcuts": "^4.1.0",
|
|
48
|
+
"@wordpress/keycodes": "^3.24.0",
|
|
49
|
+
"@wordpress/media-utils": "^4.15.0",
|
|
50
|
+
"@wordpress/notices": "^3.24.0",
|
|
51
|
+
"@wordpress/plugins": "^5.1.0",
|
|
52
|
+
"@wordpress/preferences": "^3.1.0",
|
|
53
|
+
"@wordpress/reusable-blocks": "^4.1.0",
|
|
54
|
+
"@wordpress/style-engine": "^1.7.0",
|
|
55
|
+
"@wordpress/url": "^3.25.0",
|
|
56
|
+
"@wordpress/viewport": "^5.1.0",
|
|
57
|
+
"@wordpress/widgets": "^3.1.0",
|
|
57
58
|
"classnames": "^2.3.1",
|
|
58
59
|
"colord": "^2.9.2",
|
|
59
60
|
"downloadjs": "^1.4.7",
|
|
@@ -70,5 +71,5 @@
|
|
|
70
71
|
"publishConfig": {
|
|
71
72
|
"access": "public"
|
|
72
73
|
},
|
|
73
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "200bee7b06b15f6fa655e25b6ab69cbd6b49a357"
|
|
74
75
|
}
|
|
@@ -153,6 +153,8 @@ export default function BlockEditor( { setIsInserterOpen } ) {
|
|
|
153
153
|
// Disable resizing in mobile viewport.
|
|
154
154
|
! isMobileViewport;
|
|
155
155
|
const isViewMode = canvasMode === 'view';
|
|
156
|
+
const showBlockAppender =
|
|
157
|
+
( isTemplatePart && hasBlocks ) || isViewMode ? false : undefined;
|
|
156
158
|
|
|
157
159
|
// eslint-disable-next-line @wordpress/data-no-store-string-literals
|
|
158
160
|
const { enableComplementaryArea } = useDispatch( 'core/interface' );
|
|
@@ -243,11 +245,7 @@ export default function BlockEditor( { setIsInserterOpen } ) {
|
|
|
243
245
|
<BlockList
|
|
244
246
|
className="edit-site-block-editor__block-list wp-site-blocks"
|
|
245
247
|
__experimentalLayout={ LAYOUT }
|
|
246
|
-
renderAppender={
|
|
247
|
-
isTemplatePart && hasBlocks
|
|
248
|
-
? false
|
|
249
|
-
: undefined
|
|
250
|
-
}
|
|
248
|
+
renderAppender={ showBlockAppender }
|
|
251
249
|
/>
|
|
252
250
|
</EditorCanvas>
|
|
253
251
|
</ResizableEditor>
|
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
EntitiesSavedStates,
|
|
23
23
|
} from '@wordpress/editor';
|
|
24
24
|
import { __ } from '@wordpress/i18n';
|
|
25
|
-
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
26
25
|
|
|
27
26
|
/**
|
|
28
27
|
* Internal dependencies
|
|
@@ -64,8 +63,6 @@ export default function Editor() {
|
|
|
64
63
|
isInserterOpen,
|
|
65
64
|
isListViewOpen,
|
|
66
65
|
isSaveViewOpen,
|
|
67
|
-
previousShortcut,
|
|
68
|
-
nextShortcut,
|
|
69
66
|
showIconLabels,
|
|
70
67
|
} = useSelect( ( select ) => {
|
|
71
68
|
const {
|
|
@@ -80,9 +77,6 @@ export default function Editor() {
|
|
|
80
77
|
} = select( editSiteStore );
|
|
81
78
|
const { hasFinishedResolution, getEntityRecord } = select( coreStore );
|
|
82
79
|
const { __unstableGetEditorMode } = select( blockEditorStore );
|
|
83
|
-
const { getAllShortcutKeyCombinations } = select(
|
|
84
|
-
keyboardShortcutsStore
|
|
85
|
-
);
|
|
86
80
|
const { getActiveComplementaryArea } = select( interfaceStore );
|
|
87
81
|
const postType = getEditedPostType();
|
|
88
82
|
const postId = getEditedPostId();
|
|
@@ -112,12 +106,6 @@ export default function Editor() {
|
|
|
112
106
|
isRightSidebarOpen: getActiveComplementaryArea(
|
|
113
107
|
editSiteStore.name
|
|
114
108
|
),
|
|
115
|
-
previousShortcut: getAllShortcutKeyCombinations(
|
|
116
|
-
'core/edit-site/previous-region'
|
|
117
|
-
),
|
|
118
|
-
nextShortcut: getAllShortcutKeyCombinations(
|
|
119
|
-
'core/edit-site/next-region'
|
|
120
|
-
),
|
|
121
109
|
showIconLabels: select( preferencesStore ).get(
|
|
122
110
|
'core/edit-site',
|
|
123
111
|
'showIconLabels'
|
|
@@ -178,6 +166,7 @@ export default function Editor() {
|
|
|
178
166
|
<BlockContextProvider value={ blockContext }>
|
|
179
167
|
<SidebarComplementaryAreaFills />
|
|
180
168
|
<InterfaceSkeleton
|
|
169
|
+
enableRegionNavigation={ false }
|
|
181
170
|
className={
|
|
182
171
|
showIconLabels && 'show-icon-labels'
|
|
183
172
|
}
|
|
@@ -258,10 +247,6 @@ export default function Editor() {
|
|
|
258
247
|
/>
|
|
259
248
|
)
|
|
260
249
|
}
|
|
261
|
-
shortcuts={ {
|
|
262
|
-
previous: previousShortcut,
|
|
263
|
-
next: nextShortcut,
|
|
264
|
-
} }
|
|
265
250
|
labels={ {
|
|
266
251
|
...interfaceLabels,
|
|
267
252
|
secondarySidebar: secondarySidebarLabel,
|
|
@@ -4,25 +4,40 @@
|
|
|
4
4
|
import { BlockPreview } from '@wordpress/block-editor';
|
|
5
5
|
import { getBlockType, getBlockFromExample } from '@wordpress/blocks';
|
|
6
6
|
import { useResizeObserver } from '@wordpress/compose';
|
|
7
|
+
import { __experimentalSpacer as Spacer } from '@wordpress/components';
|
|
7
8
|
|
|
8
9
|
const BlockPreviewPanel = ( { name } ) => {
|
|
9
|
-
const blockExample = getBlockType( name )?.example;
|
|
10
10
|
const [
|
|
11
11
|
containerResizeListener,
|
|
12
12
|
{ width: containerWidth, height: containerHeight },
|
|
13
13
|
] = useResizeObserver();
|
|
14
|
+
const blockExample = getBlockType( name )?.example;
|
|
15
|
+
const blocks = blockExample && getBlockFromExample( name, blockExample );
|
|
14
16
|
const viewportWidth = blockExample?.viewportWidth || containerWidth;
|
|
17
|
+
const minHeight = containerHeight;
|
|
15
18
|
|
|
16
19
|
return ! blockExample ? null : (
|
|
17
|
-
<
|
|
18
|
-
|
|
20
|
+
<Spacer marginX={ 4 } marginBottom={ 4 }>
|
|
21
|
+
<div className="edit-site-global-styles__block-preview-panel">
|
|
22
|
+
{ containerResizeListener }
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
<BlockPreview
|
|
25
|
+
blocks={ blocks }
|
|
26
|
+
viewportWidth={ viewportWidth }
|
|
27
|
+
__experimentalMinHeight={ minHeight }
|
|
28
|
+
__experimentalStyles={ [
|
|
29
|
+
{
|
|
30
|
+
css: `
|
|
31
|
+
body{
|
|
32
|
+
min-height:${ minHeight }px;
|
|
33
|
+
display:flex;align-items:center;justify-content:center;
|
|
34
|
+
}
|
|
35
|
+
`,
|
|
36
|
+
},
|
|
37
|
+
] }
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
</Spacer>
|
|
26
41
|
);
|
|
27
42
|
};
|
|
28
43
|
|
|
@@ -184,7 +184,6 @@ export default function BorderPanel( { name } ) {
|
|
|
184
184
|
popoverOffset={ 40 }
|
|
185
185
|
popoverPlacement="left-start"
|
|
186
186
|
value={ border }
|
|
187
|
-
__experimentalHasMultipleOrigins={ true }
|
|
188
187
|
__experimentalIsRenderedInSidebar={ true }
|
|
189
188
|
size={ '__unstable-large' }
|
|
190
189
|
/>
|
|
@@ -94,7 +94,7 @@ function useGlobalStylesUserConfig() {
|
|
|
94
94
|
}, [ settings, styles ] );
|
|
95
95
|
|
|
96
96
|
const setConfig = useCallback(
|
|
97
|
-
( callback ) => {
|
|
97
|
+
( callback, options = {} ) => {
|
|
98
98
|
const record = getEditedEntityRecord(
|
|
99
99
|
'root',
|
|
100
100
|
'globalStyles',
|
|
@@ -105,10 +105,16 @@ function useGlobalStylesUserConfig() {
|
|
|
105
105
|
settings: record?.settings ?? {},
|
|
106
106
|
};
|
|
107
107
|
const updatedConfig = callback( currentConfig );
|
|
108
|
-
editEntityRecord(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
editEntityRecord(
|
|
109
|
+
'root',
|
|
110
|
+
'globalStyles',
|
|
111
|
+
globalStylesId,
|
|
112
|
+
{
|
|
113
|
+
styles: cleanEmptyObject( updatedConfig.styles ) || {},
|
|
114
|
+
settings: cleanEmptyObject( updatedConfig.settings ) || {},
|
|
115
|
+
},
|
|
116
|
+
options
|
|
117
|
+
);
|
|
112
118
|
},
|
|
113
119
|
[ globalStylesId ]
|
|
114
120
|
);
|
|
@@ -96,7 +96,6 @@ function ScreenBackgroundColor( { name } ) {
|
|
|
96
96
|
gradients={ gradientsPerOrigin }
|
|
97
97
|
disableCustomColors={ ! areCustomSolidsEnabled }
|
|
98
98
|
disableCustomGradients={ ! areCustomGradientsEnabled }
|
|
99
|
-
__experimentalHasMultipleOrigins
|
|
100
99
|
showTitle={ false }
|
|
101
100
|
enableAlpha
|
|
102
101
|
__experimentalIsRenderedInSidebar
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { getBlockType } from '@wordpress/blocks';
|
|
5
|
-
import { __experimentalSpacer as Spacer } from '@wordpress/components';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Internal dependencies
|
|
@@ -17,9 +16,7 @@ function ScreenBlock( { name } ) {
|
|
|
17
16
|
return (
|
|
18
17
|
<>
|
|
19
18
|
<ScreenHeader title={ blockType.title } />
|
|
20
|
-
<
|
|
21
|
-
<BlockPreviewPanel name={ name } />
|
|
22
|
-
</Spacer>
|
|
19
|
+
<BlockPreviewPanel name={ name } />
|
|
23
20
|
<ContextMenu
|
|
24
21
|
parentMenu={ '/blocks/' + encodeURIComponent( name ) }
|
|
25
22
|
name={ name }
|
|
@@ -8,6 +8,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
8
8
|
*/
|
|
9
9
|
import ScreenHeader from './header';
|
|
10
10
|
import BorderPanel, { useHasBorderPanel } from './border-panel';
|
|
11
|
+
import BlockPreviewPanel from './block-preview-panel';
|
|
11
12
|
|
|
12
13
|
function ScreenBorder( { name } ) {
|
|
13
14
|
const hasBorderPanel = useHasBorderPanel( name );
|
|
@@ -15,6 +16,7 @@ function ScreenBorder( { name } ) {
|
|
|
15
16
|
return (
|
|
16
17
|
<>
|
|
17
18
|
<ScreenHeader title={ __( 'Border' ) } />
|
|
19
|
+
<BlockPreviewPanel name={ name } />
|
|
18
20
|
{ hasBorderPanel && <BorderPanel name={ name } /> }
|
|
19
21
|
</>
|
|
20
22
|
);
|