Skip to content

Commit

Permalink
Sync with GB 14.1 RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Sep 14, 2022
1 parent 18c2ec4 commit 50a3596
Show file tree
Hide file tree
Showing 63 changed files with 1,910 additions and 1,212 deletions.
2,321 changes: 1,285 additions & 1,036 deletions package-lock.json

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
],
"devDependencies": {
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
"@wordpress/babel-preset-default": "7.0.0",
"@wordpress/babel-preset-default": "7.1.0",
"@wordpress/dependency-extraction-webpack-plugin": "4.0.0",
"@wordpress/e2e-test-utils": "8.0.0",
"@wordpress/scripts": "24.0.0",
"@wordpress/e2e-test-utils": "8.1.0",
"@wordpress/scripts": "24.1.0",
"autoprefixer": "^9.8.8",
"chalk": "5.0.1",
"check-node-version": "4.2.1",
Expand Down Expand Up @@ -76,61 +76,61 @@
"webpack-livereload-plugin": "3.0.2"
},
"dependencies": {
"@wordpress/a11y": "3.16.0",
"@wordpress/annotations": "2.16.0",
"@wordpress/api-fetch": "6.13.0",
"@wordpress/autop": "3.16.0",
"@wordpress/blob": "3.16.0",
"@wordpress/block-directory": "3.14.0",
"@wordpress/block-editor": "9.8.0",
"@wordpress/block-library": "7.13.0",
"@wordpress/block-serialization-default-parser": "4.16.0",
"@wordpress/blocks": "11.15.0",
"@wordpress/components": "20.0.0",
"@wordpress/compose": "5.14.0",
"@wordpress/core-data": "4.14.0",
"@wordpress/customize-widgets": "3.13.0",
"@wordpress/data": "7.0.0",
"@wordpress/data-controls": "2.16.0",
"@wordpress/date": "4.16.0",
"@wordpress/deprecated": "3.16.0",
"@wordpress/dom": "3.16.0",
"@wordpress/dom-ready": "3.16.0",
"@wordpress/edit-post": "6.13.0",
"@wordpress/edit-site": "4.13.0",
"@wordpress/edit-widgets": "4.13.0",
"@wordpress/editor": "12.15.0",
"@wordpress/element": "4.14.0",
"@wordpress/escape-html": "2.16.0",
"@wordpress/format-library": "3.14.0",
"@wordpress/hooks": "3.16.0",
"@wordpress/html-entities": "3.16.0",
"@wordpress/i18n": "4.16.0",
"@wordpress/icons": "9.7.0",
"@wordpress/interface": "4.15.0",
"@wordpress/is-shallow-equal": "4.16.0",
"@wordpress/keyboard-shortcuts": "3.14.0",
"@wordpress/keycodes": "3.16.0",
"@wordpress/list-reusable-blocks": "3.14.0",
"@wordpress/media-utils": "4.7.0",
"@wordpress/notices": "3.16.0",
"@wordpress/nux": "5.14.0",
"@wordpress/plugins": "4.14.0",
"@wordpress/preferences": "2.8.0",
"@wordpress/primitives": "3.14.0",
"@wordpress/priority-queue": "2.16.0",
"@wordpress/redux-routine": "4.16.0",
"@wordpress/reusable-blocks": "3.14.0",
"@wordpress/rich-text": "5.14.0",
"@wordpress/server-side-render": "3.14.0",
"@wordpress/shortcode": "3.16.0",
"@wordpress/style-engine": "0.15.0",
"@wordpress/token-list": "2.16.0",
"@wordpress/url": "3.17.0",
"@wordpress/viewport": "4.14.0",
"@wordpress/warning": "2.16.0",
"@wordpress/widgets": "2.14.0",
"@wordpress/wordcount": "3.16.0",
"@wordpress/a11y": "3.17.0",
"@wordpress/annotations": "2.17.0",
"@wordpress/api-fetch": "6.14.0",
"@wordpress/autop": "3.17.0",
"@wordpress/blob": "3.17.0",
"@wordpress/block-directory": "3.15.0",
"@wordpress/block-editor": "10.0.0",
"@wordpress/block-library": "7.14.0",
"@wordpress/block-serialization-default-parser": "4.17.0",
"@wordpress/blocks": "11.16.0",
"@wordpress/components": "21.0.0",
"@wordpress/compose": "5.15.0",
"@wordpress/core-data": "5.0.0",
"@wordpress/customize-widgets": "3.14.0",
"@wordpress/data": "7.1.0",
"@wordpress/data-controls": "2.17.0",
"@wordpress/date": "4.17.0",
"@wordpress/deprecated": "3.17.0",
"@wordpress/dom": "3.17.0",
"@wordpress/dom-ready": "3.17.0",
"@wordpress/edit-post": "6.14.0",
"@wordpress/edit-site": "4.14.0",
"@wordpress/edit-widgets": "4.14.0",
"@wordpress/editor": "12.16.0",
"@wordpress/element": "4.15.0",
"@wordpress/escape-html": "2.17.0",
"@wordpress/format-library": "3.15.0",
"@wordpress/hooks": "3.17.0",
"@wordpress/html-entities": "3.17.0",
"@wordpress/i18n": "4.17.0",
"@wordpress/icons": "9.8.0",
"@wordpress/interface": "4.16.0",
"@wordpress/is-shallow-equal": "4.17.0",
"@wordpress/keyboard-shortcuts": "3.15.0",
"@wordpress/keycodes": "3.17.0",
"@wordpress/list-reusable-blocks": "3.15.0",
"@wordpress/media-utils": "4.8.0",
"@wordpress/notices": "3.17.0",
"@wordpress/nux": "5.15.0",
"@wordpress/plugins": "4.15.0",
"@wordpress/preferences": "2.9.0",
"@wordpress/primitives": "3.15.0",
"@wordpress/priority-queue": "2.17.0",
"@wordpress/redux-routine": "4.17.0",
"@wordpress/reusable-blocks": "3.15.0",
"@wordpress/rich-text": "5.15.0",
"@wordpress/server-side-render": "3.15.0",
"@wordpress/shortcode": "3.17.0",
"@wordpress/style-engine": "0.16.0",
"@wordpress/token-list": "2.17.0",
"@wordpress/url": "3.18.0",
"@wordpress/viewport": "4.15.0",
"@wordpress/warning": "2.17.0",
"@wordpress/widgets": "2.15.0",
"@wordpress/wordcount": "3.17.0",
"backbone": "1.4.1",
"clipboard": "2.0.10",
"core-js-url-browser": "3.6.4",
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/wp-includes/blocks/archives/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"editorStyle": "wp-block-archives-editor"
Expand Down
14 changes: 6 additions & 8 deletions src/wp-includes/blocks/audio/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@
"type": "string",
"source": "attribute",
"selector": "audio",
"attribute": "src"
"attribute": "src",
"__experimentalRole": "content"
},
"caption": {
"type": "string",
"source": "html",
"selector": "figcaption"
"selector": "figcaption",
"__experimentalRole": "content"
},
"id": {
"type": "number"
"type": "number",
"__experimentalRole": "content"
},
"autoplay": {
"type": "boolean",
Expand All @@ -44,11 +47,6 @@
"supports": {
"anchor": true,
"align": true,
"__experimentalStyle": {
"spacing": {
"margin": "0 0 1em 0"
}
},
"spacing": {
"margin": true,
"padding": true
Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/blocks/avatar/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"align": true,
"alignWide": false,
"spacing": {
"margin": true
"margin": true,
"padding": true
},
"__experimentalBorder": {
"__experimentalSkipSerialization": true,
Expand Down
5 changes: 5 additions & 0 deletions src/wp-includes/blocks/button/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
Expand Down
13 changes: 13 additions & 0 deletions src/wp-includes/blocks/buttons/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@
"blockGap": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"__experimentalLayout": {
"allowSwitching": false,
"allowInheriting": false,
Expand Down
14 changes: 13 additions & 1 deletion src/wp-includes/blocks/calendar/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,19 @@
}
},
"supports": {
"align": true
"align": true,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"style": "wp-block-calendar"
}
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
function onCatChange() {
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {
location.href = "<?php echo home_url(); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
location.href = "<?php echo esc_url( home_url() ); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;
}
}
dropdown.onchange = onCatChange;
Expand Down
4 changes: 4 additions & 0 deletions src/wp-includes/blocks/categories/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
"supports": {
"align": true,
"html": false,
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/column/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"templateLock": {
"type": [ "string", "boolean" ],
"enum": [ "all", "insert", false ]
"enum": [ "all", "insert", "noContent", false ]
}
},
"supports": {
Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/blocks/columns/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
},
"spacing": {
"blockGap": {
"__experimentalDefault": "2em"
"__experimentalDefault": "2em",
"sides": [ "horizontal", "vertical" ]
},
"margin": [ "top", "bottom" ],
"padding": true,
Expand Down
4 changes: 4 additions & 0 deletions src/wp-includes/blocks/comment-date/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
4 changes: 4 additions & 0 deletions src/wp-includes/blocks/comment-edit-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
4 changes: 4 additions & 0 deletions src/wp-includes/blocks/comment-reply-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function register_block_core_comments() {
*/
function comments_block_form_defaults( $fields ) {
if ( wp_is_block_theme() ) {
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="%3$s wp-block-button__link ' . WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' ) . '" value="%4$s" />';
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="%3$s wp-block-button__link ' . wp_theme_element_class_name( 'button' ) . '" value="%4$s" />';
$fields['submit_field'] = '<p class="form-submit wp-block-button">%1$s %2$s</p>';
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/cover/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"templateLock": {
"type": [ "string", "boolean" ],
"enum": [ "all", "insert", false ]
"enum": [ "all", "insert", "noContent", false ]
}
},
"usesContext": [ "postId", "postType" ],
Expand Down
7 changes: 1 addition & 6 deletions src/wp-includes/blocks/embed/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@
}
},
"supports": {
"align": true,
"__experimentalStyle": {
"spacing": {
"margin": "0 0 1em 0"
}
}
"align": true
},
"editorStyle": "wp-block-embed-editor",
"style": "wp-block-embed"
Expand Down
22 changes: 22 additions & 0 deletions src/wp-includes/blocks/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ function render_block_core_file( $attributes, $content ) {
wp_enqueue_script( 'wp-block-file-view' );
}

// Update object's aria-label attribute if present in block HTML.

// Match an aria-label attribute from an object tag.
$pattern = '@<object.+(?<attribute>aria-label="(?<filename>[^"]+)?")@i';
$content = preg_replace_callback(
$pattern,
function ( $matches ) {
$filename = ! empty( $matches['filename'] ) ? $matches['filename'] : '';
$has_filename = ! empty( $filename ) && 'PDF embed' !== $filename;
$label = $has_filename ?
sprintf(
/* translators: %s: filename. */
__( 'Embed of %s.' ),
$filename
)
: __( 'PDF embed' );

return str_replace( $matches['attribute'], sprintf( 'aria-label="%s"', $label ), $matches[0] );
},
$content
);

return $content;
}

Expand Down
Loading

0 comments on commit 50a3596

Please sign in to comment.