Skip to content

Commit

Permalink
Editor: Update Packages with the latest bug fixes for 6.5 beta1.
Browse files Browse the repository at this point in the history
It includes all the backports from this Gutenberg PR WordPress/gutenberg#58964

Props youknowriad, get_dave.
See #60315.

git-svn-id: https://develop.svn.wordpress.org/trunk@57619 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
youknowriad committed Feb 13, 2024
1 parent 19b83ff commit add2b40
Show file tree
Hide file tree
Showing 9 changed files with 495 additions and 474 deletions.
860 changes: 436 additions & 424 deletions package-lock.json

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,61 +81,61 @@
"@emotion/is-prop-valid": "0.8.8",
"@emotion/memoize": "0.7.4",
"@wordpress/a11y": "3.51.0",
"@wordpress/annotations": "2.51.0",
"@wordpress/annotations": "2.51.1",
"@wordpress/api-fetch": "6.48.0",
"@wordpress/autop": "3.51.0",
"@wordpress/blob": "3.51.0",
"@wordpress/block-directory": "4.28.0",
"@wordpress/block-editor": "12.19.0",
"@wordpress/block-library": "8.28.0",
"@wordpress/block-directory": "4.28.1",
"@wordpress/block-editor": "12.19.1",
"@wordpress/block-library": "8.28.1",
"@wordpress/block-serialization-default-parser": "4.51.0",
"@wordpress/blocks": "12.28.0",
"@wordpress/commands": "0.22.0",
"@wordpress/components": "26.0.0",
"@wordpress/blocks": "12.28.1",
"@wordpress/commands": "0.22.1",
"@wordpress/components": "26.0.1",
"@wordpress/compose": "6.28.0",
"@wordpress/core-commands": "0.20.0",
"@wordpress/core-data": "6.28.0",
"@wordpress/customize-widgets": "4.28.0",
"@wordpress/core-commands": "0.20.1",
"@wordpress/core-data": "6.28.1",
"@wordpress/customize-widgets": "4.28.1",
"@wordpress/data": "9.21.0",
"@wordpress/data-controls": "3.20.0",
"@wordpress/dataviews": "0.5.0",
"@wordpress/dataviews": "0.5.1",
"@wordpress/date": "4.51.0",
"@wordpress/deprecated": "3.51.0",
"@wordpress/dom": "3.51.0",
"@wordpress/dom-ready": "3.51.0",
"@wordpress/edit-post": "7.28.0",
"@wordpress/edit-site": "5.28.0",
"@wordpress/edit-widgets": "5.28.0",
"@wordpress/editor": "13.28.0",
"@wordpress/edit-post": "7.28.1",
"@wordpress/edit-site": "5.28.1",
"@wordpress/edit-widgets": "5.28.1",
"@wordpress/editor": "13.28.1",
"@wordpress/element": "5.28.0",
"@wordpress/escape-html": "2.51.0",
"@wordpress/format-library": "4.28.0",
"@wordpress/format-library": "4.28.1",
"@wordpress/hooks": "3.51.0",
"@wordpress/html-entities": "3.51.0",
"@wordpress/i18n": "4.51.0",
"@wordpress/icons": "9.42.0",
"@wordpress/interactivity": "5.0.0",
"@wordpress/interactivity-router": "1.1.0",
"@wordpress/interface": "5.28.0",
"@wordpress/interface": "5.28.1",
"@wordpress/is-shallow-equal": "4.51.0",
"@wordpress/keyboard-shortcuts": "4.28.0",
"@wordpress/keycodes": "3.51.0",
"@wordpress/list-reusable-blocks": "4.28.0",
"@wordpress/list-reusable-blocks": "4.28.1",
"@wordpress/media-utils": "4.42.0",
"@wordpress/notices": "4.19.0",
"@wordpress/nux": "8.13.0",
"@wordpress/patterns": "1.12.0",
"@wordpress/plugins": "6.19.0",
"@wordpress/preferences": "3.28.0",
"@wordpress/nux": "8.13.1",
"@wordpress/patterns": "1.12.1",
"@wordpress/plugins": "6.19.1",
"@wordpress/preferences": "3.28.1",
"@wordpress/preferences-persistence": "1.43.0",
"@wordpress/primitives": "3.49.0",
"@wordpress/priority-queue": "2.51.0",
"@wordpress/private-apis": "0.33.0",
"@wordpress/redux-routine": "4.51.0",
"@wordpress/reusable-blocks": "4.28.0",
"@wordpress/rich-text": "6.28.0",
"@wordpress/reusable-blocks": "4.28.1",
"@wordpress/rich-text": "6.28.1",
"@wordpress/router": "0.20.0",
"@wordpress/server-side-render": "4.28.0",
"@wordpress/server-side-render": "4.28.1",
"@wordpress/shortcode": "3.51.0",
"@wordpress/style-engine": "1.34.0",
"@wordpress/sync": "0.13.0",
Expand All @@ -144,7 +144,7 @@
"@wordpress/url": "3.52.0",
"@wordpress/viewport": "5.28.0",
"@wordpress/warning": "2.51.0",
"@wordpress/widgets": "3.28.0",
"@wordpress/widgets": "3.28.1",
"@wordpress/wordcount": "3.51.0",
"backbone": "1.5.0",
"clipboard": "2.0.11",
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/assets/script-loader-packages.min.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/wp-includes/blocks/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static function ( $matches ) {

$processor = new WP_HTML_Tag_Processor( $content );
$processor->next_tag();
$processor->set_attribute( 'data-wp-interactive', '{"namespace":"core/file"}' );
$processor->set_attribute( 'data-wp-interactive', 'core/file' );
$processor->next_tag( 'object' );
$processor->set_attribute( 'data-wp-bind--hidden', '!state.hasPdfPreview' );
$processor->set_attribute( 'hidden', true );
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/blocks/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function block_core_image_render_lightbox( $block_content, $block ) {
$figure_class_names = $p->get_attribute( 'class' );
$figure_styles = $p->get_attribute( 'style' );
$p->add_class( 'wp-lightbox-container' );
$p->set_attribute( 'data-wp-interactive', '{"namespace":"core/image"}' );
$p->set_attribute( 'data-wp-interactive', 'core/image' );
$p->set_attribute(
'data-wp-context',
wp_json_encode(
Expand Down Expand Up @@ -240,7 +240,7 @@ function block_core_image_print_lightbox_overlay() {
echo <<<HTML
<div
class="wp-lightbox-overlay zoom"
data-wp-interactive='{"namespace":"core/image"}'
data-wp-interactive="core/image"
data-wp-context='{}'
data-wp-bind--role="state.roleAttribute"
data-wp-bind--aria-label="state.currentImage.ariaLabel"
Expand Down
12 changes: 5 additions & 7 deletions src/wp-includes/blocks/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,19 +557,17 @@ private static function get_nav_element_directives( $is_interactive, $attributes
return '';
}
// When adding to this array be mindful of security concerns.
$nav_element_context = wp_json_encode(
$nav_element_context = data_wp_context(
array(
'overlayOpenedBy' => array(),
'type' => 'overlay',
'roleAttribute' => '',
'ariaLabel' => __( 'Menu' ),
),
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP
)
);
$nav_element_directives = '
data-wp-interactive=\'{"namespace":"core/navigation"}\'
data-wp-context=\'' . $nav_element_context . '\'
';
data-wp-interactive="core/navigation"'
. $nav_element_context;

/*
* When the navigation's 'overlayMenu' attribute is set to 'always', JavaScript
Expand Down Expand Up @@ -780,7 +778,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
)
) ) {
// Add directives to the parent `<li>`.
$tags->set_attribute( 'data-wp-interactive', '{ "namespace": "core/navigation" }' );
$tags->set_attribute( 'data-wp-interactive', 'core/navigation' );
$tags->set_attribute( 'data-wp-context', '{ "submenuOpenedBy": {}, "type": "submenu" }' );
$tags->set_attribute( 'data-wp-watch', 'callbacks.initMenu' );
$tags->set_attribute( 'data-wp-on--focusout', 'actions.handleMenuFocusout' );
Expand Down
15 changes: 9 additions & 6 deletions src/wp-includes/blocks/query-pagination-numbers.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,17 @@ function render_block_core_query_pagination_numbers( $attributes, $content, $blo
}

if ( $enhanced_pagination ) {
$p = new WP_HTML_Tag_Processor( $content );
$p = new WP_HTML_Tag_Processor( $content );
$tag_index = 0;
while ( $p->next_tag(
array(
'tag_name' => 'a',
'class_name' => 'page-numbers',
)
array( 'class_name' => 'page-numbers' )
) ) {
$p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
if ( null === $p->get_attribute( 'data-wp-key' ) ) {
$p->set_attribute( 'data-wp-key', 'index-' . $tag_index++ );
}
if ( 'A' === $p->get_tag() ) {
$p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
}
}
$content = $p->get_updated_html();
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function render_block_core_query( $attributes, $content, $block ) {
$p = new WP_HTML_Tag_Processor( $content );
if ( $p->next_tag() ) {
// Add the necessary directives.
$p->set_attribute( 'data-wp-interactive', '{"namespace":"core/query"}' );
$p->set_attribute( 'data-wp-interactive', 'core/query' );
$p->set_attribute( 'data-wp-router-region', 'query-' . $attributes['queryId'] );
$p->set_attribute( 'data-wp-init', 'callbacks.setQueryRef' );
$p->set_attribute( 'data-wp-context', '{}' );
Expand Down
20 changes: 14 additions & 6 deletions src/wp-includes/blocks/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function render_block_core_search( $attributes ) {
$border_color_classes = get_border_color_classes_for_block_core_search( $attributes );
// This variable is a constant and its value is always false at this moment.
// It is defined this way because some values depend on it, in case it changes in the future.
$open_by_default = 'false';
$open_by_default = false;

$label_inner_html = empty( $attributes['label'] ) ? __( 'Search' ) : wp_kses_post( $attributes['label'] );
$label = new WP_HTML_Tag_Processor( sprintf( '<label %1$s>%2$s</label>', $inline_styles['label'], $label_inner_html ) );
Expand Down Expand Up @@ -179,12 +179,20 @@ function render_block_core_search( $attributes ) {
if ( $is_expandable_searchfield ) {
$aria_label_expanded = __( 'Submit Search' );
$aria_label_collapsed = __( 'Expand search field' );
$form_context = data_wp_context(
array(
'isSearchInputVisible' => $open_by_default,
'inputId' => $input_id,
'ariaLabelExpanded' => $aria_label_expanded,
'ariaLabelCollapsed' => $aria_label_collapsed,
)
);
$form_directives = '
data-wp-interactive=\'{ "namespace": "core/search" }\'
data-wp-context=\'{ "isSearchInputVisible": ' . $open_by_default . ', "inputId": "' . $input_id . '", "ariaLabelExpanded": "' . $aria_label_expanded . '", "ariaLabelCollapsed": "' . $aria_label_collapsed . '" }\'
data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
data-wp-on--keydown="actions.handleSearchKeydown"
data-wp-on--focusout="actions.handleSearchFocusout"
data-wp-interactive=\'"core/search"\''
. $form_context .
'data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
data-wp-on--keydown="actions.handleSearchKeydown"
data-wp-on--focusout="actions.handleSearchFocusout"
';
}

Expand Down

0 comments on commit add2b40

Please sign in to comment.