Editor: Update packages for 6.7 Beta 1.

Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

Fixes #61906.
Props peterwilsoncc, gziolo, kevin940726.

Built from https://develop.svn.wordpress.org/trunk@59072


git-svn-id: http://core.svn.wordpress.org/trunk@58468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
noisysocks 2024-09-20 01:55:35 +00:00
parent 2086230339
commit f6df3fba16
386 changed files with 67117 additions and 53481 deletions

View File

@ -737,10 +737,14 @@ $_old_files = array(
'wp-includes/blocks/query-title/editor.min.css', 'wp-includes/blocks/query-title/editor.min.css',
'wp-includes/blocks/query-title/editor-rtl.css', 'wp-includes/blocks/query-title/editor-rtl.css',
'wp-includes/blocks/query-title/editor-rtl.min.css', 'wp-includes/blocks/query-title/editor-rtl.min.css',
'wp-includes/blocks/tag-cloud/editor.css', /*
'wp-includes/blocks/tag-cloud/editor.min.css', * Restored in WordPress 6.7
'wp-includes/blocks/tag-cloud/editor-rtl.css', *
'wp-includes/blocks/tag-cloud/editor-rtl.min.css', * 'wp-includes/blocks/tag-cloud/editor.css',
* 'wp-includes/blocks/tag-cloud/editor.min.css',
* 'wp-includes/blocks/tag-cloud/editor-rtl.css',
* 'wp-includes/blocks/tag-cloud/editor-rtl.min.css',
*/
// 6.1 // 6.1
'wp-includes/blocks/post-comments.php', 'wp-includes/blocks/post-comments.php',
'wp-includes/blocks/post-comments', 'wp-includes/blocks/post-comments',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,6 +8,10 @@
"keywords": [ "music", "sound", "podcast", "recording" ], "keywords": [ "music", "sound", "podcast", "recording" ],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"blob": {
"type": "string",
"__experimentalRole": "local"
},
"src": { "src": {
"type": "string", "type": "string",
"source": "attribute", "source": "attribute",

File diff suppressed because it is too large Load Diff

View File

@ -93,6 +93,7 @@
"__experimentalTextTransform": true, "__experimentalTextTransform": true,
"__experimentalTextDecoration": true, "__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true, "__experimentalLetterSpacing": true,
"__experimentalWritingMode": true,
"__experimentalDefaultControls": { "__experimentalDefaultControls": {
"fontSize": true "fontSize": true
} }

View File

@ -24,7 +24,3 @@
div[data-type="core/button"]{ div[data-type="core/button"]{
display:table; display:table;
} }
.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{
text-decoration:inherit;
}

View File

@ -1 +1 @@
.wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit} .wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}

View File

@ -24,7 +24,3 @@
div[data-type="core/button"]{ div[data-type="core/button"]{
display:table; display:table;
} }
.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{
text-decoration:inherit;
}

View File

@ -1,2 +1,2 @@
.wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{ .wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{
/*!rtl:ignore*/text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit} /*!rtl:ignore*/text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}

View File

@ -13,8 +13,16 @@
"align": [ "wide", "full" ], "align": [ "wide", "full" ],
"html": false, "html": false,
"__experimentalExposeControlsToChildren": true, "__experimentalExposeControlsToChildren": true,
"color": {
"gradients": true,
"text": false,
"__experimentalDefaultControls": {
"background": true
}
},
"spacing": { "spacing": {
"blockGap": true, "blockGap": [ "horizontal", "vertical" ],
"padding": true,
"margin": [ "top", "bottom" ], "margin": [ "top", "bottom" ],
"__experimentalDefaultControls": { "__experimentalDefaultControls": {
"blockGap": true "blockGap": true
@ -33,6 +41,18 @@
"fontSize": true "fontSize": true
} }
}, },
"__experimentalBorder": {
"color": true,
"radius": true,
"style": true,
"width": true,
"__experimentalDefaultControls": {
"color": true,
"radius": true,
"style": true,
"width": true
}
},
"layout": { "layout": {
"allowSwitching": false, "allowSwitching": false,
"allowInheriting": false, "allowInheriting": false,

View File

@ -20,9 +20,6 @@
.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{ .wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{
margin-bottom:0; margin-bottom:0;
} }
.editor-styles-wrapper .wp-block-buttons.has-custom-font-size .wp-block-button__link{
font-size:inherit;
}
.wp-block[data-align=center]>.wp-block-buttons{ .wp-block[data-align=center]>.wp-block-buttons{
align-items:center; align-items:center;

View File

@ -1 +1 @@
.wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{margin:0}.wp-block-buttons>.block-list-appender{align-items:center;display:inline-flex}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-left:auto;margin-right:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.editor-styles-wrapper .wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end} .wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{margin:0}.wp-block-buttons>.block-list-appender{align-items:center;display:inline-flex}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-left:auto;margin-right:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end}

View File

@ -20,9 +20,6 @@
.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{ .wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{
margin-bottom:0; margin-bottom:0;
} }
.editor-styles-wrapper .wp-block-buttons.has-custom-font-size .wp-block-button__link{
font-size:inherit;
}
.wp-block[data-align=center]>.wp-block-buttons{ .wp-block[data-align=center]>.wp-block-buttons{
align-items:center; align-items:center;

View File

@ -1 +1 @@
.wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{margin:0}.wp-block-buttons>.block-list-appender{align-items:center;display:inline-flex}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-left:auto;margin-right:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.editor-styles-wrapper .wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end} .wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{margin:0}.wp-block-buttons>.block-list-appender{align-items:center;display:inline-flex}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-left:auto;margin-right:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end}

View File

@ -9,20 +9,26 @@
* Renders the `core/categories` block on server. * Renders the `core/categories` block on server.
* *
* @since 5.0.0 * @since 5.0.0
* @since 6.7.0 Enable client-side rendering if enhancedPagination context is true.
* *
* @param array $attributes The block attributes. * @param array $attributes The block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
* *
* @return string Returns the categories list/dropdown markup. * @return string Returns the categories list/dropdown markup.
*/ */
function render_block_core_categories( $attributes ) { function render_block_core_categories( $attributes, $content, $block ) {
static $block_id = 0; static $block_id = 0;
++$block_id; ++$block_id;
$taxonomy = get_taxonomy( $attributes['taxonomy'] );
$args = array( $args = array(
'echo' => false, 'echo' => false,
'hierarchical' => ! empty( $attributes['showHierarchy'] ), 'hierarchical' => ! empty( $attributes['showHierarchy'] ),
'orderby' => 'name', 'orderby' => 'name',
'show_count' => ! empty( $attributes['showPostCounts'] ), 'show_count' => ! empty( $attributes['showPostCounts'] ),
'taxonomy' => $attributes['taxonomy'],
'title_li' => '', 'title_li' => '',
'hide_empty' => empty( $attributes['showEmpty'] ), 'hide_empty' => empty( $attributes['showEmpty'] ),
); );
@ -33,8 +39,18 @@ function render_block_core_categories( $attributes ) {
if ( ! empty( $attributes['displayAsDropdown'] ) ) { if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$id = 'wp-block-categories-' . $block_id; $id = 'wp-block-categories-' . $block_id;
$args['id'] = $id; $args['id'] = $id;
$args['show_option_none'] = __( 'Select Category' ); $args['name'] = $taxonomy->query_var;
$wrapper_markup = '<div %1$s><label class="screen-reader-text" for="' . esc_attr( $id ) . '">' . __( 'Categories' ) . '</label>%2$s</div>'; $args['value_field'] = 'slug';
$args['show_option_none'] = sprintf(
/* translators: %s: taxonomy's singular name */
__( 'Select %s' ),
$taxonomy->labels->singular_name
);
$show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : '';
$default_label = $taxonomy->label;
$label_text = ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
$wrapper_markup = '<div %1$s><label class="wp-block-categories__label' . $show_label . '" for="' . esc_attr( $id ) . '">' . $label_text . '</label>%2$s</div>';
$items_markup = wp_dropdown_categories( $args ); $items_markup = wp_dropdown_categories( $args );
$type = 'dropdown'; $type = 'dropdown';
@ -48,9 +64,19 @@ function render_block_core_categories( $attributes ) {
); );
} }
} else { } else {
$args['show_option_none'] = $taxonomy->labels->no_terms;
$wrapper_markup = '<ul %1$s>%2$s</ul>'; $wrapper_markup = '<ul %1$s>%2$s</ul>';
$items_markup = wp_list_categories( $args ); $items_markup = wp_list_categories( $args );
$type = 'list'; $type = 'list';
if ( ! empty( $block->context['enhancedPagination'] ) ) {
$p = new WP_HTML_Tag_Processor( $items_markup );
while ( $p->next_tag( 'a' ) ) {
$p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
}
$items_markup = $p->get_updated_html();
}
} }
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => "wp-block-categories-{$type}" ) ); $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => "wp-block-categories-{$type}" ) );
@ -78,8 +104,8 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
( function() { ( function() {
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' ); var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
function onCatChange() { function onCatChange() {
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) { if ( dropdown.options[ dropdown.selectedIndex ].value !== -1 ) {
location.href = "<?php echo esc_url( home_url() ); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value; location.href = "<?php echo esc_url( home_url() ); ?>/?" + dropdown.name + '=' + dropdown.options[ dropdown.selectedIndex ].value;
} }
} }
dropdown.onchange = onCatChange; dropdown.onchange = onCatChange;

View File

@ -2,11 +2,16 @@
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3, "apiVersion": 3,
"name": "core/categories", "name": "core/categories",
"title": "Categories List", "title": "Terms List",
"category": "widgets", "category": "widgets",
"description": "Display a list of all categories.", "description": "Display a list of all terms of a given taxonomy.",
"keywords": [ "categories" ],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"taxonomy": {
"type": "string",
"default": "category"
},
"displayAsDropdown": { "displayAsDropdown": {
"type": "boolean", "type": "boolean",
"default": false "default": false
@ -26,8 +31,17 @@
"showEmpty": { "showEmpty": {
"type": "boolean", "type": "boolean",
"default": false "default": false
},
"label": {
"type": "string",
"__experimentalRole": "content"
},
"showLabel": {
"type": "boolean",
"default": true
} }
}, },
"usesContext": [ "enhancedPagination" ],
"supports": { "supports": {
"align": true, "align": true,
"html": false, "html": false,
@ -54,6 +68,18 @@
}, },
"interactivity": { "interactivity": {
"clientNavigation": true "clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
}
} }
}, },
"editorStyle": "wp-block-categories-editor", "editorStyle": "wp-block-categories-editor",

View File

@ -7,3 +7,7 @@
[data-align=center] .wp-block-categories{ [data-align=center] .wp-block-categories{
text-align:center; text-align:center;
} }
.wp-block-categories__indentation{
padding-right:16px;
}

View File

@ -1 +1 @@
.wp-block-categories ul{padding-right:2.5em}.wp-block-categories ul ul{margin-top:6px}[data-align=center] .wp-block-categories{text-align:center} .wp-block-categories ul{padding-right:2.5em}.wp-block-categories ul ul{margin-top:6px}[data-align=center] .wp-block-categories{text-align:center}.wp-block-categories__indentation{padding-right:16px}

View File

@ -7,3 +7,7 @@
[data-align=center] .wp-block-categories{ [data-align=center] .wp-block-categories{
text-align:center; text-align:center;
} }
.wp-block-categories__indentation{
padding-left:16px;
}

View File

@ -1 +1 @@
.wp-block-categories ul{padding-left:2.5em}.wp-block-categories ul ul{margin-top:6px}[data-align=center] .wp-block-categories{text-align:center} .wp-block-categories ul{padding-left:2.5em}.wp-block-categories ul ul{margin-top:6px}[data-align=center] .wp-block-categories{text-align:center}.wp-block-categories__indentation{padding-left:16px}

View File

@ -10,3 +10,7 @@
.wp-block-categories.wp-block-categories-dropdown.aligncenter{ .wp-block-categories.wp-block-categories-dropdown.aligncenter{
text-align:center; text-align:center;
} }
.wp-block-categories .wp-block-categories__label{
display:block;
width:100%;
}

View File

@ -1 +1 @@
.wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}.wp-block-categories.wp-block-categories-dropdown.aligncenter{text-align:center} .wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}.wp-block-categories.wp-block-categories-dropdown.aligncenter{text-align:center}.wp-block-categories .wp-block-categories__label{display:block;width:100%}

View File

@ -10,3 +10,7 @@
.wp-block-categories.wp-block-categories-dropdown.aligncenter{ .wp-block-categories.wp-block-categories-dropdown.aligncenter{
text-align:center; text-align:center;
} }
.wp-block-categories .wp-block-categories__label{
display:block;
width:100%;
}

View File

@ -1 +1 @@
.wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}.wp-block-categories.wp-block-categories-dropdown.aligncenter{text-align:center} .wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}.wp-block-categories.wp-block-categories-dropdown.aligncenter{text-align:center}.wp-block-categories .wp-block-categories__label{display:block;width:100%}

View File

@ -48,10 +48,12 @@
}, },
"__experimentalBorder": { "__experimentalBorder": {
"color": true, "color": true,
"radius": true,
"style": true, "style": true,
"width": true, "width": true,
"__experimentalDefaultControls": { "__experimentalDefaultControls": {
"color": true, "color": true,
"radius": true,
"style": true, "style": true,
"width": true "width": true
} }

View File

@ -51,6 +51,19 @@
}, },
"interactivity": { "interactivity": {
"clientNavigation": true "clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
} }
} }
},
"style": "wp-block-comment-author-name"
} }

View File

@ -0,0 +1,3 @@
.wp-block-comment-author-name{
box-sizing:border-box;
}

View File

@ -0,0 +1 @@
.wp-block-comment-author-name{box-sizing:border-box}

View File

@ -0,0 +1,3 @@
.wp-block-comment-author-name{
box-sizing:border-box;
}

View File

@ -0,0 +1 @@
.wp-block-comment-author-name{box-sizing:border-box}

View File

@ -35,6 +35,18 @@
"fontSize": true "fontSize": true
} }
}, },
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
}
},
"spacing": { "spacing": {
"padding": [ "horizontal", "vertical" ], "padding": [ "horizontal", "vertical" ],
"__experimentalDefaultControls": { "__experimentalDefaultControls": {
@ -42,5 +54,6 @@
} }
}, },
"html": false "html": false
} },
"style": "wp-block-comment-content"
} }

View File

@ -3,3 +3,7 @@
font-size:.875em; font-size:.875em;
line-height:1.5; line-height:1.5;
} }
.wp-block-comment-content{
box-sizing:border-box;
}

View File

@ -1 +1 @@
.comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5} .comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5}.wp-block-comment-content{box-sizing:border-box}

View File

@ -3,3 +3,7 @@
font-size:.875em; font-size:.875em;
line-height:1.5; line-height:1.5;
} }
.wp-block-comment-content{
box-sizing:border-box;
}

View File

@ -1 +1 @@
.comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5} .comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5}.wp-block-comment-content{box-sizing:border-box}

View File

@ -28,10 +28,12 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
$classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : ''; $classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : '';
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
$formatted_date = get_comment_date( if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) {
isset( $attributes['format'] ) ? $attributes['format'] : '', // translators: %s: human-readable time difference.
$comment $formatted_date = sprintf( __( '%s ago' ), human_time_diff( get_comment_date( 'U', $comment ) ) );
); } else {
$formatted_date = get_comment_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $comment );
}
$link = get_comment_link( $comment ); $link = get_comment_link( $comment );
if ( ! empty( $attributes['isLink'] ) ) { if ( ! empty( $attributes['isLink'] ) ) {

View File

@ -47,6 +47,19 @@
}, },
"interactivity": { "interactivity": {
"clientNavigation": true "clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
} }
} }
},
"style": "wp-block-comment-date"
} }

View File

@ -0,0 +1,3 @@
.wp-block-comment-date{
box-sizing:border-box;
}

View File

@ -0,0 +1 @@
.wp-block-comment-date{box-sizing:border-box}

View File

@ -0,0 +1,3 @@
.wp-block-comment-date{
box-sizing:border-box;
}

View File

@ -0,0 +1 @@
.wp-block-comment-date{box-sizing:border-box}

View File

@ -30,7 +30,11 @@
}, },
"spacing": { "spacing": {
"margin": true, "margin": true,
"padding": true "padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
}, },
"typography": { "typography": {
"fontSize": true, "fontSize": true,
@ -47,6 +51,13 @@
}, },
"interactivity": { "interactivity": {
"clientNavigation": true "clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
} }
} },
"style": "wp-block-comment-edit-link"
} }

View File

@ -0,0 +1,3 @@
.wp-block-comment-edit-link{
box-sizing:border-box;
}

View File

@ -0,0 +1 @@
.wp-block-comment-edit-link{box-sizing:border-box}

View File

@ -0,0 +1,3 @@
.wp-block-comment-edit-link{
box-sizing:border-box;
}

View File

@ -0,0 +1 @@
.wp-block-comment-edit-link{box-sizing:border-box}

View File

@ -25,7 +25,11 @@
}, },
"spacing": { "spacing": {
"margin": true, "margin": true,
"padding": true "padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
}, },
"typography": { "typography": {
"fontSize": true, "fontSize": true,
@ -40,6 +44,13 @@
"fontSize": true "fontSize": true
} }
}, },
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
},
"html": false "html": false
} },
"style": "wp-block-comment-reply-link"
} }

View File

@ -0,0 +1,3 @@
.wp-block-comment-reply-link{
box-sizing:border-box;
}

View File

@ -0,0 +1 @@
.wp-block-comment-reply-link{box-sizing:border-box}

View File

@ -0,0 +1,3 @@
.wp-block-comment-reply-link{
box-sizing:border-box;
}

View File

@ -0,0 +1 @@
.wp-block-comment-reply-link{box-sizing:border-box}

View File

@ -31,6 +31,18 @@
}, },
"interactivity": { "interactivity": {
"clientNavigation": true "clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
}
} }
}, },
"style": "wp-block-comment-template" "style": "wp-block-comment-template"

View File

@ -37,7 +37,7 @@ function render_block_core_comments_pagination_next( $attributes, $content, $blo
$label .= $pagination_arrow; $label .= $pagination_arrow;
} }
$next_comments_link = get_next_comments_link( $label, $max_page ); $next_comments_link = get_next_comments_link( $label, $max_page, $comment_vars['paged'] ?? null );
remove_filter( 'next_posts_link_attributes', $filter_link_attributes ); remove_filter( 'next_posts_link_attributes', $filter_link_attributes );

View File

@ -29,7 +29,8 @@ function render_block_core_comments_pagination_previous( $attributes, $content,
}; };
add_filter( 'previous_comments_link_attributes', $filter_link_attributes ); add_filter( 'previous_comments_link_attributes', $filter_link_attributes );
$previous_comments_link = get_previous_comments_link( $label ); $comment_vars = build_comment_query_vars_from_block( $block );
$previous_comments_link = get_previous_comments_link( $label, $comment_vars['paged'] ?? null );
remove_filter( 'previous_comments_link_attributes', $filter_link_attributes ); remove_filter( 'previous_comments_link_attributes', $filter_link_attributes );

View File

@ -2,10 +2,10 @@
justify-content:center; justify-content:center;
} }
.editor-styles-wrapper .wp-block-comments-pagination{ :where(.editor-styles-wrapper) .wp-block-comments-pagination{
max-width:100%; max-width:100%;
} }
.editor-styles-wrapper .wp-block-comments-pagination.block-editor-block-list__layout{ :where(.editor-styles-wrapper) .wp-block-comments-pagination.block-editor-block-list__layout{
margin:0; margin:0;
} }

View File

@ -1 +1 @@
.wp-block[data-align=center]>.wp-block-comments-pagination{justify-content:center}.editor-styles-wrapper .wp-block-comments-pagination{max-width:100%}.editor-styles-wrapper .wp-block-comments-pagination.block-editor-block-list__layout{margin:0}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{margin-bottom:.5em;margin-right:.5em;margin-top:.5em}.wp-block-comments-pagination>.wp-block-comments-pagination-next:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-previous:last-child{margin-right:0} .wp-block[data-align=center]>.wp-block-comments-pagination{justify-content:center}:where(.editor-styles-wrapper) .wp-block-comments-pagination{max-width:100%}:where(.editor-styles-wrapper) .wp-block-comments-pagination.block-editor-block-list__layout{margin:0}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{margin-bottom:.5em;margin-right:.5em;margin-top:.5em}.wp-block-comments-pagination>.wp-block-comments-pagination-next:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-previous:last-child{margin-right:0}

View File

@ -2,10 +2,10 @@
justify-content:center; justify-content:center;
} }
.editor-styles-wrapper .wp-block-comments-pagination{ :where(.editor-styles-wrapper) .wp-block-comments-pagination{
max-width:100%; max-width:100%;
} }
.editor-styles-wrapper .wp-block-comments-pagination.block-editor-block-list__layout{ :where(.editor-styles-wrapper) .wp-block-comments-pagination.block-editor-block-list__layout{
margin:0; margin:0;
} }

View File

@ -1 +1 @@
.wp-block[data-align=center]>.wp-block-comments-pagination{justify-content:center}.editor-styles-wrapper .wp-block-comments-pagination{max-width:100%}.editor-styles-wrapper .wp-block-comments-pagination.block-editor-block-list__layout{margin:0}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{margin:.5em .5em .5em 0}.wp-block-comments-pagination>.wp-block-comments-pagination-next:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-previous:last-child{margin-right:0} .wp-block[data-align=center]>.wp-block-comments-pagination{justify-content:center}:where(.editor-styles-wrapper) .wp-block-comments-pagination{max-width:100%}:where(.editor-styles-wrapper) .wp-block-comments-pagination.block-editor-block-list__layout{margin:0}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{margin:.5em .5em .5em 0}.wp-block-comments-pagination>.wp-block-comments-pagination-next:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-previous:last-child{margin-right:0}

View File

@ -23,6 +23,9 @@
"level": { "level": {
"type": "number", "type": "number",
"default": 2 "default": 2
},
"levelOptions": {
"type": "array"
} }
}, },
"supports": { "supports": {

View File

@ -1,6 +1,3 @@
.editor-styles-wrapper .wp-block-cover{
box-sizing:border-box;
}
.wp-block-cover.is-placeholder{ .wp-block-cover.is-placeholder{
align-items:stretch; align-items:stretch;
display:flex; display:flex;

View File

@ -1 +1 @@
.editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{align-items:stretch;display:flex;min-height:240px;padding:0!important}.wp-block-cover.is-placeholder .components-placeholder.is-large{justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder:focus:after{min-height:auto}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient{position:relative}.wp-block-cover.is-transient:before{background-color:#fff;content:"";height:100%;opacity:.3;position:absolute;width:100%;z-index:1}.wp-block-cover .components-spinner{margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:right}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-right:auto}.block-library-cover__resize-container{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .block-library-cover__resize-container,.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .components-popover__content>div{overflow:visible;pointer-events:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px} .wp-block-cover.is-placeholder{align-items:stretch;display:flex;min-height:240px;padding:0!important}.wp-block-cover.is-placeholder .components-placeholder.is-large{justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder:focus:after{min-height:auto}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient{position:relative}.wp-block-cover.is-transient:before{background-color:#fff;content:"";height:100%;opacity:.3;position:absolute;width:100%;z-index:1}.wp-block-cover .components-spinner{margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:right}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-right:auto}.block-library-cover__resize-container{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .block-library-cover__resize-container,.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .components-popover__content>div{overflow:visible;pointer-events:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}

View File

@ -1,6 +1,3 @@
.editor-styles-wrapper .wp-block-cover{
box-sizing:border-box;
}
.wp-block-cover.is-placeholder{ .wp-block-cover.is-placeholder{
align-items:stretch; align-items:stretch;
display:flex; display:flex;

View File

@ -1 +1 @@
.editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{align-items:stretch;display:flex;min-height:240px;padding:0!important}.wp-block-cover.is-placeholder .components-placeholder.is-large{justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder:focus:after{min-height:auto}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient{position:relative}.wp-block-cover.is-transient:before{background-color:#fff;content:"";height:100%;opacity:.3;position:absolute;width:100%;z-index:1}.wp-block-cover .components-spinner{left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:left}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-left:auto}.block-library-cover__resize-container{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .block-library-cover__resize-container,.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .components-popover__content>div{overflow:visible;pointer-events:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px} .wp-block-cover.is-placeholder{align-items:stretch;display:flex;min-height:240px;padding:0!important}.wp-block-cover.is-placeholder .components-placeholder.is-large{justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder:focus:after{min-height:auto}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient{position:relative}.wp-block-cover.is-transient:before{background-color:#fff;content:"";height:100%;opacity:.3;position:absolute;width:100%;z-index:1}.wp-block-cover .components-spinner{left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:left}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-left:auto}.block-library-cover__resize-container{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .block-library-cover__resize-container,.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .components-popover__content>div{overflow:visible;pointer-events:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}

View File

@ -7,6 +7,9 @@
display:flex; display:flex;
justify-content:center; justify-content:center;
} }
.wp-block-embed .wp-block-embed__placeholder-input{
flex:1 1 auto;
}
.wp-block-embed .components-placeholder__error{ .wp-block-embed .components-placeholder__error{
word-break:break-word; word-break:break-word;
} }

View File

@ -1 +1 @@
.wp-block-embed{clear:both;margin-left:0;margin-right:0}.wp-block-embed.is-loading{display:flex;justify-content:center}.wp-block-embed .components-placeholder__error{word-break:break-word}.wp-block-post-content .wp-block-embed__learn-more a{color:var(--wp-admin-theme-color)}.block-library-embed__interactive-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.wp-block[data-align=left]>.wp-block-embed,.wp-block[data-align=right]>.wp-block-embed{max-width:360px;width:100%}.wp-block[data-align=left]>.wp-block-embed .wp-block-embed__wrapper,.wp-block[data-align=right]>.wp-block-embed .wp-block-embed__wrapper{min-width:280px} .wp-block-embed{clear:both;margin-left:0;margin-right:0}.wp-block-embed.is-loading{display:flex;justify-content:center}.wp-block-embed .wp-block-embed__placeholder-input{flex:1 1 auto}.wp-block-embed .components-placeholder__error{word-break:break-word}.wp-block-post-content .wp-block-embed__learn-more a{color:var(--wp-admin-theme-color)}.block-library-embed__interactive-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.wp-block[data-align=left]>.wp-block-embed,.wp-block[data-align=right]>.wp-block-embed{max-width:360px;width:100%}.wp-block[data-align=left]>.wp-block-embed .wp-block-embed__wrapper,.wp-block[data-align=right]>.wp-block-embed .wp-block-embed__wrapper{min-width:280px}

View File

@ -7,6 +7,9 @@
display:flex; display:flex;
justify-content:center; justify-content:center;
} }
.wp-block-embed .wp-block-embed__placeholder-input{
flex:1 1 auto;
}
.wp-block-embed .components-placeholder__error{ .wp-block-embed .components-placeholder__error{
word-break:break-word; word-break:break-word;
} }

View File

@ -1 +1 @@
.wp-block-embed{clear:both;margin-left:0;margin-right:0}.wp-block-embed.is-loading{display:flex;justify-content:center}.wp-block-embed .components-placeholder__error{word-break:break-word}.wp-block-post-content .wp-block-embed__learn-more a{color:var(--wp-admin-theme-color)}.block-library-embed__interactive-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.wp-block[data-align=left]>.wp-block-embed,.wp-block[data-align=right]>.wp-block-embed{max-width:360px;width:100%}.wp-block[data-align=left]>.wp-block-embed .wp-block-embed__wrapper,.wp-block[data-align=right]>.wp-block-embed .wp-block-embed__wrapper{min-width:280px} .wp-block-embed{clear:both;margin-left:0;margin-right:0}.wp-block-embed.is-loading{display:flex;justify-content:center}.wp-block-embed .wp-block-embed__placeholder-input{flex:1 1 auto}.wp-block-embed .components-placeholder__error{word-break:break-word}.wp-block-post-content .wp-block-embed__learn-more a{color:var(--wp-admin-theme-color)}.block-library-embed__interactive-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.wp-block[data-align=left]>.wp-block-embed,.wp-block[data-align=right]>.wp-block-embed{max-width:360px;width:100%}.wp-block[data-align=left]>.wp-block-embed .wp-block-embed__wrapper,.wp-block[data-align=right]>.wp-block-embed .wp-block-embed__wrapper{min-width:280px}

View File

@ -21,7 +21,7 @@ function render_block_core_file( $attributes, $content ) {
if ( ! empty( $attributes['displayPreview'] ) ) { if ( ! empty( $attributes['displayPreview'] ) ) {
$suffix = wp_scripts_get_suffix(); $suffix = wp_scripts_get_suffix();
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
$module_url = gutenberg_url( '/build/interactivity/file.min.js' ); $module_url = gutenberg_url( '/build-module/block-library/file/view.min.js' );
} }
wp_register_script_module( wp_register_script_module(

View File

@ -11,6 +11,10 @@
"id": { "id": {
"type": "number" "type": "number"
}, },
"blob": {
"type": "string",
"__experimentalRole": "local"
},
"href": { "href": {
"type": "string" "type": "string"
}, },
@ -70,6 +74,18 @@
"link": true "link": true
} }
}, },
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
}
},
"interactivity": true "interactivity": true
}, },
"editorStyle": "wp-block-file-editor", "editorStyle": "wp-block-file-editor",

View File

@ -112,6 +112,16 @@
"supports": { "supports": {
"anchor": true, "anchor": true,
"align": true, "align": true,
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"color": true,
"radius": true
}
},
"html": false, "html": false,
"units": [ "px", "em", "rem", "vh", "vw" ], "units": [ "px", "em", "rem", "vh", "vw" ],
"spacing": { "spacing": {

View File

@ -45,7 +45,6 @@
} }
.gallery-image-sizes .components-base-control__label{ .gallery-image-sizes .components-base-control__label{
display:block;
margin-bottom:4px; margin-bottom:4px;
} }
.gallery-image-sizes .gallery-image-sizes__loading{ .gallery-image-sizes .gallery-image-sizes__loading{
@ -104,7 +103,7 @@
} }
} }
.block-library-gallery-item__inline-menu:hover{ .block-library-gallery-item__inline-menu:hover{
box-shadow:0 .7px 1px #0000001a,0 1.2px 1.7px -.2px #0000001a,0 2.3px 3.3px -.5px #0000001a; box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003;
} }
@media (min-width:600px){ @media (min-width:600px){
.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{ .columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{

View File

@ -1 +1 @@
:root :where(figure.wp-block-gallery){display:block}:root :where(figure.wp-block-gallery)>.blocks-gallery-caption{flex:0 0 100%}:root :where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{display:block}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content{margin:4px 0}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{left:5px;position:absolute;top:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder{margin:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{display:flex}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{z-index:2}:root :where(figure.wp-block-gallery) .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.gallery-settings-buttons .components-button:first-child{margin-left:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 4px 0 8px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid #0000;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px #0000001a,0 1.2px 1.7px -.2px #0000001a,0 2.3px 3.3px -.5px #0000001a}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{right:-2px}.block-library-gallery-item__inline-menu.is-right{left:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end} :root :where(figure.wp-block-gallery){display:block}:root :where(figure.wp-block-gallery)>.blocks-gallery-caption{flex:0 0 100%}:root :where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{display:block}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content{margin:4px 0}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{left:5px;position:absolute;top:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder{margin:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{display:flex}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{z-index:2}:root :where(figure.wp-block-gallery) .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.gallery-settings-buttons .components-button:first-child{margin-left:8px}.gallery-image-sizes .components-base-control__label{margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 4px 0 8px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid #0000;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{right:-2px}.block-library-gallery-item__inline-menu.is-right{left:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}

View File

@ -45,7 +45,6 @@
} }
.gallery-image-sizes .components-base-control__label{ .gallery-image-sizes .components-base-control__label{
display:block;
margin-bottom:4px; margin-bottom:4px;
} }
.gallery-image-sizes .gallery-image-sizes__loading{ .gallery-image-sizes .gallery-image-sizes__loading{
@ -104,7 +103,7 @@
} }
} }
.block-library-gallery-item__inline-menu:hover{ .block-library-gallery-item__inline-menu:hover{
box-shadow:0 .7px 1px #0000001a,0 1.2px 1.7px -.2px #0000001a,0 2.3px 3.3px -.5px #0000001a; box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003;
} }
@media (min-width:600px){ @media (min-width:600px){
.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{ .columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{

View File

@ -1 +1 @@
:root :where(figure.wp-block-gallery){display:block}:root :where(figure.wp-block-gallery)>.blocks-gallery-caption{flex:0 0 100%}:root :where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{display:block}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content{margin:4px 0}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{position:absolute;right:5px;top:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder{margin:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{display:flex}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{z-index:2}:root :where(figure.wp-block-gallery) .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.gallery-settings-buttons .components-button:first-child{margin-right:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 8px 0 4px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid #0000;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px #0000001a,0 1.2px 1.7px -.2px #0000001a,0 2.3px 3.3px -.5px #0000001a}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{left:-2px}.block-library-gallery-item__inline-menu.is-right{right:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end} :root :where(figure.wp-block-gallery){display:block}:root :where(figure.wp-block-gallery)>.blocks-gallery-caption{flex:0 0 100%}:root :where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{display:block}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content{margin:4px 0}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{position:absolute;right:5px;top:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder{margin:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{display:flex}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{z-index:2}:root :where(figure.wp-block-gallery) .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.gallery-settings-buttons .components-button:first-child{margin-right:8px}.gallery-image-sizes .components-base-control__label{margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 8px 0 4px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid #0000;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 1px 1px #00000008,0 1px 2px #00000005,0 3px 3px #00000005,0 4px 4px #00000003}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{left:-2px}.block-library-gallery-item__inline-menu.is-right{right:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}

View File

@ -133,23 +133,35 @@ figure.wp-block-gallery.has-nested-images{
max-width:100% !important; max-width:100% !important;
width:auto; width:auto;
} }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{ .wp-block-gallery.has-nested-images figure.wp-block-image figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{
background:linear-gradient(0deg, #000000b3, #0000004d 70%, #0000);
bottom:0; bottom:0;
left:0;
max-height:100%;
position:absolute;
right:0;
}
.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{
-webkit-backdrop-filter:blur(3px);
backdrop-filter:blur(3px);
content:"";
height:100%;
-webkit-mask-image:linear-gradient(0deg, #000 20%, #0000);
mask-image:linear-gradient(0deg, #000 20%, #0000);
max-height:40%;
}
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{
background:linear-gradient(0deg, #0006, #0000);
box-sizing:border-box; box-sizing:border-box;
color:#fff; color:#fff;
font-size:13px; font-size:13px;
margin-bottom:0; margin:0;
max-height:60%;
overflow:auto; overflow:auto;
padding:0 8px 8px; padding:1em;
position:absolute;
right:0;
scrollbar-color:#0000 #0000; scrollbar-color:#0000 #0000;
scrollbar-gutter:stable both-edges; scrollbar-gutter:stable both-edges;
scrollbar-width:thin; scrollbar-width:thin;
text-align:center; text-align:center;
width:100%; text-shadow:0 0 1.5px #000;
will-change:transform; will-change:transform;
} }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{ .wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{
@ -195,6 +207,10 @@ figure.wp-block-gallery.has-nested-images{
margin:0; margin:0;
padding:10px 10px 9px; padding:10px 10px 9px;
position:relative; position:relative;
text-shadow:none;
}
.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border:before,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded:before{
content:none;
} }
.wp-block-gallery.has-nested-images figcaption{ .wp-block-gallery.has-nested-images figcaption{
flex-basis:100%; flex-basis:100%;

File diff suppressed because one or more lines are too long

View File

@ -133,23 +133,35 @@ figure.wp-block-gallery.has-nested-images{
max-width:100% !important; max-width:100% !important;
width:auto; width:auto;
} }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{ .wp-block-gallery.has-nested-images figure.wp-block-image figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{
background:linear-gradient(0deg, #000000b3, #0000004d 70%, #0000);
bottom:0; bottom:0;
left:0;
max-height:100%;
position:absolute;
right:0;
}
.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{
-webkit-backdrop-filter:blur(3px);
backdrop-filter:blur(3px);
content:"";
height:100%;
-webkit-mask-image:linear-gradient(0deg, #000 20%, #0000);
mask-image:linear-gradient(0deg, #000 20%, #0000);
max-height:40%;
}
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{
background:linear-gradient(0deg, #0006, #0000);
box-sizing:border-box; box-sizing:border-box;
color:#fff; color:#fff;
font-size:13px; font-size:13px;
left:0; margin:0;
margin-bottom:0;
max-height:60%;
overflow:auto; overflow:auto;
padding:0 8px 8px; padding:1em;
position:absolute;
scrollbar-color:#0000 #0000; scrollbar-color:#0000 #0000;
scrollbar-gutter:stable both-edges; scrollbar-gutter:stable both-edges;
scrollbar-width:thin; scrollbar-width:thin;
text-align:center; text-align:center;
width:100%; text-shadow:0 0 1.5px #000;
will-change:transform; will-change:transform;
} }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{ .wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{
@ -195,6 +207,10 @@ figure.wp-block-gallery.has-nested-images{
margin:0; margin:0;
padding:10px 10px 9px; padding:10px 10px 9px;
position:relative; position:relative;
text-shadow:none;
}
.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border:before,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded:before{
content:none;
} }
.wp-block-gallery.has-nested-images figcaption{ .wp-block-gallery.has-nested-images figcaption{
flex-basis:100%; flex-basis:100%;

File diff suppressed because one or more lines are too long

View File

@ -45,6 +45,7 @@
"text": true "text": true
} }
}, },
"shadow": true,
"spacing": { "spacing": {
"margin": [ "top", "bottom" ], "margin": [ "top", "bottom" ],
"padding": true, "padding": true,

View File

@ -24,24 +24,12 @@
} }
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{ .wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{
border:1px dashed; border:1px dashed;
border-radius:2px;
content:""; content:"";
display:flex; display:flex;
flex:1 0 48px; flex:1 0 48px;
min-height:46px; min-height:46px;
pointer-events:none; pointer-events:none;
} }
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{
background:currentColor;
bottom:0;
content:"";
left:0;
opacity:.1;
pointer-events:none;
position:absolute;
right:0;
top:0;
}
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{ .wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{
pointer-events:all; pointer-events:all;
} }

View File

@ -1 +1 @@
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{background:currentColor;bottom:0;content:"";left:0;opacity:.1;pointer-events:none;position:absolute;right:0;top:0}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all} .wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}

View File

@ -24,24 +24,12 @@
} }
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{ .wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{
border:1px dashed; border:1px dashed;
border-radius:2px;
content:""; content:"";
display:flex; display:flex;
flex:1 0 48px; flex:1 0 48px;
min-height:46px; min-height:46px;
pointer-events:none; pointer-events:none;
} }
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{
background:currentColor;
bottom:0;
content:"";
left:0;
opacity:.1;
pointer-events:none;
position:absolute;
right:0;
top:0;
}
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{ .wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{
pointer-events:all; pointer-events:all;
} }

View File

@ -1 +1 @@
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{background:currentColor;bottom:0;content:"";left:0;opacity:.1;pointer-events:none;position:absolute;right:0;top:0}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all} .wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}

View File

@ -21,6 +21,9 @@
"type": "number", "type": "number",
"default": 2 "default": 2
}, },
"levelOptions": {
"type": "array"
},
"placeholder": { "placeholder": {
"type": "string" "type": "string"
} }
@ -30,6 +33,18 @@
"anchor": true, "anchor": true,
"className": true, "className": true,
"splitting": true, "splitting": true,
"__experimentalBorder": {
"color": true,
"radius": true,
"style": true,
"width": true,
"__experimentalDefaultControls": {
"color": true,
"radius": true,
"style": true,
"width": true
}
},
"color": { "color": {
"gradients": true, "gradients": true,
"link": true, "link": true,

View File

@ -72,7 +72,7 @@ function render_block_core_image( $attributes, $content, $block ) {
) { ) {
$suffix = wp_scripts_get_suffix(); $suffix = wp_scripts_get_suffix();
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
$module_url = gutenberg_url( '/build/interactivity/image.min.js' ); $module_url = gutenberg_url( '/build-module/block-library/image/view.min.js' );
} }
wp_register_script_module( wp_register_script_module(
@ -185,12 +185,15 @@ function block_core_image_render_lightbox( $block_content, $block ) {
$p->seek( 'figure' ); $p->seek( 'figure' );
$figure_class_names = $p->get_attribute( 'class' ); $figure_class_names = $p->get_attribute( 'class' );
$figure_styles = $p->get_attribute( 'style' ); $figure_styles = $p->get_attribute( 'style' );
$p->add_class( 'wp-lightbox-container' );
$p->set_attribute( 'data-wp-interactive', 'core/image' ); // Create unique id and set the image metadata in the state.
$p->set_attribute( $unique_image_id = uniqid();
'data-wp-context',
wp_json_encode( wp_interactivity_state(
'core/image',
array( array(
'metadata' => array(
$unique_image_id => array(
'uploadedSrc' => $img_uploaded_src, 'uploadedSrc' => $img_uploaded_src,
'figureClassNames' => $figure_class_names, 'figureClassNames' => $figure_class_names,
'figureStyles' => $figure_styles, 'figureStyles' => $figure_styles,
@ -202,6 +205,18 @@ function block_core_image_render_lightbox( $block_content, $block ) {
'ariaLabel' => $aria_label, 'ariaLabel' => $aria_label,
'alt' => $alt, 'alt' => $alt,
), ),
),
)
);
$p->add_class( 'wp-lightbox-container' );
$p->set_attribute( 'data-wp-interactive', 'core/image' );
$p->set_attribute(
'data-wp-context',
wp_json_encode(
array(
'imageId' => $unique_image_id,
),
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
) )
); );
@ -215,6 +230,8 @@ function block_core_image_render_lightbox( $block_content, $block ) {
// contain a caption, and we don't want to trigger the lightbox when the // contain a caption, and we don't want to trigger the lightbox when the
// caption is clicked. // caption is clicked.
$p->set_attribute( 'data-wp-on-async--click', 'actions.showLightbox' ); $p->set_attribute( 'data-wp-on-async--click', 'actions.showLightbox' );
$p->set_attribute( 'data-wp-class--hide', 'state.isContentHidden' );
$p->set_attribute( 'data-wp-class--show', 'state.isContentVisible' );
$body_content = $p->get_updated_html(); $body_content = $p->get_updated_html();
@ -231,8 +248,8 @@ function block_core_image_render_lightbox( $block_content, $block ) {
aria-label="' . esc_attr( $aria_label ) . '" aria-label="' . esc_attr( $aria_label ) . '"
data-wp-init="callbacks.initTriggerButton" data-wp-init="callbacks.initTriggerButton"
data-wp-on-async--click="actions.showLightbox" data-wp-on-async--click="actions.showLightbox"
data-wp-style--right="context.imageButtonRight" data-wp-style--right="state.imageButtonRight"
data-wp-style--top="context.imageButtonTop" data-wp-style--top="state.imageButtonTop"
> >
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12"> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" /> <path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
@ -288,15 +305,15 @@ function block_core_image_print_lightbox_overlay() {
tabindex="-1" tabindex="-1"
> >
<button type="button" aria-label="$close_button_label" style="fill: $close_button_color" class="close-button"> <button type="button" aria-label="$close_button_label" style="fill: $close_button_color" class="close-button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" focusable="false"><path d="m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"></path></svg>
</button> </button>
<div class="lightbox-image-container"> <div class="lightbox-image-container">
<figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.currentImage.figureStyles"> <figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.figureStyles">
<img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.currentImage.currentSrc"> <img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.currentImage.currentSrc">
</figure> </figure>
</div> </div>
<div class="lightbox-image-container"> <div class="lightbox-image-container">
<figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.currentImage.figureStyles"> <figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.figureStyles">
<img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.enlargedSrc"> <img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.enlargedSrc">
</figure> </figure>
</div> </div>

View File

@ -9,6 +9,10 @@
"keywords": [ "img", "photo", "picture" ], "keywords": [ "img", "photo", "picture" ],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"blob": {
"type": "string",
"__experimentalRole": "local"
},
"url": { "url": {
"type": "string", "type": "string",
"source": "attribute", "source": "attribute",
@ -102,6 +106,9 @@
"filter": { "filter": {
"duotone": true "duotone": true
}, },
"spacing": {
"margin": true
},
"__experimentalBorder": { "__experimentalBorder": {
"color": true, "color": true,
"radius": true, "radius": true,

View File

@ -1,25 +1,5 @@
.wp-block-image.wp-block-image.is-selected .components-placeholder{ .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small{
background-color:#fff; min-height:60px;
border:none;
border-radius:2px;
box-shadow:inset 0 0 0 1px #1e1e1e;
color:#1e1e1e;
filter:none !important;
}
.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{
opacity:0;
}
.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{
display:none;
}
.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{
opacity:0;
}
.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{
opacity:1;
}
.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{
transition:none;
} }
figure.wp-block-image:not(.wp-block){ figure.wp-block-image:not(.wp-block){
@ -36,12 +16,24 @@ figure.wp-block-image:not(.wp-block){
display:inline; display:inline;
} }
.wp-block-image .components-spinner{ .wp-block-image .components-spinner{
margin:0;
position:absolute; position:absolute;
right:50%; right:50%;
top:50%; top:50%;
transform:translate(50%, -50%); transform:translate(50%, -50%);
} }
.wp-block-image__placeholder{
aspect-ratio:4/3;
}
.wp-block-image__placeholder.has-illustration:before{
background:#fff;
opacity:.8;
}
.wp-block-image__placeholder .components-placeholder__illustration{
opacity:.1;
}
.wp-block-image .components-resizable-box__container{ .wp-block-image .components-resizable-box__container{
display:table; display:table;
} }
@ -90,6 +82,10 @@ figure.wp-block-image:not(.wp-block){
text-align:center; text-align:center;
} }
.wp-block[data-align]:has(>.wp-block-image){
position:relative;
}
.wp-block-image__crop-area{ .wp-block-image__crop-area{
max-width:100%; max-width:100%;
overflow:hidden; overflow:hidden;

View File

@ -1 +1 @@
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=right]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container{pointer-events:auto}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__toolbar_content_textarea{width:250px} .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small{min-height:60px}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.wp-block-image__placeholder{aspect-ratio:4/3}.wp-block-image__placeholder.has-illustration:before{background:#fff;opacity:.8}.wp-block-image__placeholder .components-placeholder__illustration{opacity:.1}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=right]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align]:has(>.wp-block-image){position:relative}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container{pointer-events:auto}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__toolbar_content_textarea{width:250px}

View File

@ -1,25 +1,5 @@
.wp-block-image.wp-block-image.is-selected .components-placeholder{ .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small{
background-color:#fff; min-height:60px;
border:none;
border-radius:2px;
box-shadow:inset 0 0 0 1px #1e1e1e;
color:#1e1e1e;
filter:none !important;
}
.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{
opacity:0;
}
.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{
display:none;
}
.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{
opacity:0;
}
.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{
opacity:1;
}
.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{
transition:none;
} }
figure.wp-block-image:not(.wp-block){ figure.wp-block-image:not(.wp-block){
@ -37,11 +17,23 @@ figure.wp-block-image:not(.wp-block){
} }
.wp-block-image .components-spinner{ .wp-block-image .components-spinner{
left:50%; left:50%;
margin:0;
position:absolute; position:absolute;
top:50%; top:50%;
transform:translate(-50%, -50%); transform:translate(-50%, -50%);
} }
.wp-block-image__placeholder{
aspect-ratio:4/3;
}
.wp-block-image__placeholder.has-illustration:before{
background:#fff;
opacity:.8;
}
.wp-block-image__placeholder .components-placeholder__illustration{
opacity:.1;
}
.wp-block-image .components-resizable-box__container{ .wp-block-image .components-resizable-box__container{
display:table; display:table;
} }
@ -90,6 +82,10 @@ figure.wp-block-image:not(.wp-block){
text-align:center; text-align:center;
} }
.wp-block[data-align]:has(>.wp-block-image){
position:relative;
}
.wp-block-image__crop-area{ .wp-block-image__crop-area{
max-width:100%; max-width:100%;
overflow:hidden; overflow:hidden;

View File

@ -1 +1 @@
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=right]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container{pointer-events:auto}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__toolbar_content_textarea{width:250px} .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small{min-height:60px}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%)}.wp-block-image__placeholder{aspect-ratio:4/3}.wp-block-image__placeholder.has-illustration:before{background:#fff;opacity:.8}.wp-block-image__placeholder .components-placeholder__illustration{opacity:.1}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=right]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align]:has(>.wp-block-image){position:relative}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container{pointer-events:auto}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__toolbar_content_textarea{width:250px}

View File

@ -1,9 +1,20 @@
.wp-block-image a{
display:inline-block;
}
.wp-block-image img{ .wp-block-image img{
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;
vertical-align:bottom; vertical-align:bottom;
} }
@media (prefers-reduced-motion:no-preference){
.wp-block-image img.hide{
visibility:hidden;
}
.wp-block-image img.show{
animation:show-content-image .4s;
}
}
.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{ .wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{
border-radius:inherit; border-radius:inherit;
} }
@ -13,6 +24,9 @@
.wp-block-image.aligncenter{ .wp-block-image.aligncenter{
text-align:center; text-align:center;
} }
.wp-block-image.alignfull a,.wp-block-image.alignwide a{
width:100%;
}
.wp-block-image.alignfull img,.wp-block-image.alignwide img{ .wp-block-image.alignfull img,.wp-block-image.alignwide img{
height:auto; height:auto;
width:100%; width:100%;
@ -230,6 +244,17 @@
} }
} }
@keyframes show-content-image{
0%{
visibility:hidden;
}
99%{
visibility:hidden;
}
to{
visibility:visible;
}
}
@keyframes turn-on-visibility{ @keyframes turn-on-visibility{
0%{ 0%{
opacity:0; opacity:0;

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,20 @@
.wp-block-image a{
display:inline-block;
}
.wp-block-image img{ .wp-block-image img{
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;
vertical-align:bottom; vertical-align:bottom;
} }
@media (prefers-reduced-motion:no-preference){
.wp-block-image img.hide{
visibility:hidden;
}
.wp-block-image img.show{
animation:show-content-image .4s;
}
}
.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{ .wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{
border-radius:inherit; border-radius:inherit;
} }
@ -13,6 +24,9 @@
.wp-block-image.aligncenter{ .wp-block-image.aligncenter{
text-align:center; text-align:center;
} }
.wp-block-image.alignfull a,.wp-block-image.alignwide a{
width:100%;
}
.wp-block-image.alignfull img,.wp-block-image.alignwide img{ .wp-block-image.alignfull img,.wp-block-image.alignwide img{
height:auto; height:auto;
width:100%; width:100%;
@ -230,6 +244,17 @@
} }
} }
@keyframes show-content-image{
0%{
visibility:hidden;
}
99%{
visibility:hidden;
}
to{
visibility:visible;
}
}
@keyframes turn-on-visibility{ @keyframes turn-on-visibility{
0%{ 0%{
opacity:0; opacity:0;

File diff suppressed because one or more lines are too long

View File

@ -50,29 +50,18 @@ let isTouching = false;
* @type {number} * @type {number}
*/ */
let lastTouchTime = 0; let lastTouchTime = 0;
/**
* Stores the image reference of the currently opened lightbox.
*
* @type {HTMLElement}
*/
let imageRef;
/**
* Stores the button reference of the currently opened lightbox.
*
* @type {HTMLElement}
*/
let buttonRef;
const { const {
state, state,
actions, actions,
callbacks callbacks
} = (0,interactivity_namespaceObject.store)('core/image', { } = (0,interactivity_namespaceObject.store)('core/image', {
state: { state: {
currentImage: {}, currentImageId: null,
get currentImage() {
return state.metadata[state.currentImageId];
},
get overlayOpened() { get overlayOpened() {
return state.currentImage.currentSrc; return state.currentImageId !== null;
}, },
get roleAttribute() { get roleAttribute() {
return state.overlayOpened ? 'dialog' : null; return state.overlayOpened ? 'dialog' : null;
@ -83,36 +72,63 @@ const {
get enlargedSrc() { get enlargedSrc() {
return state.currentImage.uploadedSrc || 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='; return state.currentImage.uploadedSrc || 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
}, },
get figureStyles() {
return state.overlayOpened && `${state.currentImage.figureStyles?.replace(/margin[^;]*;?/g, '')};`;
},
get imgStyles() { get imgStyles() {
return state.overlayOpened && `${state.currentImage.imgStyles?.replace(/;$/, '')}; object-fit:cover;`; return state.overlayOpened && `${state.currentImage.imgStyles?.replace(/;$/, '')}; object-fit:cover;`;
},
get imageButtonRight() {
const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
return state.metadata[imageId].imageButtonRight;
},
get imageButtonTop() {
const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
return state.metadata[imageId].imageButtonTop;
},
get isContentHidden() {
const ctx = (0,interactivity_namespaceObject.getContext)();
return state.overlayEnabled && state.currentImageId === ctx.imageId;
},
get isContentVisible() {
const ctx = (0,interactivity_namespaceObject.getContext)();
return !state.overlayEnabled && state.currentImageId === ctx.imageId;
} }
}, },
actions: { actions: {
showLightbox() { showLightbox() {
const ctx = (0,interactivity_namespaceObject.getContext)(); const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
// Bails out if the image has not loaded yet. // Bails out if the image has not loaded yet.
if (!ctx.imageRef?.complete) { if (!state.metadata[imageId].imageRef?.complete) {
return; return;
} }
// Stores the positons of the scroll to fix it until the overlay is // Stores the positions of the scroll to fix it until the overlay is
// closed. // closed.
state.scrollTopReset = document.documentElement.scrollTop; state.scrollTopReset = document.documentElement.scrollTop;
state.scrollLeftReset = document.documentElement.scrollLeft; state.scrollLeftReset = document.documentElement.scrollLeft;
// Moves the information of the expaned image to the state. // Sets the current expanded image in the state and enables the overlay.
ctx.currentSrc = ctx.imageRef.currentSrc;
imageRef = ctx.imageRef;
buttonRef = ctx.buttonRef;
state.currentImage = ctx;
state.overlayEnabled = true; state.overlayEnabled = true;
state.currentImageId = imageId;
// Computes the styles of the overlay for the animation. // Computes the styles of the overlay for the animation.
callbacks.setOverlayStyles(); callbacks.setOverlayStyles();
}, },
hideLightbox() { hideLightbox() {
if (state.overlayEnabled) { if (state.overlayEnabled) {
// Starts the overlay closing animation. The showClosingAnimation
// class is used to avoid showing it on page load.
state.showClosingAnimation = true;
state.overlayEnabled = false;
// Waits until the close animation has completed before allowing a // Waits until the close animation has completed before allowing a
// user to scroll again. The duration of this animation is defined in // user to scroll again. The duration of this animation is defined in
// the `styles.scss` file, but in any case we should wait a few // the `styles.scss` file, but in any case we should wait a few
@ -122,20 +138,13 @@ const {
// Delays before changing the focus. Otherwise the focus ring will // Delays before changing the focus. Otherwise the focus ring will
// appear on Firefox before the image has finished animating, which // appear on Firefox before the image has finished animating, which
// looks broken. // looks broken.
buttonRef.focus({ state.currentImage.buttonRef.focus({
preventScroll: true preventScroll: true
}); });
// Resets the current image to mark the overlay as closed. // Resets the current image id to mark the overlay as closed.
state.currentImage = {}; state.currentImageId = null;
imageRef = null;
buttonRef = null;
}, 450); }, 450);
// Starts the overlay closing animation. The showClosingAnimation
// class is used to avoid showing it on page load.
state.showClosingAnimation = true;
state.overlayEnabled = false;
} }
}, },
handleKeydown(event) { handleKeydown(event) {
@ -197,7 +206,7 @@ const {
}, },
callbacks: { callbacks: {
setOverlayStyles() { setOverlayStyles() {
if (!imageRef) { if (!state.overlayEnabled) {
return; return;
} }
let { let {
@ -205,11 +214,11 @@ const {
naturalHeight, naturalHeight,
offsetWidth: originalWidth, offsetWidth: originalWidth,
offsetHeight: originalHeight offsetHeight: originalHeight
} = imageRef; } = state.currentImage.imageRef;
let { let {
x: screenPosX, x: screenPosX,
y: screenPosY y: screenPosY
} = imageRef.getBoundingClientRect(); } = state.currentImage.imageRef.getBoundingClientRect();
// Natural ratio of the image clicked to open the lightbox. // Natural ratio of the image clicked to open the lightbox.
const naturalRatio = naturalWidth / naturalHeight; const naturalRatio = naturalWidth / naturalHeight;
@ -246,6 +255,7 @@ const {
let containerMaxHeight = imgMaxHeight; let containerMaxHeight = imgMaxHeight;
let containerWidth = imgMaxWidth; let containerWidth = imgMaxWidth;
let containerHeight = imgMaxHeight; let containerHeight = imgMaxHeight;
// Checks if the target image has a different ratio than the original // Checks if the target image has a different ratio than the original
// one (thumbnail). Recalculates the width and height. // one (thumbnail). Recalculates the width and height.
if (naturalRatio.toFixed(2) !== imgRatio.toFixed(2)) { if (naturalRatio.toFixed(2) !== imgRatio.toFixed(2)) {
@ -340,11 +350,14 @@ const {
`; `;
}, },
setButtonStyles() { setButtonStyles() {
const ctx = (0,interactivity_namespaceObject.getContext)(); const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
const { const {
ref ref
} = (0,interactivity_namespaceObject.getElement)(); } = (0,interactivity_namespaceObject.getElement)();
ctx.imageRef = ref; state.metadata[imageId].imageRef = ref;
state.metadata[imageId].currentSrc = ref.currentSrc;
const { const {
naturalWidth, naturalWidth,
naturalHeight, naturalHeight,
@ -374,11 +387,13 @@ const {
} }
const buttonOffsetTop = figureHeight - offsetHeight; const buttonOffsetTop = figureHeight - offsetHeight;
const buttonOffsetRight = figureWidth - offsetWidth; const buttonOffsetRight = figureWidth - offsetWidth;
let imageButtonTop = buttonOffsetTop + 16;
let imageButtonRight = buttonOffsetRight + 16;
// In the case of an image with object-fit: contain, the size of the // In the case of an image with object-fit: contain, the size of the
// <img> element can be larger than the image itself, so it needs to // <img> element can be larger than the image itself, so it needs to
// calculate where to place the button. // calculate where to place the button.
if (ctx.scaleAttr === 'contain') { if (state.metadata[imageId].scaleAttr === 'contain') {
// Natural ratio of the image. // Natural ratio of the image.
const naturalRatio = naturalWidth / naturalHeight; const naturalRatio = naturalWidth / naturalHeight;
// Offset ratio of the image. // Offset ratio of the image.
@ -387,19 +402,18 @@ const {
// If it reaches the width first, it keeps the width and compute the // If it reaches the width first, it keeps the width and compute the
// height. // height.
const referenceHeight = offsetWidth / naturalRatio; const referenceHeight = offsetWidth / naturalRatio;
ctx.imageButtonTop = (offsetHeight - referenceHeight) / 2 + buttonOffsetTop + 16; imageButtonTop = (offsetHeight - referenceHeight) / 2 + buttonOffsetTop + 16;
ctx.imageButtonRight = buttonOffsetRight + 16; imageButtonRight = buttonOffsetRight + 16;
} else { } else {
// If it reaches the height first, it keeps the height and compute // If it reaches the height first, it keeps the height and compute
// the width. // the width.
const referenceWidth = offsetHeight * naturalRatio; const referenceWidth = offsetHeight * naturalRatio;
ctx.imageButtonTop = buttonOffsetTop + 16; imageButtonTop = buttonOffsetTop + 16;
ctx.imageButtonRight = (offsetWidth - referenceWidth) / 2 + buttonOffsetRight + 16; imageButtonRight = (offsetWidth - referenceWidth) / 2 + buttonOffsetRight + 16;
} }
} else {
ctx.imageButtonTop = buttonOffsetTop + 16;
ctx.imageButtonRight = buttonOffsetRight + 16;
} }
state.metadata[imageId].imageButtonTop = imageButtonTop;
state.metadata[imageId].imageButtonRight = imageButtonRight;
}, },
setOverlayFocus() { setOverlayFocus() {
if (state.overlayEnabled) { if (state.overlayEnabled) {
@ -411,11 +425,13 @@ const {
} }
}, },
initTriggerButton() { initTriggerButton() {
const ctx = (0,interactivity_namespaceObject.getContext)(); const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
const { const {
ref ref
} = (0,interactivity_namespaceObject.getElement)(); } = (0,interactivity_namespaceObject.getElement)();
ctx.buttonRef = ref; state.metadata[imageId].buttonRef = ref;
} }
} }
}, { }, {

View File

@ -1 +1 @@
import*as t from"@wordpress/interactivity";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const n=(t=>{var n={};return e.d(n,t),n})({getContext:()=>t.getContext,getElement:()=>t.getElement,store:()=>t.store});let o,r,i=!1,l=0;const{state:a,actions:c,callbacks:s}=(0,n.store)("core/image",{state:{currentImage:{},get overlayOpened(){return a.currentImage.currentSrc},get roleAttribute(){return a.overlayOpened?"dialog":null},get ariaModal(){return a.overlayOpened?"true":null},get enlargedSrc(){return a.currentImage.uploadedSrc||"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},get imgStyles(){return a.overlayOpened&&`${a.currentImage.imgStyles?.replace(/;$/,"")}; object-fit:cover;`}},actions:{showLightbox(){const t=(0,n.getContext)();t.imageRef?.complete&&(a.scrollTopReset=document.documentElement.scrollTop,a.scrollLeftReset=document.documentElement.scrollLeft,t.currentSrc=t.imageRef.currentSrc,o=t.imageRef,r=t.buttonRef,a.currentImage=t,a.overlayEnabled=!0,s.setOverlayStyles())},hideLightbox(){a.overlayEnabled&&(setTimeout((function(){r.focus({preventScroll:!0}),a.currentImage={},o=null,r=null}),450),a.showClosingAnimation=!0,a.overlayEnabled=!1)},handleKeydown(t){if(a.overlayEnabled){if("Tab"===t.key){t.preventDefault();const{ref:e}=(0,n.getElement)();e.querySelector("button").focus()}"Escape"===t.key&&c.hideLightbox()}},handleTouchMove(t){a.overlayEnabled&&t.preventDefault()},handleTouchStart(){i=!0},handleTouchEnd(){l=Date.now(),i=!1},handleScroll(){a.overlayOpened&&!i&&Date.now()-l>450&&window.scrollTo(a.scrollLeftReset,a.scrollTopReset)}},callbacks:{setOverlayStyles(){if(!o)return;let{naturalWidth:t,naturalHeight:e,offsetWidth:n,offsetHeight:r}=o,{x:i,y:l}=o.getBoundingClientRect();const c=t/e;let s=n/r;if("contain"===a.currentImage.scaleAttr)if(c>s){const t=n/c;l+=(r-t)/2,r=t}else{const t=r*c;i+=(n-t)/2,n=t}s=n/r;let g=parseFloat("none"!==a.currentImage.targetWidth?a.currentImage.targetWidth:t),u=parseFloat("none"!==a.currentImage.targetHeight?a.currentImage.targetHeight:e),d=g/u,h=g,m=u,p=g,f=u;if(c.toFixed(2)!==d.toFixed(2)){if(c>d){const t=g/c;u-t>g?(u=t,g=t*c):u=g/c}else{const t=u*c;g-t>u?(g=t,u=t/c):g=u*c}p=g,f=u,d=g/u,s>d?(h=g,m=h/s):(m=u,h=m*s)}(n>p||r>f)&&(p=n,f=r);let w=0;window.innerWidth>480?w=80:window.innerWidth>1920&&(w=160);const y=Math.min(window.innerWidth-w,p),b=Math.min(window.innerHeight-80,f);s>y/b?(p=y,f=p/s):(f=b,p=f*s);const x=n/p,v=g*(p/h),A=u*(f/m);a.overlayStyles=`\n\t\t\t\t:root {\n\t\t\t\t\t--wp--lightbox-initial-top-position: ${l}px;\n\t\t\t\t\t--wp--lightbox-initial-left-position: ${i}px;\n\t\t\t\t\t--wp--lightbox-container-width: ${p+1}px;\n\t\t\t\t\t--wp--lightbox-container-height: ${f+1}px;\n\t\t\t\t\t--wp--lightbox-image-width: ${v}px;\n\t\t\t\t\t--wp--lightbox-image-height: ${A}px;\n\t\t\t\t\t--wp--lightbox-scale: ${x};\n\t\t\t\t\t--wp--lightbox-scrollbar-width: ${window.innerWidth-document.documentElement.clientWidth}px;\n\t\t\t\t}\n\t\t\t`},setButtonStyles(){const t=(0,n.getContext)(),{ref:e}=(0,n.getElement)();t.imageRef=e;const{naturalWidth:o,naturalHeight:r,offsetWidth:i,offsetHeight:l}=e;if(0===o||0===r)return;const a=e.parentElement,c=e.parentElement.clientWidth;let s=e.parentElement.clientHeight;const g=a.querySelector("figcaption");if(g){const t=window.getComputedStyle(g);["absolute","fixed"].includes(t.position)||(s=s-g.offsetHeight-parseFloat(t.marginTop)-parseFloat(t.marginBottom))}const u=s-l,d=c-i;if("contain"===t.scaleAttr){const e=o/r;if(e>=i/l){const n=i/e;t.imageButtonTop=(l-n)/2+u+16,t.imageButtonRight=d+16}else{const n=l*e;t.imageButtonTop=u+16,t.imageButtonRight=(i-n)/2+d+16}}else t.imageButtonTop=u+16,t.imageButtonRight=d+16},setOverlayFocus(){if(a.overlayEnabled){const{ref:t}=(0,n.getElement)();t.focus()}},initTriggerButton(){const t=(0,n.getContext)(),{ref:e}=(0,n.getElement)();t.buttonRef=e}}},{lock:!0}); import*as t from"@wordpress/interactivity";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const n=(t=>{var n={};return e.d(n,t),n})({getContext:()=>t.getContext,getElement:()=>t.getElement,store:()=>t.store});let o=!1,a=0;const{state:r,actions:i,callbacks:l}=(0,n.store)("core/image",{state:{currentImageId:null,get currentImage(){return r.metadata[r.currentImageId]},get overlayOpened(){return null!==r.currentImageId},get roleAttribute(){return r.overlayOpened?"dialog":null},get ariaModal(){return r.overlayOpened?"true":null},get enlargedSrc(){return r.currentImage.uploadedSrc||"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},get figureStyles(){return r.overlayOpened&&`${r.currentImage.figureStyles?.replace(/margin[^;]*;?/g,"")};`},get imgStyles(){return r.overlayOpened&&`${r.currentImage.imgStyles?.replace(/;$/,"")}; object-fit:cover;`},get imageButtonRight(){const{imageId:t}=(0,n.getContext)();return r.metadata[t].imageButtonRight},get imageButtonTop(){const{imageId:t}=(0,n.getContext)();return r.metadata[t].imageButtonTop},get isContentHidden(){const t=(0,n.getContext)();return r.overlayEnabled&&r.currentImageId===t.imageId},get isContentVisible(){const t=(0,n.getContext)();return!r.overlayEnabled&&r.currentImageId===t.imageId}},actions:{showLightbox(){const{imageId:t}=(0,n.getContext)();r.metadata[t].imageRef?.complete&&(r.scrollTopReset=document.documentElement.scrollTop,r.scrollLeftReset=document.documentElement.scrollLeft,r.overlayEnabled=!0,r.currentImageId=t,l.setOverlayStyles())},hideLightbox(){r.overlayEnabled&&(r.showClosingAnimation=!0,r.overlayEnabled=!1,setTimeout((function(){r.currentImage.buttonRef.focus({preventScroll:!0}),r.currentImageId=null}),450))},handleKeydown(t){if(r.overlayEnabled){if("Tab"===t.key){t.preventDefault();const{ref:e}=(0,n.getElement)();e.querySelector("button").focus()}"Escape"===t.key&&i.hideLightbox()}},handleTouchMove(t){r.overlayEnabled&&t.preventDefault()},handleTouchStart(){o=!0},handleTouchEnd(){a=Date.now(),o=!1},handleScroll(){r.overlayOpened&&!o&&Date.now()-a>450&&window.scrollTo(r.scrollLeftReset,r.scrollTopReset)}},callbacks:{setOverlayStyles(){if(!r.overlayEnabled)return;let{naturalWidth:t,naturalHeight:e,offsetWidth:n,offsetHeight:o}=r.currentImage.imageRef,{x:a,y:i}=r.currentImage.imageRef.getBoundingClientRect();const l=t/e;let g=n/o;if("contain"===r.currentImage.scaleAttr)if(l>g){const t=n/l;i+=(o-t)/2,o=t}else{const t=o*l;a+=(n-t)/2,n=t}g=n/o;let c=parseFloat("none"!==r.currentImage.targetWidth?r.currentImage.targetWidth:t),s=parseFloat("none"!==r.currentImage.targetHeight?r.currentImage.targetHeight:e),d=c/s,u=c,m=s,h=c,p=s;if(l.toFixed(2)!==d.toFixed(2)){if(l>d){const t=c/l;s-t>c?(s=t,c=t*l):s=c/l}else{const t=s*l;c-t>s?(c=t,s=t/l):c=s*l}h=c,p=s,d=c/s,g>d?(u=c,m=u/g):(m=s,u=m*g)}(n>h||o>p)&&(h=n,p=o);let f=0;window.innerWidth>480?f=80:window.innerWidth>1920&&(f=160);const y=Math.min(window.innerWidth-f,h),b=Math.min(window.innerHeight-80,p);g>y/b?(h=y,p=h/g):(p=b,h=p*g);const w=n/h,I=c*(h/u),x=s*(p/m);r.overlayStyles=`\n\t\t\t\t:root {\n\t\t\t\t\t--wp--lightbox-initial-top-position: ${i}px;\n\t\t\t\t\t--wp--lightbox-initial-left-position: ${a}px;\n\t\t\t\t\t--wp--lightbox-container-width: ${h+1}px;\n\t\t\t\t\t--wp--lightbox-container-height: ${p+1}px;\n\t\t\t\t\t--wp--lightbox-image-width: ${I}px;\n\t\t\t\t\t--wp--lightbox-image-height: ${x}px;\n\t\t\t\t\t--wp--lightbox-scale: ${w};\n\t\t\t\t\t--wp--lightbox-scrollbar-width: ${window.innerWidth-document.documentElement.clientWidth}px;\n\t\t\t\t}\n\t\t\t`},setButtonStyles(){const{imageId:t}=(0,n.getContext)(),{ref:e}=(0,n.getElement)();r.metadata[t].imageRef=e,r.metadata[t].currentSrc=e.currentSrc;const{naturalWidth:o,naturalHeight:a,offsetWidth:i,offsetHeight:l}=e;if(0===o||0===a)return;const g=e.parentElement,c=e.parentElement.clientWidth;let s=e.parentElement.clientHeight;const d=g.querySelector("figcaption");if(d){const t=window.getComputedStyle(d);["absolute","fixed"].includes(t.position)||(s=s-d.offsetHeight-parseFloat(t.marginTop)-parseFloat(t.marginBottom))}const u=s-l,m=c-i;let h=u+16,p=m+16;if("contain"===r.metadata[t].scaleAttr){const t=o/a;if(t>=i/l){h=(l-i/t)/2+u+16,p=m+16}else{h=u+16,p=(i-l*t)/2+m+16}}r.metadata[t].imageButtonTop=h,r.metadata[t].imageButtonRight=p},setOverlayFocus(){if(r.overlayEnabled){const{ref:t}=(0,n.getElement)();t.focus()}},initTriggerButton(){const{imageId:t}=(0,n.getContext)(),{ref:e}=(0,n.getElement)();r.metadata[t].buttonRef=e}}},{lock:!0});

View File

@ -29,6 +29,15 @@
}, },
"supports": { "supports": {
"align": true, "align": true,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"html": false, "html": false,
"spacing": { "spacing": {
"margin": true, "margin": true,

View File

@ -6,13 +6,6 @@
display:inline; display:inline;
} }
.editor-latest-posts-image-alignment-control .components-base-control__label{
display:block;
}
.editor-latest-posts-image-alignment-control .components-toolbar{
border-radius:2px;
}
:root :where(.wp-block-latest-posts){ :root :where(.wp-block-latest-posts){
padding-right:2.5em; padding-right:2.5em;
} }
@ -20,3 +13,10 @@
:root :where(.wp-block-latest-posts.is-grid),:root :where(.wp-block-latest-posts__list){ :root :where(.wp-block-latest-posts.is-grid),:root :where(.wp-block-latest-posts__list){
padding-right:0; padding-right:0;
} }
.wp-block-latest-posts__post-content-radio{
margin-bottom:24px;
}
.wp-block-latest-posts__post-content-radio:last-child{
margin-bottom:8px;
}

View File

@ -1 +1 @@
.wp-block-latest-posts>li{overflow:hidden}.wp-block-latest-posts li a>div{display:inline}.editor-latest-posts-image-alignment-control .components-base-control__label{display:block}.editor-latest-posts-image-alignment-control .components-toolbar{border-radius:2px}:root :where(.wp-block-latest-posts){padding-right:2.5em}:root :where(.wp-block-latest-posts.is-grid),:root :where(.wp-block-latest-posts__list){padding-right:0} .wp-block-latest-posts>li{overflow:hidden}.wp-block-latest-posts li a>div{display:inline}:root :where(.wp-block-latest-posts){padding-right:2.5em}:root :where(.wp-block-latest-posts.is-grid),:root :where(.wp-block-latest-posts__list){padding-right:0}.wp-block-latest-posts__post-content-radio{margin-bottom:24px}.wp-block-latest-posts__post-content-radio:last-child{margin-bottom:8px}

Some files were not shown because too many files have changed in this diff Show More