Skip to content

Commit

Permalink
Editor: Update packages for 6.8 Beta 1.
Browse files Browse the repository at this point in the history
Syncs @wordpress/* packages to the 'latest' npm tag.

Props mamaduka, joemcgill, desrosj.
See #62887.


git-svn-id: https://develop.svn.wordpress.org/trunk@59906 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
joemcgill committed Mar 3, 2025
1 parent 4ed2a8b commit bc1bdb3
Show file tree
Hide file tree
Showing 15 changed files with 1,057 additions and 1,082 deletions.
1,788 changes: 896 additions & 892 deletions package-lock.json

Large diffs are not rendered by default.

148 changes: 74 additions & 74 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"@lodder/grunt-postcss": "^3.1.1",
"@playwright/test": "1.49.1",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
"@wordpress/babel-preset-default": "8.17.0",
"@wordpress/dependency-extraction-webpack-plugin": "6.17.0",
"@wordpress/e2e-test-utils": "11.17.0",
"@wordpress/e2e-test-utils-playwright": "1.17.0",
"@wordpress/prettier-config": "4.17.0",
"@wordpress/scripts": "30.10.0",
"@wordpress/babel-preset-default": "8.19.0",
"@wordpress/dependency-extraction-webpack-plugin": "6.19.0",
"@wordpress/e2e-test-utils": "11.19.0",
"@wordpress/e2e-test-utils-playwright": "1.19.0",
"@wordpress/prettier-config": "4.19.0",
"@wordpress/scripts": "30.12.0",
"autoprefixer": "10.4.20",
"chalk": "5.3.0",
"check-node-version": "4.2.1",
Expand Down Expand Up @@ -77,74 +77,74 @@
"webpack-livereload-plugin": "3.0.2"
},
"dependencies": {
"@wordpress/a11y": "4.17.0",
"@wordpress/annotations": "3.17.0",
"@wordpress/api-fetch": "7.17.0",
"@wordpress/autop": "4.17.0",
"@wordpress/blob": "4.17.0",
"@wordpress/block-directory": "5.17.1",
"@wordpress/block-editor": "14.12.0",
"@wordpress/block-library": "9.17.0",
"@wordpress/block-serialization-default-parser": "5.17.0",
"@wordpress/blocks": "14.6.0",
"@wordpress/commands": "1.17.0",
"@wordpress/components": "29.3.0",
"@wordpress/compose": "7.17.0",
"@wordpress/core-commands": "1.17.0",
"@wordpress/core-data": "7.17.0",
"@wordpress/customize-widgets": "5.17.0",
"@wordpress/data": "10.17.0",
"@wordpress/data-controls": "4.17.0",
"@wordpress/dataviews": "4.13.0",
"@wordpress/date": "5.17.0",
"@wordpress/deprecated": "4.17.0",
"@wordpress/dom": "4.17.0",
"@wordpress/dom-ready": "4.17.0",
"@wordpress/edit-post": "8.17.1",
"@wordpress/edit-site": "6.17.1",
"@wordpress/edit-widgets": "6.17.0",
"@wordpress/editor": "14.17.1",
"@wordpress/element": "6.17.0",
"@wordpress/escape-html": "3.17.0",
"@wordpress/fields": "0.9.0",
"@wordpress/format-library": "5.17.0",
"@wordpress/hooks": "4.17.0",
"@wordpress/html-entities": "4.17.0",
"@wordpress/i18n": "5.17.0",
"@wordpress/icons": "10.17.0",
"@wordpress/interactivity": "6.17.0",
"@wordpress/interactivity-router": "2.17.0",
"@wordpress/interface": "9.2.0",
"@wordpress/is-shallow-equal": "5.17.0",
"@wordpress/keyboard-shortcuts": "5.17.0",
"@wordpress/keycodes": "4.17.0",
"@wordpress/list-reusable-blocks": "5.17.0",
"@wordpress/media-utils": "5.17.0",
"@wordpress/notices": "5.17.0",
"@wordpress/nux": "9.17.0",
"@wordpress/patterns": "2.17.0",
"@wordpress/plugins": "7.17.0",
"@wordpress/preferences": "4.17.0",
"@wordpress/preferences-persistence": "2.17.0",
"@wordpress/primitives": "4.17.0",
"@wordpress/priority-queue": "3.17.0",
"@wordpress/private-apis": "1.17.0",
"@wordpress/redux-routine": "5.17.0",
"@wordpress/reusable-blocks": "5.17.0",
"@wordpress/rich-text": "7.17.0",
"@wordpress/router": "1.17.0",
"@wordpress/server-side-render": "5.17.0",
"@wordpress/shortcode": "4.17.0",
"@wordpress/style-engine": "2.17.0",
"@wordpress/sync": "1.17.0",
"@wordpress/token-list": "3.17.0",
"@wordpress/undo-manager": "1.17.0",
"@wordpress/upload-media": "0.2.0",
"@wordpress/url": "4.17.0",
"@wordpress/viewport": "6.17.0",
"@wordpress/warning": "3.17.0",
"@wordpress/widgets": "4.17.0",
"@wordpress/wordcount": "4.17.0",
"@wordpress/a11y": "4.19.0",
"@wordpress/annotations": "3.19.0",
"@wordpress/api-fetch": "7.19.0",
"@wordpress/autop": "4.19.0",
"@wordpress/blob": "4.19.0",
"@wordpress/block-directory": "5.19.0",
"@wordpress/block-editor": "14.14.0",
"@wordpress/block-library": "9.19.0",
"@wordpress/block-serialization-default-parser": "5.19.0",
"@wordpress/blocks": "14.8.0",
"@wordpress/commands": "1.19.0",
"@wordpress/components": "29.5.0",
"@wordpress/compose": "7.19.0",
"@wordpress/core-commands": "1.19.0",
"@wordpress/core-data": "7.19.0",
"@wordpress/customize-widgets": "5.19.0",
"@wordpress/data": "10.19.0",
"@wordpress/data-controls": "4.19.0",
"@wordpress/dataviews": "4.15.0",
"@wordpress/date": "5.19.0",
"@wordpress/deprecated": "4.19.0",
"@wordpress/dom": "4.19.0",
"@wordpress/dom-ready": "4.19.0",
"@wordpress/edit-post": "8.19.0",
"@wordpress/edit-site": "6.19.0",
"@wordpress/edit-widgets": "6.19.0",
"@wordpress/editor": "14.19.0",
"@wordpress/element": "6.19.0",
"@wordpress/escape-html": "3.19.0",
"@wordpress/fields": "0.11.0",
"@wordpress/format-library": "5.19.0",
"@wordpress/hooks": "4.19.0",
"@wordpress/html-entities": "4.19.0",
"@wordpress/i18n": "5.19.0",
"@wordpress/icons": "10.19.0",
"@wordpress/interactivity": "6.19.0",
"@wordpress/interactivity-router": "2.19.0",
"@wordpress/interface": "9.4.0",
"@wordpress/is-shallow-equal": "5.19.0",
"@wordpress/keyboard-shortcuts": "5.19.0",
"@wordpress/keycodes": "4.19.0",
"@wordpress/list-reusable-blocks": "5.19.0",
"@wordpress/media-utils": "5.19.0",
"@wordpress/notices": "5.19.0",
"@wordpress/nux": "9.19.0",
"@wordpress/patterns": "2.19.0",
"@wordpress/plugins": "7.19.0",
"@wordpress/preferences": "4.19.0",
"@wordpress/preferences-persistence": "2.19.0",
"@wordpress/primitives": "4.19.0",
"@wordpress/priority-queue": "3.19.0",
"@wordpress/private-apis": "1.19.0",
"@wordpress/redux-routine": "5.19.0",
"@wordpress/reusable-blocks": "5.19.0",
"@wordpress/rich-text": "7.19.0",
"@wordpress/router": "1.19.0",
"@wordpress/server-side-render": "5.19.0",
"@wordpress/shortcode": "4.19.0",
"@wordpress/style-engine": "2.19.0",
"@wordpress/sync": "1.19.0",
"@wordpress/token-list": "3.19.0",
"@wordpress/undo-manager": "1.19.0",
"@wordpress/upload-media": "0.4.0",
"@wordpress/url": "4.19.0",
"@wordpress/viewport": "6.19.0",
"@wordpress/warning": "3.19.0",
"@wordpress/widgets": "4.19.0",
"@wordpress/wordcount": "4.19.0",
"backbone": "1.6.0",
"clipboard": "2.0.11",
"core-js-url-browser": "3.6.4",
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/assets/script-modules-packages.min.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('interactivity/index.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a525209c03a87e74ec45', 'type' => 'module'), 'interactivity/debug.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b1a15c164ed27698ef82', 'type' => 'module'), 'interactivity-router/index.min.js' => array('dependencies' => array('@wordpress/interactivity', 'wp-polyfill', array('id' => '@wordpress/a11y', 'import' => 'dynamic')), 'version' => '0f01f519e3dce3ad547a', 'type' => 'module'), 'a11y/index.min.js' => array('dependencies' => array(), 'version' => 'b7d06936b8bc23cff2ad', 'type' => 'module'), 'block-library/file/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'fdc2f6842e015af83140', 'type' => 'module'), 'block-library/form/view.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'baaf25398238b4f2a821', 'type' => 'module'), 'block-library/image/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '8f7f3c854009ae207c29', 'type' => 'module'), 'block-library/navigation/view.min.js' => array('dependencies' => array('@wordpress/interactivity', 'wp-polyfill'), 'version' => '8ff192874fc8910a284c', 'type' => 'module'), 'block-library/query/view.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => '0661ecffc048a34462c0', 'type' => 'module'), 'block-library/search/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '2a73400a693958f604de', 'type' => 'module'));
<?php return array('interactivity/index.min.js' => array('dependencies' => array(), 'version' => '55aebb6e0a16726baffb', 'type' => 'module'), 'interactivity/debug.min.js' => array('dependencies' => array(), 'version' => 'a5c279b9ad67f2a4e6e2', 'type' => 'module'), 'interactivity-router/index.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/a11y', 'import' => 'dynamic')), 'version' => 'dc4a227f142d2e68ef83', 'type' => 'module'), 'a11y/index.min.js' => array('dependencies' => array(), 'version' => 'b7d06936b8bc23cff2ad', 'type' => 'module'), 'block-library/file/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'fdc2f6842e015af83140', 'type' => 'module'), 'block-library/form/view.min.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'baaf25398238b4f2a821', 'type' => 'module'), 'block-library/image/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => 'e38a2f910342023b9d19', 'type' => 'module'), 'block-library/navigation/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '61572d447d60c0aa5240', 'type' => 'module'), 'block-library/query/view.min.js' => array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => 'f55e93a1ad4806e91785', 'type' => 'module'), 'block-library/search/view.min.js' => array('dependencies' => array('@wordpress/interactivity'), 'version' => '208bf143e4074549fa89', 'type' => 'module'));
9 changes: 9 additions & 0 deletions src/wp-includes/blocks/archives/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@
"fontSize": true
}
},
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"interactivity": {
"clientNavigation": true
}
Expand Down
19 changes: 1 addition & 18 deletions src/wp-includes/blocks/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,8 @@ function render_block_core_block( $attributes ) {
add_filter( 'render_block_context', $filter_block_context, 1 );
}

$ignored_hooked_blocks = get_post_meta( $attributes['ref'], '_wp_ignored_hooked_blocks', true );
if ( ! empty( $ignored_hooked_blocks ) ) {
$ignored_hooked_blocks = json_decode( $ignored_hooked_blocks, true );
$attributes['metadata'] = array(
'ignoredHookedBlocks' => $ignored_hooked_blocks,
);
}

// Wrap in "Block" block so the Block Hooks algorithm can insert blocks
// that are hooked as first or last child of `core/block`.
$content = get_comment_delimited_block_content(
'core/block',
$attributes,
$content
);
// Apply Block Hooks.
$content = apply_block_hooks_to_content( $content, $reusable_block );
// Remove block wrapper.
$content = remove_serialized_parent_block( $content );
$content = apply_block_hooks_to_content_from_post_object( $content, $reusable_block );

$content = do_blocks( $content );
unset( $seen_refs[ $attributes['ref'] ] );
Expand Down
32 changes: 32 additions & 0 deletions src/wp-includes/blocks/blocks-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@
'fontSize' => true
)
),
'color' => array(
'gradients' => true,
'link' => true,
'__experimentalDefaultControls' => array(
'background' => true,
'text' => true,
'link' => true
)
),
'interactivity' => array(
'clientNavigation' => true
)
Expand Down Expand Up @@ -610,6 +619,15 @@
'fontSize' => true
)
),
'color' => array(
'gradients' => true,
'link' => true,
'__experimentalDefaultControls' => array(
'background' => true,
'text' => true,
'link' => true
)
),
'interactivity' => array(
'clientNavigation' => true
),
Expand Down Expand Up @@ -5922,6 +5940,20 @@
'interactivity' => array(
'clientNavigation' => true
),
'__experimentalBorder' => array(
'radius' => true,
'color' => true,
'width' => true,
'style' => true
),
'spacing' => array(
'margin' => true,
'padding' => true,
'__experimentalDefaultControls' => array(
'padding' => false,
'margin' => false
)
),
'color' => array(
'background' => true,
'text' => true,
Expand Down
9 changes: 9 additions & 0 deletions src/wp-includes/blocks/categories/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@
"fontSize": true
}
},
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"interactivity": {
"clientNavigation": true
},
Expand Down
80 changes: 11 additions & 69 deletions src/wp-includes/blocks/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,12 @@ private static function get_inner_blocks_from_navigation_post( $attributes ) {
// it encounters whitespace. This code strips it.
$blocks = block_core_navigation_filter_out_empty_blocks( $parsed_blocks );

// Run Block Hooks algorithm to inject hooked blocks.
$markup = block_core_navigation_insert_hooked_blocks( $blocks, $navigation_post );
$root_nav_block = parse_blocks( $markup )[0];

$blocks = isset( $root_nav_block['innerBlocks'] ) ? $root_nav_block['innerBlocks'] : $blocks;
// Re-serialize, and run Block Hooks algorithm to inject hooked blocks.
// TODO: See if we can move the apply_block_hooks_to_content_from_post_object() call
// before the parse_blocks() call further above, to avoid the extra serialization/parsing.
$markup = serialize_blocks( $blocks );
$markup = apply_block_hooks_to_content_from_post_object( $markup, $navigation_post );
$blocks = parse_blocks( $markup );

// TODO - this uses the full navigation block attributes for the
// context which could be refined.
Expand Down Expand Up @@ -1077,12 +1078,11 @@ function block_core_navigation_get_fallback_blocks() {

// Run Block Hooks algorithm to inject hooked blocks.
// We have to run it here because we need the post ID of the Navigation block to track ignored hooked blocks.
$markup = block_core_navigation_insert_hooked_blocks( $fallback_blocks, $navigation_post );
$blocks = parse_blocks( $markup );

if ( isset( $blocks[0]['innerBlocks'] ) ) {
$fallback_blocks = $blocks[0]['innerBlocks'];
}
// TODO: See if we can move the apply_block_hooks_to_content_from_post_object() call
// before the parse_blocks() call further above, to avoid the extra serialization/parsing.
$markup = serialize_blocks( $fallback_blocks );
$markup = apply_block_hooks_to_content_from_post_object( $markup, $navigation_post );
$fallback_blocks = parse_blocks( $markup );
}

/**
Expand Down Expand Up @@ -1436,61 +1436,3 @@ function block_core_navigation_get_most_recently_published_navigation() {

return null;
}

/**
* Mock a parsed block for the Navigation block given its inner blocks and the `wp_navigation` post object.
* The `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is queried to add the `metadata.ignoredHookedBlocks` attribute.
*
* @since 6.5.0
*
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
*
* @return array the normalized parsed blocks.
*/
function block_core_navigation_mock_parsed_block( $inner_blocks, $post ) {
$attributes = array();

if ( isset( $post->ID ) ) {
$ignored_hooked_blocks = get_post_meta( $post->ID, '_wp_ignored_hooked_blocks', true );
if ( ! empty( $ignored_hooked_blocks ) ) {
$ignored_hooked_blocks = json_decode( $ignored_hooked_blocks, true );
$attributes['metadata'] = array(
'ignoredHookedBlocks' => $ignored_hooked_blocks,
);
}
}

$mock_anchor_parent_block = array(
'blockName' => 'core/navigation',
'attrs' => $attributes,
'innerBlocks' => $inner_blocks,
'innerContent' => array_fill( 0, count( $inner_blocks ), null ),
);

return $mock_anchor_parent_block;
}

/**
* Insert hooked blocks into a Navigation block.
*
* Given a Navigation block's inner blocks and its corresponding `wp_navigation` post object,
* this function inserts hooked blocks into it, and returns the serialized inner blocks in a
* mock Navigation block wrapper.
*
* If there are any hooked blocks that need to be inserted as the Navigation block's first or last
* children, the `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is checked to see if any
* of those hooked blocks should be exempted from insertion.
*
* @since 6.5.0
*
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
* @return string Serialized inner blocks in mock Navigation block wrapper, with hooked blocks inserted, if any.
*/
function block_core_navigation_insert_hooked_blocks( $inner_blocks, $post ) {
$mock_navigation_block = block_core_navigation_mock_parsed_block( $inner_blocks, $post );

$mock_navigation_block_markup = serialize_block( $mock_navigation_block );
return apply_block_hooks_to_content( $mock_navigation_block_markup, $post, 'insert_hooked_blocks' );
}
Loading

0 comments on commit bc1bdb3

Please sign in to comment.