mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Editor: Update packages for 6.1 Release Candidate 2.
Package updates for bug and regression fixes: - `@wordpress/block-directory: 3.15.8` - `@wordpress/block-editor: 10.0.7` - `@wordpress/block-library: 7.14.8` - `@wordpress/components: 21.0.6` - `@wordpress/customize-widgets: 3.14.8` - `@wordpress/edit-post: 6.14.8` - `@wordpress/edit-site: 4.14.10` - `@wordpress/edit-widgets: 4.14.8` - `@wordpress/editor: 12.16.7` - `@wordpress/format-library: 3.15.7` - `@wordpress/interface: 4.16.6` - `@wordpress/list-reusable-blocks: 3.15.6` - `@wordpress/nux: 5.15.6` - `@wordpress/preferences: 2.9.6` - `@wordpress/reusable-blocks: 3.15.7` - `@wordpress/server-side-render: 3.15.6` - `@wordpress/widgets: 2.15.7` Original PRs from Gutenberg repository: - [https://github.com/WordPress/gutenberg/pull/45041 #45041 Font Size Picker Hint: Fallback to font size `slug` if `name` is undefined] - [https://github.com/WordPress/gutenberg/pull/45045 #45045 Add: Missing output escaping on some blocks] - [https://github.com/WordPress/gutenberg/pull/44999 #44999 Escape comment author URL] - [https://github.com/WordPress/gutenberg/pull/44972 #44972 Navigator: restore focus only once per location] - [https://github.com/WordPress/gutenberg/pull/44858 #44858 Spacing Sizes Control: Try improving layout spacing] - [https://github.com/WordPress/gutenberg/pull/44878 #44878 Fix: Inspector is usable on the top level block even if it is content locked] - [https://github.com/WordPress/gutenberg/pull/44809 #44809 Fix list outdents on Enter in quote block] - [https://github.com/WordPress/gutenberg/pull/44864 #44864 List v2: fix selection when creating paragraph from empty list item] - [https://github.com/WordPress/gutenberg/pull/44853 #44853 Fix overflowing patterns] - [https://github.com/WordPress/gutenberg/pull/45050 #45050 Fix visibility of nested Group block appender] - [https://github.com/WordPress/gutenberg/pull/44887 #44887 wp-env: Use case insensitive regex when checking WP version string] Follow-up to [54257], [54335], [54383], [54483], [54486], [54490]. Props bernhard-reiter, audrasjb. See #56467. Built from https://develop.svn.wordpress.org/trunk@54632 git-svn-id: http://core.svn.wordpress.org/trunk@54184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c0f8faaed1
commit
bfbf1bc053
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -127,7 +127,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
|
||||
$label = 'aria-label="' . sprintf( esc_attr__( '(%s website link, opens in a new tab)' ), $comment->comment_author ) . '"';
|
||||
}
|
||||
// translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
|
||||
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', $comment->comment_author_url, esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
|
||||
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
|
||||
}
|
||||
return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block );
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ function render_block_core_legacy_widget( $attributes ) {
|
||||
|
||||
if ( isset( $attributes['instance']['encoded'], $attributes['instance']['hash'] ) ) {
|
||||
$serialized_instance = base64_decode( $attributes['instance']['encoded'] );
|
||||
if ( wp_hash( $serialized_instance ) !== $attributes['instance']['hash'] ) {
|
||||
if ( ! hash_equals( wp_hash( $serialized_instance ), (string) $attributes['instance']['hash'] ) ) {
|
||||
return '';
|
||||
}
|
||||
$instance = unserialize( $serialized_instance );
|
||||
|
@ -646,7 +646,7 @@ function render_block_core_navigation( $attributes, $content, $block ) {
|
||||
$toggle_aria_label_close,
|
||||
esc_attr( implode( ' ', $responsive_container_classes ) ),
|
||||
esc_attr( implode( ' ', $open_button_classes ) ),
|
||||
safecss_filter_attr( $colors['overlay_inline_styles'] ),
|
||||
esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ),
|
||||
__( 'Menu' ),
|
||||
$toggle_button_content,
|
||||
$toggle_close_button_content
|
||||
|
@ -20,7 +20,7 @@ function render_block_core_rss( $attributes ) {
|
||||
$rss = fetch_feed( $attributes['feedURL'] );
|
||||
|
||||
if ( is_wp_error( $rss ) ) {
|
||||
return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . $rss->get_error_message() . '</div></div>';
|
||||
return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . esc_html( $rss->get_error_message() ) . '</div></div>';
|
||||
}
|
||||
|
||||
if ( ! $rss->get_item_quantity() ) {
|
||||
@ -48,8 +48,8 @@ function render_block_core_rss( $attributes ) {
|
||||
if ( $date ) {
|
||||
$date = sprintf(
|
||||
'<time datetime="%1$s" class="wp-block-rss__item-publish-date">%2$s</time> ',
|
||||
date_i18n( get_option( 'c' ), $date ),
|
||||
date_i18n( get_option( 'date_format' ), $date )
|
||||
esc_attr( date_i18n( get_option( 'c' ), $date ) ),
|
||||
esc_attr( date_i18n( get_option( 'date_format' ), $date ) )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -367,12 +367,12 @@ function styles_for_block_core_search( $attributes ) {
|
||||
// Add color styles.
|
||||
$has_text_color = ! empty( $attributes['style']['color']['text'] );
|
||||
if ( $has_text_color ) {
|
||||
$button_styles[] = sprintf( 'color: %s;', esc_attr( $attributes['style']['color']['text'] ) );
|
||||
$button_styles[] = sprintf( 'color: %s;', $attributes['style']['color']['text'] );
|
||||
}
|
||||
|
||||
$has_background_color = ! empty( $attributes['style']['color']['background'] );
|
||||
if ( $has_background_color ) {
|
||||
$button_styles[] = sprintf( 'background-color: %s;', esc_attr( $attributes['style']['color']['background'] ) );
|
||||
$button_styles[] = sprintf( 'background-color: %s;', $attributes['style']['color']['background'] );
|
||||
}
|
||||
|
||||
$has_custom_gradient = ! empty( $attributes['style']['color']['gradient'] );
|
||||
@ -399,9 +399,9 @@ function styles_for_block_core_search( $attributes ) {
|
||||
}
|
||||
|
||||
return array(
|
||||
'input' => ! empty( $input_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $input_styles ) ) ) : '',
|
||||
'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $button_styles ) ) ) : '',
|
||||
'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) : '',
|
||||
'input' => ! empty( $input_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $input_styles ) ) ) ) : '',
|
||||
'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $button_styles ) ) ) ) : '',
|
||||
'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) ) : '',
|
||||
'label' => ! empty( $label_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $label_styles ) ) ) ) : '',
|
||||
);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ function render_block_core_widget_group( $attributes, $content, $block ) {
|
||||
$html = '';
|
||||
|
||||
if ( ! empty( $attributes['title'] ) ) {
|
||||
$html .= $before_title . $attributes['title'] . $after_title;
|
||||
$html .= $before_title . esc_html( $attributes['title'] ) . $after_title;
|
||||
}
|
||||
|
||||
$html .= '<div class="wp-widget-group__inner-blocks">';
|
||||
|
48
wp-includes/css/dist/block-editor/style-rtl.css
vendored
48
wp-includes/css/dist/block-editor/style-rtl.css
vendored
@ -1068,6 +1068,7 @@
|
||||
.block-editor-block-patterns-list__list-item {
|
||||
cursor: pointer;
|
||||
margin-bottom: 24px;
|
||||
position: relative;
|
||||
}
|
||||
.block-editor-block-patterns-list__list-item.is-placeholder {
|
||||
min-height: 100px;
|
||||
@ -1712,10 +1713,10 @@
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child {
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child {
|
||||
pointer-events: none;
|
||||
}
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child::after {
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -1726,7 +1727,7 @@
|
||||
border: 1px dashed currentColor;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child .block-editor-inserter {
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@ -4273,7 +4274,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
align-items: center;
|
||||
grid-template-rows: 25px auto;
|
||||
grid-template-rows: 16px auto;
|
||||
}
|
||||
|
||||
.component-spacing-sizes-control {
|
||||
@ -4296,15 +4297,16 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
grid-column: 1/1;
|
||||
justify-content: left;
|
||||
height: 16px;
|
||||
margin-top: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__side-label {
|
||||
grid-column: 1/1;
|
||||
justify-self: left;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control {
|
||||
margin-top: 12px;
|
||||
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control,
|
||||
.component-spacing-sizes-control.is-unlinked .components-spacing-sizes-control__custom-value-input {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__hint-single,
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__hint-all {
|
||||
@ -4322,12 +4324,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
grid-column: 2/2;
|
||||
grid-row: 1/1;
|
||||
justify-self: end;
|
||||
padding: 0;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-all.is-small.has-icon {
|
||||
padding: 0;
|
||||
min-width: 24px;
|
||||
height: 16px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button ~ .components-spacing-sizes-control__custom-toggle-all {
|
||||
margin-left: 4px;
|
||||
@ -4335,29 +4332,37 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single {
|
||||
grid-column: 3/3;
|
||||
justify-self: end;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single.is-small.has-icon {
|
||||
padding: 0;
|
||||
min-width: 24px;
|
||||
height: 16px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button {
|
||||
grid-column: 3/3;
|
||||
grid-row: 1/1;
|
||||
justify-self: end;
|
||||
line-height: 0;
|
||||
margin-top: -4px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-range {
|
||||
grid-column: span 2;
|
||||
margin-right: 8px;
|
||||
height: 30px;
|
||||
margin-right: 16px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-input {
|
||||
width: 124px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-range-control {
|
||||
height: 40px;
|
||||
/* Vertically center the RangeControl until it has true 40px height. */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.component-spacing-sizes-control .components-range-control > .components-base-control__field {
|
||||
/* Fixes RangeControl contents when the outer wrapper is flex */
|
||||
flex: 1;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__range-control {
|
||||
grid-column: span 3;
|
||||
height: 40px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-range-control__mark {
|
||||
height: 4px;
|
||||
@ -4376,6 +4381,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-select-control {
|
||||
grid-column: span 3;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
body.admin-color-light {
|
||||
|
File diff suppressed because one or more lines are too long
48
wp-includes/css/dist/block-editor/style.css
vendored
48
wp-includes/css/dist/block-editor/style.css
vendored
@ -1068,6 +1068,7 @@
|
||||
.block-editor-block-patterns-list__list-item {
|
||||
cursor: pointer;
|
||||
margin-bottom: 24px;
|
||||
position: relative;
|
||||
}
|
||||
.block-editor-block-patterns-list__list-item.is-placeholder {
|
||||
min-height: 100px;
|
||||
@ -1712,10 +1713,10 @@
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child {
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child {
|
||||
pointer-events: none;
|
||||
}
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child::after {
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -1726,7 +1727,7 @@
|
||||
border: 1px dashed currentColor;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__layout > .block-list-appender:only-child .block-editor-inserter {
|
||||
.is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .wp-block-group__inner-container > .block-list-appender:only-child .block-editor-inserter {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@ -4273,7 +4274,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
align-items: center;
|
||||
grid-template-rows: 25px auto;
|
||||
grid-template-rows: 16px auto;
|
||||
}
|
||||
|
||||
.component-spacing-sizes-control {
|
||||
@ -4296,15 +4297,16 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
grid-column: 1/1;
|
||||
justify-content: left;
|
||||
height: 16px;
|
||||
margin-top: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__side-label {
|
||||
grid-column: 1/1;
|
||||
justify-self: left;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control {
|
||||
margin-top: 12px;
|
||||
.component-spacing-sizes-control.is-unlinked .components-range-control.components-spacing-sizes-control__range-control,
|
||||
.component-spacing-sizes-control.is-unlinked .components-spacing-sizes-control__custom-value-input {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__hint-single,
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__hint-all {
|
||||
@ -4322,12 +4324,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
grid-column: 2/2;
|
||||
grid-row: 1/1;
|
||||
justify-self: end;
|
||||
padding: 0;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-all.is-small.has-icon {
|
||||
padding: 0;
|
||||
min-width: 24px;
|
||||
height: 16px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button ~ .components-spacing-sizes-control__custom-toggle-all {
|
||||
margin-right: 4px;
|
||||
@ -4335,29 +4332,37 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single {
|
||||
grid-column: 3/3;
|
||||
justify-self: end;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-toggle-single.is-small.has-icon {
|
||||
padding: 0;
|
||||
min-width: 24px;
|
||||
height: 16px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.component-spacing-sizes-control .component-spacing-sizes-control__linked-button {
|
||||
grid-column: 3/3;
|
||||
grid-row: 1/1;
|
||||
justify-self: end;
|
||||
line-height: 0;
|
||||
margin-top: -4px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-range {
|
||||
grid-column: span 2;
|
||||
margin-left: 8px;
|
||||
height: 30px;
|
||||
margin-left: 16px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-value-input {
|
||||
width: 124px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-range-control {
|
||||
height: 40px;
|
||||
/* Vertically center the RangeControl until it has true 40px height. */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.component-spacing-sizes-control .components-range-control > .components-base-control__field {
|
||||
/* Fixes RangeControl contents when the outer wrapper is flex */
|
||||
flex: 1;
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__range-control {
|
||||
grid-column: span 3;
|
||||
height: 40px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.component-spacing-sizes-control .components-range-control__mark {
|
||||
height: 4px;
|
||||
@ -4376,6 +4381,7 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
||||
}
|
||||
.component-spacing-sizes-control .components-spacing-sizes-control__custom-select-control {
|
||||
grid-column: span 3;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
body.admin-color-light {
|
||||
|
File diff suppressed because one or more lines are too long
491
wp-includes/js/dist/block-editor.js
vendored
491
wp-includes/js/dist/block-editor.js
vendored
@ -2772,21 +2772,208 @@ module.exports.remove = removeAccents;
|
||||
/***/ 3124:
|
||||
/***/ (function(module) {
|
||||
|
||||
var traverse = module.exports = function (obj) {
|
||||
return new Traverse(obj);
|
||||
"use strict";
|
||||
|
||||
|
||||
// TODO: use call-bind, is-date, is-regex, is-string, is-boolean-object, is-number-object
|
||||
function toS(obj) { return Object.prototype.toString.call(obj); }
|
||||
function isDate(obj) { return toS(obj) === '[object Date]'; }
|
||||
function isRegExp(obj) { return toS(obj) === '[object RegExp]'; }
|
||||
function isError(obj) { return toS(obj) === '[object Error]'; }
|
||||
function isBoolean(obj) { return toS(obj) === '[object Boolean]'; }
|
||||
function isNumber(obj) { return toS(obj) === '[object Number]'; }
|
||||
function isString(obj) { return toS(obj) === '[object String]'; }
|
||||
|
||||
// TODO: use isarray
|
||||
var isArray = Array.isArray || function isArray(xs) {
|
||||
return Object.prototype.toString.call(xs) === '[object Array]';
|
||||
};
|
||||
|
||||
function Traverse (obj) {
|
||||
// TODO: use for-each?
|
||||
function forEach(xs, fn) {
|
||||
if (xs.forEach) { return xs.forEach(fn); }
|
||||
for (var i = 0; i < xs.length; i++) {
|
||||
fn(xs[i], i, xs);
|
||||
}
|
||||
return void undefined;
|
||||
}
|
||||
|
||||
// TODO: use object-keys
|
||||
var objectKeys = Object.keys || function keys(obj) {
|
||||
var res = [];
|
||||
for (var key in obj) { res.push(key); } // eslint-disable-line no-restricted-syntax
|
||||
return res;
|
||||
};
|
||||
|
||||
// TODO: use object.hasown
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty || function (obj, key) {
|
||||
return key in obj;
|
||||
};
|
||||
|
||||
function copy(src) {
|
||||
if (typeof src === 'object' && src !== null) {
|
||||
var dst;
|
||||
|
||||
if (isArray(src)) {
|
||||
dst = [];
|
||||
} else if (isDate(src)) {
|
||||
dst = new Date(src.getTime ? src.getTime() : src);
|
||||
} else if (isRegExp(src)) {
|
||||
dst = new RegExp(src);
|
||||
} else if (isError(src)) {
|
||||
dst = { message: src.message };
|
||||
} else if (isBoolean(src) || isNumber(src) || isString(src)) {
|
||||
dst = Object(src);
|
||||
} else if (Object.create && Object.getPrototypeOf) {
|
||||
dst = Object.create(Object.getPrototypeOf(src));
|
||||
} else if (src.constructor === Object) {
|
||||
dst = {};
|
||||
} else {
|
||||
var proto = (src.constructor && src.constructor.prototype)
|
||||
|| src.__proto__
|
||||
|| {};
|
||||
var T = function T() {}; // eslint-disable-line func-style, func-name-matching
|
||||
T.prototype = proto;
|
||||
dst = new T();
|
||||
}
|
||||
|
||||
forEach(objectKeys(src), function (key) {
|
||||
dst[key] = src[key];
|
||||
});
|
||||
return dst;
|
||||
}
|
||||
return src;
|
||||
}
|
||||
|
||||
function walk(root, cb, immutable) {
|
||||
var path = [];
|
||||
var parents = [];
|
||||
var alive = true;
|
||||
|
||||
return (function walker(node_) {
|
||||
var node = immutable ? copy(node_) : node_;
|
||||
var modifiers = {};
|
||||
|
||||
var keepGoing = true;
|
||||
|
||||
var state = {
|
||||
node: node,
|
||||
node_: node_,
|
||||
path: [].concat(path),
|
||||
parent: parents[parents.length - 1],
|
||||
parents: parents,
|
||||
key: path[path.length - 1],
|
||||
isRoot: path.length === 0,
|
||||
level: path.length,
|
||||
circular: null,
|
||||
update: function (x, stopHere) {
|
||||
if (!state.isRoot) {
|
||||
state.parent.node[state.key] = x;
|
||||
}
|
||||
state.node = x;
|
||||
if (stopHere) { keepGoing = false; }
|
||||
},
|
||||
delete: function (stopHere) {
|
||||
delete state.parent.node[state.key];
|
||||
if (stopHere) { keepGoing = false; }
|
||||
},
|
||||
remove: function (stopHere) {
|
||||
if (isArray(state.parent.node)) {
|
||||
state.parent.node.splice(state.key, 1);
|
||||
} else {
|
||||
delete state.parent.node[state.key];
|
||||
}
|
||||
if (stopHere) { keepGoing = false; }
|
||||
},
|
||||
keys: null,
|
||||
before: function (f) { modifiers.before = f; },
|
||||
after: function (f) { modifiers.after = f; },
|
||||
pre: function (f) { modifiers.pre = f; },
|
||||
post: function (f) { modifiers.post = f; },
|
||||
stop: function () { alive = false; },
|
||||
block: function () { keepGoing = false; },
|
||||
};
|
||||
|
||||
if (!alive) { return state; }
|
||||
|
||||
function updateState() {
|
||||
if (typeof state.node === 'object' && state.node !== null) {
|
||||
if (!state.keys || state.node_ !== state.node) {
|
||||
state.keys = objectKeys(state.node);
|
||||
}
|
||||
|
||||
state.isLeaf = state.keys.length === 0;
|
||||
|
||||
for (var i = 0; i < parents.length; i++) {
|
||||
if (parents[i].node_ === node_) {
|
||||
state.circular = parents[i];
|
||||
break; // eslint-disable-line no-restricted-syntax
|
||||
}
|
||||
}
|
||||
} else {
|
||||
state.isLeaf = true;
|
||||
state.keys = null;
|
||||
}
|
||||
|
||||
state.notLeaf = !state.isLeaf;
|
||||
state.notRoot = !state.isRoot;
|
||||
}
|
||||
|
||||
updateState();
|
||||
|
||||
// use return values to update if defined
|
||||
var ret = cb.call(state, state.node);
|
||||
if (ret !== undefined && state.update) { state.update(ret); }
|
||||
|
||||
if (modifiers.before) { modifiers.before.call(state, state.node); }
|
||||
|
||||
if (!keepGoing) { return state; }
|
||||
|
||||
if (
|
||||
typeof state.node === 'object'
|
||||
&& state.node !== null
|
||||
&& !state.circular
|
||||
) {
|
||||
parents.push(state);
|
||||
|
||||
updateState();
|
||||
|
||||
forEach(state.keys, function (key, i) {
|
||||
path.push(key);
|
||||
|
||||
if (modifiers.pre) { modifiers.pre.call(state, state.node[key], key); }
|
||||
|
||||
var child = walker(state.node[key]);
|
||||
if (immutable && hasOwnProperty.call(state.node, key)) {
|
||||
state.node[key] = child.node;
|
||||
}
|
||||
|
||||
child.isLast = i === state.keys.length - 1;
|
||||
child.isFirst = i === 0;
|
||||
|
||||
if (modifiers.post) { modifiers.post.call(state, child); }
|
||||
|
||||
path.pop();
|
||||
});
|
||||
parents.pop();
|
||||
}
|
||||
|
||||
if (modifiers.after) { modifiers.after.call(state, state.node); }
|
||||
|
||||
return state;
|
||||
}(root)).node;
|
||||
}
|
||||
|
||||
function Traverse(obj) {
|
||||
this.value = obj;
|
||||
}
|
||||
|
||||
Traverse.prototype.get = function (ps) {
|
||||
var node = this.value;
|
||||
for (var i = 0; i < ps.length; i ++) {
|
||||
for (var i = 0; i < ps.length; i++) {
|
||||
var key = ps[i];
|
||||
if (!node || !hasOwnProperty.call(node, key)) {
|
||||
node = undefined;
|
||||
break;
|
||||
return void undefined;
|
||||
}
|
||||
node = node[key];
|
||||
}
|
||||
@ -2795,7 +2982,7 @@ Traverse.prototype.get = function (ps) {
|
||||
|
||||
Traverse.prototype.has = function (ps) {
|
||||
var node = this.value;
|
||||
for (var i = 0; i < ps.length; i ++) {
|
||||
for (var i = 0; i < ps.length; i++) {
|
||||
var key = ps[i];
|
||||
if (!node || !hasOwnProperty.call(node, key)) {
|
||||
return false;
|
||||
@ -2807,9 +2994,9 @@ Traverse.prototype.has = function (ps) {
|
||||
|
||||
Traverse.prototype.set = function (ps, value) {
|
||||
var node = this.value;
|
||||
for (var i = 0; i < ps.length - 1; i ++) {
|
||||
for (var i = 0; i < ps.length - 1; i++) {
|
||||
var key = ps[i];
|
||||
if (!hasOwnProperty.call(node, key)) node[key] = {};
|
||||
if (!hasOwnProperty.call(node, key)) { node[key] = {}; }
|
||||
node = node[key];
|
||||
}
|
||||
node[ps[i]] = value;
|
||||
@ -2838,7 +3025,7 @@ Traverse.prototype.reduce = function (cb, init) {
|
||||
|
||||
Traverse.prototype.paths = function () {
|
||||
var acc = [];
|
||||
this.forEach(function (x) {
|
||||
this.forEach(function () {
|
||||
acc.push(this.path);
|
||||
});
|
||||
return acc;
|
||||
@ -2846,16 +3033,17 @@ Traverse.prototype.paths = function () {
|
||||
|
||||
Traverse.prototype.nodes = function () {
|
||||
var acc = [];
|
||||
this.forEach(function (x) {
|
||||
this.forEach(function () {
|
||||
acc.push(this.node);
|
||||
});
|
||||
return acc;
|
||||
};
|
||||
|
||||
Traverse.prototype.clone = function () {
|
||||
var parents = [], nodes = [];
|
||||
var parents = [];
|
||||
var nodes = [];
|
||||
|
||||
return (function clone (src) {
|
||||
return (function clone(src) {
|
||||
for (var i = 0; i < parents.length; i++) {
|
||||
if (parents[i] === src) {
|
||||
return nodes[i];
|
||||
@ -2876,205 +3064,17 @@ Traverse.prototype.clone = function () {
|
||||
nodes.pop();
|
||||
return dst;
|
||||
}
|
||||
else {
|
||||
|
||||
return src;
|
||||
}
|
||||
})(this.value);
|
||||
|
||||
}(this.value));
|
||||
};
|
||||
|
||||
function walk (root, cb, immutable) {
|
||||
var path = [];
|
||||
var parents = [];
|
||||
var alive = true;
|
||||
|
||||
return (function walker (node_) {
|
||||
var node = immutable ? copy(node_) : node_;
|
||||
var modifiers = {};
|
||||
|
||||
var keepGoing = true;
|
||||
|
||||
var state = {
|
||||
node : node,
|
||||
node_ : node_,
|
||||
path : [].concat(path),
|
||||
parent : parents[parents.length - 1],
|
||||
parents : parents,
|
||||
key : path.slice(-1)[0],
|
||||
isRoot : path.length === 0,
|
||||
level : path.length,
|
||||
circular : null,
|
||||
update : function (x, stopHere) {
|
||||
if (!state.isRoot) {
|
||||
state.parent.node[state.key] = x;
|
||||
}
|
||||
state.node = x;
|
||||
if (stopHere) keepGoing = false;
|
||||
},
|
||||
'delete' : function (stopHere) {
|
||||
delete state.parent.node[state.key];
|
||||
if (stopHere) keepGoing = false;
|
||||
},
|
||||
remove : function (stopHere) {
|
||||
if (isArray(state.parent.node)) {
|
||||
state.parent.node.splice(state.key, 1);
|
||||
}
|
||||
else {
|
||||
delete state.parent.node[state.key];
|
||||
}
|
||||
if (stopHere) keepGoing = false;
|
||||
},
|
||||
keys : null,
|
||||
before : function (f) { modifiers.before = f },
|
||||
after : function (f) { modifiers.after = f },
|
||||
pre : function (f) { modifiers.pre = f },
|
||||
post : function (f) { modifiers.post = f },
|
||||
stop : function () { alive = false },
|
||||
block : function () { keepGoing = false }
|
||||
};
|
||||
|
||||
if (!alive) return state;
|
||||
|
||||
function updateState() {
|
||||
if (typeof state.node === 'object' && state.node !== null) {
|
||||
if (!state.keys || state.node_ !== state.node) {
|
||||
state.keys = objectKeys(state.node)
|
||||
}
|
||||
|
||||
state.isLeaf = state.keys.length == 0;
|
||||
|
||||
for (var i = 0; i < parents.length; i++) {
|
||||
if (parents[i].node_ === node_) {
|
||||
state.circular = parents[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
state.isLeaf = true;
|
||||
state.keys = null;
|
||||
}
|
||||
|
||||
state.notLeaf = !state.isLeaf;
|
||||
state.notRoot = !state.isRoot;
|
||||
}
|
||||
|
||||
updateState();
|
||||
|
||||
// use return values to update if defined
|
||||
var ret = cb.call(state, state.node);
|
||||
if (ret !== undefined && state.update) state.update(ret);
|
||||
|
||||
if (modifiers.before) modifiers.before.call(state, state.node);
|
||||
|
||||
if (!keepGoing) return state;
|
||||
|
||||
if (typeof state.node == 'object'
|
||||
&& state.node !== null && !state.circular) {
|
||||
parents.push(state);
|
||||
|
||||
updateState();
|
||||
|
||||
forEach(state.keys, function (key, i) {
|
||||
path.push(key);
|
||||
|
||||
if (modifiers.pre) modifiers.pre.call(state, state.node[key], key);
|
||||
|
||||
var child = walker(state.node[key]);
|
||||
if (immutable && hasOwnProperty.call(state.node, key)) {
|
||||
state.node[key] = child.node;
|
||||
}
|
||||
|
||||
child.isLast = i == state.keys.length - 1;
|
||||
child.isFirst = i == 0;
|
||||
|
||||
if (modifiers.post) modifiers.post.call(state, child);
|
||||
|
||||
path.pop();
|
||||
});
|
||||
parents.pop();
|
||||
}
|
||||
|
||||
if (modifiers.after) modifiers.after.call(state, state.node);
|
||||
|
||||
return state;
|
||||
})(root).node;
|
||||
function traverse(obj) {
|
||||
return new Traverse(obj);
|
||||
}
|
||||
|
||||
function copy (src) {
|
||||
if (typeof src === 'object' && src !== null) {
|
||||
var dst;
|
||||
|
||||
if (isArray(src)) {
|
||||
dst = [];
|
||||
}
|
||||
else if (isDate(src)) {
|
||||
dst = new Date(src.getTime ? src.getTime() : src);
|
||||
}
|
||||
else if (isRegExp(src)) {
|
||||
dst = new RegExp(src);
|
||||
}
|
||||
else if (isError(src)) {
|
||||
dst = { message: src.message };
|
||||
}
|
||||
else if (isBoolean(src)) {
|
||||
dst = new Boolean(src);
|
||||
}
|
||||
else if (isNumber(src)) {
|
||||
dst = new Number(src);
|
||||
}
|
||||
else if (isString(src)) {
|
||||
dst = new String(src);
|
||||
}
|
||||
else if (Object.create && Object.getPrototypeOf) {
|
||||
dst = Object.create(Object.getPrototypeOf(src));
|
||||
}
|
||||
else if (src.constructor === Object) {
|
||||
dst = {};
|
||||
}
|
||||
else {
|
||||
var proto =
|
||||
(src.constructor && src.constructor.prototype)
|
||||
|| src.__proto__
|
||||
|| {}
|
||||
;
|
||||
var T = function () {};
|
||||
T.prototype = proto;
|
||||
dst = new T;
|
||||
}
|
||||
|
||||
forEach(objectKeys(src), function (key) {
|
||||
dst[key] = src[key];
|
||||
});
|
||||
return dst;
|
||||
}
|
||||
else return src;
|
||||
}
|
||||
|
||||
var objectKeys = Object.keys || function keys (obj) {
|
||||
var res = [];
|
||||
for (var key in obj) res.push(key)
|
||||
return res;
|
||||
};
|
||||
|
||||
function toS (obj) { return Object.prototype.toString.call(obj) }
|
||||
function isDate (obj) { return toS(obj) === '[object Date]' }
|
||||
function isRegExp (obj) { return toS(obj) === '[object RegExp]' }
|
||||
function isError (obj) { return toS(obj) === '[object Error]' }
|
||||
function isBoolean (obj) { return toS(obj) === '[object Boolean]' }
|
||||
function isNumber (obj) { return toS(obj) === '[object Number]' }
|
||||
function isString (obj) { return toS(obj) === '[object String]' }
|
||||
|
||||
var isArray = Array.isArray || function isArray (xs) {
|
||||
return Object.prototype.toString.call(xs) === '[object Array]';
|
||||
};
|
||||
|
||||
var forEach = function (xs, fn) {
|
||||
if (xs.forEach) return xs.forEach(fn)
|
||||
else for (var i = 0; i < xs.length; i++) {
|
||||
fn(xs[i], i, xs);
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: replace with object.assign?
|
||||
forEach(objectKeys(Traverse.prototype), function (key) {
|
||||
traverse[key] = function (obj) {
|
||||
var args = [].slice.call(arguments, 1);
|
||||
@ -3083,9 +3083,7 @@ forEach(objectKeys(Traverse.prototype), function (key) {
|
||||
};
|
||||
});
|
||||
|
||||
var hasOwnProperty = Object.hasOwnProperty || function (obj, key) {
|
||||
return key in obj;
|
||||
};
|
||||
module.exports = traverse;
|
||||
|
||||
|
||||
/***/ }),
|
||||
@ -11112,7 +11110,8 @@ function SpacingInputControl(_ref) {
|
||||
className: "components-spacing-sizes-control__custom-value-input",
|
||||
style: {
|
||||
gridColumn: '1'
|
||||
}
|
||||
},
|
||||
size: '__unstable-large'
|
||||
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.RangeControl, {
|
||||
value: customRangeValue,
|
||||
min: 0,
|
||||
@ -11153,7 +11152,8 @@ function SpacingInputControl(_ref) {
|
||||
options: options,
|
||||
label: ariaLabel,
|
||||
hideLabelFromVision: true,
|
||||
__nextUnconstrainedWidth: true
|
||||
__nextUnconstrainedWidth: true,
|
||||
size: '__unstable-large'
|
||||
}));
|
||||
}
|
||||
|
||||
@ -33533,7 +33533,8 @@ function useNestedSettingsUpdate(clientId, allowedBlocks, __experimentalDefaultB
|
||||
|
||||
function useInnerBlockTemplateSync(clientId, template, templateLock, templateInsertUpdatesSelection) {
|
||||
const {
|
||||
getSelectedBlocksInitialCaretPosition
|
||||
getSelectedBlocksInitialCaretPosition,
|
||||
isBlockSelected
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(store);
|
||||
const {
|
||||
replaceInnerBlocks
|
||||
@ -33564,7 +33565,7 @@ function useInnerBlockTemplateSync(clientId, template, templateLock, templateIns
|
||||
const nextBlocks = (0,external_wp_blocks_namespaceObject.synchronizeBlocksWithTemplate)(currentInnerBlocks, template);
|
||||
|
||||
if (!(0,external_lodash_namespaceObject.isEqual)(nextBlocks, currentInnerBlocks)) {
|
||||
replaceInnerBlocks(clientId, nextBlocks, currentInnerBlocks.length === 0 && templateInsertUpdatesSelection && nextBlocks.length !== 0, // This ensures the "initialPosition" doesn't change when applying the template
|
||||
replaceInnerBlocks(clientId, nextBlocks, currentInnerBlocks.length === 0 && templateInsertUpdatesSelection && nextBlocks.length !== 0 && isBlockSelected(clientId), // This ensures the "initialPosition" doesn't change when applying the template
|
||||
// If we're supposed to focus the block, we'll focus the first inner block
|
||||
// otherwise, we won't apply any auto-focus.
|
||||
// This ensures for instance that the focus stays in the inserter when inserting the "buttons" block.
|
||||
@ -44660,6 +44661,9 @@ function (_super) {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
_this.gestureZoomStart = 0;
|
||||
_this.gestureRotationStart = 0;
|
||||
_this.isTouching = false;
|
||||
_this.lastPinchDistance = 0;
|
||||
_this.lastPinchRotation = 0;
|
||||
_this.rafDragTimeout = null;
|
||||
@ -44684,6 +44688,10 @@ function (_super) {
|
||||
_this.currentDoc.removeEventListener('touchmove', _this.onTouchMove);
|
||||
|
||||
_this.currentDoc.removeEventListener('touchend', _this.onDragStopped);
|
||||
|
||||
_this.currentDoc.removeEventListener('gesturemove', _this.onGestureMove);
|
||||
|
||||
_this.currentDoc.removeEventListener('gestureend', _this.onGestureEnd);
|
||||
};
|
||||
|
||||
_this.clearScrollEvent = function () {
|
||||
@ -44835,6 +44843,8 @@ function (_super) {
|
||||
};
|
||||
|
||||
_this.onTouchStart = function (e) {
|
||||
_this.isTouching = true;
|
||||
|
||||
if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) {
|
||||
return;
|
||||
}
|
||||
@ -44864,6 +44874,43 @@ function (_super) {
|
||||
}
|
||||
};
|
||||
|
||||
_this.onGestureStart = function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this.currentDoc.addEventListener('gesturechange', _this.onGestureMove);
|
||||
|
||||
_this.currentDoc.addEventListener('gestureend', _this.onGestureEnd);
|
||||
|
||||
_this.gestureZoomStart = _this.props.zoom;
|
||||
_this.gestureRotationStart = _this.props.rotation;
|
||||
};
|
||||
|
||||
_this.onGestureMove = function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (_this.isTouching) {
|
||||
// this is to avoid conflict between gesture and touch events
|
||||
return;
|
||||
}
|
||||
|
||||
var point = Cropper.getMousePoint(e);
|
||||
var newZoom = _this.gestureZoomStart - 1 + e.scale;
|
||||
|
||||
_this.setNewZoom(newZoom, point, {
|
||||
shouldUpdatePosition: true
|
||||
});
|
||||
|
||||
if (_this.props.onRotationChange) {
|
||||
var newRotation = _this.gestureRotationStart + e.rotation;
|
||||
|
||||
_this.props.onRotationChange(newRotation);
|
||||
}
|
||||
};
|
||||
|
||||
_this.onGestureEnd = function (e) {
|
||||
_this.cleanEvents();
|
||||
};
|
||||
|
||||
_this.onDragStart = function (_a) {
|
||||
var _b, _c;
|
||||
|
||||
@ -44899,6 +44946,8 @@ function (_super) {
|
||||
_this.onDragStopped = function () {
|
||||
var _a, _b;
|
||||
|
||||
_this.isTouching = false;
|
||||
|
||||
_this.cleanEvents();
|
||||
|
||||
_this.emitCropData();
|
||||
@ -44975,18 +45024,17 @@ function (_super) {
|
||||
var _b = (_a === void 0 ? {} : _a).shouldUpdatePosition,
|
||||
shouldUpdatePosition = _b === void 0 ? true : _b;
|
||||
if (!_this.state.cropSize || !_this.props.onZoomChange) return;
|
||||
var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom);
|
||||
|
||||
if (shouldUpdatePosition) {
|
||||
var zoomPoint = _this.getPointOnContainer(point);
|
||||
|
||||
var zoomTarget = _this.getPointOnMedia(zoomPoint);
|
||||
|
||||
var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom);
|
||||
var requestedPosition = {
|
||||
x: zoomTarget.x * newZoom - zoomPoint.x,
|
||||
y: zoomTarget.y * newZoom - zoomPoint.y
|
||||
};
|
||||
|
||||
if (shouldUpdatePosition) {
|
||||
var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
|
||||
|
||||
_this.props.onCropChange(newPosition);
|
||||
@ -45059,8 +45107,7 @@ function (_super) {
|
||||
this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {
|
||||
passive: false
|
||||
});
|
||||
this.containerRef.addEventListener('gesturestart', this.preventZoomSafari);
|
||||
this.containerRef.addEventListener('gesturechange', this.preventZoomSafari);
|
||||
this.containerRef.addEventListener('gesturestart', this.onGestureStart);
|
||||
}
|
||||
|
||||
if (!this.props.disableAutomaticStylesInjection) {
|
||||
@ -45097,7 +45144,6 @@ function (_super) {
|
||||
|
||||
if (this.containerRef) {
|
||||
this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);
|
||||
this.containerRef.removeEventListener('gesturechange', this.preventZoomSafari);
|
||||
}
|
||||
|
||||
if (this.styleRef) {
|
||||
@ -51945,7 +51991,8 @@ const BlockInspector = _ref5 => {
|
||||
getSelectedBlockClientId,
|
||||
getSelectedBlockCount,
|
||||
getBlockName,
|
||||
__unstableGetContentLockingParent
|
||||
__unstableGetContentLockingParent,
|
||||
getTemplateLock
|
||||
} = select(store);
|
||||
|
||||
const _selectedBlockClientId = getSelectedBlockClientId();
|
||||
@ -51959,7 +52006,7 @@ const BlockInspector = _ref5 => {
|
||||
selectedBlockClientId: _selectedBlockClientId,
|
||||
selectedBlockName: _selectedBlockName,
|
||||
blockType: _blockType,
|
||||
topLevelLockedBlock: __unstableGetContentLockingParent(_selectedBlockClientId)
|
||||
topLevelLockedBlock: __unstableGetContentLockingParent(_selectedBlockClientId) || (getTemplateLock(_selectedBlockClientId) === 'contentOnly' ? _selectedBlockClientId : undefined)
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
2
wp-includes/js/dist/block-editor.min.js
vendored
2
wp-includes/js/dist/block-editor.min.js
vendored
File diff suppressed because one or more lines are too long
7
wp-includes/js/dist/block-library.js
vendored
7
wp-includes/js/dist/block-library.js
vendored
@ -25772,11 +25772,14 @@ function useOutdentListItem(clientId) {
|
||||
canOutdent
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(innerSelect => {
|
||||
const {
|
||||
getBlockRootClientId
|
||||
getBlockRootClientId,
|
||||
getBlockName
|
||||
} = innerSelect(external_wp_blockEditor_namespaceObject.store);
|
||||
const grandParentId = getBlockRootClientId(getBlockRootClientId(clientId));
|
||||
const grandParentName = getBlockName(grandParentId);
|
||||
const isListItem = grandParentName === listItemName;
|
||||
return {
|
||||
canOutdent: !!grandParentId
|
||||
canOutdent: isListItem
|
||||
};
|
||||
}, [clientId]);
|
||||
const {
|
||||
|
2
wp-includes/js/dist/block-library.min.js
vendored
2
wp-includes/js/dist/block-library.min.js
vendored
File diff suppressed because one or more lines are too long
14
wp-includes/js/dist/components.js
vendored
14
wp-includes/js/dist/components.js
vendored
@ -55246,7 +55246,7 @@ function FontSizePicker(_ref2, ref) {
|
||||
} // Calculate the `hint` for toggle group control.
|
||||
|
||||
|
||||
let hint = selectedOption.name;
|
||||
let hint = (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.name) || selectedOption.slug;
|
||||
|
||||
if (!fontSizesContainComplexValues && typeof selectedOption.size === 'string') {
|
||||
const [, unit] = splitValueAndUnitFromSize(selectedOption.size);
|
||||
@ -58120,13 +58120,15 @@ function NavigatorProvider(props, forwardedRef) {
|
||||
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
setLocationHistory([...locationHistory, { ...options,
|
||||
path,
|
||||
isBack: false
|
||||
isBack: false,
|
||||
hasRestoredFocus: false
|
||||
}]);
|
||||
}, [locationHistory]);
|
||||
const goBack = (0,external_wp_element_namespaceObject.useCallback)(() => {
|
||||
if (locationHistory.length > 1) {
|
||||
setLocationHistory([...locationHistory.slice(0, -2), { ...locationHistory[locationHistory.length - 2],
|
||||
isBack: true
|
||||
isBack: true,
|
||||
hasRestoredFocus: false
|
||||
}]);
|
||||
}
|
||||
}, [locationHistory]);
|
||||
@ -58251,7 +58253,8 @@ function NavigatorScreen(props, forwardedRef) {
|
||||
// - if the current location is not the initial one (to avoid moving focus on page load)
|
||||
// - when the screen becomes visible
|
||||
// - if the wrapper ref has been assigned
|
||||
if (isInitialLocation || !isMatch || !wrapperRef.current) {
|
||||
// - if focus hasn't already been restored for the current location
|
||||
if (isInitialLocation || !isMatch || !wrapperRef.current || location.hasRestoredFocus) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -58269,8 +58272,9 @@ function NavigatorScreen(props, forwardedRef) {
|
||||
elementToFocus = firstTabbable !== null && firstTabbable !== void 0 ? firstTabbable : wrapperRef.current;
|
||||
}
|
||||
|
||||
location.hasRestoredFocus = true;
|
||||
elementToFocus.focus();
|
||||
}, [isInitialLocation, isMatch, location.isBack, previousLocation === null || previousLocation === void 0 ? void 0 : previousLocation.focusTargetSelector]);
|
||||
}, [isInitialLocation, isMatch, location.hasRestoredFocus, location.isBack, previousLocation === null || previousLocation === void 0 ? void 0 : previousLocation.focusTargetSelector]);
|
||||
const mergedWrapperRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([forwardedRef, wrapperRef]);
|
||||
|
||||
if (!isMatch) {
|
||||
|
2
wp-includes/js/dist/components.min.js
vendored
2
wp-includes/js/dist/components.min.js
vendored
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.1-RC1-54631';
|
||||
$wp_version = '6.1-RC1-54632';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user