@wordpress/edit-site 6.5.0 → 6.6.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 +2 -0
- package/build/components/global-styles/background-panel.js +1 -4
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +3 -2
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/screen-block.js +5 -7
- package/build/components/global-styles/screen-block.js.map +1 -1
- 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/shadows-edit-panel.js +1 -0
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build/components/global-styles/size-control/index.js +10 -5
- package/build/components/global-styles/size-control/index.js.map +1 -1
- package/build/components/page-patterns/index.js +5 -2
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +29 -26
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/post-edit/index.js +43 -43
- package/build/components/post-edit/index.js.map +1 -1
- package/build/components/post-fields/index.js +31 -13
- package/build/components/post-fields/index.js.map +1 -1
- package/build/components/post-list/index.js +1 -1
- package/build/components/post-list/index.js.map +1 -1
- package/build/components/sidebar-dataviews/add-new-view.js +1 -0
- package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js +1 -0
- package/build/components/sidebar-dataviews/custom-dataviews-list.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/utils/is-template-removable.js +2 -2
- package/build/utils/is-template-removable.js.map +1 -1
- package/build/utils/is-template-revertable.js +1 -1
- package/build/utils/is-template-revertable.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +1 -4
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +3 -2
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +5 -7
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- 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/shadows-edit-panel.js +1 -0
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build-module/components/global-styles/size-control/index.js +10 -5
- package/build-module/components/global-styles/size-control/index.js.map +1 -1
- package/build-module/components/page-patterns/index.js +3 -2
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +26 -25
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/post-edit/index.js +47 -47
- package/build-module/components/post-edit/index.js.map +1 -1
- package/build-module/components/post-fields/index.js +31 -13
- package/build-module/components/post-fields/index.js.map +1 -1
- package/build-module/components/post-list/index.js +1 -1
- package/build-module/components/post-list/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js +1 -0
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +1 -0
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.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/utils/is-template-removable.js +2 -2
- package/build-module/utils/is-template-removable.js.map +1 -1
- package/build-module/utils/is-template-revertable.js +1 -1
- package/build-module/utils/is-template-revertable.js.map +1 -1
- package/build-style/posts-rtl.css +19 -22
- package/build-style/posts.css +19 -22
- package/build-style/style-rtl.css +19 -22
- package/build-style/style.css +19 -22
- package/package.json +41 -41
- package/src/components/add-new-template/style.scss +1 -1
- package/src/components/editor/style.scss +1 -1
- package/src/components/global-styles/background-panel.js +0 -3
- package/src/components/global-styles/font-library-modal/installed-fonts.js +6 -4
- package/src/components/global-styles/font-library-modal/style.scss +1 -1
- package/src/components/global-styles/screen-block.js +2 -4
- package/src/components/global-styles/screen-css.js +3 -1
- package/src/components/global-styles/shadows-edit-panel.js +1 -0
- package/src/components/global-styles/size-control/index.js +9 -6
- package/src/components/page-patterns/index.js +4 -2
- package/src/components/page-patterns/use-patterns.js +33 -30
- package/src/components/post-edit/index.js +57 -53
- package/src/components/post-fields/index.js +59 -8
- package/src/components/post-list/index.js +1 -5
- package/src/components/sidebar-dataviews/add-new-view.js +1 -0
- package/src/components/sidebar-dataviews/custom-dataviews-list.js +1 -0
- package/src/hooks/push-changes-to-global-styles/index.js +1 -0
- package/src/utils/is-template-removable.js +4 -2
- package/src/utils/is-template-revertable.js +2 -1
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
* Radius scale.
|
|
39
39
|
*/
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Elevation scale.
|
|
42
42
|
*/
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Dimensions.
|
|
45
45
|
*/
|
|
46
46
|
/**
|
|
47
47
|
* Editor widths.
|
|
@@ -135,10 +135,6 @@
|
|
|
135
135
|
transition-delay: 0s;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
.dataviews__view-actions .components-search-control .components-base-control__field,
|
|
139
|
-
.dataviews-filters__container .components-search-control .components-base-control__field {
|
|
140
|
-
max-width: 240px;
|
|
141
|
-
}
|
|
142
138
|
|
|
143
139
|
.dataviews-view-list__primary-field,
|
|
144
140
|
.dataviews-view-grid__primary-field,
|
|
@@ -214,10 +210,6 @@
|
|
|
214
210
|
.dataviews-filters__container {
|
|
215
211
|
padding: 12px 24px;
|
|
216
212
|
}
|
|
217
|
-
.dataviews__view-actions .components-search-control .components-base-control__field,
|
|
218
|
-
.dataviews-filters__container .components-search-control .components-base-control__field {
|
|
219
|
-
max-width: 112px;
|
|
220
|
-
}
|
|
221
213
|
|
|
222
214
|
.dataviews-view-grid,
|
|
223
215
|
.dataviews-no-results,
|
|
@@ -550,7 +542,6 @@
|
|
|
550
542
|
background-color: #fff;
|
|
551
543
|
padding: 12px 48px;
|
|
552
544
|
border-top: 1px solid #f0f0f0;
|
|
553
|
-
color: #757575;
|
|
554
545
|
flex-shrink: 0;
|
|
555
546
|
transition: padding ease-out 0.1s;
|
|
556
547
|
}
|
|
@@ -561,11 +552,16 @@
|
|
|
561
552
|
}
|
|
562
553
|
}
|
|
563
554
|
|
|
564
|
-
.dataviews-pagination__page-
|
|
555
|
+
.dataviews-pagination__page-select {
|
|
565
556
|
font-size: 11px;
|
|
566
|
-
text-transform: uppercase;
|
|
567
557
|
font-weight: 500;
|
|
568
|
-
|
|
558
|
+
text-transform: uppercase;
|
|
559
|
+
}
|
|
560
|
+
@media (min-width: 600px) {
|
|
561
|
+
.dataviews-pagination__page-select .components-select-control__input {
|
|
562
|
+
font-size: 11px !important;
|
|
563
|
+
font-weight: 500;
|
|
564
|
+
}
|
|
569
565
|
}
|
|
570
566
|
|
|
571
567
|
/* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
|
|
@@ -767,10 +763,6 @@
|
|
|
767
763
|
}
|
|
768
764
|
}
|
|
769
765
|
|
|
770
|
-
.dataviews-density-picker__range-control {
|
|
771
|
-
width: 200px;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
766
|
.dataviews-view-grid__field-value:empty,
|
|
775
767
|
.dataviews-view-grid__field:empty {
|
|
776
768
|
display: none;
|
|
@@ -1109,6 +1101,11 @@
|
|
|
1109
1101
|
}
|
|
1110
1102
|
}
|
|
1111
1103
|
|
|
1104
|
+
.dataviews-controls__datetime {
|
|
1105
|
+
border: none;
|
|
1106
|
+
padding: 0;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1112
1109
|
.dataforms-layouts-panel__field {
|
|
1113
1110
|
width: 100%;
|
|
1114
1111
|
min-height: 32px;
|
|
@@ -2537,7 +2534,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2537
2534
|
contain: content;
|
|
2538
2535
|
}
|
|
2539
2536
|
|
|
2540
|
-
@keyframes
|
|
2537
|
+
@keyframes _tghql_slide-from-right {
|
|
2541
2538
|
from {
|
|
2542
2539
|
transform: translateX(-50px);
|
|
2543
2540
|
opacity: 0;
|
|
@@ -2547,7 +2544,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2547
2544
|
opacity: 1;
|
|
2548
2545
|
}
|
|
2549
2546
|
}
|
|
2550
|
-
@keyframes
|
|
2547
|
+
@keyframes _tghql_slide-from-left {
|
|
2551
2548
|
from {
|
|
2552
2549
|
transform: translateX(50px);
|
|
2553
2550
|
opacity: 0;
|
|
@@ -2603,10 +2600,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2603
2600
|
}
|
|
2604
2601
|
}
|
|
2605
2602
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
2606
|
-
animation-name:
|
|
2603
|
+
animation-name: _tghql_slide-from-left;
|
|
2607
2604
|
}
|
|
2608
2605
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
2609
|
-
animation-name:
|
|
2606
|
+
animation-name: _tghql_slide-from-right;
|
|
2610
2607
|
}
|
|
2611
2608
|
|
|
2612
2609
|
.edit-site-sidebar-button {
|
package/build-style/style.css
CHANGED
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
* Radius scale.
|
|
39
39
|
*/
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Elevation scale.
|
|
42
42
|
*/
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Dimensions.
|
|
45
45
|
*/
|
|
46
46
|
/**
|
|
47
47
|
* Editor widths.
|
|
@@ -135,10 +135,6 @@
|
|
|
135
135
|
transition-delay: 0s;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
.dataviews__view-actions .components-search-control .components-base-control__field,
|
|
139
|
-
.dataviews-filters__container .components-search-control .components-base-control__field {
|
|
140
|
-
max-width: 240px;
|
|
141
|
-
}
|
|
142
138
|
|
|
143
139
|
.dataviews-view-list__primary-field,
|
|
144
140
|
.dataviews-view-grid__primary-field,
|
|
@@ -214,10 +210,6 @@
|
|
|
214
210
|
.dataviews-filters__container {
|
|
215
211
|
padding: 12px 24px;
|
|
216
212
|
}
|
|
217
|
-
.dataviews__view-actions .components-search-control .components-base-control__field,
|
|
218
|
-
.dataviews-filters__container .components-search-control .components-base-control__field {
|
|
219
|
-
max-width: 112px;
|
|
220
|
-
}
|
|
221
213
|
|
|
222
214
|
.dataviews-view-grid,
|
|
223
215
|
.dataviews-no-results,
|
|
@@ -550,7 +542,6 @@
|
|
|
550
542
|
background-color: #fff;
|
|
551
543
|
padding: 12px 48px;
|
|
552
544
|
border-top: 1px solid #f0f0f0;
|
|
553
|
-
color: #757575;
|
|
554
545
|
flex-shrink: 0;
|
|
555
546
|
transition: padding ease-out 0.1s;
|
|
556
547
|
}
|
|
@@ -561,11 +552,16 @@
|
|
|
561
552
|
}
|
|
562
553
|
}
|
|
563
554
|
|
|
564
|
-
.dataviews-pagination__page-
|
|
555
|
+
.dataviews-pagination__page-select {
|
|
565
556
|
font-size: 11px;
|
|
566
|
-
text-transform: uppercase;
|
|
567
557
|
font-weight: 500;
|
|
568
|
-
|
|
558
|
+
text-transform: uppercase;
|
|
559
|
+
}
|
|
560
|
+
@media (min-width: 600px) {
|
|
561
|
+
.dataviews-pagination__page-select .components-select-control__input {
|
|
562
|
+
font-size: 11px !important;
|
|
563
|
+
font-weight: 500;
|
|
564
|
+
}
|
|
569
565
|
}
|
|
570
566
|
|
|
571
567
|
/* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
|
|
@@ -767,10 +763,6 @@
|
|
|
767
763
|
}
|
|
768
764
|
}
|
|
769
765
|
|
|
770
|
-
.dataviews-density-picker__range-control {
|
|
771
|
-
width: 200px;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
766
|
.dataviews-view-grid__field-value:empty,
|
|
775
767
|
.dataviews-view-grid__field:empty {
|
|
776
768
|
display: none;
|
|
@@ -1109,6 +1101,11 @@
|
|
|
1109
1101
|
}
|
|
1110
1102
|
}
|
|
1111
1103
|
|
|
1104
|
+
.dataviews-controls__datetime {
|
|
1105
|
+
border: none;
|
|
1106
|
+
padding: 0;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1112
1109
|
.dataforms-layouts-panel__field {
|
|
1113
1110
|
width: 100%;
|
|
1114
1111
|
min-height: 32px;
|
|
@@ -2538,7 +2535,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2538
2535
|
contain: content;
|
|
2539
2536
|
}
|
|
2540
2537
|
|
|
2541
|
-
@keyframes
|
|
2538
|
+
@keyframes _tghql_slide-from-right {
|
|
2542
2539
|
from {
|
|
2543
2540
|
transform: translateX(50px);
|
|
2544
2541
|
opacity: 0;
|
|
@@ -2548,7 +2545,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2548
2545
|
opacity: 1;
|
|
2549
2546
|
}
|
|
2550
2547
|
}
|
|
2551
|
-
@keyframes
|
|
2548
|
+
@keyframes _tghql_slide-from-left {
|
|
2552
2549
|
from {
|
|
2553
2550
|
transform: translateX(-50px);
|
|
2554
2551
|
opacity: 0;
|
|
@@ -2604,10 +2601,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2604
2601
|
}
|
|
2605
2602
|
}
|
|
2606
2603
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
2607
|
-
animation-name:
|
|
2604
|
+
animation-name: _tghql_slide-from-left;
|
|
2608
2605
|
}
|
|
2609
2606
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
2610
|
-
animation-name:
|
|
2607
|
+
animation-name: _tghql_slide-from-right;
|
|
2611
2608
|
}
|
|
2612
2609
|
|
|
2613
2610
|
.edit-site-sidebar-button {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.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.
|
|
33
|
-
"@wordpress/api-fetch": "^7.
|
|
34
|
-
"@wordpress/blob": "^4.
|
|
35
|
-
"@wordpress/block-editor": "^14.
|
|
36
|
-
"@wordpress/block-library": "^9.
|
|
37
|
-
"@wordpress/blocks": "^13.
|
|
38
|
-
"@wordpress/commands": "^1.
|
|
39
|
-
"@wordpress/components": "^28.
|
|
40
|
-
"@wordpress/compose": "^7.
|
|
41
|
-
"@wordpress/core-commands": "^1.
|
|
42
|
-
"@wordpress/core-data": "^7.
|
|
43
|
-
"@wordpress/data": "^10.
|
|
44
|
-
"@wordpress/dataviews": "^4.
|
|
45
|
-
"@wordpress/date": "^5.
|
|
46
|
-
"@wordpress/deprecated": "^4.
|
|
47
|
-
"@wordpress/dom": "^4.
|
|
48
|
-
"@wordpress/editor": "^14.
|
|
49
|
-
"@wordpress/element": "^6.
|
|
50
|
-
"@wordpress/escape-html": "^3.
|
|
51
|
-
"@wordpress/hooks": "^4.
|
|
52
|
-
"@wordpress/html-entities": "^4.
|
|
53
|
-
"@wordpress/i18n": "^5.
|
|
54
|
-
"@wordpress/icons": "^10.
|
|
55
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
56
|
-
"@wordpress/keycodes": "^4.
|
|
57
|
-
"@wordpress/notices": "^5.
|
|
58
|
-
"@wordpress/patterns": "^2.
|
|
59
|
-
"@wordpress/plugins": "^7.
|
|
60
|
-
"@wordpress/preferences": "^4.
|
|
61
|
-
"@wordpress/primitives": "^4.
|
|
62
|
-
"@wordpress/priority-queue": "^3.
|
|
63
|
-
"@wordpress/private-apis": "^1.
|
|
64
|
-
"@wordpress/reusable-blocks": "^5.
|
|
65
|
-
"@wordpress/router": "^1.
|
|
66
|
-
"@wordpress/style-engine": "^2.
|
|
67
|
-
"@wordpress/url": "^4.
|
|
68
|
-
"@wordpress/viewport": "^6.
|
|
69
|
-
"@wordpress/widgets": "^4.
|
|
70
|
-
"@wordpress/wordcount": "^4.
|
|
32
|
+
"@wordpress/a11y": "^4.6.0",
|
|
33
|
+
"@wordpress/api-fetch": "^7.6.0",
|
|
34
|
+
"@wordpress/blob": "^4.6.0",
|
|
35
|
+
"@wordpress/block-editor": "^14.1.0",
|
|
36
|
+
"@wordpress/block-library": "^9.6.1",
|
|
37
|
+
"@wordpress/blocks": "^13.6.0",
|
|
38
|
+
"@wordpress/commands": "^1.6.0",
|
|
39
|
+
"@wordpress/components": "^28.6.0",
|
|
40
|
+
"@wordpress/compose": "^7.6.0",
|
|
41
|
+
"@wordpress/core-commands": "^1.6.0",
|
|
42
|
+
"@wordpress/core-data": "^7.6.0",
|
|
43
|
+
"@wordpress/data": "^10.6.0",
|
|
44
|
+
"@wordpress/dataviews": "^4.2.0",
|
|
45
|
+
"@wordpress/date": "^5.6.0",
|
|
46
|
+
"@wordpress/deprecated": "^4.6.0",
|
|
47
|
+
"@wordpress/dom": "^4.6.0",
|
|
48
|
+
"@wordpress/editor": "^14.6.0",
|
|
49
|
+
"@wordpress/element": "^6.6.0",
|
|
50
|
+
"@wordpress/escape-html": "^3.6.0",
|
|
51
|
+
"@wordpress/hooks": "^4.6.0",
|
|
52
|
+
"@wordpress/html-entities": "^4.6.0",
|
|
53
|
+
"@wordpress/i18n": "^5.6.0",
|
|
54
|
+
"@wordpress/icons": "^10.6.0",
|
|
55
|
+
"@wordpress/keyboard-shortcuts": "^5.6.0",
|
|
56
|
+
"@wordpress/keycodes": "^4.6.0",
|
|
57
|
+
"@wordpress/notices": "^5.6.0",
|
|
58
|
+
"@wordpress/patterns": "^2.6.0",
|
|
59
|
+
"@wordpress/plugins": "^7.6.0",
|
|
60
|
+
"@wordpress/preferences": "^4.6.0",
|
|
61
|
+
"@wordpress/primitives": "^4.6.0",
|
|
62
|
+
"@wordpress/priority-queue": "^3.6.0",
|
|
63
|
+
"@wordpress/private-apis": "^1.6.0",
|
|
64
|
+
"@wordpress/reusable-blocks": "^5.6.0",
|
|
65
|
+
"@wordpress/router": "^1.6.0",
|
|
66
|
+
"@wordpress/style-engine": "^2.6.0",
|
|
67
|
+
"@wordpress/url": "^4.6.0",
|
|
68
|
+
"@wordpress/viewport": "^6.6.0",
|
|
69
|
+
"@wordpress/widgets": "^4.6.0",
|
|
70
|
+
"@wordpress/wordcount": "^4.6.0",
|
|
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": "2c178a34c8ea9b1c0e51c1fd48e24da95c418f6e"
|
|
86
86
|
}
|
|
@@ -16,7 +16,6 @@ const BACKGROUND_DEFAULT_VALUES = {
|
|
|
16
16
|
const {
|
|
17
17
|
useGlobalStyle,
|
|
18
18
|
useGlobalSetting,
|
|
19
|
-
useGlobalStyleLinks,
|
|
20
19
|
BackgroundPanel: StylesBackgroundPanel,
|
|
21
20
|
} = unlock( blockEditorPrivateApis );
|
|
22
21
|
|
|
@@ -42,7 +41,6 @@ export default function BackgroundPanel() {
|
|
|
42
41
|
const [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {
|
|
43
42
|
shouldDecodeEncode: false,
|
|
44
43
|
} );
|
|
45
|
-
const _links = useGlobalStyleLinks();
|
|
46
44
|
const [ settings ] = useGlobalSetting( '' );
|
|
47
45
|
|
|
48
46
|
return (
|
|
@@ -52,7 +50,6 @@ export default function BackgroundPanel() {
|
|
|
52
50
|
onChange={ setStyle }
|
|
53
51
|
settings={ settings }
|
|
54
52
|
defaultValues={ BACKGROUND_DEFAULT_VALUES }
|
|
55
|
-
themeFileURIs={ _links?.[ 'wp:theme-file' ] }
|
|
56
53
|
/>
|
|
57
54
|
);
|
|
58
55
|
}
|
|
@@ -130,9 +130,11 @@ function InstalledFonts() {
|
|
|
130
130
|
} catch ( error ) {
|
|
131
131
|
setNotice( {
|
|
132
132
|
type: 'error',
|
|
133
|
-
message:
|
|
134
|
-
|
|
135
|
-
error.
|
|
133
|
+
message: sprintf(
|
|
134
|
+
/* translators: %s: error message */
|
|
135
|
+
__( 'There was an error updating the font family. %s' ),
|
|
136
|
+
error.message
|
|
137
|
+
),
|
|
136
138
|
} );
|
|
137
139
|
}
|
|
138
140
|
};
|
|
@@ -464,7 +466,7 @@ function ConfirmDeleteDialog( {
|
|
|
464
466
|
setNotice( {
|
|
465
467
|
type: 'error',
|
|
466
468
|
message:
|
|
467
|
-
__( 'There was an error uninstalling the font family.
|
|
469
|
+
__( 'There was an error uninstalling the font family.' ) +
|
|
468
470
|
error.message,
|
|
469
471
|
} );
|
|
470
472
|
}
|
|
@@ -25,9 +25,10 @@ import {
|
|
|
25
25
|
VariationsPanel,
|
|
26
26
|
} from './variations/variations-panel';
|
|
27
27
|
|
|
28
|
-
// Initial control values
|
|
28
|
+
// Initial control values.
|
|
29
29
|
const BACKGROUND_BLOCK_DEFAULT_VALUES = {
|
|
30
30
|
backgroundSize: 'cover',
|
|
31
|
+
backgroundPosition: '50% 50%', // used only when backgroundSize is 'contain'.
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
function applyFallbackStyle( border ) {
|
|
@@ -84,7 +85,6 @@ const {
|
|
|
84
85
|
FiltersPanel: StylesFiltersPanel,
|
|
85
86
|
ImageSettingsPanel,
|
|
86
87
|
AdvancedPanel: StylesAdvancedPanel,
|
|
87
|
-
useGlobalStyleLinks,
|
|
88
88
|
} = unlock( blockEditorPrivateApis );
|
|
89
89
|
|
|
90
90
|
function ScreenBlock( { name, variation } ) {
|
|
@@ -104,7 +104,6 @@ function ScreenBlock( { name, variation } ) {
|
|
|
104
104
|
const [ rawSettings, setSettings ] = useGlobalSetting( '', name );
|
|
105
105
|
const settings = useSettingsForBlockElement( rawSettings, name );
|
|
106
106
|
const blockType = getBlockType( name );
|
|
107
|
-
const _links = useGlobalStyleLinks();
|
|
108
107
|
|
|
109
108
|
// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.
|
|
110
109
|
if (
|
|
@@ -271,7 +270,6 @@ function ScreenBlock( { name, variation } ) {
|
|
|
271
270
|
onChange={ setStyle }
|
|
272
271
|
settings={ settings }
|
|
273
272
|
defaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }
|
|
274
|
-
themeFileURIs={ _links?.[ 'wp:theme-file' ] }
|
|
275
273
|
/>
|
|
276
274
|
) }
|
|
277
275
|
{ hasTypographyPanel && (
|
|
@@ -34,7 +34,9 @@ function ScreenCSS() {
|
|
|
34
34
|
<>
|
|
35
35
|
{ description }
|
|
36
36
|
<ExternalLink
|
|
37
|
-
href=
|
|
37
|
+
href={ __(
|
|
38
|
+
'https://developer.wordpress.org/advanced-administration/wordpress/css/'
|
|
39
|
+
) }
|
|
38
40
|
className="edit-site-global-styles-screen-css-help-link"
|
|
39
41
|
>
|
|
40
42
|
{ __( 'Learn more about CSS' ) }
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __ } from '@wordpress/i18n';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Internal dependencies
|
|
@@ -20,9 +19,13 @@ import {
|
|
|
20
19
|
|
|
21
20
|
const DEFAULT_UNITS = [ 'px', 'em', 'rem', 'vw', 'vh' ];
|
|
22
21
|
|
|
23
|
-
function SizeControl(
|
|
22
|
+
function SizeControl( {
|
|
23
|
+
// Do not allow manipulation of margin bottom
|
|
24
|
+
__nextHasNoMarginBottom,
|
|
25
|
+
...props
|
|
26
|
+
} ) {
|
|
24
27
|
const { baseControlProps } = useBaseControlProps( props );
|
|
25
|
-
const { value, onChange, fallbackValue, disabled } = props;
|
|
28
|
+
const { value, onChange, fallbackValue, disabled, label } = props;
|
|
26
29
|
|
|
27
30
|
const units = useCustomUnits( {
|
|
28
31
|
availableUnits: DEFAULT_UNITS,
|
|
@@ -45,13 +48,13 @@ function SizeControl( props ) {
|
|
|
45
48
|
};
|
|
46
49
|
|
|
47
50
|
return (
|
|
48
|
-
<BaseControl { ...baseControlProps }>
|
|
51
|
+
<BaseControl { ...baseControlProps } __nextHasNoMarginBottom>
|
|
49
52
|
<Flex>
|
|
50
53
|
<FlexItem isBlock>
|
|
51
54
|
<UnitControl
|
|
52
55
|
__next40pxDefaultSize
|
|
53
56
|
__nextHasNoMarginBottom
|
|
54
|
-
label={
|
|
57
|
+
label={ label }
|
|
55
58
|
hideLabelFromVision
|
|
56
59
|
value={ value }
|
|
57
60
|
onChange={ handleUnitControlChange }
|
|
@@ -65,7 +68,7 @@ function SizeControl( props ) {
|
|
|
65
68
|
<RangeControl
|
|
66
69
|
__next40pxDefaultSize
|
|
67
70
|
__nextHasNoMarginBottom
|
|
68
|
-
label={
|
|
71
|
+
label={ label }
|
|
69
72
|
hideLabelFromVision
|
|
70
73
|
value={ valueQuantity }
|
|
71
74
|
initialPosition={ fallbackValue }
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from '../../utils/constants';
|
|
24
24
|
import usePatternSettings from './use-pattern-settings';
|
|
25
25
|
import { unlock } from '../../lock-unlock';
|
|
26
|
-
import usePatterns from './use-patterns';
|
|
26
|
+
import usePatterns, { useAugmentPatternsWithPermissions } from './use-patterns';
|
|
27
27
|
import PatternsHeader from './header';
|
|
28
28
|
import { useEditPostAction } from '../dataviews-actions';
|
|
29
29
|
import {
|
|
@@ -136,6 +136,8 @@ export default function DataviewsPatterns() {
|
|
|
136
136
|
return filterSortAndPaginate( patterns, viewWithoutFilters, fields );
|
|
137
137
|
}, [ patterns, view, fields, type ] );
|
|
138
138
|
|
|
139
|
+
const dataWithPermissions = useAugmentPatternsWithPermissions( data );
|
|
140
|
+
|
|
139
141
|
const templatePartActions = usePostActions( {
|
|
140
142
|
postType: TEMPLATE_PART_POST_TYPE,
|
|
141
143
|
context: 'list',
|
|
@@ -175,7 +177,7 @@ export default function DataviewsPatterns() {
|
|
|
175
177
|
paginationInfo={ paginationInfo }
|
|
176
178
|
fields={ fields }
|
|
177
179
|
actions={ actions }
|
|
178
|
-
data={
|
|
180
|
+
data={ dataWithPermissions || EMPTY_ARRAY }
|
|
179
181
|
getItemId={ ( item ) => item.name ?? item.id }
|
|
180
182
|
isLoading={ isResolving }
|
|
181
183
|
view={ view }
|
|
@@ -256,12 +256,44 @@ const selectUserPatterns = createSelector(
|
|
|
256
256
|
]
|
|
257
257
|
);
|
|
258
258
|
|
|
259
|
+
export function useAugmentPatternsWithPermissions( patterns ) {
|
|
260
|
+
const idsAndTypes = useMemo(
|
|
261
|
+
() =>
|
|
262
|
+
patterns
|
|
263
|
+
?.filter( ( record ) => record.type !== PATTERN_TYPES.theme )
|
|
264
|
+
.map( ( record ) => [ record.type, record.id ] ) ?? [],
|
|
265
|
+
[ patterns ]
|
|
266
|
+
);
|
|
267
|
+
|
|
268
|
+
const permissions = useSelect(
|
|
269
|
+
( select ) => {
|
|
270
|
+
const { getEntityRecordPermissions } = unlock(
|
|
271
|
+
select( coreStore )
|
|
272
|
+
);
|
|
273
|
+
return idsAndTypes.reduce( ( acc, [ type, id ] ) => {
|
|
274
|
+
acc[ id ] = getEntityRecordPermissions( 'postType', type, id );
|
|
275
|
+
return acc;
|
|
276
|
+
}, {} );
|
|
277
|
+
},
|
|
278
|
+
[ idsAndTypes ]
|
|
279
|
+
);
|
|
280
|
+
|
|
281
|
+
return useMemo(
|
|
282
|
+
() =>
|
|
283
|
+
patterns?.map( ( record ) => ( {
|
|
284
|
+
...record,
|
|
285
|
+
permissions: permissions?.[ record.id ] ?? {},
|
|
286
|
+
} ) ) ?? [],
|
|
287
|
+
[ patterns, permissions ]
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
|
|
259
291
|
export const usePatterns = (
|
|
260
292
|
postType,
|
|
261
293
|
categoryId,
|
|
262
294
|
{ search = '', syncStatus } = {}
|
|
263
295
|
) => {
|
|
264
|
-
|
|
296
|
+
return useSelect(
|
|
265
297
|
( select ) => {
|
|
266
298
|
if ( postType === TEMPLATE_PART_POST_TYPE ) {
|
|
267
299
|
return selectTemplateParts( select, categoryId, search );
|
|
@@ -284,35 +316,6 @@ export const usePatterns = (
|
|
|
284
316
|
},
|
|
285
317
|
[ categoryId, postType, search, syncStatus ]
|
|
286
318
|
);
|
|
287
|
-
|
|
288
|
-
const ids = useMemo(
|
|
289
|
-
() => patterns?.map( ( record ) => record.id ) ?? [],
|
|
290
|
-
[ patterns ]
|
|
291
|
-
);
|
|
292
|
-
|
|
293
|
-
const permissions = useSelect(
|
|
294
|
-
( select ) => {
|
|
295
|
-
const { getEntityRecordsPermissions } = unlock(
|
|
296
|
-
select( coreStore )
|
|
297
|
-
);
|
|
298
|
-
return getEntityRecordsPermissions( 'postType', postType, ids );
|
|
299
|
-
},
|
|
300
|
-
[ ids, postType ]
|
|
301
|
-
);
|
|
302
|
-
|
|
303
|
-
const patternsWithPermissions = useMemo(
|
|
304
|
-
() =>
|
|
305
|
-
patterns?.map( ( record, index ) => ( {
|
|
306
|
-
...record,
|
|
307
|
-
permissions: permissions[ index ],
|
|
308
|
-
} ) ) ?? [],
|
|
309
|
-
[ patterns, permissions ]
|
|
310
|
-
);
|
|
311
|
-
|
|
312
|
-
return {
|
|
313
|
-
...rest,
|
|
314
|
-
patterns: patternsWithPermissions,
|
|
315
|
-
};
|
|
316
319
|
};
|
|
317
320
|
|
|
318
321
|
export default usePatterns;
|