Editor: Update packages for 6.1 Beta 3.

Package updates for bug and regression fixes:

* @wordpress/annotations: 2.17.3
* @wordpress/block-directory: 3.15.4
* @wordpress/block-editor: 10.0.4
* @wordpress/block-library: 7.14.4
* @wordpress/blocks: 11.16.4
* @wordpress/components: 21.0.4
* @wordpress/core-data: 5.0.4
* @wordpress/customize-widgets: 3.14.4
* @wordpress/data: 7.1.3
* @wordpress/data-controls: 2.17.3
* @wordpress/edit-post: 6.14.4
* @wordpress/edit-site: 4.14.5
* @wordpress/edit-widgets: 4.14.4
* @wordpress/editor: 12.16.4
* @wordpress/format-library: 3.15.4
* @wordpress/interface: 4.16.3
* @wordpress/keyboard-shortcuts: 3.15.3
* @wordpress/list-reusable-blocks: 3.15.4
* @wordpress/notices: 3.17.3
* @wordpress/nux: 5.15.4
* @wordpress/preferences: 2.9.4
* @wordpress/reusable-blocks: 3.15.4
* @wordpress/rich-text: 5.15.3
* @wordpress/server-side-render: 3.15.4
* @wordpress/style-engine: 1.0.3
* @wordpress/viewport: 4.15.3
* @wordpress/widgets: 2.15.4

References:
* [https://github.com/WordPress/gutenberg/pull/44634 Gutenberg PR 44634] – Quote block: stop slash inserter popup showing in citation
* [https://github.com/WordPress/gutenberg/pull/44630 Gutenberg PR 44630] – Query Loop: Fix condition for displaying 'parents' control
* [https://github.com/WordPress/gutenberg/pull/44554 Gutenberg PR 44554] – Hide the Classic block in the Site Editor
* [https://github.com/WordPress/gutenberg/pull/44594 Gutenberg PR 44594] – Fix navigation block console error
* [https://github.com/WordPress/gutenberg/pull/44555 Gutenberg PR 44555] – Theme export: Fix broken spacingScale export
* [https://github.com/WordPress/gutenberg/pull/44580 Gutenberg PR 44580] – Code Block: Add box-sizing to fix inconsistent layout
* [https://github.com/WordPress/gutenberg/pull/44556 Gutenberg PR 44556] – Remove border from Global Styles previews
* [https://github.com/WordPress/gutenberg/pull/44141 Gutenberg PR 44141] – Spacing presets: Modify the styling of the input controls when in unlinked mode in order to better differentiate sides
* [https://github.com/WordPress/gutenberg/pull/44453 Gutenberg PR 44453] – Preserve the generic signature of getEntityRecord and getEntityRecords through currying
* [https://github.com/WordPress/gutenberg/pull/44504 Gutenberg PR 44504] – Theme.json: fix some outline properties doesn't work properly on the editor
* [https://github.com/WordPress/gutenberg/pull/44516 Gutenberg PR 44516] – Add style engine to editor tsconfig references
* [https://github.com/WordPress/gutenberg/pull/44523 Gutenberg PR 44523] – Query Loop Block: Rename Query Loop variations allowControls to allowedControls
* [https://github.com/WordPress/gutenberg/pull/44520 Gutenberg PR 44520] – Post Featured Image: Fix application of default border style in editor
* [https://github.com/WordPress/gutenberg/pull/44286 Gutenberg PR 44286] – Post Featured Image: Fix borders after addition of overlay feature
* [https://github.com/WordPress/gutenberg/pull/44482 Gutenberg PR 44482] – Template Editor: Fix crashes due to undefined variables
* [https://github.com/WordPress/gutenberg/pull/44480 Gutenberg PR 44480] – Template Parts: Prevent adding block in post editor or inside post template or content blocks
* [https://github.com/WordPress/gutenberg/pull/44425 Gutenberg PR 44425] – Fix rotated image crop area aspect ratio
* [https://github.com/WordPress/gutenberg/pull/44485 Gutenberg PR 44485] – Fix padding/margin visualizer accuracy
* [https://github.com/WordPress/gutenberg/pull/44569 Gutenberg PR 44569] – Theme.json: Fix some shadow properties that do not work properly in the site editor
* [https://github.com/WordPress/gutenberg/pull/44575 Gutenberg PR 44575] – ToggleGroupControl: Fix unselected icon color
* [https://github.com/WordPress/gutenberg/pull/44526 Gutenberg PR 44526] – TokenInput Field: Try alternative approach to fix screen reader focus issue
* [https://github.com/WordPress/gutenberg/pull/44506 Gutenberg PR 44506] – Edit Post: Optimize legacy post content layout
* [https://github.com/WordPress/gutenberg/pull/44258 Gutenberg PR 44258] – Add layout styles from Post Content block to post editor

Follow-up to [54257] and [54335].

Props czapla, isabel_brison, wildworks, bernhard-reiter, hellofromTonya.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54383


git-svn-id: http://core.svn.wordpress.org/trunk@53942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
davidbaumwald 2022-10-04 15:06:52 +00:00
parent 9017d4beb0
commit 4de88db482
40 changed files with 584 additions and 324 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -74,6 +74,9 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-code {
box-sizing: border-box;
}
.wp-block-code code {
display: block;
font-family: inherit;

View File

@ -1 +1 @@
.wp-block-code code{display:block;font-family:inherit;overflow-wrap:break-word;white-space:pre-wrap}
.wp-block-code{box-sizing:border-box}.wp-block-code code{display:block;font-family:inherit;overflow-wrap:break-word;white-space:pre-wrap}

View File

@ -74,6 +74,9 @@
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
.wp-block-code {
box-sizing: border-box;
}
.wp-block-code code {
display: block;
font-family: inherit;

View File

@ -1 +1 @@
.wp-block-code code{display:block;font-family:inherit;overflow-wrap:break-word;white-space:pre-wrap}
.wp-block-code{box-sizing:border-box}.wp-block-code code{display:block;font-family:inherit;overflow-wrap:break-word;white-space:pre-wrap}

View File

@ -83,16 +83,25 @@ function get_block_core_post_featured_image_overlay_element_markup( $attributes
$has_custom_gradient = isset( $attributes['customGradient'] ) && $attributes['customGradient'];
$has_solid_overlay = isset( $attributes['overlayColor'] ) && $attributes['overlayColor'];
$has_custom_overlay = isset( $attributes['customOverlayColor'] ) && $attributes['customOverlayColor'];
$class_names = array(
'wp-block-post-featured-image__overlay',
);
$styles_properties = array();
$class_names = array( 'wp-block-post-featured-image__overlay' );
$styles = array();
if ( ! $has_dim_background ) {
return '';
}
// Generate required classes for the element.
// Apply border classes and styles.
$border_attributes = get_block_core_post_featured_image_border_attributes( $attributes );
if ( ! empty( $border_attributes['class'] ) ) {
$class_names[] = $border_attributes['class'];
}
if ( ! empty( $border_attributes['style'] ) ) {
$styles[] = $border_attributes['style'];
}
// Apply overlay and gradient classes.
if ( $has_dim_background ) {
$class_names[] = 'has-background-dim';
$class_names[] = "has-background-dim-{$attributes['dimRatio']}";
@ -110,35 +119,20 @@ function get_block_core_post_featured_image_overlay_element_markup( $attributes
$class_names[] = "has-{$attributes['gradient']}-gradient-background";
}
// Generate required CSS properties and their values.
if ( ! empty( $attributes['style']['border']['radius'] ) ) {
$styles_properties['border-radius'] = $attributes['style']['border']['radius'];
}
if ( ! empty( $attributes['style']['border']['width'] ) ) {
$styles_properties['border-width'] = $attributes['style']['border']['width'];
}
// Apply background styles.
if ( $has_custom_gradient ) {
$styles_properties['background-image'] = $attributes['customGradient'];
$styles[] = sprintf( 'background-image: %s;', $attributes['customGradient'] );
}
if ( $has_custom_overlay ) {
$styles_properties['background-color'] = $attributes['customOverlayColor'];
}
$styles = '';
foreach ( $styles_properties as $style_attribute => $style_attribute_value ) {
$styles .= "{$style_attribute}: $style_attribute_value; ";
$styles[] = sprintf( 'background-color: %s;', $attributes['customOverlayColor'] );
}
return sprintf(
'<span class="%s" style="%s" aria-hidden="true"></span>',
esc_attr( implode( ' ', $class_names ) ),
esc_attr( trim( $styles ) )
esc_attr( safecss_filter_attr( implode( ' ', $styles ) ) )
);
}
/**

View File

@ -62,7 +62,7 @@
"color": true,
"radius": true,
"width": true,
"__experimentalSelector": "img, .block-editor-media-placeholder",
"__experimentalSelector": "img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",
"__experimentalSkipSerialization": true,
"__experimentalDefaultControls": {
"color": true,

View File

@ -79,19 +79,19 @@
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
.wp-block-post-featured-image .components-placeholder {
justify-content: center;
align-items: center;
padding: 0;
min-height: 200px;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
display: none;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button,
.wp-block-post-featured-image .components-placeholder .components-button {
padding: 0;
display: flex;
justify-content: center;
@ -105,51 +105,61 @@
border-style: solid;
color: #fff;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button > svg,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button > svg {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button > svg,
.wp-block-post-featured-image .components-placeholder .components-button > svg {
color: inherit;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where(.has-border-color) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
.wp-block-post-featured-image .components-placeholder:where(.has-border-color),
.wp-block-post-featured-image img:where(.has-border-color) {
border-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image img:where([style*="border-top-color"]) {
border-top-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image img:where([style*="border-right-color"]) {
border-left-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image img:where([style*="border-bottom-color"]) {
border-bottom-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image img:where([style*="border-left-color"]) {
border-right-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]),
.wp-block-post-featured-image img:where([style*="border-width"]) {
border-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image img:where([style*="border-top-width"]) {
border-top-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image img:where([style*="border-right-width"]) {
border-left-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image img:where([style*="border-bottom-width"]) {
border-bottom-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image img:where([style*="border-left-width"]) {
border-right-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
.wp-block-post-featured-image[style*=height] .components-placeholder {
min-height: 48px;
min-width: 48px;
height: 100%;

View File

@ -1 +1 @@
.wp-block-post-featured-image .block-editor-media-placeholder{z-index:1;-webkit-backdrop-filter:none;backdrop-filter:none}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder,.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder{justify-content:center;align-items:center;padding:0;min-height:200px}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-form-file-upload,.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload{display:none}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button,.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button{padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button>svg,.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button>svg{color:inherit}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where(.has-border-color),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color){border-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-top-color]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-top-color]){border-top-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-right-color]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-right-color]){border-left-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-bottom-color]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-bottom-color]){border-bottom-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-left-color]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-left-color]){border-right-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-width]){border-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-top-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-top-width]){border-top-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-right-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-right-width]){border-left-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-bottom-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-bottom-width]){border-bottom-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-left-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-left-width]){border-right-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder{min-height:48px;min-width:48px;height:100%;width:100%}div[data-type="core/post-featured-image"] img{max-width:100%;height:auto;display:block}
.wp-block-post-featured-image .block-editor-media-placeholder{z-index:1;-webkit-backdrop-filter:none;backdrop-filter:none}.wp-block-post-featured-image .components-placeholder,.wp-block-post-featured-image .wp-block-post-featured-image__placeholder{justify-content:center;align-items:center;padding:0;min-height:200px}.wp-block-post-featured-image .components-placeholder .components-form-file-upload,.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload{display:none}.wp-block-post-featured-image .components-placeholder .components-button,.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button{padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff}.wp-block-post-featured-image .components-placeholder .components-button>svg,.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button>svg{color:inherit}.wp-block-post-featured-image .components-placeholder:where(.has-border-color),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),.wp-block-post-featured-image img:where(.has-border-color){border-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-top-color]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-top-color]),.wp-block-post-featured-image img:where([style*=border-top-color]){border-top-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-right-color]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-right-color]),.wp-block-post-featured-image img:where([style*=border-right-color]){border-left-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-bottom-color]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-bottom-color]),.wp-block-post-featured-image img:where([style*=border-bottom-color]){border-bottom-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-left-color]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-left-color]),.wp-block-post-featured-image img:where([style*=border-left-color]){border-right-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-width]),.wp-block-post-featured-image img:where([style*=border-width]){border-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-top-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-top-width]),.wp-block-post-featured-image img:where([style*=border-top-width]){border-top-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-right-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-right-width]),.wp-block-post-featured-image img:where([style*=border-right-width]){border-left-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-bottom-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-bottom-width]),.wp-block-post-featured-image img:where([style*=border-bottom-width]){border-bottom-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-left-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-left-width]),.wp-block-post-featured-image img:where([style*=border-left-width]){border-right-style:solid}.wp-block-post-featured-image[style*=height] .components-placeholder{min-height:48px;min-width:48px;height:100%;width:100%}div[data-type="core/post-featured-image"] img{max-width:100%;height:auto;display:block}

View File

@ -79,19 +79,19 @@
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
.wp-block-post-featured-image .components-placeholder {
justify-content: center;
align-items: center;
padding: 0;
min-height: 200px;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
display: none;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button,
.wp-block-post-featured-image .components-placeholder .components-button {
padding: 0;
display: flex;
justify-content: center;
@ -105,51 +105,61 @@
border-style: solid;
color: #fff;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button > svg,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button > svg {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button > svg,
.wp-block-post-featured-image .components-placeholder .components-button > svg {
color: inherit;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where(.has-border-color) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
.wp-block-post-featured-image .components-placeholder:where(.has-border-color),
.wp-block-post-featured-image img:where(.has-border-color) {
border-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image img:where([style*="border-top-color"]) {
border-top-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image img:where([style*="border-right-color"]) {
border-right-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image img:where([style*="border-bottom-color"]) {
border-bottom-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image img:where([style*="border-left-color"]) {
border-left-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]),
.wp-block-post-featured-image img:where([style*="border-width"]) {
border-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image img:where([style*="border-top-width"]) {
border-top-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image img:where([style*="border-right-width"]) {
border-right-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image img:where([style*="border-bottom-width"]) {
border-bottom-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image img:where([style*="border-left-width"]) {
border-left-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
.wp-block-post-featured-image[style*=height] .components-placeholder {
min-height: 48px;
min-width: 48px;
height: 100%;

View File

@ -1 +1 @@
.wp-block-post-featured-image .block-editor-media-placeholder{z-index:1;-webkit-backdrop-filter:none;backdrop-filter:none}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder,.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder{justify-content:center;align-items:center;padding:0;min-height:200px}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-form-file-upload,.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload{display:none}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button,.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button{padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button>svg,.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button>svg{color:inherit}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where(.has-border-color),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color){border-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-top-color]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-top-color]){border-top-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-right-color]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-right-color]){border-right-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-bottom-color]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-bottom-color]){border-bottom-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-left-color]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-left-color]){border-left-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-width]){border-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-top-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-top-width]){border-top-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-right-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-right-width]){border-right-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-bottom-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-bottom-width]){border-bottom-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*=border-left-width]),.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-left-width]){border-left-style:solid}.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder{min-height:48px;min-width:48px;height:100%;width:100%}div[data-type="core/post-featured-image"] img{max-width:100%;height:auto;display:block}
.wp-block-post-featured-image .block-editor-media-placeholder{z-index:1;-webkit-backdrop-filter:none;backdrop-filter:none}.wp-block-post-featured-image .components-placeholder,.wp-block-post-featured-image .wp-block-post-featured-image__placeholder{justify-content:center;align-items:center;padding:0;min-height:200px}.wp-block-post-featured-image .components-placeholder .components-form-file-upload,.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload{display:none}.wp-block-post-featured-image .components-placeholder .components-button,.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button{padding:0;display:flex;justify-content:center;align-items:center;width:48px;height:48px;border-radius:50%;position:relative;background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-style:solid;color:#fff}.wp-block-post-featured-image .components-placeholder .components-button>svg,.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button>svg{color:inherit}.wp-block-post-featured-image .components-placeholder:where(.has-border-color),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),.wp-block-post-featured-image img:where(.has-border-color){border-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-top-color]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-top-color]),.wp-block-post-featured-image img:where([style*=border-top-color]){border-top-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-right-color]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-right-color]),.wp-block-post-featured-image img:where([style*=border-right-color]){border-right-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-bottom-color]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-bottom-color]),.wp-block-post-featured-image img:where([style*=border-bottom-color]){border-bottom-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-left-color]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-left-color]),.wp-block-post-featured-image img:where([style*=border-left-color]){border-left-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-width]),.wp-block-post-featured-image img:where([style*=border-width]){border-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-top-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-top-width]),.wp-block-post-featured-image img:where([style*=border-top-width]){border-top-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-right-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-right-width]),.wp-block-post-featured-image img:where([style*=border-right-width]){border-right-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-bottom-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-bottom-width]),.wp-block-post-featured-image img:where([style*=border-bottom-width]){border-bottom-style:solid}.wp-block-post-featured-image .components-placeholder:where([style*=border-left-width]),.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*=border-left-width]),.wp-block-post-featured-image img:where([style*=border-left-width]){border-left-style:solid}.wp-block-post-featured-image[style*=height] .components-placeholder{min-height:48px;min-width:48px;height:100%;width:100%}div[data-type="core/post-featured-image"] img{max-width:100%;height:auto;display:block}

View File

@ -29,7 +29,6 @@
},
"supports": {
"anchor": true,
"__experimentalSlashInserter": true,
"__experimentalOnEnter": true,
"typography": {
"fontSize": true,

View File

@ -4317,7 +4317,8 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
.tools-panel-item-spacing {
display: grid;
grid-template-columns: auto 1fr auto;
grid-row-gap: 4px;
align-items: center;
grid-template-rows: 25px auto;
}
.component-spacing-sizes-control {
@ -4332,19 +4333,28 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
grid-row: 1/1;
align-self: center;
}
.component-spacing-sizes-control .components-base-control__label {
margin-bottom: 0;
height: 16px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__side-labels {
grid-column: 1/1;
min-height: 30px;
justify-content: left;
height: 16px;
margin-top: 12px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__hint-single {
margin-top: 0;
margin-right: 0;
.component-spacing-sizes-control .components-spacing-sizes-control__side-label {
grid-column: 1/1;
justify-self: left;
margin-bottom: 0;
}
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control {
margin-top: 12px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__hint-single,
.component-spacing-sizes-control .components-spacing-sizes-control__hint-all {
color: #757575;
font-size: 12px;
margin-bottom: 0;
}
.component-spacing-sizes-control .components-spacing-sizes-control__hint-all {
grid-column: 2/2;
@ -4359,6 +4369,11 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
justify-self: end;
padding: 0;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-all.is-small.has-icon {
padding: 0;
min-width: 24px;
height: 16px;
}
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button ~ .components-spacing-sizes-control__custom-toggle-all {
margin-left: 4px;
}
@ -4366,10 +4381,11 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
grid-column: 3/3;
justify-self: end;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-all.is-small.has-icon,
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single.is-small.has-icon {
padding: 0;
min-width: 24px;
height: 16px;
margin-top: 12px;
}
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button {
grid-column: 3/3;
@ -4379,7 +4395,6 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-range {
grid-column: span 2;
margin-right: 8px;
padding-left: 8px;
height: 30px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-input {
@ -4387,11 +4402,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
}
.component-spacing-sizes-control .components-spacing-sizes-control__range-control {
grid-column: span 3;
padding-left: 8px;
height: 30px;
}
.component-spacing-sizes-control .components-range-control__wrapper {
margin-bottom: 0;
height: 40px;
}
.component-spacing-sizes-control .components-range-control__mark {
height: 4px;
@ -4408,12 +4419,6 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
.component-spacing-sizes-control [class*=ThumbWrapper-thumbColor] {
z-index: 3;
}
.component-spacing-sizes-control .components-spacing-sizes-control__side-label {
margin-left: 4px;
grid-column: 1/1;
justify-self: left;
font-size: 12px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-select-control {
grid-column: span 3;
}

File diff suppressed because one or more lines are too long

View File

@ -4317,7 +4317,8 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
.tools-panel-item-spacing {
display: grid;
grid-template-columns: auto 1fr auto;
grid-row-gap: 4px;
align-items: center;
grid-template-rows: 25px auto;
}
.component-spacing-sizes-control {
@ -4332,19 +4333,28 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
grid-row: 1/1;
align-self: center;
}
.component-spacing-sizes-control .components-base-control__label {
margin-bottom: 0;
height: 16px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__side-labels {
grid-column: 1/1;
min-height: 30px;
justify-content: left;
height: 16px;
margin-top: 12px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__hint-single {
margin-top: 0;
margin-left: 0;
.component-spacing-sizes-control .components-spacing-sizes-control__side-label {
grid-column: 1/1;
justify-self: left;
margin-bottom: 0;
}
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control {
margin-top: 12px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__hint-single,
.component-spacing-sizes-control .components-spacing-sizes-control__hint-all {
color: #757575;
font-size: 12px;
margin-bottom: 0;
}
.component-spacing-sizes-control .components-spacing-sizes-control__hint-all {
grid-column: 2/2;
@ -4359,6 +4369,11 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
justify-self: end;
padding: 0;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-all.is-small.has-icon {
padding: 0;
min-width: 24px;
height: 16px;
}
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button ~ .components-spacing-sizes-control__custom-toggle-all {
margin-right: 4px;
}
@ -4366,10 +4381,11 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
grid-column: 3/3;
justify-self: end;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-all.is-small.has-icon,
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single.is-small.has-icon {
padding: 0;
min-width: 24px;
height: 16px;
margin-top: 12px;
}
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button {
grid-column: 3/3;
@ -4379,7 +4395,6 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-range {
grid-column: span 2;
margin-left: 8px;
padding-right: 8px;
height: 30px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-input {
@ -4387,11 +4402,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
}
.component-spacing-sizes-control .components-spacing-sizes-control__range-control {
grid-column: span 3;
padding-right: 8px;
height: 30px;
}
.component-spacing-sizes-control .components-range-control__wrapper {
margin-bottom: 0;
height: 40px;
}
.component-spacing-sizes-control .components-range-control__mark {
height: 4px;
@ -4408,12 +4419,6 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
.component-spacing-sizes-control [class*=ThumbWrapper-thumbColor] {
z-index: 3;
}
.component-spacing-sizes-control .components-spacing-sizes-control__side-label {
margin-right: 4px;
grid-column: 1/1;
justify-self: left;
font-size: 12px;
}
.component-spacing-sizes-control .components-spacing-sizes-control__custom-select-control {
grid-column: span 3;
}

File diff suppressed because one or more lines are too long

View File

@ -2719,19 +2719,19 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
.wp-block-post-featured-image .components-placeholder {
justify-content: center;
align-items: center;
padding: 0;
min-height: 200px;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
display: none;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button,
.wp-block-post-featured-image .components-placeholder .components-button {
padding: 0;
display: flex;
justify-content: center;
@ -2745,51 +2745,61 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
border-style: solid;
color: #fff;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button > svg,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button > svg {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button > svg,
.wp-block-post-featured-image .components-placeholder .components-button > svg {
color: inherit;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where(.has-border-color) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
.wp-block-post-featured-image .components-placeholder:where(.has-border-color),
.wp-block-post-featured-image img:where(.has-border-color) {
border-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image img:where([style*="border-top-color"]) {
border-top-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image img:where([style*="border-right-color"]) {
border-left-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image img:where([style*="border-bottom-color"]) {
border-bottom-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image img:where([style*="border-left-color"]) {
border-right-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]),
.wp-block-post-featured-image img:where([style*="border-width"]) {
border-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image img:where([style*="border-top-width"]) {
border-top-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image img:where([style*="border-right-width"]) {
border-left-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image img:where([style*="border-bottom-width"]) {
border-bottom-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image img:where([style*="border-left-width"]) {
border-right-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
.wp-block-post-featured-image[style*=height] .components-placeholder {
min-height: 48px;
min-width: 48px;
height: 100%;

File diff suppressed because one or more lines are too long

View File

@ -2730,19 +2730,19 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
.wp-block-post-featured-image .components-placeholder {
justify-content: center;
align-items: center;
padding: 0;
min-height: 200px;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-form-file-upload,
.wp-block-post-featured-image .components-placeholder .components-form-file-upload {
display: none;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button,
.wp-block-post-featured-image .components-placeholder .components-button {
padding: 0;
display: flex;
justify-content: center;
@ -2756,51 +2756,61 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
border-style: solid;
color: #fff;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button.components-button > svg,
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder .components-button.components-button > svg {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder .components-button > svg,
.wp-block-post-featured-image .components-placeholder .components-button > svg {
color: inherit;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where(.has-border-color) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where(.has-border-color),
.wp-block-post-featured-image .components-placeholder:where(.has-border-color),
.wp-block-post-featured-image img:where(.has-border-color) {
border-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-top-color"]),
.wp-block-post-featured-image img:where([style*="border-top-color"]) {
border-top-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-right-color"]),
.wp-block-post-featured-image img:where([style*="border-right-color"]) {
border-right-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-color"]),
.wp-block-post-featured-image img:where([style*="border-bottom-color"]) {
border-bottom-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-left-color"]),
.wp-block-post-featured-image img:where([style*="border-left-color"]) {
border-left-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-width"]),
.wp-block-post-featured-image img:where([style*="border-width"]) {
border-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-top-width"]),
.wp-block-post-featured-image img:where([style*="border-top-width"]) {
border-top-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-right-width"]),
.wp-block-post-featured-image img:where([style*="border-right-width"]) {
border-right-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-bottom-width"]),
.wp-block-post-featured-image img:where([style*="border-bottom-width"]) {
border-bottom-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]) {
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image .components-placeholder:where([style*="border-left-width"]),
.wp-block-post-featured-image img:where([style*="border-left-width"]) {
border-left-style: solid;
}
.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
.wp-block-post-featured-image[style*=height] .components-placeholder {
min-height: 48px;
min-width: 48px;
height: 100%;

File diff suppressed because one or more lines are too long

View File

@ -277,6 +277,9 @@
margin-left: 2em;
}
.wp-block-code {
box-sizing: border-box;
}
.wp-block-code code {
display: block;
font-family: inherit;

File diff suppressed because one or more lines are too long

View File

@ -280,6 +280,9 @@
margin-left: 2em;
}
.wp-block-code {
box-sizing: border-box;
}
.wp-block-code code {
display: block;
font-family: inherit;

File diff suppressed because one or more lines are too long

View File

@ -3291,6 +3291,8 @@ __webpack_require__.d(__webpack_exports__, {
"__experimentalUseHasRecursion": function() { return /* reexport */ useHasRecursion; },
"__experimentalUseMultipleOriginColorsAndGradients": function() { return /* reexport */ useMultipleOriginColorsAndGradients; },
"__experimentalUseResizeCanvas": function() { return /* reexport */ useResizeCanvas; },
"__experimentaluseLayoutClasses": function() { return /* reexport */ useLayoutClasses; },
"__experimentaluseLayoutStyles": function() { return /* reexport */ useLayoutStyles; },
"__unstableBlockNameContext": function() { return /* reexport */ block_name_context; },
"__unstableBlockSettingsMenuFirstItem": function() { return /* reexport */ block_settings_menu_first_item; },
"__unstableBlockToolbarLastItem": function() { return /* reexport */ block_toolbar_last_item; },
@ -11078,11 +11080,11 @@ function SpacingInputControl(_ref) {
const showHint = showRangeControl && !showCustomValueControl && currentValueHint !== undefined;
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, side !== 'all' && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
className: "components-spacing-sizes-control__side-labels"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
className: "components-spacing-sizes-control__side-label"
}, LABELS[side]), showHint && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
}, LABELS[side]), showHint && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
className: "components-spacing-sizes-control__hint-single"
}, currentValueHint)), side === 'all' && showHint && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
}, currentValueHint)), side === 'all' && showHint && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
className: "components-spacing-sizes-control__hint-all"
}, currentValueHint), !disableCustomSpacingSizes && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
label: showCustomValueControl ? (0,external_wp_i18n_namespaceObject.__)('Use size preset') : (0,external_wp_i18n_namespaceObject.__)('Set custom size'),
@ -11138,7 +11140,8 @@ function SpacingInputControl(_ref) {
max: spacingSizes.length - 1,
marks: marks,
label: ariaLabel,
hideLabelFromVision: true
hideLabelFromVision: true,
__nextHasNoMarginBottom: true
}), !showRangeControl && !showCustomValueControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CustomSelectControl, {
className: "components-spacing-sizes-control__custom-select-control",
value: options.find(option => option.key === currentValue) || '' // passing undefined here causes a downshift controlled/uncontrolled warning
@ -11357,12 +11360,17 @@ function LinkedButton(_ref) {
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
@ -11426,8 +11434,10 @@ function SpacingSizesControl(_ref) {
};
return (0,external_wp_element_namespaceObject.createElement)("fieldset", {
role: "region",
className: "component-spacing-sizes-control"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
className: classnames_default()('component-spacing-sizes-control', {
'is-unlinked': !isLinked
})
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
as: "legend"
}, label), !hasOneSide && (0,external_wp_element_namespaceObject.createElement)(LinkedButton, {
onClick: toggleLinked,
@ -11869,18 +11879,7 @@ function BlockPopover(_ref, ref) {
const selectedElement = useBlockElement(clientId);
const lastSelectedElement = useBlockElement(bottomClientId !== null && bottomClientId !== void 0 ? bottomClientId : clientId);
const mergedRefs = (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, use_popover_scroll(__unstableContentRef)]);
const style = (0,external_wp_element_namespaceObject.useMemo)(() => {
if (!selectedElement || lastSelectedElement !== selectedElement) {
return {};
}
return {
position: 'absolute',
width: selectedElement.offsetWidth,
height: selectedElement.offsetHeight
};
}, [selectedElement, lastSelectedElement, __unstableRefreshSize]);
const [popoverAnchorRecomputeCounter, forceRecomputePopoverAnchor] = (0,external_wp_element_namespaceObject.useReducer)( // Module is there to make sure that the counter doesn't overflow.
const [popoverDimensionsRecomputeCounter, forceRecomputePopoverDimensions] = (0,external_wp_element_namespaceObject.useReducer)( // Module is there to make sure that the counter doesn't overflow.
s => (s + 1) % MAX_POPOVER_RECOMPUTE_COUNTER, 0); // When blocks are moved up/down, they are animated to their new position by
// updating the `transform` property manually (i.e. without using CSS
// transitions or animations). The animation, which can also scroll the block
@ -11894,7 +11893,7 @@ function BlockPopover(_ref, ref) {
return;
}
const observer = new window.MutationObserver(forceRecomputePopoverAnchor);
const observer = new window.MutationObserver(forceRecomputePopoverDimensions);
observer.observe(selectedElement, {
attributes: true
});
@ -11902,11 +11901,25 @@ function BlockPopover(_ref, ref) {
observer.disconnect();
};
}, [selectedElement]);
const popoverAnchor = (0,external_wp_element_namespaceObject.useMemo)(() => {
if ( // popoverAnchorRecomputeCounter is by definition always equal or greater
const style = (0,external_wp_element_namespaceObject.useMemo)(() => {
if ( // popoverDimensionsRecomputeCounter is by definition always equal or greater
// than 0. This check is only there to satisfy the correctness of the
// exhaustive-deps rule for the `useMemo` hook.
popoverAnchorRecomputeCounter < 0 || !selectedElement || bottomClientId && !lastSelectedElement) {
popoverDimensionsRecomputeCounter < 0 || !selectedElement || lastSelectedElement !== selectedElement) {
return {};
}
return {
position: 'absolute',
width: selectedElement.offsetWidth,
height: selectedElement.offsetHeight
};
}, [selectedElement, lastSelectedElement, __unstableRefreshSize, popoverDimensionsRecomputeCounter]);
const popoverAnchor = (0,external_wp_element_namespaceObject.useMemo)(() => {
if ( // popoverDimensionsRecomputeCounter is by definition always equal or greater
// than 0. This check is only there to satisfy the correctness of the
// exhaustive-deps rule for the `useMemo` hook.
popoverDimensionsRecomputeCounter < 0 || !selectedElement || bottomClientId && !lastSelectedElement) {
return undefined;
}
@ -11931,7 +11944,7 @@ function BlockPopover(_ref, ref) {
ownerDocument: selectedElement.ownerDocument
};
}, [bottomClientId, lastSelectedElement, selectedElement, popoverAnchorRecomputeCounter]);
}, [bottomClientId, lastSelectedElement, selectedElement, popoverDimensionsRecomputeCounter]);
if (!selectedElement || bottomClientId && !lastSelectedElement) {
return null;
@ -28020,7 +28033,9 @@ function BlockPopoverInbetween(_ref) {
previousElement.ownerDocument.defaultView.addEventListener('resize', forcePopoverRecompute);
return () => {
previousElement.ownerDocument.defaultView.removeEventListener('resize', forcePopoverRecompute);
var _previousElement$owne;
(_previousElement$owne = previousElement.ownerDocument.defaultView) === null || _previousElement$owne === void 0 ? void 0 : _previousElement$owne.removeEventListener('resize', forcePopoverRecompute);
};
}, [previousElement]); // If there's either a previous or a next element, show the inbetween popover.
// Note that drag and drop uses the inbetween popover to show the drop indicator
@ -30093,10 +30108,10 @@ function BlockParentSelector() {
onClick: () => selectBlock(firstParentClientId),
label: (0,external_wp_i18n_namespaceObject.sprintf)(
/* translators: %s: Name of the block's parent. */
(0,external_wp_i18n_namespaceObject.__)('Select %s'), blockInformation.title),
(0,external_wp_i18n_namespaceObject.__)('Select %s'), blockInformation === null || blockInformation === void 0 ? void 0 : blockInformation.title),
showTooltip: true,
icon: (0,external_wp_element_namespaceObject.createElement)(block_icon, {
icon: blockInformation.icon
icon: blockInformation === null || blockInformation === void 0 ? void 0 : blockInformation.icon
})
}));
}
@ -39300,22 +39315,17 @@ const withDuotoneStyles = (0,external_wp_compose_namespaceObject.createHigherOrd
const layoutBlockSupportKey = '__experimentalLayout';
/**
* Generates the utility classnames for the given blocks layout attributes.
* This method was primarily added to reintroduce classnames that were removed
* in the 5.9 release (https://github.com/WordPress/gutenberg/issues/38719), rather
* than providing an extensive list of all possible layout classes. The plan is to
* have the style engine generate a more extensive list of utility classnames which
* will then replace this method.
* Generates the utility classnames for the given block's layout attributes.
*
* @param { Object } layout Layout object.
* @param { Object } layoutDefinitions An object containing layout definitions, stored in theme.json.
* @param { Object } block Block object.
*
* @return { Array } Array of CSS classname strings.
*/
function useLayoutClasses(layout, layoutDefinitions) {
var _layoutDefinitions;
function useLayoutClasses() {
var _globalLayoutSettings, _globalLayoutSettings2;
let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
const rootPaddingAlignment = (0,external_wp_data_namespaceObject.useSelect)(select => {
var _getSettings$__experi;
@ -39324,32 +39334,86 @@ function useLayoutClasses(layout, layoutDefinitions) {
} = select(store);
return (_getSettings$__experi = getSettings().__experimentalFeatures) === null || _getSettings$__experi === void 0 ? void 0 : _getSettings$__experi.useRootPaddingAwareAlignments;
}, []);
const globalLayoutSettings = useSetting('layout') || {};
const {
attributes = {},
name
} = block;
const {
layout
} = attributes;
const {
default: defaultBlockLayout
} = (0,external_wp_blocks_namespaceObject.getBlockSupport)(name, layoutBlockSupportKey) || {};
const usedLayout = layout !== null && layout !== void 0 && layout.inherit || layout !== null && layout !== void 0 && layout.contentSize || layout !== null && layout !== void 0 && layout.wideSize ? { ...layout,
type: 'constrained'
} : layout || defaultBlockLayout || {};
const layoutClassnames = [];
if (layoutDefinitions !== null && layoutDefinitions !== void 0 && (_layoutDefinitions = layoutDefinitions[(layout === null || layout === void 0 ? void 0 : layout.type) || 'default']) !== null && _layoutDefinitions !== void 0 && _layoutDefinitions.className) {
var _layoutDefinitions2;
if (globalLayoutSettings !== null && globalLayoutSettings !== void 0 && (_globalLayoutSettings = globalLayoutSettings.definitions) !== null && _globalLayoutSettings !== void 0 && (_globalLayoutSettings2 = _globalLayoutSettings[(usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) || 'default']) !== null && _globalLayoutSettings2 !== void 0 && _globalLayoutSettings2.className) {
var _globalLayoutSettings3, _globalLayoutSettings4;
layoutClassnames.push(layoutDefinitions === null || layoutDefinitions === void 0 ? void 0 : (_layoutDefinitions2 = layoutDefinitions[(layout === null || layout === void 0 ? void 0 : layout.type) || 'default']) === null || _layoutDefinitions2 === void 0 ? void 0 : _layoutDefinitions2.className);
layoutClassnames.push(globalLayoutSettings === null || globalLayoutSettings === void 0 ? void 0 : (_globalLayoutSettings3 = globalLayoutSettings.definitions) === null || _globalLayoutSettings3 === void 0 ? void 0 : (_globalLayoutSettings4 = _globalLayoutSettings3[(usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) || 'default']) === null || _globalLayoutSettings4 === void 0 ? void 0 : _globalLayoutSettings4.className);
}
if ((layout !== null && layout !== void 0 && layout.inherit || layout !== null && layout !== void 0 && layout.contentSize || (layout === null || layout === void 0 ? void 0 : layout.type) === 'constrained') && rootPaddingAlignment) {
if ((usedLayout !== null && usedLayout !== void 0 && usedLayout.inherit || usedLayout !== null && usedLayout !== void 0 && usedLayout.contentSize || (usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) === 'constrained') && rootPaddingAlignment) {
layoutClassnames.push('has-global-padding');
}
if (layout !== null && layout !== void 0 && layout.orientation) {
layoutClassnames.push(`is-${(0,external_lodash_namespaceObject.kebabCase)(layout.orientation)}`);
if (usedLayout !== null && usedLayout !== void 0 && usedLayout.orientation) {
layoutClassnames.push(`is-${(0,external_lodash_namespaceObject.kebabCase)(usedLayout.orientation)}`);
}
if (layout !== null && layout !== void 0 && layout.justifyContent) {
layoutClassnames.push(`is-content-justification-${(0,external_lodash_namespaceObject.kebabCase)(layout.justifyContent)}`);
if (usedLayout !== null && usedLayout !== void 0 && usedLayout.justifyContent) {
layoutClassnames.push(`is-content-justification-${(0,external_lodash_namespaceObject.kebabCase)(usedLayout.justifyContent)}`);
}
if (layout !== null && layout !== void 0 && layout.flexWrap && layout.flexWrap === 'nowrap') {
if (usedLayout !== null && usedLayout !== void 0 && usedLayout.flexWrap && usedLayout.flexWrap === 'nowrap') {
layoutClassnames.push('is-nowrap');
}
return layoutClassnames;
}
/**
* Generates a CSS rule with the given block's layout styles.
*
* @param { Object } block Block object.
* @param { string } selector A selector to use in generating the CSS rule.
*
* @return { string } CSS rule.
*/
function useLayoutStyles() {
var _fullLayoutType$getLa;
let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
let selector = arguments.length > 1 ? arguments[1] : undefined;
const {
attributes = {},
name
} = block;
const {
layout = {},
style = {}
} = attributes; // Update type for blocks using legacy layouts.
const usedLayout = layout !== null && layout !== void 0 && layout.inherit || layout !== null && layout !== void 0 && layout.contentSize || layout !== null && layout !== void 0 && layout.wideSize ? { ...layout,
type: 'constrained'
} : layout || {};
const fullLayoutType = getLayoutType((usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) || 'default');
const globalLayoutSettings = useSetting('layout') || {};
const blockGapSupport = useSetting('spacing.blockGap');
const hasBlockGapSupport = blockGapSupport !== null;
const css = fullLayoutType === null || fullLayoutType === void 0 ? void 0 : (_fullLayoutType$getLa = fullLayoutType.getLayoutStyle) === null || _fullLayoutType$getLa === void 0 ? void 0 : _fullLayoutType$getLa.call(fullLayoutType, {
blockName: name,
selector,
layout,
layoutDefinitions: globalLayoutSettings === null || globalLayoutSettings === void 0 ? void 0 : globalLayoutSettings.definitions,
style,
hasBlockGapSupport
});
return css;
}
function LayoutPanel(_ref) {
let {
@ -39517,7 +39581,8 @@ const withInspectorControls = (0,external_wp_compose_namespaceObject.createHighe
const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockListBlock => props => {
const {
name,
attributes
attributes,
block
} = props;
const hasLayoutBlockSupport = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(name, layoutBlockSupportKey);
const disableLayoutStyles = (0,external_wp_data_namespaceObject.useSelect)(select => {
@ -39539,7 +39604,7 @@ const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrde
const usedLayout = layout !== null && layout !== void 0 && layout.inherit || layout !== null && layout !== void 0 && layout.contentSize || layout !== null && layout !== void 0 && layout.wideSize ? { ...layout,
type: 'constrained'
} : layout || defaultBlockLayout || {};
const layoutClasses = hasLayoutBlockSupport ? useLayoutClasses(usedLayout, defaultThemeLayout === null || defaultThemeLayout === void 0 ? void 0 : defaultThemeLayout.definitions) : null;
const layoutClasses = hasLayoutBlockSupport ? useLayoutClasses(block) : null;
const selector = `.${(0,external_wp_blocks_namespaceObject.getBlockDefaultClassName)(name)}.wp-container-${id}`;
const blockGapSupport = useSetting('spacing.blockGap');
const hasBlockGapSupport = blockGapSupport !== null; // Get CSS string for the current layout type.
@ -39548,10 +39613,10 @@ const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrde
let css;
if (shouldRenderLayoutStyles) {
var _fullLayoutType$getLa;
var _fullLayoutType$getLa2;
const fullLayoutType = getLayoutType((usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) || 'default');
css = fullLayoutType === null || fullLayoutType === void 0 ? void 0 : (_fullLayoutType$getLa = fullLayoutType.getLayoutStyle) === null || _fullLayoutType$getLa === void 0 ? void 0 : _fullLayoutType$getLa.call(fullLayoutType, {
css = fullLayoutType === null || fullLayoutType === void 0 ? void 0 : (_fullLayoutType$getLa2 = fullLayoutType.getLayoutStyle) === null || _fullLayoutType$getLa2 === void 0 ? void 0 : _fullLayoutType$getLa2.call(fullLayoutType, {
blockName: name,
selector,
layout: usedLayout,
@ -40103,6 +40168,7 @@ function useCachedTruthy(value) {
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/with-colors.js
@ -45112,7 +45178,7 @@ function useTransformState(_ref) {
if (angle === 0) {
setEditedUrl();
setRotation(angle);
setAspect(1 / aspect);
setAspect(naturalWidth / naturalHeight);
setPosition({
x: -(position.y * naturalAspectRatio),
y: position.x * naturalAspectRatio
@ -45148,7 +45214,7 @@ function useTransformState(_ref) {
canvas.toBlob(blob => {
setEditedUrl(URL.createObjectURL(blob));
setRotation(angle);
setAspect(1 / aspect);
setAspect(canvas.width / canvas.height);
setPosition({
x: -(position.y * naturalAspectRatio),
y: position.x * naturalAspectRatio

File diff suppressed because one or more lines are too long

View File

@ -30518,19 +30518,19 @@ function Navigation(_ref) {
// - there are no uncontrolled blocks.
const isPlaceholder = !ref && !isCreatingNavigationMenu && !isConvertingClassicMenu && hasResolvedNavigationMenus && !hasUncontrolledInnerBlocks;
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (isPlaceholder && !ref) {
/**
* this fallback only displays (both in editor and on front)
* the list of pages block if no menu is available as a fallback.
* We don't want the fallback to request a save,
* nor to be undoable, hence we mark it non persistent.
*/
__unstableMarkNextChangeAsNotPersistent();
if (isPlaceholder && !ref) {
/**
* this fallback only displays (both in editor and on front)
* the list of pages block if no menu is available as a fallback.
* We don't want the fallback to request a save,
* nor to be undoable, hence we mark it non persistent.
*/
__unstableMarkNextChangeAsNotPersistent();
replaceInnerBlocks(clientId, [(0,external_wp_blocks_namespaceObject.createBlock)('core/page-list')]);
}
replaceInnerBlocks(clientId, [(0,external_wp_blocks_namespaceObject.createBlock)('core/page-list')]);
}
}, [clientId, isPlaceholder, ref]);
const isEntityAvailable = !isNavigationMenuMissing && isNavigationMenuResolved; // "loading" state:
// - there is a menu creation process in progress.
// - there is a classic menu conversion process in progress.
@ -36564,7 +36564,12 @@ function EditableContent(_ref2) {
return (_getSettings = getSettings()) === null || _getSettings === void 0 ? void 0 : _getSettings.supportsLayout;
}, []);
const defaultLayout = (0,external_wp_blockEditor_namespaceObject.useSetting)('layout') || {};
const usedLayout = !!layout && layout.inherit ? defaultLayout : layout;
const usedLayout = !(layout !== null && layout !== void 0 && layout.type) ? { ...defaultLayout,
...layout,
type: 'default'
} : { ...defaultLayout,
...layout
};
const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('postType', postType, {
id: postId
});
@ -37411,14 +37416,14 @@ const Overlay = _ref => {
backgroundImage: gradientValue,
...borderProps.style
};
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("span", {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !!dimRatio && (0,external_wp_element_namespaceObject.createElement)("span", {
"aria-hidden": "true",
className: classnames_default()('wp-block-post-featured-image__overlay', utils_dimRatioToClass(dimRatio), {
[overlayColor.class]: overlayColor.class,
'has-background-dim': dimRatio !== undefined,
'has-background-gradient': gradientValue,
[gradientClass]: gradientClass
}),
}, borderProps.className),
style: overlayStyles
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, {
__experimentalGroup: "color"
@ -37779,7 +37784,7 @@ const post_featured_image_metadata = {
color: true,
radius: true,
width: true,
__experimentalSelector: "img, .block-editor-media-placeholder",
__experimentalSelector: "img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",
__experimentalSkipSerialization: true,
__experimentalDefaultControls: {
color: true,
@ -40542,7 +40547,7 @@ function useAllowedControls(attributes) {
return (0,external_wp_data_namespaceObject.useSelect)(select => {
var _select$getActiveBloc;
return (_select$getActiveBloc = select(external_wp_blocks_namespaceObject.store).getActiveBlockVariation(queryLoopName, attributes)) === null || _select$getActiveBloc === void 0 ? void 0 : _select$getActiveBloc.allowControls;
return (_select$getActiveBloc = select(external_wp_blocks_namespaceObject.store).getActiveBlockVariation(queryLoopName, attributes)) === null || _select$getActiveBloc === void 0 ? void 0 : _select$getActiveBloc.allowedControls;
}, [attributes]);
}
function isControlAllowed(allowedControls, key) {
@ -41231,7 +41236,7 @@ function QueryInspectorControls(_ref) {
label: (0,external_wp_i18n_namespaceObject.__)('Keyword'),
value: querySearch,
onChange: setQuerySearch
})), isPostTypeHierarchical && !isControlAllowed(allowedControls, 'parents') && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
})), isPostTypeHierarchical && isControlAllowed(allowedControls, 'parents') && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
hasValue: () => !!(parents !== null && parents !== void 0 && parents.length),
label: (0,external_wp_i18n_namespaceObject.__)('Parents'),
onDeselect: () => setQuery({
@ -43566,7 +43571,6 @@ const quote_metadata = {
},
supports: {
anchor: true,
__experimentalSlashInserter: true,
__experimentalOnEnter: true,
typography: {
fontSize: true,
@ -52437,14 +52441,14 @@ const template_part_init = () => {
(0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/template-part', enhanceTemplatePartVariations); // Prevent adding template parts inside post templates.
const DISALLOWED_PARENTS = ['core/post-template', 'core/post-content'];
(0,external_wp_hooks_namespaceObject.addFilter)('blockEditor.__unstableCanInsertBlockType', 'removeTemplatePartsFromPostTemplates', (can, blockType, rootClientId, _ref2) => {
(0,external_wp_hooks_namespaceObject.addFilter)('blockEditor.__unstableCanInsertBlockType', 'removeTemplatePartsFromPostTemplates', (canInsert, blockType, rootClientId, _ref2) => {
let {
getBlock,
getBlockParentsByBlockName
} = _ref2;
if (blockType.name !== 'core/template-part') {
return can;
return canInsert;
}
for (const disallowedParentType of DISALLOWED_PARENTS) {

File diff suppressed because one or more lines are too long

View File

@ -41897,8 +41897,11 @@ function UnForwardedTokenInput(props, ref) {
selectedSuggestionIndex,
className,
onChange,
onFocus,
onBlur,
...restProps
} = props;
const [hasFocus, setHasFocus] = (0,external_wp_element_namespaceObject.useState)(false);
const size = value ? value.length + 1 : 0;
const onChangeHandler = event => {
@ -41909,6 +41912,16 @@ function UnForwardedTokenInput(props, ref) {
}
};
const onFocusHandler = e => {
setHasFocus(true);
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
};
const onBlurHandler = e => {
setHasFocus(false);
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
};
return (0,external_wp_element_namespaceObject.createElement)("input", extends_extends({
ref: ref,
id: `components-form-token-input-${instanceId}`,
@ -41916,6 +41929,8 @@ function UnForwardedTokenInput(props, ref) {
}, restProps, {
value: value || '',
onChange: onChangeHandler,
onFocus: onFocusHandler,
onBlur: onBlurHandler,
size: size,
className: classnames_default()(className, 'components-form-token-field__input'),
autoComplete: "off",
@ -41923,7 +41938,11 @@ function UnForwardedTokenInput(props, ref) {
"aria-expanded": isExpanded,
"aria-autocomplete": "list",
"aria-owns": isExpanded ? `components-form-token-suggestions-${instanceId}` : undefined,
"aria-activedescendant": selectedSuggestionIndex !== -1 ? `components-form-token-suggestions-${instanceId}-${selectedSuggestionIndex}` : undefined,
"aria-activedescendant": // Only add the `aria-activedescendant` attribute when:
// - the user is actively interacting with the input (`hasFocus`)
// - there is a selected suggestion (`selectedSuggestionIndex !== -1`)
// - the list of suggestions are rendered in the DOM (`isExpanded`)
hasFocus && selectedSuggestionIndex !== -1 && isExpanded ? `components-form-token-suggestions-${instanceId}-${selectedSuggestionIndex}` : undefined,
"aria-describedby": `components-form-token-suggestions-howto-${instanceId}`
}));
}
@ -42318,7 +42337,6 @@ function ComboboxControl(_ref) {
instanceId: instanceId,
ref: inputContainer,
value: isExpanded ? inputValue : currentLabel,
"aria-label": currentLabel ? `${currentLabel}, ${label}` : null,
onFocus: onFocus,
onBlur: onBlur,
isExpanded: isExpanded,
@ -54810,7 +54828,6 @@ const labelBlock = true ? {
styles: "flex:1"
} : 0;
const buttonView = /*#__PURE__*/emotion_react_browser_esm_css("align-items:center;appearance:none;background:transparent;border:none;border-radius:", config_values.controlBorderRadius, ";color:", COLORS.gray[700], ";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ", config_values.transitionDurationFast, " linear,color ", config_values.transitionDurationFast, " linear,font-weight 60ms linear;", reduceMotion('transition'), " user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:", config_values.toggleGroupControlBackgroundColor, ";}" + ( true ? "" : 0), true ? "" : 0);
const buttonActive = /*#__PURE__*/emotion_react_browser_esm_css("color:", COLORS.white, ";&:active{background:transparent;}" + ( true ? "" : 0), true ? "" : 0);
const ButtonContentView = emotion_styled_base_browser_esm("div", true ? {
target: "et6ln9s0"
} : 0)("font-size:", config_values.fontSize, ";line-height:1;" + ( true ? "" : 0));
@ -54826,8 +54843,9 @@ const styles_isIcon = _ref => {
default: '30px',
'__unstable-large': '34px'
};
return /*#__PURE__*/emotion_react_browser_esm_css("width:", iconButtonSizes[size], ";padding-left:0;padding-right:0;" + ( true ? "" : 0), true ? "" : 0);
return /*#__PURE__*/emotion_react_browser_esm_css("color:", COLORS.gray[900], ";width:", iconButtonSizes[size], ";padding-left:0;padding-right:0;" + ( true ? "" : 0), true ? "" : 0);
};
const buttonActive = /*#__PURE__*/emotion_react_browser_esm_css("color:", COLORS.white, ";&:active{background:transparent;}" + ( true ? "" : 0), true ? "" : 0);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/toggle-group-control/toggle-group-control-option-base/component.js

File diff suppressed because one or more lines are too long

View File

@ -4388,6 +4388,31 @@ function getEntityConfig(state, kind, name) {
name
});
}
/**
* GetEntityRecord is declared as a *callable interface* with
* two signatures to work around the fact that TypeScript doesn't
* allow currying generic functions:
*
* ```ts
* type CurriedState = F extends ( state: any, ...args: infer P ) => infer R
* ? ( ...args: P ) => R
* : F;
* type Selector = <K extends string | number>(
* state: any,
* kind: K,
* key: K extends string ? 'string value' : false
* ) => K;
* type BadlyInferredSignature = CurriedState< Selector >
* // BadlyInferredSignature evaluates to:
* // (kind: string number, key: false | "string value") => string number
* ```
*
* The signature without the state parameter shipped as CurriedSignature
* is used in the return value of `select( coreStore )`.
*
* See https://github.com/WordPress/gutenberg/pull/41578 for more details.
*/
/**
* Returns the Entity's record object by key. Returns `null` if the value is not
* yet received, undefined if the value entity is known to not exist, or the
@ -4402,7 +4427,6 @@ function getEntityConfig(state, kind, name) {
*
* @return Record.
*/
const getEntityRecord = rememo((state, kind, name, key, query) => {
var _query$context, _queriedState$items$c;
@ -4510,6 +4534,15 @@ const getRawEntityRecord = rememo((state, kind, name, key) => {
function hasEntityRecords(state, kind, name, query) {
return Array.isArray(getEntityRecords(state, kind, name, query));
}
/**
* GetEntityRecord is declared as a *callable interface* with
* two signatures to work around the fact that TypeScript doesn't
* allow currying generic functions.
*
* @see GetEntityRecord
* @see https://github.com/WordPress/gutenberg/pull/41578
*/
/**
* Returns the Entity's records.
*
@ -4521,7 +4554,6 @@ function hasEntityRecords(state, kind, name, query) {
*
* @return Records.
*/
const getEntityRecords = (state, kind, name, query) => {
// Queried data state is prepopulated for all known entities. If this is not
// assigned for the given parameters, then it is known to not exist.

View File

@ -3715,6 +3715,7 @@ function BlockInspectorButton(_ref) {
/**
* Internal dependencies
*/
@ -3762,8 +3763,35 @@ function MaybeIframe(_ref) {
name: "editor-canvas"
}, children);
}
/**
* Given an array of nested blocks, find the first Post Content
* block inside it, recursing through any nesting levels.
*
* @param {Array} blocks A list of blocks.
*
* @return {Object} The Post Content block.
*/
function findPostContent(blocks) {
for (let i = 0; i < blocks.length; i++) {
if (blocks[i].name === 'core/post-content') {
return blocks[i];
}
if (blocks[i].innerBlocks.length) {
const nestedPostContent = findPostContent(blocks[i].innerBlocks);
if (nestedPostContent) {
return nestedPostContent;
}
}
}
}
function VisualEditor(_ref2) {
var _postContentBlock$att;
let {
styles
} = _ref2;
@ -3771,17 +3799,20 @@ function VisualEditor(_ref2) {
deviceType,
isWelcomeGuideVisible,
isTemplateMode,
editedPostTemplate = {},
wrapperBlockName,
wrapperUniqueId
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
isFeatureActive,
isEditingTemplate,
__experimentalGetPreviewDeviceType
__experimentalGetPreviewDeviceType,
getEditedPostTemplate
} = select(store_store);
const {
getCurrentPostId,
getCurrentPostType
getCurrentPostType,
getEditorSettings
} = select(external_wp_editor_namespaceObject.store);
const _isTemplateMode = isEditingTemplate();
@ -3794,10 +3825,14 @@ function VisualEditor(_ref2) {
_wrapperBlockName = 'core/post-content';
}
const supportsTemplateMode = getEditorSettings().supportsTemplateMode;
return {
deviceType: __experimentalGetPreviewDeviceType(),
isWelcomeGuideVisible: isFeatureActive('welcomeGuide'),
isTemplateMode: _isTemplateMode,
// Post template fetch returns a 404 on classic themes, which
// messes with e2e tests, so we check it's a block theme first.
editedPostTemplate: supportsTemplateMode ? getEditedPostTemplate() : {},
wrapperBlockName: _wrapperBlockName,
wrapperUniqueId: getCurrentPostId()
};
@ -3809,18 +3844,14 @@ function VisualEditor(_ref2) {
const {
themeHasDisabledLayoutStyles,
themeSupportsLayout,
assets,
useRootPaddingAwareAlignments
assets
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
var _settings$__experimen;
const _settings = select(external_wp_blockEditor_namespaceObject.store).getSettings();
return {
themeHasDisabledLayoutStyles: _settings.disableLayoutStyles,
themeSupportsLayout: _settings.supportsLayout,
assets: _settings.__unstableResolvedAssets,
useRootPaddingAwareAlignments: (_settings$__experimen = _settings.__experimentalFeatures) === null || _settings$__experimen === void 0 ? void 0 : _settings$__experimen.useRootPaddingAwareAlignments
assets: _settings.__unstableResolvedAssets
};
}, []);
const {
@ -3845,7 +3876,7 @@ function VisualEditor(_ref2) {
borderBottom: 0
};
const resizedCanvasStyles = (0,external_wp_blockEditor_namespaceObject.__experimentalUseResizeCanvas)(deviceType, isTemplateMode);
const defaultLayout = (0,external_wp_blockEditor_namespaceObject.useSetting)('layout');
const globalLayoutSettings = (0,external_wp_blockEditor_namespaceObject.useSetting)('layout');
const previewMode = 'is-' + deviceType.toLowerCase() + '-preview';
let animatedStyles = isTemplateMode ? templateModeStyles : desktopCanvasStyles;
@ -3862,8 +3893,10 @@ function VisualEditor(_ref2) {
const ref = (0,external_wp_element_namespaceObject.useRef)();
const contentRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, (0,external_wp_blockEditor_namespaceObject.__unstableUseClipboardHandler)(), (0,external_wp_blockEditor_namespaceObject.__unstableUseTypewriter)(), (0,external_wp_blockEditor_namespaceObject.__unstableUseTypingObserver)(), (0,external_wp_blockEditor_namespaceObject.__unstableUseBlockSelectionClearer)()]);
const blockSelectionClearerRef = (0,external_wp_blockEditor_namespaceObject.__unstableUseBlockSelectionClearer)();
const layout = (0,external_wp_element_namespaceObject.useMemo)(() => {
const blockSelectionClearerRef = (0,external_wp_blockEditor_namespaceObject.__unstableUseBlockSelectionClearer)(); // fallbackLayout is used if there is no Post Content,
// and for Post Title.
const fallbackLayout = (0,external_wp_element_namespaceObject.useMemo)(() => {
if (isTemplateMode) {
return {
type: 'default'
@ -3873,7 +3906,7 @@ function VisualEditor(_ref2) {
if (themeSupportsLayout) {
// We need to ensure support for wide and full alignments,
// so we add the constrained type.
return { ...defaultLayout,
return { ...globalLayoutSettings,
type: 'constrained'
};
} // Set default layout for classic themes so all alignments are supported.
@ -3882,12 +3915,37 @@ function VisualEditor(_ref2) {
return {
type: 'default'
};
}, [isTemplateMode, themeSupportsLayout, defaultLayout]);
}, [isTemplateMode, themeSupportsLayout, globalLayoutSettings]);
const postContentBlock = (0,external_wp_element_namespaceObject.useMemo)(() => {
// When in template editing mode, we can access the blocks directly.
if (editedPostTemplate !== null && editedPostTemplate !== void 0 && editedPostTemplate.blocks) {
return findPostContent(editedPostTemplate === null || editedPostTemplate === void 0 ? void 0 : editedPostTemplate.blocks);
} // If there are no blocks, we have to parse the content string.
// Best double-check it's a string otherwise the parse function gets unhappy.
const parseableContent = typeof (editedPostTemplate === null || editedPostTemplate === void 0 ? void 0 : editedPostTemplate.content) === 'string' ? editedPostTemplate === null || editedPostTemplate === void 0 ? void 0 : editedPostTemplate.content : '';
return findPostContent((0,external_wp_blocks_namespaceObject.parse)(parseableContent)) || {};
}, [editedPostTemplate === null || editedPostTemplate === void 0 ? void 0 : editedPostTemplate.content, editedPostTemplate === null || editedPostTemplate === void 0 ? void 0 : editedPostTemplate.blocks]);
const postContentLayoutClasses = (0,external_wp_blockEditor_namespaceObject.__experimentaluseLayoutClasses)(postContentBlock);
const blockListLayoutClass = classnames_default()({
'is-layout-constrained': themeSupportsLayout,
'is-layout-flow': !themeSupportsLayout,
'has-global-padding': useRootPaddingAwareAlignments
});
'is-layout-flow': !themeSupportsLayout
}, themeSupportsLayout && postContentLayoutClasses);
const postContentLayoutStyles = (0,external_wp_blockEditor_namespaceObject.__experimentaluseLayoutStyles)(postContentBlock, '.block-editor-block-list__layout.is-root-container');
const layout = (postContentBlock === null || postContentBlock === void 0 ? void 0 : (_postContentBlock$att = postContentBlock.attributes) === null || _postContentBlock$att === void 0 ? void 0 : _postContentBlock$att.layout) || {}; // Update type for blocks using legacy layouts.
const postContentLayout = (0,external_wp_element_namespaceObject.useMemo)(() => {
return layout && ((layout === null || layout === void 0 ? void 0 : layout.type) === 'constrained' || layout !== null && layout !== void 0 && layout.inherit || layout !== null && layout !== void 0 && layout.contentSize || layout !== null && layout !== void 0 && layout.wideSize) ? { ...globalLayoutSettings,
...layout,
type: 'constrained'
} : { ...globalLayoutSettings,
...layout,
type: 'default'
};
}, [layout === null || layout === void 0 ? void 0 : layout.type, layout === null || layout === void 0 ? void 0 : layout.inherit, layout === null || layout === void 0 ? void 0 : layout.contentSize, layout === null || layout === void 0 ? void 0 : layout.wideSize, globalLayoutSettings]); // If there is a Post Content block we use its layout for the block list;
// if not, this must be a classic theme, in which case we use the fallback layout.
const blockListLayout = postContentBlock ? postContentLayout : fallbackLayout;
const titleRef = (0,external_wp_element_namespaceObject.useRef)();
(0,external_wp_element_namespaceObject.useEffect)(() => {
var _titleRef$current;
@ -3928,11 +3986,15 @@ function VisualEditor(_ref2) {
style: {
paddingBottom
}
}, themeSupportsLayout && !themeHasDisabledLayoutStyles && !isTemplateMode && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLayoutStyle, {
}, themeSupportsLayout && !themeHasDisabledLayoutStyles && !isTemplateMode && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLayoutStyle, {
selector: ".edit-post-visual-editor__post-title-wrapper, .block-editor-block-list__layout.is-root-container",
layout: layout,
layoutDefinitions: defaultLayout === null || defaultLayout === void 0 ? void 0 : defaultLayout.definitions
}), !isTemplateMode && (0,external_wp_element_namespaceObject.createElement)("div", {
layout: fallbackLayout,
layoutDefinitions: globalLayoutSettings === null || globalLayoutSettings === void 0 ? void 0 : globalLayoutSettings.definitions
}), postContentLayoutStyles && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLayoutStyle, {
layout: postContentLayout,
css: postContentLayoutStyles,
layoutDefinitions: globalLayoutSettings === null || globalLayoutSettings === void 0 ? void 0 : globalLayoutSettings.definitions
})), !isTemplateMode && (0,external_wp_element_namespaceObject.createElement)("div", {
className: "edit-post-visual-editor__post-title-wrapper",
contentEditable: false
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.PostTitle, {
@ -3943,7 +4005,7 @@ function VisualEditor(_ref2) {
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockList, {
className: isTemplateMode ? 'wp-site-blocks' : `${blockListLayoutClass} wp-block-post-content` // Ensure root level blocks receive default/flow blockGap styling rules.
,
__experimentalLayout: layout
__experimentalLayout: blockListLayout
}))))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableBlockSettingsMenuFirstItem, null, _ref3 => {
let {
onClose
@ -9614,15 +9676,6 @@ function reinitializeEditor(postType, postId, target, settings, initialEdits) {
*/
function initializeEditor(id, postType, postId, settings, initialEdits) {
// Prevent adding template part in the post editor.
// Only add the filter when the post editor is initialized, not imported.
(0,external_wp_hooks_namespaceObject.addFilter)('blockEditor.__unstableCanInsertBlockType', 'removeTemplatePartsFromInserter', (can, blockType) => {
if (!(0,external_wp_data_namespaceObject.select)(store_store).isEditingTemplate() && blockType.name === 'core/template-part') {
return false;
}
return can;
});
const target = document.getElementById(id);
const reboot = reinitializeEditor.bind(null, postType, postId, target, settings, initialEdits);
(0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/edit-post', {
@ -9651,9 +9704,23 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
(0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)();
if (false) {} // Show a console log warning if the browser is not in Standards rendering mode.
if (false) {}
/*
* Prevent adding template part in the post editor.
* Only add the filter when the post editor is initialized, not imported.
* Also only add the filter(s) after registerCoreBlocks()
* so that common filters in the block library are not overwritten.
*/
(0,external_wp_hooks_namespaceObject.addFilter)('blockEditor.__unstableCanInsertBlockType', 'removeTemplatePartsFromInserter', (canInsert, blockType) => {
if (!(0,external_wp_data_namespaceObject.select)(store_store).isEditingTemplate() && blockType.name === 'core/template-part') {
return false;
}
return canInsert;
}); // Show a console log warning if the browser is not in Standards rendering mode.
const documentMode = document.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';
if (documentMode !== 'Standards') {

File diff suppressed because one or more lines are too long

View File

@ -8741,7 +8741,7 @@ const getNodesWithStyles = (tree, blockSelectors) => {
return nodes;
}
const pickStyleKeys = treeToPickFrom => (0,external_lodash_namespaceObject.pickBy)(treeToPickFrom, (value, key) => ['border', 'color', 'spacing', 'typography', 'filter'].includes(key)); // Top-level.
const pickStyleKeys = treeToPickFrom => (0,external_lodash_namespaceObject.pickBy)(treeToPickFrom, (value, key) => ['border', 'color', 'spacing', 'typography', 'filter', 'outline', 'shadow'].includes(key)); // Top-level.
const styles = pickStyleKeys(tree.styles);
@ -8906,12 +8906,12 @@ const toStyles = function (tree, blockSelectors, hasBlockGapSupport, hasFallback
}
if (useRootPaddingAlign) {
ruleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
.has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }
.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
.has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }
.has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
ruleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }
.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
.has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }
.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }
.has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }
.has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }
.has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;`;
}
@ -9191,12 +9191,12 @@ const StylesPreview = _ref => {
color
} = _ref2;
return color !== backgroundColor && color !== headingColor;
}).slice(0, 2); // Reset leaked styles from WP common.css and remove main content layout padding.
}).slice(0, 2); // Reset leaked styles from WP common.css and remove main content layout padding and border.
const editorStyles = (0,external_wp_element_namespaceObject.useMemo)(() => {
if (styles) {
return [...styles, {
css: 'body{min-width: 0;padding: 0;}',
css: 'body{min-width: 0;padding: 0;border: none;}',
isGlobalStyles: true
}];
}
@ -16486,6 +16486,7 @@ function PluginSidebarMoreMenuItem(props) {
/**
* Internal dependencies
*/
@ -16512,9 +16513,26 @@ function reinitializeEditor(target, settings) {
dashboardLink: "index.php"
}), target);
return;
} // This will be a no-op if the target doesn't have any React nodes.
}
/*
* Prevent adding the Clasic block in the site editor.
* Only add the filter when the site editor is initialized, not imported.
* Also only add the filter(s) after registerCoreBlocks()
* so that common filters in the block library are not overwritten.
*
* This usage here is inspired by previous usage of the filter in the post editor:
* https://github.com/WordPress/gutenberg/pull/37157
*/
(0,external_wp_hooks_namespaceObject.addFilter)('blockEditor.__unstableCanInsertBlockType', 'removeClassicBlockFromInserter', (canInsert, blockType) => {
if (blockType.name === 'core/freeform') {
return false;
}
return canInsert;
}); // This will be a no-op if the target doesn't have any React nodes.
(0,external_wp_element_namespaceObject.unmountComponentAtNode)(target);
const reboot = reinitializeEditor.bind(null, target, settings); // We dispatch actions and update the store synchronously before rendering
// so that we won't trigger unnecessary re-renders with useEffect.

File diff suppressed because one or more lines are too long

View File

@ -319,7 +319,7 @@ const offset = {
name: 'offset',
generate: function (style, options) {
let path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ['outline', 'offset'];
let ruleKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'outlineColor';
let ruleKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'outlineOffset';
return generateRule(style, options, path, ruleKey);
}
};

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-beta2-54382';
$wp_version = '6.1-beta2-54383';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.