@wordpress/block-library 9.12.0 → 9.13.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 +2 -0
- package/build/block-keyboard-shortcuts/index.js +7 -7
- package/build/block-keyboard-shortcuts/index.js.map +1 -1
- package/build/cover/edit/index.js +1 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/index.js +10 -10
- package/build/cover/index.js.map +1 -1
- package/build/cover/shared.js +6 -7
- package/build/cover/shared.js.map +1 -1
- package/build/details/index.js +19 -0
- package/build/details/index.js.map +1 -1
- package/build/file/edit.js +7 -3
- package/build/file/edit.js.map +1 -1
- package/build/freeform/modal.js +1 -1
- package/build/freeform/modal.js.map +1 -1
- package/build/heading/index.js +1 -7
- package/build/heading/index.js.map +1 -1
- package/build/home-link/edit.js +20 -36
- package/build/home-link/edit.js.map +1 -1
- package/build/navigation/use-template-part-area-label.js +6 -8
- package/build/navigation/use-template-part-area-label.js.map +1 -1
- package/build/page-list/index.js +14 -0
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.js +26 -25
- package/build/paragraph/edit.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +1 -3
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +1 -11
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/utils.js +6 -8
- package/build/query/utils.js.map +1 -1
- package/build/social-link/edit.js +57 -10
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/index.js +4 -2
- package/build/social-link/index.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +2 -7
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/utils/get-template-part-icon.js +23 -0
- package/build/template-part/edit/utils/get-template-part-icon.js.map +1 -0
- package/build/template-part/edit/utils/hooks.js +1 -6
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/template-part/variations.js +6 -12
- package/build/template-part/variations.js.map +1 -1
- package/build/video/tracks-editor.js +135 -121
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/block-keyboard-shortcuts/index.js +7 -7
- package/build-module/block-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/cover/edit/index.js +1 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/index.js +10 -10
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/shared.js +6 -7
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/details/index.js +20 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/file/edit.js +7 -3
- package/build-module/file/edit.js.map +1 -1
- package/build-module/freeform/modal.js +1 -1
- package/build-module/freeform/modal.js.map +1 -1
- package/build-module/heading/index.js +1 -7
- package/build-module/heading/index.js.map +1 -1
- package/build-module/home-link/edit.js +23 -39
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/navigation/use-template-part-area-label.js +6 -8
- package/build-module/navigation/use-template-part-area-label.js.map +1 -1
- package/build-module/page-list/index.js +14 -0
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.js +26 -25
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -3
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +1 -11
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/utils.js +6 -8
- package/build-module/query/utils.js.map +1 -1
- package/build-module/social-link/edit.js +61 -14
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/index.js +4 -2
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +3 -8
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/utils/get-template-part-icon.js +15 -0
- package/build-module/template-part/edit/utils/get-template-part-icon.js.map +1 -0
- package/build-module/template-part/edit/utils/hooks.js +1 -6
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/template-part/variations.js +5 -11
- package/build-module/template-part/variations.js.map +1 -1
- package/build-module/video/tracks-editor.js +136 -122
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/editor-rtl.css +16 -8
- package/build-style/editor.css +16 -8
- package/build-style/navigation/style-rtl.css +1 -1
- package/build-style/navigation/style.css +1 -1
- package/build-style/page-list/style-rtl.css +4 -0
- package/build-style/page-list/style.css +4 -0
- package/build-style/query/editor-rtl.css +0 -4
- package/build-style/query/editor.css +0 -4
- package/build-style/search/style-rtl.css +3 -3
- package/build-style/search/style.css +3 -3
- package/build-style/social-link/editor-rtl.css +8 -4
- package/build-style/social-link/editor.css +8 -4
- package/build-style/style-rtl.css +8 -4
- package/build-style/style.css +8 -4
- package/build-style/video/editor-rtl.css +8 -0
- package/build-style/video/editor.css +8 -0
- package/package.json +2 -2
- package/src/block-keyboard-shortcuts/index.js +25 -11
- package/src/cover/edit/index.js +1 -1
- package/src/cover/index.js +8 -8
- package/src/cover/shared.js +10 -10
- package/src/cover/test/edit.js +2 -2
- package/src/details/index.js +23 -1
- package/src/file/edit.js +8 -2
- package/src/freeform/modal.js +1 -1
- package/src/heading/block.json +1 -7
- package/src/home-link/edit.js +27 -45
- package/src/home-link/index.php +0 -3
- package/src/navigation/index.php +4 -150
- package/src/navigation/style.scss +1 -1
- package/src/navigation/use-template-part-area-label.js +10 -10
- package/src/page-list/block.json +14 -0
- package/src/page-list/style.scss +4 -0
- package/src/paragraph/edit.js +20 -17
- package/src/pattern/index.php +0 -7
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -5
- package/src/query/edit/inspector-controls/index.js +0 -10
- package/src/query/editor.scss +0 -4
- package/src/query/index.php +1 -1
- package/src/query/utils.js +14 -15
- package/src/rss/index.php +11 -8
- package/src/search/style.scss +3 -5
- package/src/social-link/block.json +4 -2
- package/src/social-link/edit.js +87 -19
- package/src/social-link/editor.scss +11 -7
- package/src/template-part/edit/advanced-controls.js +13 -13
- package/src/template-part/edit/utils/get-template-part-icon.js +20 -0
- package/src/template-part/edit/utils/hooks.js +2 -7
- package/src/template-part/variations.js +4 -16
- package/src/video/editor.scss +9 -0
- package/src/video/tracks-editor.js +157 -139
- package/build/query/edit/inspector-controls/create-new-post-link.js +0 -40
- package/build/query/edit/inspector-controls/create-new-post-link.js.map +0 -1
- package/build-module/query/edit/inspector-controls/create-new-post-link.js +0 -33
- package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +0 -1
- package/src/query/edit/inspector-controls/create-new-post-link.js +0 -32
package/build-style/editor.css
CHANGED
|
@@ -2411,13 +2411,13 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2411
2411
|
font-size: inherit;
|
|
2412
2412
|
color: currentColor;
|
|
2413
2413
|
height: auto;
|
|
2414
|
+
font-weight: inherit;
|
|
2415
|
+
font-family: inherit;
|
|
2414
2416
|
opacity: 1;
|
|
2415
2417
|
padding: 0.25em;
|
|
2416
2418
|
}
|
|
2417
|
-
.wp-block-social-link-anchor:
|
|
2418
|
-
|
|
2419
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
2420
|
-
outline: 3px solid transparent;
|
|
2419
|
+
.wp-block-social-link-anchor:hover {
|
|
2420
|
+
transform: none;
|
|
2421
2421
|
}
|
|
2422
2422
|
|
|
2423
2423
|
:root :where(.wp-block-social-links.is-style-pill-shape .wp-social-link button) {
|
|
@@ -2429,6 +2429,10 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2429
2429
|
padding: 0;
|
|
2430
2430
|
}
|
|
2431
2431
|
|
|
2432
|
+
.wp-block-social-link__toolbar_content_text {
|
|
2433
|
+
width: 250px;
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2432
2436
|
.wp-block-social-links div.block-editor-url-input {
|
|
2433
2437
|
display: inline-block;
|
|
2434
2438
|
margin-left: 8px;
|
|
@@ -2706,6 +2710,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2706
2710
|
max-width: 240px;
|
|
2707
2711
|
}
|
|
2708
2712
|
|
|
2713
|
+
.block-library-video-tracks-editor__tracks-informative-message-title,
|
|
2709
2714
|
.block-library-video-tracks-editor__single-track-editor-edit-track-label {
|
|
2710
2715
|
margin-top: 4px;
|
|
2711
2716
|
color: #757575;
|
|
@@ -2724,6 +2729,13 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2724
2729
|
padding: 0;
|
|
2725
2730
|
}
|
|
2726
2731
|
|
|
2732
|
+
.block-library-video-tracks-editor__tracks-informative-message {
|
|
2733
|
+
padding: 8px;
|
|
2734
|
+
}
|
|
2735
|
+
.block-library-video-tracks-editor__tracks-informative-message-description {
|
|
2736
|
+
margin-bottom: 0;
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2727
2739
|
.editor-styles-wrapper ul.wp-block-post-template {
|
|
2728
2740
|
padding-left: 0;
|
|
2729
2741
|
margin-left: 0;
|
|
@@ -2737,10 +2749,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2737
2749
|
margin-bottom: 8px;
|
|
2738
2750
|
}
|
|
2739
2751
|
|
|
2740
|
-
.wp-block-query__create-new-link {
|
|
2741
|
-
padding: 0 16px 16px 52px;
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
2752
|
.block-library-query__pattern-selection-content .block-editor-block-patterns-list {
|
|
2745
2753
|
display: grid;
|
|
2746
2754
|
grid-template-columns: 1fr 1fr 1fr;
|
|
@@ -448,7 +448,7 @@ button.wp-block-navigation-item__content {
|
|
|
448
448
|
padding-top: clamp(1rem, var(--wp--style--root--padding-top), 20rem);
|
|
449
449
|
padding-left: clamp(1rem, var(--wp--style--root--padding-right), 20rem);
|
|
450
450
|
padding-bottom: clamp(1rem, var(--wp--style--root--padding-bottom), 20rem);
|
|
451
|
-
padding-right: clamp(1rem, var(--wp--style--root--padding-left),
|
|
451
|
+
padding-right: clamp(1rem, var(--wp--style--root--padding-left), 20rem);
|
|
452
452
|
overflow: auto;
|
|
453
453
|
z-index: 100000;
|
|
454
454
|
}
|
|
@@ -448,7 +448,7 @@ button.wp-block-navigation-item__content {
|
|
|
448
448
|
padding-top: clamp(1rem, var(--wp--style--root--padding-top), 20rem);
|
|
449
449
|
padding-right: clamp(1rem, var(--wp--style--root--padding-right), 20rem);
|
|
450
450
|
padding-bottom: clamp(1rem, var(--wp--style--root--padding-bottom), 20rem);
|
|
451
|
-
padding-left: clamp(1rem, var(--wp--style--root--padding-left),
|
|
451
|
+
padding-left: clamp(1rem, var(--wp--style--root--padding-left), 20rem);
|
|
452
452
|
overflow: auto;
|
|
453
453
|
z-index: 100000;
|
|
454
454
|
}
|
|
@@ -105,10 +105,6 @@
|
|
|
105
105
|
margin-bottom: 8px;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.wp-block-query__create-new-link {
|
|
109
|
-
padding: 0 52px 16px 16px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
108
|
.block-library-query__pattern-selection-content .block-editor-block-patterns-list {
|
|
113
109
|
display: grid;
|
|
114
110
|
grid-template-columns: 1fr 1fr 1fr;
|
|
@@ -105,10 +105,6 @@
|
|
|
105
105
|
margin-bottom: 8px;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.wp-block-query__create-new-link {
|
|
109
|
-
padding: 0 16px 16px 52px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
108
|
.block-library-query__pattern-selection-content .block-editor-block-patterns-list {
|
|
113
109
|
display: grid;
|
|
114
110
|
grid-template-columns: 1fr 1fr 1fr;
|
|
@@ -145,9 +145,9 @@
|
|
|
145
145
|
margin-right: 0;
|
|
146
146
|
flex-shrink: 0;
|
|
147
147
|
max-width: 100%;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
box-sizing: border-box;
|
|
149
|
+
display: flex;
|
|
150
|
+
justify-content: center;
|
|
151
151
|
}
|
|
152
152
|
.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper {
|
|
153
153
|
transition-property: width;
|
|
@@ -145,9 +145,9 @@
|
|
|
145
145
|
margin-left: 0;
|
|
146
146
|
flex-shrink: 0;
|
|
147
147
|
max-width: 100%;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
box-sizing: border-box;
|
|
149
|
+
display: flex;
|
|
150
|
+
justify-content: center;
|
|
151
151
|
}
|
|
152
152
|
.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper {
|
|
153
153
|
transition-property: width;
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
font-size: inherit;
|
|
113
113
|
color: currentColor;
|
|
114
114
|
height: auto;
|
|
115
|
+
font-weight: inherit;
|
|
116
|
+
font-family: inherit;
|
|
115
117
|
opacity: 1;
|
|
116
118
|
padding: 0.25em;
|
|
117
119
|
}
|
|
118
|
-
.wp-block-social-link-anchor:
|
|
119
|
-
|
|
120
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
121
|
-
outline: 3px solid transparent;
|
|
120
|
+
.wp-block-social-link-anchor:hover {
|
|
121
|
+
transform: none;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
:root :where(.wp-block-social-links.is-style-pill-shape .wp-social-link button) {
|
|
@@ -128,4 +128,8 @@
|
|
|
128
128
|
|
|
129
129
|
:root :where(.wp-block-social-links.is-style-logos-only .wp-social-link button) {
|
|
130
130
|
padding: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.wp-block-social-link__toolbar_content_text {
|
|
134
|
+
width: 250px;
|
|
131
135
|
}
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
font-size: inherit;
|
|
113
113
|
color: currentColor;
|
|
114
114
|
height: auto;
|
|
115
|
+
font-weight: inherit;
|
|
116
|
+
font-family: inherit;
|
|
115
117
|
opacity: 1;
|
|
116
118
|
padding: 0.25em;
|
|
117
119
|
}
|
|
118
|
-
.wp-block-social-link-anchor:
|
|
119
|
-
|
|
120
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
121
|
-
outline: 3px solid transparent;
|
|
120
|
+
.wp-block-social-link-anchor:hover {
|
|
121
|
+
transform: none;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
:root :where(.wp-block-social-links.is-style-pill-shape .wp-social-link button) {
|
|
@@ -128,4 +128,8 @@
|
|
|
128
128
|
|
|
129
129
|
:root :where(.wp-block-social-links.is-style-logos-only .wp-social-link button) {
|
|
130
130
|
padding: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.wp-block-social-link__toolbar_content_text {
|
|
134
|
+
width: 250px;
|
|
131
135
|
}
|
|
@@ -2558,7 +2558,7 @@ button.wp-block-navigation-item__content {
|
|
|
2558
2558
|
padding-top: clamp(1rem, var(--wp--style--root--padding-top), 20rem);
|
|
2559
2559
|
padding-left: clamp(1rem, var(--wp--style--root--padding-right), 20rem);
|
|
2560
2560
|
padding-bottom: clamp(1rem, var(--wp--style--root--padding-bottom), 20rem);
|
|
2561
|
-
padding-right: clamp(1rem, var(--wp--style--root--padding-left),
|
|
2561
|
+
padding-right: clamp(1rem, var(--wp--style--root--padding-left), 20rem);
|
|
2562
2562
|
overflow: auto;
|
|
2563
2563
|
z-index: 100000;
|
|
2564
2564
|
}
|
|
@@ -2767,6 +2767,10 @@ html.has-modal-open {
|
|
|
2767
2767
|
background-color: inherit;
|
|
2768
2768
|
}
|
|
2769
2769
|
|
|
2770
|
+
.wp-block-page-list {
|
|
2771
|
+
box-sizing: border-box;
|
|
2772
|
+
}
|
|
2773
|
+
|
|
2770
2774
|
.is-small-text {
|
|
2771
2775
|
font-size: 0.875em;
|
|
2772
2776
|
}
|
|
@@ -3342,9 +3346,9 @@ ul.wp-block-rss.is-grid li {
|
|
|
3342
3346
|
margin-right: 0;
|
|
3343
3347
|
flex-shrink: 0;
|
|
3344
3348
|
max-width: 100%;
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3349
|
+
box-sizing: border-box;
|
|
3350
|
+
display: flex;
|
|
3351
|
+
justify-content: center;
|
|
3348
3352
|
}
|
|
3349
3353
|
.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper {
|
|
3350
3354
|
transition-property: width;
|
package/build-style/style.css
CHANGED
|
@@ -2590,7 +2590,7 @@ button.wp-block-navigation-item__content {
|
|
|
2590
2590
|
padding-top: clamp(1rem, var(--wp--style--root--padding-top), 20rem);
|
|
2591
2591
|
padding-right: clamp(1rem, var(--wp--style--root--padding-right), 20rem);
|
|
2592
2592
|
padding-bottom: clamp(1rem, var(--wp--style--root--padding-bottom), 20rem);
|
|
2593
|
-
padding-left: clamp(1rem, var(--wp--style--root--padding-left),
|
|
2593
|
+
padding-left: clamp(1rem, var(--wp--style--root--padding-left), 20rem);
|
|
2594
2594
|
overflow: auto;
|
|
2595
2595
|
z-index: 100000;
|
|
2596
2596
|
}
|
|
@@ -2799,6 +2799,10 @@ html.has-modal-open {
|
|
|
2799
2799
|
background-color: inherit;
|
|
2800
2800
|
}
|
|
2801
2801
|
|
|
2802
|
+
.wp-block-page-list {
|
|
2803
|
+
box-sizing: border-box;
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2802
2806
|
.is-small-text {
|
|
2803
2807
|
font-size: 0.875em;
|
|
2804
2808
|
}
|
|
@@ -3376,9 +3380,9 @@ ul.wp-block-rss.is-grid li {
|
|
|
3376
3380
|
margin-left: 0;
|
|
3377
3381
|
flex-shrink: 0;
|
|
3378
3382
|
max-width: 100%;
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3383
|
+
box-sizing: border-box;
|
|
3384
|
+
display: flex;
|
|
3385
|
+
justify-content: center;
|
|
3382
3386
|
}
|
|
3383
3387
|
.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper {
|
|
3384
3388
|
transition-property: width;
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
max-width: 240px;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
.block-library-video-tracks-editor__tracks-informative-message-title,
|
|
135
136
|
.block-library-video-tracks-editor__single-track-editor-edit-track-label {
|
|
136
137
|
margin-top: 4px;
|
|
137
138
|
color: #757575;
|
|
@@ -148,4 +149,11 @@
|
|
|
148
149
|
.block-library-video-tracks-editor__track-list .components-menu-group__label,
|
|
149
150
|
.block-library-video-tracks-editor__add-tracks-container .components-menu-group__label {
|
|
150
151
|
padding: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.block-library-video-tracks-editor__tracks-informative-message {
|
|
155
|
+
padding: 8px;
|
|
156
|
+
}
|
|
157
|
+
.block-library-video-tracks-editor__tracks-informative-message-description {
|
|
158
|
+
margin-bottom: 0;
|
|
151
159
|
}
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
max-width: 240px;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
.block-library-video-tracks-editor__tracks-informative-message-title,
|
|
135
136
|
.block-library-video-tracks-editor__single-track-editor-edit-track-label {
|
|
136
137
|
margin-top: 4px;
|
|
137
138
|
color: #757575;
|
|
@@ -148,4 +149,11 @@
|
|
|
148
149
|
.block-library-video-tracks-editor__track-list .components-menu-group__label,
|
|
149
150
|
.block-library-video-tracks-editor__add-tracks-container .components-menu-group__label {
|
|
150
151
|
padding: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.block-library-video-tracks-editor__tracks-informative-message {
|
|
155
|
+
padding: 8px;
|
|
156
|
+
}
|
|
157
|
+
.block-library-video-tracks-editor__tracks-informative-message-description {
|
|
158
|
+
margin-bottom: 0;
|
|
151
159
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.13.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"publishConfig": {
|
|
91
91
|
"access": "public"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "cce81c13739c2a8b53d91df90c4f037cb68c2665"
|
|
94
94
|
}
|
|
@@ -90,22 +90,36 @@ function BlockKeyboardShortcuts() {
|
|
|
90
90
|
},
|
|
91
91
|
} );
|
|
92
92
|
} );
|
|
93
|
-
}, [] );
|
|
93
|
+
}, [ registerShortcut ] );
|
|
94
94
|
|
|
95
95
|
useShortcut(
|
|
96
96
|
'core/block-editor/transform-heading-to-paragraph',
|
|
97
97
|
( event ) => handleTransformHeadingAndParagraph( event, 0 )
|
|
98
98
|
);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
useShortcut(
|
|
100
|
+
'core/block-editor/transform-paragraph-to-heading-1',
|
|
101
|
+
( event ) => handleTransformHeadingAndParagraph( event, 1 )
|
|
102
|
+
);
|
|
103
|
+
useShortcut(
|
|
104
|
+
'core/block-editor/transform-paragraph-to-heading-2',
|
|
105
|
+
( event ) => handleTransformHeadingAndParagraph( event, 2 )
|
|
106
|
+
);
|
|
107
|
+
useShortcut(
|
|
108
|
+
'core/block-editor/transform-paragraph-to-heading-3',
|
|
109
|
+
( event ) => handleTransformHeadingAndParagraph( event, 3 )
|
|
110
|
+
);
|
|
111
|
+
useShortcut(
|
|
112
|
+
'core/block-editor/transform-paragraph-to-heading-4',
|
|
113
|
+
( event ) => handleTransformHeadingAndParagraph( event, 4 )
|
|
114
|
+
);
|
|
115
|
+
useShortcut(
|
|
116
|
+
'core/block-editor/transform-paragraph-to-heading-5',
|
|
117
|
+
( event ) => handleTransformHeadingAndParagraph( event, 5 )
|
|
118
|
+
);
|
|
119
|
+
useShortcut(
|
|
120
|
+
'core/block-editor/transform-paragraph-to-heading-6',
|
|
121
|
+
( event ) => handleTransformHeadingAndParagraph( event, 6 )
|
|
122
|
+
);
|
|
109
123
|
|
|
110
124
|
return null;
|
|
111
125
|
}
|
package/src/cover/edit/index.js
CHANGED
|
@@ -201,7 +201,7 @@ function CoverEdit( {
|
|
|
201
201
|
averageBackgroundColor
|
|
202
202
|
);
|
|
203
203
|
|
|
204
|
-
if ( backgroundType === IMAGE_BACKGROUND_TYPE && mediaAttributes
|
|
204
|
+
if ( backgroundType === IMAGE_BACKGROUND_TYPE && mediaAttributes?.id ) {
|
|
205
205
|
const { imageDefaultSize } = getSettings();
|
|
206
206
|
|
|
207
207
|
// Try to use the previous selected image size if it's available
|
package/src/cover/index.js
CHANGED
|
@@ -26,6 +26,14 @@ export const settings = {
|
|
|
26
26
|
customOverlayColor: '#065174',
|
|
27
27
|
dimRatio: 40,
|
|
28
28
|
url: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg',
|
|
29
|
+
style: {
|
|
30
|
+
typography: {
|
|
31
|
+
fontSize: 48,
|
|
32
|
+
},
|
|
33
|
+
color: {
|
|
34
|
+
text: 'white',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
29
37
|
},
|
|
30
38
|
innerBlocks: [
|
|
31
39
|
{
|
|
@@ -33,14 +41,6 @@ export const settings = {
|
|
|
33
41
|
attributes: {
|
|
34
42
|
content: __( '<strong>Snow Patrol</strong>' ),
|
|
35
43
|
align: 'center',
|
|
36
|
-
style: {
|
|
37
|
-
typography: {
|
|
38
|
-
fontSize: 48,
|
|
39
|
-
},
|
|
40
|
-
color: {
|
|
41
|
-
text: 'white',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
46
|
],
|
package/src/cover/shared.js
CHANGED
|
@@ -35,7 +35,7 @@ export function dimRatioToClass( ratio ) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export function attributesFromMedia( media ) {
|
|
38
|
-
if ( ! media || ! media.url ) {
|
|
38
|
+
if ( ! media || ( ! media.url && ! media.src ) ) {
|
|
39
39
|
return {
|
|
40
40
|
url: undefined,
|
|
41
41
|
id: undefined,
|
|
@@ -52,23 +52,23 @@ export function attributesFromMedia( media ) {
|
|
|
52
52
|
if ( media.media_type === IMAGE_BACKGROUND_TYPE ) {
|
|
53
53
|
mediaType = IMAGE_BACKGROUND_TYPE;
|
|
54
54
|
} else {
|
|
55
|
-
//
|
|
55
|
+
// Only images and videos are accepted so if the media_type is not an image we can assume it is a video.
|
|
56
56
|
// Videos contain the media type of 'file' in the object returned from the rest api.
|
|
57
57
|
mediaType = VIDEO_BACKGROUND_TYPE;
|
|
58
58
|
}
|
|
59
|
-
} else {
|
|
60
59
|
// For media selections originated from existing files in the media library.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
60
|
+
} else if (
|
|
61
|
+
media.type &&
|
|
62
|
+
( media.type === IMAGE_BACKGROUND_TYPE ||
|
|
63
|
+
media.type === VIDEO_BACKGROUND_TYPE )
|
|
64
|
+
) {
|
|
67
65
|
mediaType = media.type;
|
|
66
|
+
} else {
|
|
67
|
+
return;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
return {
|
|
71
|
-
url: media.url,
|
|
71
|
+
url: media.url || media.src,
|
|
72
72
|
id: media.id,
|
|
73
73
|
alt: media?.alt,
|
|
74
74
|
backgroundType: mediaType,
|
package/src/cover/test/edit.js
CHANGED
|
@@ -337,7 +337,7 @@ describe( 'Cover block', () => {
|
|
|
337
337
|
describe( 'when colors are disabled', () => {
|
|
338
338
|
test( 'does not render overlay control', async () => {
|
|
339
339
|
await setup( undefined, true, disabledColorSettings );
|
|
340
|
-
await
|
|
340
|
+
await selectBlock( 'Block: Cover' );
|
|
341
341
|
await userEvent.click(
|
|
342
342
|
screen.getByRole( 'tab', { name: 'Styles' } )
|
|
343
343
|
);
|
|
@@ -350,7 +350,7 @@ describe( 'Cover block', () => {
|
|
|
350
350
|
} );
|
|
351
351
|
test( 'does not render opacity control', async () => {
|
|
352
352
|
await setup( undefined, true, disabledColorSettings );
|
|
353
|
-
await
|
|
353
|
+
await selectBlock( 'Block: Cover' );
|
|
354
354
|
await userEvent.click(
|
|
355
355
|
screen.getByRole( 'tab', { name: 'Styles' } )
|
|
356
356
|
);
|
package/src/details/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { details as icon } from '@wordpress/icons';
|
|
5
|
-
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal dependencies
|
|
@@ -34,6 +34,28 @@ export const settings = {
|
|
|
34
34
|
},
|
|
35
35
|
],
|
|
36
36
|
},
|
|
37
|
+
__experimentalLabel( attributes, { context } ) {
|
|
38
|
+
const { summary } = attributes;
|
|
39
|
+
|
|
40
|
+
const customName = attributes?.metadata?.name;
|
|
41
|
+
const hasSummary = summary?.trim().length > 0;
|
|
42
|
+
|
|
43
|
+
// In the list view, use the block's summary as the label.
|
|
44
|
+
// If the summary is empty, fall back to the default label.
|
|
45
|
+
if ( context === 'list-view' && ( customName || hasSummary ) ) {
|
|
46
|
+
return customName || summary;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if ( context === 'accessibility' ) {
|
|
50
|
+
return ! hasSummary
|
|
51
|
+
? __( 'Details. Empty.' )
|
|
52
|
+
: sprintf(
|
|
53
|
+
/* translators: accessibility text; summary title. */
|
|
54
|
+
__( 'Details. %s' ),
|
|
55
|
+
summary
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
37
59
|
save,
|
|
38
60
|
edit,
|
|
39
61
|
transforms,
|
package/src/file/edit.js
CHANGED
|
@@ -128,15 +128,21 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
const isPdf = newMedia.url.endsWith( '.pdf' );
|
|
131
|
+
const pdfAttributes = {
|
|
132
|
+
displayPreview: isPdf
|
|
133
|
+
? attributes.displayPreview ?? true
|
|
134
|
+
: undefined,
|
|
135
|
+
previewHeight: isPdf ? attributes.previewHeight ?? 600 : undefined,
|
|
136
|
+
};
|
|
137
|
+
|
|
131
138
|
setAttributes( {
|
|
132
139
|
href: newMedia.url,
|
|
133
140
|
fileName: newMedia.title,
|
|
134
141
|
textLinkHref: newMedia.url,
|
|
135
142
|
id: newMedia.id,
|
|
136
|
-
displayPreview: isPdf ? true : undefined,
|
|
137
|
-
previewHeight: isPdf ? 600 : undefined,
|
|
138
143
|
fileId: `wp-block-file--media-${ clientId }`,
|
|
139
144
|
blob: undefined,
|
|
145
|
+
...pdfAttributes,
|
|
140
146
|
} );
|
|
141
147
|
setTemporaryURL();
|
|
142
148
|
}
|
package/src/freeform/modal.js
CHANGED
package/src/heading/block.json
CHANGED
package/src/home-link/edit.js
CHANGED
|
@@ -6,15 +6,10 @@ import clsx from 'clsx';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
RichText,
|
|
11
|
-
useBlockProps,
|
|
12
|
-
store as blockEditorStore,
|
|
13
|
-
} from '@wordpress/block-editor';
|
|
9
|
+
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
14
10
|
import { __ } from '@wordpress/i18n';
|
|
15
|
-
import { useSelect
|
|
11
|
+
import { useSelect } from '@wordpress/data';
|
|
16
12
|
import { store as coreStore } from '@wordpress/core-data';
|
|
17
|
-
import { useEffect } from '@wordpress/element';
|
|
18
13
|
|
|
19
14
|
const preventDefault = ( event ) => event.preventDefault();
|
|
20
15
|
|
|
@@ -24,8 +19,6 @@ export default function HomeEdit( { attributes, setAttributes, context } ) {
|
|
|
24
19
|
return select( coreStore ).getEntityRecord( 'root', '__unstableBase' )
|
|
25
20
|
?.home;
|
|
26
21
|
}, [] );
|
|
27
|
-
const { __unstableMarkNextChangeAsNotPersistent } =
|
|
28
|
-
useDispatch( blockEditorStore );
|
|
29
22
|
|
|
30
23
|
const { textColor, backgroundColor, style } = context;
|
|
31
24
|
const blockProps = useBlockProps( {
|
|
@@ -41,42 +34,31 @@ export default function HomeEdit( { attributes, setAttributes, context } ) {
|
|
|
41
34
|
},
|
|
42
35
|
} );
|
|
43
36
|
|
|
44
|
-
const { label } = attributes;
|
|
45
|
-
|
|
46
|
-
useEffect( () => {
|
|
47
|
-
if ( label === undefined ) {
|
|
48
|
-
__unstableMarkNextChangeAsNotPersistent();
|
|
49
|
-
setAttributes( { label: __( 'Home' ) } );
|
|
50
|
-
}
|
|
51
|
-
}, [ label ] );
|
|
52
|
-
|
|
53
37
|
return (
|
|
54
|
-
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</div>
|
|
80
|
-
</>
|
|
38
|
+
<div { ...blockProps }>
|
|
39
|
+
<a
|
|
40
|
+
className="wp-block-home-link__content wp-block-navigation-item__content"
|
|
41
|
+
href={ homeUrl }
|
|
42
|
+
onClick={ preventDefault }
|
|
43
|
+
>
|
|
44
|
+
<RichText
|
|
45
|
+
identifier="label"
|
|
46
|
+
className="wp-block-home-link__label"
|
|
47
|
+
value={ attributes.label ?? __( 'Home' ) }
|
|
48
|
+
onChange={ ( labelValue ) => {
|
|
49
|
+
setAttributes( { label: labelValue } );
|
|
50
|
+
} }
|
|
51
|
+
aria-label={ __( 'Home link text' ) }
|
|
52
|
+
placeholder={ __( 'Add home link' ) }
|
|
53
|
+
withoutInteractiveFormatting
|
|
54
|
+
allowedFormats={ [
|
|
55
|
+
'core/bold',
|
|
56
|
+
'core/italic',
|
|
57
|
+
'core/image',
|
|
58
|
+
'core/strikethrough',
|
|
59
|
+
] }
|
|
60
|
+
/>
|
|
61
|
+
</a>
|
|
62
|
+
</div>
|
|
81
63
|
);
|
|
82
64
|
}
|