Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update to Gutenberg 16.7 RC2 packages
  • Loading branch information
youknowriad committed Jan 29, 2024
commit 9fd979c4d81d74f02ade1f25e99e380375b21288
3,210 changes: 1,621 additions & 1,589 deletions package-lock.json

Large diffs are not rendered by default.

143 changes: 72 additions & 71 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.32.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
"@wordpress/babel-preset-default": "7.33.0",
"@wordpress/dependency-extraction-webpack-plugin": "5.0.0",
"@wordpress/e2e-test-utils": "10.20.0",
"@wordpress/e2e-test-utils-playwright": "0.17.0",
"@wordpress/prettier-config": "3.6.0",
"@wordpress/scripts": "27.0.0",
"@wordpress/babel-preset-default": "7.34.0",
"@wordpress/dependency-extraction-webpack-plugin": "5.1.0",
"@wordpress/e2e-test-utils": "10.21.0",
"@wordpress/e2e-test-utils-playwright": "0.18.0",
"@wordpress/prettier-config": "3.7.0",
"@wordpress/scripts": "27.1.0",
"autoprefixer": "10.4.16",
"chalk": "5.3.0",
"check-node-version": "4.2.1",
Expand Down Expand Up @@ -80,71 +80,72 @@
"dependencies": {
"@emotion/is-prop-valid": "0.8.8",
"@emotion/memoize": "0.7.4",
"@wordpress/a11y": "3.49.0",
"@wordpress/annotations": "2.49.0",
"@wordpress/api-fetch": "6.46.0",
"@wordpress/autop": "3.49.0",
"@wordpress/blob": "3.49.0",
"@wordpress/block-directory": "4.26.0",
"@wordpress/block-editor": "12.17.0",
"@wordpress/block-library": "8.26.0",
"@wordpress/block-serialization-default-parser": "4.49.0",
"@wordpress/blocks": "12.26.0",
"@wordpress/commands": "0.20.0",
"@wordpress/components": "25.15.0",
"@wordpress/compose": "6.26.0",
"@wordpress/core-commands": "0.18.0",
"@wordpress/core-data": "6.26.0",
"@wordpress/customize-widgets": "4.26.0",
"@wordpress/data": "9.19.0",
"@wordpress/data-controls": "3.18.0",
"@wordpress/dataviews": "0.3.0",
"@wordpress/date": "4.49.0",
"@wordpress/deprecated": "3.49.0",
"@wordpress/dom": "3.49.0",
"@wordpress/dom-ready": "3.49.0",
"@wordpress/edit-post": "7.26.0",
"@wordpress/edit-site": "5.26.0",
"@wordpress/edit-widgets": "5.26.0",
"@wordpress/editor": "13.26.0",
"@wordpress/element": "5.26.0",
"@wordpress/escape-html": "2.49.0",
"@wordpress/format-library": "4.26.0",
"@wordpress/hooks": "3.49.0",
"@wordpress/html-entities": "3.49.0",
"@wordpress/i18n": "4.49.0",
"@wordpress/icons": "9.40.0",
"@wordpress/interactivity": "3.2.0",
"@wordpress/interface": "5.26.0",
"@wordpress/is-shallow-equal": "4.49.0",
"@wordpress/keyboard-shortcuts": "4.26.0",
"@wordpress/keycodes": "3.49.0",
"@wordpress/list-reusable-blocks": "4.26.0",
"@wordpress/media-utils": "4.40.0",
"@wordpress/notices": "4.17.0",
"@wordpress/nux": "8.11.0",
"@wordpress/patterns": "1.10.0",
"@wordpress/plugins": "6.17.0",
"@wordpress/preferences": "3.26.0",
"@wordpress/preferences-persistence": "1.41.0",
"@wordpress/primitives": "3.47.0",
"@wordpress/priority-queue": "2.49.0",
"@wordpress/private-apis": "0.31.0",
"@wordpress/redux-routine": "4.49.0",
"@wordpress/reusable-blocks": "4.26.0",
"@wordpress/rich-text": "6.26.0",
"@wordpress/router": "0.18.0",
"@wordpress/server-side-render": "4.26.0",
"@wordpress/shortcode": "3.49.0",
"@wordpress/style-engine": "1.32.0",
"@wordpress/sync": "0.11.0",
"@wordpress/token-list": "2.49.0",
"@wordpress/undo-manager": "0.9.0",
"@wordpress/url": "3.50.0",
"@wordpress/viewport": "5.26.0",
"@wordpress/warning": "2.49.0",
"@wordpress/widgets": "3.26.0",
"@wordpress/wordcount": "3.49.0",
"@wordpress/a11y": "3.50.0",
"@wordpress/annotations": "2.50.0",
"@wordpress/api-fetch": "6.47.0",
"@wordpress/autop": "3.50.0",
"@wordpress/blob": "3.50.0",
"@wordpress/block-directory": "4.27.1",
"@wordpress/block-editor": "12.18.1",
"@wordpress/block-library": "8.27.1",
"@wordpress/block-serialization-default-parser": "4.50.0",
"@wordpress/blocks": "12.27.1",
"@wordpress/commands": "0.21.0",
"@wordpress/components": "25.16.0",
"@wordpress/compose": "6.27.0",
"@wordpress/core-commands": "0.19.1",
"@wordpress/core-data": "6.27.1",
"@wordpress/customize-widgets": "4.27.1",
"@wordpress/data": "9.20.0",
"@wordpress/data-controls": "3.19.0",
"@wordpress/dataviews": "0.4.0",
"@wordpress/date": "4.50.0",
"@wordpress/deprecated": "3.50.0",
"@wordpress/dom": "3.50.0",
"@wordpress/dom-ready": "3.50.0",
"@wordpress/edit-post": "7.27.1",
"@wordpress/edit-site": "5.27.1",
"@wordpress/edit-widgets": "5.27.1",
"@wordpress/editor": "13.27.1",
"@wordpress/element": "5.27.0",
"@wordpress/escape-html": "2.50.0",
"@wordpress/format-library": "4.27.1",
"@wordpress/hooks": "3.50.0",
"@wordpress/html-entities": "3.50.0",
"@wordpress/i18n": "4.50.0",
"@wordpress/icons": "9.41.0",
"@wordpress/interactivity": "4.0.0",
"@wordpress/interactivity-router": "1.0.0",
"@wordpress/interface": "5.27.0",
"@wordpress/is-shallow-equal": "4.50.0",
"@wordpress/keyboard-shortcuts": "4.27.0",
"@wordpress/keycodes": "3.50.0",
"@wordpress/list-reusable-blocks": "4.27.0",
"@wordpress/media-utils": "4.41.0",
"@wordpress/notices": "4.18.0",
"@wordpress/nux": "8.12.0",
"@wordpress/patterns": "1.11.1",
"@wordpress/plugins": "6.18.0",
"@wordpress/preferences": "3.27.0",
"@wordpress/preferences-persistence": "1.42.0",
"@wordpress/primitives": "3.48.0",
"@wordpress/priority-queue": "2.50.0",
"@wordpress/private-apis": "0.32.0",
"@wordpress/redux-routine": "4.50.0",
"@wordpress/reusable-blocks": "4.27.1",
"@wordpress/rich-text": "6.27.0",
"@wordpress/router": "0.19.0",
"@wordpress/server-side-render": "4.27.1",
"@wordpress/shortcode": "3.50.0",
"@wordpress/style-engine": "1.33.1",
"@wordpress/sync": "0.12.0",
"@wordpress/token-list": "2.50.0",
"@wordpress/undo-manager": "0.10.0",
"@wordpress/url": "3.51.0",
"@wordpress/viewport": "5.27.0",
"@wordpress/warning": "2.50.0",
"@wordpress/widgets": "3.27.1",
"@wordpress/wordcount": "3.50.0",
"backbone": "1.5.0",
"clipboard": "2.0.11",
"core-js-url-browser": "3.6.4",
Expand Down
34 changes: 3 additions & 31 deletions src/wp-includes/blocks/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,14 @@ function render_block_core_block( $attributes ) {
$content = $wp_embed->run_shortcode( $reusable_block->post_content );
$content = $wp_embed->autoembed( $content );

$gutenberg_experiments = get_option( 'gutenberg-experiments' );
$has_partial_synced_overrides = $gutenberg_experiments
&& array_key_exists( 'gutenberg-pattern-partial-syncing', $gutenberg_experiments )
&& isset( $attributes['overrides'] );
$has_pattern_overrides = isset( $attributes['overrides'] );

/**
* We set the `pattern/overrides` context through the `render_block_context`
* filter so that it is available when a pattern's inner blocks are
* rendering via do_blocks given it only receives the inner content.
*/
if ( $has_partial_synced_overrides ) {
if ( $has_pattern_overrides ) {
$filter_block_context = static function ( $context ) use ( $attributes ) {
$context['pattern/overrides'] = $attributes['overrides'];
return $context;
Expand All @@ -67,7 +64,7 @@ function render_block_core_block( $attributes ) {
$content = do_blocks( $content );
unset( $seen_refs[ $attributes['ref'] ] );

if ( $has_partial_synced_overrides ) {
if ( $has_pattern_overrides ) {
remove_filter( 'render_block_context', $filter_block_context, 1 );
}

Expand All @@ -86,28 +83,3 @@ function register_block_core_block() {
);
}
add_action( 'init', 'register_block_core_block' );

$gutenberg_experiments = get_option( 'gutenberg-experiments' );
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-pattern-partial-syncing', $gutenberg_experiments ) ) {
/**
* Registers the overrides attribute for core/block.
*
* @param array $args Array of arguments for registering a block type.
* @param string $block_name Block name including namespace.
* @return array $args
*/
function register_block_core_block_args( $args, $block_name ) {
if ( 'core/block' === $block_name ) {
$args['attributes'] = array_merge(
$args['attributes'],
array(
'overrides' => array(
'type' => 'object',
),
)
);
}
return $args;
}
add_filter( 'register_block_type_args', 'register_block_core_block_args', 10, 2 );
}
3 changes: 3 additions & 0 deletions src/wp-includes/blocks/block/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"attributes": {
"ref": {
"type": "number"
},
"overrides": {
"type": "object"
}
},
"supports": {
Expand Down
43 changes: 33 additions & 10 deletions src/wp-includes/blocks/blocks-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
'attributes' => array(
'ref' => array(
'type' => 'number'
),
'overrides' => array(
'type' => 'object'
)
),
'supports' => array(
Expand All @@ -219,6 +222,9 @@
'link'
),
'textdomain' => 'default',
'usesContext' => array(
'pattern/overrides'
),
'attributes' => array(
'tagName' => array(
'type' => 'string',
Expand Down Expand Up @@ -1513,6 +1519,9 @@
),
'enableContrastChecker' => false
),
'dimensions' => array(
'aspectRatio' => true
),
'typography' => array(
'fontSize' => true,
'lineHeight' => true,
Expand Down Expand Up @@ -1735,7 +1744,6 @@
),
'interactivity' => true
),
'viewScript' => 'file:./view.min.js',
'editorStyle' => 'wp-block-file-editor',
'style' => 'wp-block-file'
),
Expand Down Expand Up @@ -2065,6 +2073,7 @@
)
),
'dimensions' => array(
'aspectRatio' => true,
'minHeight' => true
),
'__experimentalBorder' => array(
Expand Down Expand Up @@ -2114,6 +2123,9 @@
'subtitle'
),
'textdomain' => 'default',
'usesContext' => array(
'pattern/overrides'
),
'attributes' => array(
'textAlign' => array(
'type' => 'string'
Expand Down Expand Up @@ -2253,7 +2265,8 @@
'usesContext' => array(
'allowResize',
'imageCrop',
'fixedHeight'
'fixedHeight',
'pattern/overrides'
),
'description' => 'Insert an image to make a visual statement.',
'keywords' => array(
Expand Down Expand Up @@ -2392,8 +2405,7 @@
)
),
'editorStyle' => 'wp-block-image-editor',
'style' => 'wp-block-image',
'viewScript' => 'file:./view.min.js'
'style' => 'wp-block-image'
),
'latest-comments' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
Expand Down Expand Up @@ -3135,7 +3147,6 @@
'interactivity' => true,
'renaming' => false
),
'viewScript' => 'file:./view.min.js',
'editorStyle' => 'wp-block-navigation-editor',
'style' => 'wp-block-navigation'
),
Expand Down Expand Up @@ -3436,7 +3447,8 @@
),
'textdomain' => 'default',
'usesContext' => array(
'postId'
'postId',
'pattern/overrides'
),
'attributes' => array(
'align' => array(
Expand Down Expand Up @@ -3474,7 +3486,6 @@
'text' => true
)
),
'__experimentalConnections' => true,
'spacing' => array(
'margin' => true,
'padding' => true,
Expand Down Expand Up @@ -4042,8 +4053,18 @@
'arrow' => array(
'type' => 'string',
'default' => 'none'
),
'inSameTerm' => array(
'type' => 'boolean'
),
'taxonomy' => array(
'type' => 'string',
'default' => ''
)
),
'usesContext' => array(
'postType'
),
'supports' => array(
'reusable' => false,
'html' => false,
Expand Down Expand Up @@ -4348,6 +4369,10 @@
'text' => true
)
),
'spacing' => array(
'margin' => true,
'padding' => true
),
'typography' => array(
'fontSize' => true,
'lineHeight' => true,
Expand Down Expand Up @@ -4444,8 +4469,7 @@
'layout' => true
),
'editorStyle' => 'wp-block-query-editor',
'style' => 'wp-block-query',
'viewScript' => 'file:./view.min.js'
'style' => 'wp-block-query'
),
'query-no-results' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
Expand Down Expand Up @@ -5046,7 +5070,6 @@
),
'html' => false
),
'viewScript' => 'file:./view.min.js',
'editorStyle' => 'wp-block-search-editor',
'style' => 'wp-block-search'
),
Expand Down
1 change: 1 addition & 0 deletions src/wp-includes/blocks/button/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"description": "Prompt visitors to take action with a button-style link.",
"keywords": [ "link" ],
"textdomain": "default",
"usesContext": [ "pattern/overrides" ],
"attributes": {
"tagName": {
"type": "string",
Expand Down
3 changes: 3 additions & 0 deletions src/wp-includes/blocks/cover/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
"__experimentalSkipSerialization": [ "gradients" ],
"enableContrastChecker": false
},
"dimensions": {
"aspectRatio": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
Loading