@wordpress/block-library 9.14.0 → 9.15.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/LICENSE.md +1 -1
- package/build/archives/edit.js +83 -36
- package/build/archives/edit.js.map +1 -1
- package/build/button/deprecated.js +182 -1
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.js +47 -25
- package/build/button/edit.js.map +1 -1
- package/build/button/index.js +8 -2
- package/build/button/index.js.map +1 -1
- package/build/button/save.js +8 -5
- package/build/button/save.js.map +1 -1
- package/build/column/edit.js +33 -13
- package/build/column/edit.js.map +1 -1
- package/build/columns/edit.js +50 -27
- package/build/columns/edit.js.map +1 -1
- package/build/comments/index.js +1 -0
- package/build/comments/index.js.map +1 -1
- package/build/cover/edit/index.js +9 -3
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit.native.js +1 -1
- package/build/cover/edit.native.js.map +1 -1
- package/build/details/edit.js +29 -7
- package/build/details/edit.js.map +1 -1
- package/build/image/transforms.js +1 -0
- package/build/image/transforms.js.map +1 -1
- package/build/latest-posts/deprecated.js +12 -0
- package/build/latest-posts/deprecated.js.map +1 -1
- package/build/latest-posts/index.js +12 -0
- package/build/latest-posts/index.js.map +1 -1
- package/build/loginout/edit.js +42 -13
- package/build/loginout/edit.js.map +1 -1
- package/build/media-text/edit.js +59 -31
- package/build/media-text/edit.js.map +1 -1
- package/build/more/edit.js +28 -7
- package/build/more/edit.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +5 -3
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation-link/edit.js +95 -55
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +105 -53
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +44 -25
- package/build/page-list/edit.js.map +1 -1
- package/build/paragraph/edit.js +14 -4
- package/build/paragraph/edit.js.map +1 -1
- package/build/post-author/edit.js +15 -3
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author/index.js +4 -2
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-name/edit.js +11 -5
- package/build/post-author-name/edit.js.map +1 -1
- package/build/post-author-name/index.js +4 -2
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-comments-form/index.js +6 -1
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +8 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-date/edit.js +58 -18
- package/build/post-date/edit.js.map +1 -1
- package/build/post-date/index.js +2 -1
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +42 -18
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +17 -19
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +45 -11
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +6 -3
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/index.js +11 -7
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-navigation-link/variations.js +2 -2
- package/build/post-navigation-link/variations.js.map +1 -1
- package/build/post-template/index.js +11 -1
- package/build/post-template/index.js.map +1 -1
- package/build/post-title/index.js +6 -3
- package/build/post-title/index.js.map +1 -1
- package/build/query-no-results/index.js +10 -9
- package/build/query-no-results/index.js.map +1 -1
- package/build/query-pagination/edit.js +47 -17
- package/build/query-pagination/edit.js.map +1 -1
- package/build/query-pagination/query-pagination-label-control.js +1 -1
- package/build/query-pagination/query-pagination-label-control.js.map +1 -1
- package/build/query-pagination-numbers/edit.js +33 -15
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-total/edit.js +8 -10
- package/build/query-total/edit.js.map +1 -1
- package/build/query-total/index.js +8 -1
- package/build/query-total/index.js.map +1 -1
- package/build/read-more/index.js +7 -1
- package/build/read-more/index.js.map +1 -1
- package/build/site-logo/index.js +4 -2
- package/build/site-logo/index.js.map +1 -1
- package/build/site-title/edit.js +41 -12
- package/build/site-title/edit.js.map +1 -1
- package/build/site-title/index.js +4 -2
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +19 -3
- package/build/social-link/edit.js.map +1 -1
- package/build/social-links/edit.js +41 -12
- package/build/social-links/edit.js.map +1 -1
- package/build/spacer/controls.js +34 -12
- package/build/spacer/controls.js.map +1 -1
- package/build/table/edit.js +48 -15
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +4 -1
- package/build/table/index.js.map +1 -1
- package/build/table-of-contents/edit.js +1 -1
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/table-of-contents/index.js +24 -23
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/edit.js +56 -11
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/video/edit-common-settings.js +90 -30
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.js +20 -49
- package/build/video/edit.js.map +1 -1
- package/build/video/poster-image.js +81 -0
- package/build/video/poster-image.js.map +1 -0
- package/build/video/tracks-editor.js +1 -1
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/archives/edit.js +84 -37
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/button/deprecated.js +183 -2
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/edit.js +50 -28
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/index.js +8 -2
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/save.js +9 -6
- package/build-module/button/save.js.map +1 -1
- package/build-module/column/edit.js +34 -14
- package/build-module/column/edit.js.map +1 -1
- package/build-module/columns/edit.js +52 -29
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/comments/index.js +1 -0
- package/build-module/comments/index.js.map +1 -1
- package/build-module/cover/edit/index.js +9 -3
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit.native.js +2 -2
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/details/edit.js +30 -8
- package/build-module/details/edit.js.map +1 -1
- package/build-module/image/transforms.js +1 -0
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/latest-posts/deprecated.js +12 -0
- package/build-module/latest-posts/deprecated.js.map +1 -1
- package/build-module/latest-posts/index.js +12 -0
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/loginout/edit.js +42 -14
- package/build-module/loginout/edit.js.map +1 -1
- package/build-module/media-text/edit.js +59 -31
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/more/edit.js +28 -8
- package/build-module/more/edit.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +5 -3
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation-link/edit.js +96 -56
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +106 -54
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +45 -26
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/paragraph/edit.js +15 -6
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/post-author/edit.js +16 -4
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-author/index.js +4 -2
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-name/edit.js +12 -6
- package/build-module/post-author-name/edit.js.map +1 -1
- package/build-module/post-author-name/index.js +4 -2
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +6 -1
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +8 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-date/edit.js +59 -19
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-date/index.js +2 -1
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +44 -20
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +18 -20
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +47 -13
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +6 -3
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/index.js +12 -7
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-navigation-link/variations.js +2 -2
- package/build-module/post-navigation-link/variations.js.map +1 -1
- package/build-module/post-template/index.js +11 -1
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-title/index.js +6 -3
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/query-no-results/index.js +10 -9
- package/build-module/query-no-results/index.js.map +1 -1
- package/build-module/query-pagination/edit.js +49 -19
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination/query-pagination-label-control.js +1 -1
- package/build-module/query-pagination/query-pagination-label-control.js.map +1 -1
- package/build-module/query-pagination-numbers/edit.js +34 -16
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-total/edit.js +8 -10
- package/build-module/query-total/edit.js.map +1 -1
- package/build-module/query-total/index.js +8 -1
- package/build-module/query-total/index.js.map +1 -1
- package/build-module/read-more/index.js +7 -1
- package/build-module/read-more/index.js.map +1 -1
- package/build-module/site-logo/index.js +4 -2
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-title/edit.js +42 -13
- package/build-module/site-title/edit.js.map +1 -1
- package/build-module/site-title/index.js +4 -2
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +20 -4
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-links/edit.js +42 -13
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/spacer/controls.js +35 -13
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/table/edit.js +49 -16
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +4 -1
- package/build-module/table/index.js.map +1 -1
- package/build-module/table-of-contents/edit.js +1 -1
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/table-of-contents/index.js +26 -25
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/edit.js +57 -12
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/video/edit-common-settings.js +91 -31
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +24 -53
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/poster-image.js +74 -0
- package/build-module/video/poster-image.js.map +1 -0
- package/build-module/video/tracks-editor.js +1 -1
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/comment-template/style-rtl.css +0 -1
- package/build-style/comment-template/style.css +0 -1
- package/build-style/editor-rtl.css +4 -19
- package/build-style/editor.css +4 -19
- package/build-style/form-input/style-rtl.css +0 -2
- package/build-style/form-input/style.css +0 -2
- package/build-style/freeform/editor-rtl.css +4 -8
- package/build-style/freeform/editor.css +4 -8
- package/build-style/{post-template/editor.css → post-comments-link/style-rtl.css} +2 -4
- package/build-style/{post-template/editor-rtl.css → post-comments-link/style.css} +2 -4
- package/build-style/post-template/style-rtl.css +1 -0
- package/build-style/post-template/style.css +1 -0
- package/build-style/query-total/style-rtl.css +103 -0
- package/build-style/query-total/style.css +103 -0
- package/build-style/read-more/style-rtl.css +0 -1
- package/build-style/read-more/style.css +0 -1
- package/build-style/style-rtl.css +9 -4
- package/build-style/style.css +9 -4
- package/build-style/tag-cloud/editor-rtl.css +0 -5
- package/build-style/tag-cloud/editor.css +0 -5
- package/package.json +35 -35
- package/src/archives/edit.js +94 -36
- package/src/audio/test/__snapshots__/edit.native.js.snap +1 -1
- package/src/block/index.php +20 -0
- package/src/button/block.json +17 -2
- package/src/button/deprecated.js +189 -0
- package/src/button/edit.js +60 -31
- package/src/button/save.js +6 -1
- package/src/column/edit.js +34 -13
- package/src/columns/edit.js +71 -40
- package/src/comments/index.js +1 -0
- package/src/cover/edit/index.js +12 -5
- package/src/cover/edit.native.js +5 -2
- package/src/cover/test/edit.js +5 -7
- package/src/details/edit.js +40 -11
- package/src/editor.scss +0 -1
- package/src/file/test/__snapshots__/edit.native.js.snap +1 -1
- package/src/image/transforms.js +1 -0
- package/src/latest-posts/block.json +12 -0
- package/src/loginout/edit.js +56 -20
- package/src/media-text/edit.js +57 -28
- package/src/more/edit.js +39 -12
- package/src/navigation/edit/navigation-menu-selector.js +9 -2
- package/src/navigation/index.php +2 -2
- package/src/navigation-link/edit.js +101 -61
- package/src/navigation-link/index.php +16 -1
- package/src/navigation-submenu/edit.js +113 -57
- package/src/page-list/edit.js +52 -31
- package/src/paragraph/edit.js +18 -4
- package/src/post-author/block.json +4 -2
- package/src/post-author/edit.js +17 -3
- package/src/post-author/index.php +4 -0
- package/src/post-author-name/block.json +4 -2
- package/src/post-author-name/edit.js +17 -4
- package/src/post-author-name/index.php +4 -0
- package/src/post-comments-form/block.json +6 -1
- package/src/post-comments-link/block.json +8 -1
- package/src/post-comments-link/style.scss +4 -0
- package/src/post-content/index.php +23 -0
- package/src/post-date/block.json +2 -1
- package/src/post-date/edit.js +79 -25
- package/src/post-excerpt/edit.js +59 -22
- package/src/post-featured-image/block.json +6 -3
- package/src/post-featured-image/dimension-controls.js +18 -21
- package/src/post-featured-image/edit.js +67 -10
- package/src/post-navigation-link/block.json +0 -6
- package/src/post-navigation-link/index.js +11 -0
- package/src/post-navigation-link/variations.js +2 -2
- package/src/post-template/block.json +11 -1
- package/src/post-template/style.scss +2 -0
- package/src/post-title/block.json +6 -3
- package/src/query-no-results/block.json +0 -10
- package/src/query-no-results/index.js +11 -0
- package/src/query-pagination/edit.js +57 -15
- package/src/query-pagination/query-pagination-label-control.js +1 -3
- package/src/query-pagination-numbers/edit.js +41 -19
- package/src/query-pagination-previous/index.php +21 -14
- package/src/query-total/block.json +8 -1
- package/src/query-total/edit.js +11 -13
- package/src/query-total/index.php +9 -13
- package/src/query-total/style.scss +4 -0
- package/src/read-more/index.js +6 -0
- package/src/site-logo/block.json +4 -2
- package/src/site-title/block.json +4 -2
- package/src/site-title/edit.js +52 -15
- package/src/social-link/edit.js +21 -6
- package/src/social-links/edit.js +52 -15
- package/src/spacer/controls.js +42 -15
- package/src/style.scss +2 -0
- package/src/table/block.json +4 -1
- package/src/table/edit.js +58 -20
- package/src/table-of-contents/block.json +0 -52
- package/src/table-of-contents/edit.js +1 -1
- package/src/table-of-contents/index.js +53 -0
- package/src/tag-cloud/edit.js +60 -8
- package/src/tag-cloud/editor.scss +0 -8
- package/src/video/edit-common-settings.js +97 -39
- package/src/video/edit.js +29 -75
- package/src/video/poster-image.js +86 -0
- package/src/video/tracks-editor.js +1 -1
- package/tsconfig.json +0 -2
- package/src/post-template/editor.scss +0 -7
package/src/column/edit.js
CHANGED
|
@@ -18,31 +18,52 @@ import {
|
|
|
18
18
|
} from '@wordpress/block-editor';
|
|
19
19
|
import {
|
|
20
20
|
__experimentalUseCustomUnits as useCustomUnits,
|
|
21
|
-
PanelBody,
|
|
22
21
|
__experimentalUnitControl as UnitControl,
|
|
22
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
23
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
23
24
|
} from '@wordpress/components';
|
|
24
25
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
25
26
|
import { sprintf, __ } from '@wordpress/i18n';
|
|
26
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Internal dependencies
|
|
30
|
+
*/
|
|
31
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
32
|
+
|
|
27
33
|
function ColumnInspectorControls( { width, setAttributes } ) {
|
|
28
34
|
const [ availableUnits ] = useSettings( 'spacing.units' );
|
|
29
35
|
const units = useCustomUnits( {
|
|
30
36
|
availableUnits: availableUnits || [ '%', 'px', 'em', 'rem', 'vw' ],
|
|
31
37
|
} );
|
|
38
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
32
39
|
return (
|
|
33
|
-
<
|
|
34
|
-
|
|
40
|
+
<ToolsPanel
|
|
41
|
+
label={ __( 'Settings' ) }
|
|
42
|
+
resetAll={ () => {
|
|
43
|
+
setAttributes( { width: undefined } );
|
|
44
|
+
} }
|
|
45
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
46
|
+
>
|
|
47
|
+
<ToolsPanelItem
|
|
48
|
+
hasValue={ () => width !== undefined }
|
|
35
49
|
label={ __( 'Width' ) }
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
onDeselect={ () => setAttributes( { width: undefined } ) }
|
|
51
|
+
isShownByDefault
|
|
52
|
+
>
|
|
53
|
+
<UnitControl
|
|
54
|
+
label={ __( 'Width' ) }
|
|
55
|
+
__unstableInputWidth="calc(50% - 8px)"
|
|
56
|
+
__next40pxDefaultSize
|
|
57
|
+
value={ width || '' }
|
|
58
|
+
onChange={ ( nextWidth ) => {
|
|
59
|
+
nextWidth =
|
|
60
|
+
0 > parseFloat( nextWidth ) ? '0' : nextWidth;
|
|
61
|
+
setAttributes( { width: nextWidth } );
|
|
62
|
+
} }
|
|
63
|
+
units={ units }
|
|
64
|
+
/>
|
|
65
|
+
</ToolsPanelItem>
|
|
66
|
+
</ToolsPanel>
|
|
46
67
|
);
|
|
47
68
|
}
|
|
48
69
|
|
package/src/columns/edit.js
CHANGED
|
@@ -9,9 +9,11 @@ import clsx from 'clsx';
|
|
|
9
9
|
import { __ } from '@wordpress/i18n';
|
|
10
10
|
import {
|
|
11
11
|
Notice,
|
|
12
|
-
PanelBody,
|
|
13
12
|
RangeControl,
|
|
14
13
|
ToggleControl,
|
|
14
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
15
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
16
|
+
__experimentalVStack as VStack,
|
|
15
17
|
} from '@wordpress/components';
|
|
16
18
|
|
|
17
19
|
import {
|
|
@@ -39,6 +41,7 @@ import {
|
|
|
39
41
|
getRedistributedColumnWidths,
|
|
40
42
|
toWidthPrecision,
|
|
41
43
|
} from './utils';
|
|
44
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
42
45
|
|
|
43
46
|
const DEFAULT_BLOCK = {
|
|
44
47
|
name: 'core/column',
|
|
@@ -51,19 +54,15 @@ function ColumnInspectorControls( {
|
|
|
51
54
|
} ) {
|
|
52
55
|
const { count, canInsertColumnBlock, minCount } = useSelect(
|
|
53
56
|
( select ) => {
|
|
54
|
-
const {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
getBlocks,
|
|
58
|
-
getBlockCount,
|
|
59
|
-
} = select( blockEditorStore );
|
|
60
|
-
const innerBlocks = getBlocks( clientId );
|
|
57
|
+
const { canInsertBlockType, canRemoveBlock, getBlockOrder } =
|
|
58
|
+
select( blockEditorStore );
|
|
59
|
+
const blockOrder = getBlockOrder( clientId );
|
|
61
60
|
|
|
62
61
|
// Get the indexes of columns for which removal is prevented.
|
|
63
62
|
// The highest index will be used to determine the minimum column count.
|
|
64
|
-
const preventRemovalBlockIndexes =
|
|
65
|
-
( acc,
|
|
66
|
-
if ( ! canRemoveBlock(
|
|
63
|
+
const preventRemovalBlockIndexes = blockOrder.reduce(
|
|
64
|
+
( acc, blockId, index ) => {
|
|
65
|
+
if ( ! canRemoveBlock( blockId ) ) {
|
|
67
66
|
acc.push( index );
|
|
68
67
|
}
|
|
69
68
|
return acc;
|
|
@@ -72,7 +71,7 @@ function ColumnInspectorControls( {
|
|
|
72
71
|
);
|
|
73
72
|
|
|
74
73
|
return {
|
|
75
|
-
count:
|
|
74
|
+
count: blockOrder.length,
|
|
76
75
|
canInsertColumnBlock: canInsertBlockType(
|
|
77
76
|
'core/column',
|
|
78
77
|
clientId
|
|
@@ -148,41 +147,73 @@ function ColumnInspectorControls( {
|
|
|
148
147
|
replaceInnerBlocks( clientId, innerBlocks );
|
|
149
148
|
}
|
|
150
149
|
|
|
150
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
151
|
+
|
|
151
152
|
return (
|
|
152
|
-
<
|
|
153
|
+
<ToolsPanel
|
|
154
|
+
label={ __( 'Settings' ) }
|
|
155
|
+
resetAll={ () => {
|
|
156
|
+
updateColumns( count, minCount );
|
|
157
|
+
setAttributes( {
|
|
158
|
+
isStackedOnMobile: true,
|
|
159
|
+
} );
|
|
160
|
+
} }
|
|
161
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
162
|
+
>
|
|
153
163
|
{ canInsertColumnBlock && (
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
164
|
+
<ToolsPanelItem
|
|
165
|
+
label={ __( 'Columns' ) }
|
|
166
|
+
isShownByDefault
|
|
167
|
+
hasValue={ () => count }
|
|
168
|
+
onDeselect={ () => updateColumns( count, minCount ) }
|
|
169
|
+
>
|
|
170
|
+
<VStack spacing={ 4 }>
|
|
171
|
+
<RangeControl
|
|
172
|
+
__nextHasNoMarginBottom
|
|
173
|
+
__next40pxDefaultSize
|
|
174
|
+
label={ __( 'Columns' ) }
|
|
175
|
+
value={ count }
|
|
176
|
+
onChange={ ( value ) =>
|
|
177
|
+
updateColumns(
|
|
178
|
+
count,
|
|
179
|
+
Math.max( minCount, value )
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
min={ Math.max( 1, minCount ) }
|
|
183
|
+
max={ Math.max( 6, count ) }
|
|
184
|
+
/>
|
|
185
|
+
{ count > 6 && (
|
|
186
|
+
<Notice status="warning" isDismissible={ false }>
|
|
187
|
+
{ __(
|
|
188
|
+
'This column count exceeds the recommended amount and may cause visual breakage.'
|
|
189
|
+
) }
|
|
190
|
+
</Notice>
|
|
191
|
+
) }
|
|
192
|
+
</VStack>
|
|
193
|
+
</ToolsPanelItem>
|
|
174
194
|
) }
|
|
175
|
-
<
|
|
176
|
-
__nextHasNoMarginBottom
|
|
195
|
+
<ToolsPanelItem
|
|
177
196
|
label={ __( 'Stack on mobile' ) }
|
|
178
|
-
|
|
179
|
-
|
|
197
|
+
isShownByDefault
|
|
198
|
+
hasValue={ () => isStackedOnMobile !== true }
|
|
199
|
+
onDeselect={ () =>
|
|
180
200
|
setAttributes( {
|
|
181
|
-
isStackedOnMobile:
|
|
201
|
+
isStackedOnMobile: true,
|
|
182
202
|
} )
|
|
183
203
|
}
|
|
184
|
-
|
|
185
|
-
|
|
204
|
+
>
|
|
205
|
+
<ToggleControl
|
|
206
|
+
__nextHasNoMarginBottom
|
|
207
|
+
label={ __( 'Stack on mobile' ) }
|
|
208
|
+
checked={ isStackedOnMobile }
|
|
209
|
+
onChange={ () =>
|
|
210
|
+
setAttributes( {
|
|
211
|
+
isStackedOnMobile: ! isStackedOnMobile,
|
|
212
|
+
} )
|
|
213
|
+
}
|
|
214
|
+
/>
|
|
215
|
+
</ToolsPanelItem>
|
|
216
|
+
</ToolsPanel>
|
|
186
217
|
);
|
|
187
218
|
}
|
|
188
219
|
|
package/src/comments/index.js
CHANGED
package/src/cover/edit/index.js
CHANGED
|
@@ -114,11 +114,18 @@ function CoverEdit( {
|
|
|
114
114
|
|
|
115
115
|
const { __unstableMarkNextChangeAsNotPersistent } =
|
|
116
116
|
useDispatch( blockEditorStore );
|
|
117
|
-
const media = useSelect(
|
|
118
|
-
( select ) =>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
const { media } = useSelect(
|
|
118
|
+
( select ) => {
|
|
119
|
+
return {
|
|
120
|
+
media:
|
|
121
|
+
featuredImage && useFeaturedImage
|
|
122
|
+
? select( coreStore ).getMedia( featuredImage, {
|
|
123
|
+
context: 'view',
|
|
124
|
+
} )
|
|
125
|
+
: undefined,
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
[ featuredImage, useFeaturedImage ]
|
|
122
129
|
);
|
|
123
130
|
const mediaUrl =
|
|
124
131
|
media?.media_details?.sizes?.[ sizeSlug ]?.source_url ??
|
package/src/cover/edit.native.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
useCallback,
|
|
59
59
|
useMemo,
|
|
60
60
|
} from '@wordpress/element';
|
|
61
|
-
import { cover as icon, replace, image,
|
|
61
|
+
import { cover as icon, replace, image, cautionFilled } from '@wordpress/icons';
|
|
62
62
|
import { getProtocol } from '@wordpress/url';
|
|
63
63
|
// eslint-disable-next-line no-restricted-imports
|
|
64
64
|
import { store as editPostStore } from '@wordpress/edit-post';
|
|
@@ -665,7 +665,10 @@ const Cover = ( {
|
|
|
665
665
|
style={ styles.uploadFailedContainer }
|
|
666
666
|
>
|
|
667
667
|
<View style={ styles.uploadFailed }>
|
|
668
|
-
<Icon
|
|
668
|
+
<Icon
|
|
669
|
+
icon={ cautionFilled }
|
|
670
|
+
{ ...styles.uploadFailedIcon }
|
|
671
|
+
/>
|
|
669
672
|
</View>
|
|
670
673
|
</View>
|
|
671
674
|
) }
|
package/src/cover/test/edit.js
CHANGED
|
@@ -200,9 +200,7 @@ describe( 'Cover block', () => {
|
|
|
200
200
|
|
|
201
201
|
await selectBlock( 'Block: Cover' );
|
|
202
202
|
expect(
|
|
203
|
-
screen.
|
|
204
|
-
name: 'Settings',
|
|
205
|
-
} )
|
|
203
|
+
await screen.findByRole( 'heading', { name: 'Settings' } )
|
|
206
204
|
).toBeInTheDocument();
|
|
207
205
|
} );
|
|
208
206
|
} );
|
|
@@ -216,7 +214,7 @@ describe( 'Cover block', () => {
|
|
|
216
214
|
);
|
|
217
215
|
await selectBlock( 'Block: Cover' );
|
|
218
216
|
await userEvent.click(
|
|
219
|
-
screen.
|
|
217
|
+
await screen.findByLabelText( 'Fixed background' )
|
|
220
218
|
);
|
|
221
219
|
expect( screen.getByLabelText( 'Block: Cover' ) ).toHaveClass(
|
|
222
220
|
'has-parallax'
|
|
@@ -232,7 +230,7 @@ describe( 'Cover block', () => {
|
|
|
232
230
|
);
|
|
233
231
|
await selectBlock( 'Block: Cover' );
|
|
234
232
|
await userEvent.click(
|
|
235
|
-
screen.
|
|
233
|
+
await screen.findByLabelText( 'Repeated background' )
|
|
236
234
|
);
|
|
237
235
|
expect( screen.getByLabelText( 'Block: Cover' ) ).toHaveClass(
|
|
238
236
|
'is-repeated'
|
|
@@ -245,7 +243,7 @@ describe( 'Cover block', () => {
|
|
|
245
243
|
} );
|
|
246
244
|
|
|
247
245
|
await selectBlock( 'Block: Cover' );
|
|
248
|
-
await userEvent.clear( screen.
|
|
246
|
+
await userEvent.clear( await screen.findByLabelText( 'Left' ) );
|
|
249
247
|
await userEvent.type( screen.getByLabelText( 'Left' ), '100' );
|
|
250
248
|
|
|
251
249
|
expect(
|
|
@@ -262,7 +260,7 @@ describe( 'Cover block', () => {
|
|
|
262
260
|
|
|
263
261
|
await selectBlock( 'Block: Cover' );
|
|
264
262
|
await userEvent.type(
|
|
265
|
-
screen.
|
|
263
|
+
await screen.findByLabelText( 'Alternative text' ),
|
|
266
264
|
'Me'
|
|
267
265
|
);
|
|
268
266
|
expect( screen.getByAltText( 'Me' ) ).toBeInTheDocument();
|
package/src/details/edit.js
CHANGED
|
@@ -9,9 +9,18 @@ import {
|
|
|
9
9
|
InspectorControls,
|
|
10
10
|
} from '@wordpress/block-editor';
|
|
11
11
|
import { useSelect } from '@wordpress/data';
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
ToggleControl,
|
|
14
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
15
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
16
|
+
} from '@wordpress/components';
|
|
13
17
|
import { __ } from '@wordpress/i18n';
|
|
14
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Internal dependencies
|
|
21
|
+
*/
|
|
22
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
23
|
+
|
|
15
24
|
const TEMPLATE = [
|
|
16
25
|
[
|
|
17
26
|
'core/paragraph',
|
|
@@ -28,6 +37,7 @@ function DetailsEdit( { attributes, setAttributes, clientId } ) {
|
|
|
28
37
|
template: TEMPLATE,
|
|
29
38
|
__experimentalCaptureToolbars: true,
|
|
30
39
|
} );
|
|
40
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
31
41
|
|
|
32
42
|
// Check if either the block or the inner blocks are selected.
|
|
33
43
|
const hasSelection = useSelect(
|
|
@@ -46,18 +56,37 @@ function DetailsEdit( { attributes, setAttributes, clientId } ) {
|
|
|
46
56
|
return (
|
|
47
57
|
<>
|
|
48
58
|
<InspectorControls>
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
59
|
+
<ToolsPanel
|
|
60
|
+
label={ __( 'Settings' ) }
|
|
61
|
+
resetAll={ () => {
|
|
62
|
+
setAttributes( {
|
|
63
|
+
showContent: false,
|
|
64
|
+
} );
|
|
65
|
+
} }
|
|
66
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
67
|
+
>
|
|
68
|
+
<ToolsPanelItem
|
|
69
|
+
isShownByDefault
|
|
52
70
|
label={ __( 'Open by default' ) }
|
|
53
|
-
|
|
54
|
-
|
|
71
|
+
hasValue={ () => showContent }
|
|
72
|
+
onDeselect={ () => {
|
|
55
73
|
setAttributes( {
|
|
56
|
-
showContent:
|
|
57
|
-
} )
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
74
|
+
showContent: false,
|
|
75
|
+
} );
|
|
76
|
+
} }
|
|
77
|
+
>
|
|
78
|
+
<ToggleControl
|
|
79
|
+
__nextHasNoMarginBottom
|
|
80
|
+
label={ __( 'Open by default' ) }
|
|
81
|
+
checked={ showContent }
|
|
82
|
+
onChange={ () =>
|
|
83
|
+
setAttributes( {
|
|
84
|
+
showContent: ! showContent,
|
|
85
|
+
} )
|
|
86
|
+
}
|
|
87
|
+
/>
|
|
88
|
+
</ToolsPanelItem>
|
|
89
|
+
</ToolsPanel>
|
|
61
90
|
</InspectorControls>
|
|
62
91
|
<details
|
|
63
92
|
{ ...innerBlocksProps }
|
package/src/editor.scss
CHANGED
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
@import "./template-part/editor.scss";
|
|
50
50
|
@import "./text-columns/editor.scss";
|
|
51
51
|
@import "./video/editor.scss";
|
|
52
|
-
@import "./post-template/editor.scss";
|
|
53
52
|
@import "./query/editor.scss";
|
|
54
53
|
@import "./query-pagination/editor.scss";
|
|
55
54
|
@import "./query-pagination-numbers/editor.scss";
|
package/src/image/transforms.js
CHANGED
|
@@ -111,6 +111,18 @@
|
|
|
111
111
|
"fontSize": true
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
|
+
"__experimentalBorder": {
|
|
115
|
+
"radius": true,
|
|
116
|
+
"color": true,
|
|
117
|
+
"width": true,
|
|
118
|
+
"style": true,
|
|
119
|
+
"__experimentalDefaultControls": {
|
|
120
|
+
"radius": true,
|
|
121
|
+
"color": true,
|
|
122
|
+
"width": true,
|
|
123
|
+
"style": true
|
|
124
|
+
}
|
|
125
|
+
},
|
|
114
126
|
"interactivity": {
|
|
115
127
|
"clientNavigation": true
|
|
116
128
|
}
|
package/src/loginout/edit.js
CHANGED
|
@@ -1,38 +1,74 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { PanelBody, ToggleControl } from '@wordpress/components';
|
|
5
|
-
import { __ } from '@wordpress/i18n';
|
|
6
4
|
import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
|
|
5
|
+
import {
|
|
6
|
+
ToggleControl,
|
|
7
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
8
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
9
|
+
} from '@wordpress/components';
|
|
10
|
+
import { __ } from '@wordpress/i18n';
|
|
11
|
+
/**
|
|
12
|
+
* Internal dependencies
|
|
13
|
+
*/
|
|
14
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
7
15
|
|
|
8
16
|
export default function LoginOutEdit( { attributes, setAttributes } ) {
|
|
9
17
|
const { displayLoginAsForm, redirectToCurrent } = attributes;
|
|
18
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
10
19
|
|
|
11
20
|
return (
|
|
12
21
|
<>
|
|
13
22
|
<InspectorControls>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
<ToolsPanel
|
|
24
|
+
label={ __( 'Settings' ) }
|
|
25
|
+
resetAll={ () => {
|
|
26
|
+
setAttributes( {
|
|
27
|
+
displayLoginAsForm: false,
|
|
28
|
+
redirectToCurrent: true,
|
|
29
|
+
} );
|
|
30
|
+
} }
|
|
31
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
32
|
+
>
|
|
33
|
+
<ToolsPanelItem
|
|
17
34
|
label={ __( 'Display login as form' ) }
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} )
|
|
35
|
+
isShownByDefault
|
|
36
|
+
hasValue={ () => displayLoginAsForm }
|
|
37
|
+
onDeselect={ () =>
|
|
38
|
+
setAttributes( { displayLoginAsForm: false } )
|
|
23
39
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
40
|
+
>
|
|
41
|
+
<ToggleControl
|
|
42
|
+
__nextHasNoMarginBottom
|
|
43
|
+
label={ __( 'Display login as form' ) }
|
|
44
|
+
checked={ displayLoginAsForm }
|
|
45
|
+
onChange={ () =>
|
|
46
|
+
setAttributes( {
|
|
47
|
+
displayLoginAsForm: ! displayLoginAsForm,
|
|
48
|
+
} )
|
|
49
|
+
}
|
|
50
|
+
/>
|
|
51
|
+
</ToolsPanelItem>
|
|
52
|
+
<ToolsPanelItem
|
|
27
53
|
label={ __( 'Redirect to current URL' ) }
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} )
|
|
54
|
+
isShownByDefault
|
|
55
|
+
hasValue={ () => ! redirectToCurrent }
|
|
56
|
+
onDeselect={ () =>
|
|
57
|
+
setAttributes( { redirectToCurrent: true } )
|
|
33
58
|
}
|
|
34
|
-
|
|
35
|
-
|
|
59
|
+
>
|
|
60
|
+
<ToggleControl
|
|
61
|
+
__nextHasNoMarginBottom
|
|
62
|
+
label={ __( 'Redirect to current URL' ) }
|
|
63
|
+
checked={ redirectToCurrent }
|
|
64
|
+
onChange={ () =>
|
|
65
|
+
setAttributes( {
|
|
66
|
+
redirectToCurrent: ! redirectToCurrent,
|
|
67
|
+
} )
|
|
68
|
+
}
|
|
69
|
+
/>
|
|
70
|
+
</ToolsPanelItem>
|
|
71
|
+
</ToolsPanel>
|
|
36
72
|
</InspectorControls>
|
|
37
73
|
<div
|
|
38
74
|
{ ...useBlockProps( {
|
package/src/media-text/edit.js
CHANGED
|
@@ -76,6 +76,7 @@ function attributesFromMedia( {
|
|
|
76
76
|
mediaLink: undefined,
|
|
77
77
|
href: undefined,
|
|
78
78
|
focalPoint: undefined,
|
|
79
|
+
useFeaturedImage: false,
|
|
79
80
|
} );
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
@@ -128,10 +129,37 @@ function attributesFromMedia( {
|
|
|
128
129
|
mediaLink: media.link || undefined,
|
|
129
130
|
href: newHref,
|
|
130
131
|
focalPoint: undefined,
|
|
132
|
+
useFeaturedImage: false,
|
|
131
133
|
} );
|
|
132
134
|
};
|
|
133
135
|
}
|
|
134
136
|
|
|
137
|
+
function MediaTextResolutionTool( { image, value, onChange } ) {
|
|
138
|
+
const { imageSizes } = useSelect( ( select ) => {
|
|
139
|
+
const { getSettings } = select( blockEditorStore );
|
|
140
|
+
return {
|
|
141
|
+
imageSizes: getSettings().imageSizes,
|
|
142
|
+
};
|
|
143
|
+
}, [] );
|
|
144
|
+
|
|
145
|
+
if ( ! imageSizes?.length ) {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const imageSizeOptions = imageSizes
|
|
150
|
+
.filter( ( { slug } ) => getImageSourceUrlBySizeSlug( image, slug ) )
|
|
151
|
+
.map( ( { name, slug } ) => ( { value: slug, label: name } ) );
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<ResolutionTool
|
|
155
|
+
value={ value }
|
|
156
|
+
defaultValue={ DEFAULT_MEDIA_SIZE_SLUG }
|
|
157
|
+
options={ imageSizeOptions }
|
|
158
|
+
onChange={ onChange }
|
|
159
|
+
/>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
135
163
|
function MediaTextEdit( {
|
|
136
164
|
attributes,
|
|
137
165
|
isSelected,
|
|
@@ -152,12 +180,12 @@ function MediaTextEdit( {
|
|
|
152
180
|
mediaType,
|
|
153
181
|
mediaUrl,
|
|
154
182
|
mediaWidth,
|
|
183
|
+
mediaSizeSlug,
|
|
155
184
|
rel,
|
|
156
185
|
verticalAlignment,
|
|
157
186
|
allowedBlocks,
|
|
158
187
|
useFeaturedImage,
|
|
159
188
|
} = attributes;
|
|
160
|
-
const mediaSizeSlug = attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
|
|
161
189
|
|
|
162
190
|
const [ featuredImage ] = useEntityProp(
|
|
163
191
|
'postType',
|
|
@@ -166,11 +194,32 @@ function MediaTextEdit( {
|
|
|
166
194
|
postId
|
|
167
195
|
);
|
|
168
196
|
|
|
169
|
-
const featuredImageMedia = useSelect(
|
|
170
|
-
( select ) =>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
197
|
+
const { featuredImageMedia } = useSelect(
|
|
198
|
+
( select ) => {
|
|
199
|
+
return {
|
|
200
|
+
featuredImageMedia:
|
|
201
|
+
featuredImage && useFeaturedImage
|
|
202
|
+
? select( coreStore ).getMedia( featuredImage, {
|
|
203
|
+
context: 'view',
|
|
204
|
+
} )
|
|
205
|
+
: undefined,
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
[ featuredImage, useFeaturedImage ]
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
const { image } = useSelect(
|
|
212
|
+
( select ) => {
|
|
213
|
+
return {
|
|
214
|
+
image:
|
|
215
|
+
mediaId && isSelected
|
|
216
|
+
? select( coreStore ).getMedia( mediaId, {
|
|
217
|
+
context: 'view',
|
|
218
|
+
} )
|
|
219
|
+
: null,
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
[ isSelected, mediaId ]
|
|
174
223
|
);
|
|
175
224
|
|
|
176
225
|
const featuredImageURL = useFeaturedImage
|
|
@@ -197,22 +246,6 @@ function MediaTextEdit( {
|
|
|
197
246
|
} );
|
|
198
247
|
};
|
|
199
248
|
|
|
200
|
-
const { imageSizes, image } = useSelect(
|
|
201
|
-
( select ) => {
|
|
202
|
-
const { getSettings } = select( blockEditorStore );
|
|
203
|
-
return {
|
|
204
|
-
image:
|
|
205
|
-
mediaId && isSelected
|
|
206
|
-
? select( coreStore ).getMedia( mediaId, {
|
|
207
|
-
context: 'view',
|
|
208
|
-
} )
|
|
209
|
-
: null,
|
|
210
|
-
imageSizes: getSettings()?.imageSizes,
|
|
211
|
-
};
|
|
212
|
-
},
|
|
213
|
-
[ isSelected, mediaId ]
|
|
214
|
-
);
|
|
215
|
-
|
|
216
249
|
const refMedia = useRef();
|
|
217
250
|
const imperativeFocalPointPreview = ( value ) => {
|
|
218
251
|
const { style } = refMedia.current;
|
|
@@ -260,10 +293,6 @@ function MediaTextEdit( {
|
|
|
260
293
|
const onVerticalAlignmentChange = ( alignment ) => {
|
|
261
294
|
setAttributes( { verticalAlignment: alignment } );
|
|
262
295
|
};
|
|
263
|
-
|
|
264
|
-
const imageSizeOptions = imageSizes
|
|
265
|
-
.filter( ( { slug } ) => getImageSourceUrlBySizeSlug( image, slug ) )
|
|
266
|
-
.map( ( { name, slug } ) => ( { value: slug, label: name } ) );
|
|
267
296
|
const updateImage = ( newMediaSizeSlug ) => {
|
|
268
297
|
const newUrl = getImageSourceUrlBySizeSlug( image, newMediaSizeSlug );
|
|
269
298
|
|
|
@@ -409,9 +438,9 @@ function MediaTextEdit( {
|
|
|
409
438
|
</ToolsPanelItem>
|
|
410
439
|
) }
|
|
411
440
|
{ mediaType === 'image' && ! useFeaturedImage && (
|
|
412
|
-
<
|
|
441
|
+
<MediaTextResolutionTool
|
|
442
|
+
image={ image }
|
|
413
443
|
value={ mediaSizeSlug }
|
|
414
|
-
options={ imageSizeOptions }
|
|
415
444
|
onChange={ updateImage }
|
|
416
445
|
/>
|
|
417
446
|
) }
|