Block Editor: Update `@wordpress` package dependencies.

Update packages include:

- block-library
- components
- edit-post
- editor
- format-library
- list-reusable-blocks
- nux

Other changes:

- Fix a translator comment in `edit-form-blocks.php`.
- Rename the `gutenberg_` functions in `blocks/latest-comments.php`.

Props noisy socks, youknowriad, pinto, swissspidy.

Merges [43935] and [43949-43951] into trunk.

See #45145.
Built from https://develop.svn.wordpress.org/trunk@44273


git-svn-id: http://core.svn.wordpress.org/trunk@44103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2018-12-17 19:06:59 +00:00
parent 945ba795dc
commit 36158d7909
44 changed files with 348 additions and 380 deletions

View File

@ -178,10 +178,7 @@ $styles = array(
),
);
/*
* Set a locale specific default font.
* Translators: Use this to specify the CSS font family for the default font
*/
/* Translators: Use this to specify the CSS font family for the default font */
$locale_font_family = esc_html_x( 'Noto Serif', 'CSS Font Family for Editor Font' );
$styles[] = array(
'css' => "body { font-family: '$locale_font_family' }",

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/archives` block.
*
* @package gutenberg
* @package WordPress
*/
/**
@ -32,7 +32,7 @@ function render_block_core_archives( $attributes ) {
$class .= ' wp-block-archives-dropdown';
$dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) );
$title = __( 'Archives', 'default' );
$title = __( 'Archives' );
/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
$dropdown_args = apply_filters(
@ -50,19 +50,19 @@ function render_block_core_archives( $attributes ) {
switch ( $dropdown_args['type'] ) {
case 'yearly':
$label = __( 'Select Year', 'default' );
$label = __( 'Select Year' );
break;
case 'monthly':
$label = __( 'Select Month', 'default' );
$label = __( 'Select Month' );
break;
case 'daily':
$label = __( 'Select Day', 'default' );
$label = __( 'Select Day' );
break;
case 'weekly':
$label = __( 'Select Week', 'default' );
$label = __( 'Select Week' );
break;
default:
$label = __( 'Select Post', 'default' );
$label = __( 'Select Post' );
break;
}
@ -101,7 +101,7 @@ function render_block_core_archives( $attributes ) {
$block_content = sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No archives to show.', 'default' )
__( 'No archives to show.' )
);
} else {

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/block` block.
*
* @package gutenberg
* @package WordPress
*/
/**

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/categories` block.
*
* @package gutenberg
* @package WordPress
*/
/**
@ -27,7 +27,7 @@ function render_block_core_categories( $attributes ) {
if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$id = 'wp-block-categories-' . $block_id;
$args['id'] = $id;
$args['show_option_none'] = __( 'Select Category', 'default' );
$args['show_option_none'] = __( 'Select Category' );
$wrapper_markup = '<div class="%1$s">%2$s</div>';
$items_markup = wp_dropdown_categories( $args );
$type = 'dropdown';

View File

@ -2,10 +2,10 @@
/**
* Server-side rendering of the `core/latest-comments` block.
*
* @package gutenberg
* @package WordPress
*/
if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
if ( ! function_exists( 'wp_latest_comments_draft_or_post_title' ) ) {
/**
* Get the post title.
*
@ -26,10 +26,10 @@ if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
* @return string The post title if set; "(no title)" if no title is set.
*/
function gutenberg_draft_or_post_title( $post = 0 ) {
function wp_latest_comments_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)', 'default' );
$title = __( '(no title)' );
}
return esc_html( $title );
}
@ -42,7 +42,7 @@ if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
*
* @return string Returns the post content with latest comments added.
*/
function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
function render_block_core_latest_comments( $attributes = array() ) {
// This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
$comments = get_comments(
apply_filters(
@ -94,11 +94,11 @@ function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
// `esc_html`.
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . gutenberg_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . wp_latest_comments_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
$list_items_markup .= sprintf(
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
__( '%1$s on %2$s', 'default' ),
__( '%1$s on %2$s' ),
$author_markup,
$post_title
);
@ -143,7 +143,7 @@ function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
) : sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No comments to show.', 'default' )
__( 'No comments to show.' )
);
return $block_content;
@ -179,6 +179,6 @@ register_block_type(
'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ),
),
),
'render_callback' => 'gutenberg_render_block_core_latest_comments',
'render_callback' => 'render_block_core_latest_comments',
)
);

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/latest-posts` block.
*
* @package gutenberg
* @package WordPress
*/
/**
@ -21,7 +21,7 @@ function render_block_core_latest_posts( $attributes ) {
);
if ( isset( $attributes['categories'] ) ) {
$args['categories'] = $attributes['categories'];
$args['category'] = $attributes['categories'];
}
$recent_posts = wp_get_recent_posts( $args );
@ -33,7 +33,7 @@ function render_block_core_latest_posts( $attributes ) {
$title = get_the_title( $post_id );
if ( ! $title ) {
$title = __( '(Untitled)', 'default' );
$title = __( '(Untitled)' );
}
$list_items_markup .= sprintf(
'<li><a href="%1$s">%2$s</a>',

View File

@ -2,7 +2,7 @@
/**
* Server-side rendering of the `core/shortcode` block.
*
* @package gutenberg
* @package WordPress
*/
/**

View File

@ -45,16 +45,15 @@
margin-bottom: 0;
position: relative; }
.wp-block-button .editor-rich-text__tinymce.mce-content-body {
cursor: text;
line-height: 24px; }
cursor: text; }
.wp-block-button:not(.has-text-color):not(.is-style-outline) .editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce {
color: #fff; }
.wp-block-button .editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce {
opacity: 0.8; }
.wp-block-button .editor-rich-text__tinymce[data-is-placeholder-visible="true"] {
height: auto; }
.editor-block-preview__content .wp-block-button {
max-width: 100%; }
.editor-block-preview__content .wp-block-button .editor-rich-text__tinymce[data-is-placeholder-visible="true"] {
height: auto; }
.editor-block-preview__content .wp-block-button .wp-block-button__link {
max-width: 100%;
overflow: hidden;
@ -214,7 +213,7 @@
.wp-block-columns [data-type="core/column"].is-hovered .editor-block-list__breadcrumb {
display: none; }
:not(.components-disabled) > .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit .editor-block-list__layout > * {
:not(.components-disabled) > .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit > * {
pointer-events: all; }
.wp-block-cover-image .editor-rich-text__tinymce[data-is-empty="true"]::before,
@ -241,6 +240,22 @@
.wp-block-cover.has-right-content .editor-rich-text__inline-toolbar {
justify-content: flex-end; }
.wp-block-cover-image.components-placeholder,
.wp-block-cover.components-placeholder {
background: rgba(139, 139, 150, 0.1);
min-height: 200px; }
.is-dark-theme .wp-block-cover-image.components-placeholder, .is-dark-theme
.wp-block-cover.components-placeholder {
background: rgba(255, 255, 255, 0.15); }
[data-align="left"] .wp-block-cover-image,
[data-align="right"] .wp-block-cover-image, [data-align="left"]
.wp-block-cover,
[data-align="right"]
.wp-block-cover {
max-width: 305px;
width: 100%; }
.wp-block-embed {
margin: 0;
clear: both; }
@ -281,7 +296,12 @@
margin-right: 1em; }
.wp-block-freeform.block-library-rich-text__tinymce {
overflow: hidden; }
overflow: hidden;
/**
* The following gallery styles were replicated
* from the styles applied in the tinymce skin,
* /wp-includes/js/tinymce/skins/wordpress/wp-content.css.
*/ }
.wp-block-freeform.block-library-rich-text__tinymce p,
.wp-block-freeform.block-library-rich-text__tinymce li {
line-height: 1.8; }
@ -352,6 +372,54 @@
outline: 0;
cursor: default;
border: 2px dashed #bababa; }
.wp-block-freeform.block-library-rich-text__tinymce .wpview-type-gallery::after {
content: "";
display: table;
clear: both; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery img[data-mce-selected]:focus {
outline: none; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery a {
cursor: default; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery {
margin: auto -6px;
padding: 6px 0;
line-height: 1;
overflow-x: hidden; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery .gallery-item {
float: right;
margin: 0;
text-align: center;
padding: 6px;
box-sizing: border-box; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery .gallery-caption,
.wp-block-freeform.block-library-rich-text__tinymce .gallery .gallery-icon {
margin: 0; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery .gallery-caption {
font-size: 13px;
margin: 4px 0; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-1 .gallery-item {
width: 100%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-2 .gallery-item {
width: 50%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-3 .gallery-item {
width: 33.33333%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-4 .gallery-item {
width: 25%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-5 .gallery-item {
width: 20%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-6 .gallery-item {
width: 16.66667%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-7 .gallery-item {
width: 14.28571%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-8 .gallery-item {
width: 12.5%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-9 .gallery-item {
width: 11.11111%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery img {
max-width: 100%;
height: auto;
border: none;
padding: 0; }
.editor-block-list__layout .editor-block-list__block[data-type="core/freeform"] .mce-btn.mce-active button,
.editor-block-list__layout .editor-block-list__block[data-type="core/freeform"] .mce-btn.mce-active:hover button,
@ -834,6 +902,9 @@ figure.block-library-media-text__media-container {
left: 0;
border-top: 3px dashed #ccd0d4; }
.editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce.wp-block-paragraph {
padding-left: 36px; }
.wp-block-preformatted pre {
white-space: pre-wrap; }

File diff suppressed because one or more lines are too long

View File

@ -46,16 +46,15 @@
margin-bottom: 0;
position: relative; }
.wp-block-button .editor-rich-text__tinymce.mce-content-body {
cursor: text;
line-height: 24px; }
cursor: text; }
.wp-block-button:not(.has-text-color):not(.is-style-outline) .editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce {
color: #fff; }
.wp-block-button .editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce {
opacity: 0.8; }
.wp-block-button .editor-rich-text__tinymce[data-is-placeholder-visible="true"] {
height: auto; }
.editor-block-preview__content .wp-block-button {
max-width: 100%; }
.editor-block-preview__content .wp-block-button .editor-rich-text__tinymce[data-is-placeholder-visible="true"] {
height: auto; }
.editor-block-preview__content .wp-block-button .wp-block-button__link {
max-width: 100%;
overflow: hidden;
@ -215,7 +214,7 @@
.wp-block-columns [data-type="core/column"].is-hovered .editor-block-list__breadcrumb {
display: none; }
:not(.components-disabled) > .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit .editor-block-list__layout > * {
:not(.components-disabled) > .wp-block-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] > .editor-block-list__block-edit > * {
pointer-events: all; }
.wp-block-cover-image .editor-rich-text__tinymce[data-is-empty="true"]::before,
@ -242,6 +241,22 @@
.wp-block-cover.has-right-content .editor-rich-text__inline-toolbar {
justify-content: flex-end; }
.wp-block-cover-image.components-placeholder,
.wp-block-cover.components-placeholder {
background: rgba(139, 139, 150, 0.1);
min-height: 200px; }
.is-dark-theme .wp-block-cover-image.components-placeholder, .is-dark-theme
.wp-block-cover.components-placeholder {
background: rgba(255, 255, 255, 0.15); }
[data-align="left"] .wp-block-cover-image,
[data-align="right"] .wp-block-cover-image, [data-align="left"]
.wp-block-cover,
[data-align="right"]
.wp-block-cover {
max-width: 305px;
width: 100%; }
.wp-block-embed {
margin: 0;
clear: both; }
@ -282,7 +297,12 @@
margin-left: 1em; }
.wp-block-freeform.block-library-rich-text__tinymce {
overflow: hidden; }
overflow: hidden;
/**
* The following gallery styles were replicated
* from the styles applied in the tinymce skin,
* /wp-includes/js/tinymce/skins/wordpress/wp-content.css.
*/ }
.wp-block-freeform.block-library-rich-text__tinymce p,
.wp-block-freeform.block-library-rich-text__tinymce li {
line-height: 1.8; }
@ -357,6 +377,54 @@
outline: 0;
cursor: default;
border: 2px dashed #bababa; }
.wp-block-freeform.block-library-rich-text__tinymce .wpview-type-gallery::after {
content: "";
display: table;
clear: both; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery img[data-mce-selected]:focus {
outline: none; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery a {
cursor: default; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery {
margin: auto -6px;
padding: 6px 0;
line-height: 1;
overflow-x: hidden; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery .gallery-item {
float: left;
margin: 0;
text-align: center;
padding: 6px;
box-sizing: border-box; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery .gallery-caption,
.wp-block-freeform.block-library-rich-text__tinymce .gallery .gallery-icon {
margin: 0; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery .gallery-caption {
font-size: 13px;
margin: 4px 0; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-1 .gallery-item {
width: 100%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-2 .gallery-item {
width: 50%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-3 .gallery-item {
width: 33.33333%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-4 .gallery-item {
width: 25%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-5 .gallery-item {
width: 20%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-6 .gallery-item {
width: 16.66667%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-7 .gallery-item {
width: 14.28571%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-8 .gallery-item {
width: 12.5%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery-columns-9 .gallery-item {
width: 11.11111%; }
.wp-block-freeform.block-library-rich-text__tinymce .gallery img {
max-width: 100%;
height: auto;
border: none;
padding: 0; }
.editor-block-list__layout .editor-block-list__block[data-type="core/freeform"] .mce-btn.mce-active button,
.editor-block-list__layout .editor-block-list__block[data-type="core/freeform"] .mce-btn.mce-active:hover button,
@ -839,6 +907,9 @@ figure.block-library-media-text__media-container {
right: 0;
border-top: 3px dashed #ccd0d4; }
.editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce.wp-block-paragraph {
padding-right: 36px; }
.wp-block-preformatted pre {
white-space: pre-wrap; }

File diff suppressed because one or more lines are too long

View File

@ -103,19 +103,18 @@
.wp-block-button__link {
background-color: #32373c;
border: none;
border-radius: 23px;
border-radius: 28px;
box-shadow: none;
color: inherit;
cursor: pointer;
display: inline-block;
font-size: 18px;
line-height: 24px;
margin: 0;
padding: 11px 24px;
padding: 12px 24px;
text-align: center;
text-decoration: none;
white-space: normal;
word-break: break-all; }
overflow-wrap: break-word; }
.wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active {
color: inherit; }
@ -284,18 +283,21 @@
.wp-block-cover-image.has-background-dim.has-background-dim-100::before,
.wp-block-cover.has-background-dim.has-background-dim-100::before {
opacity: 1; }
.wp-block-cover-image.components-placeholder,
.wp-block-cover.components-placeholder {
height: inherit; }
[data-align="left"] .wp-block-cover-image,
[data-align="right"] .wp-block-cover-image, .wp-block-cover-image.alignleft, .wp-block-cover-image.alignright, [data-align="left"]
.wp-block-cover,
[data-align="right"]
.wp-block-cover,
.wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
.wp-block-cover.alignleft,
.wp-block-cover.alignright {
max-width: 305px;
width: 100%; }
.wp-block-cover-image::after,
.wp-block-cover::after {
display: block;
content: "";
font-size: 0;
min-height: inherit; }
@supports ((position: -webkit-sticky) or (position: sticky)) {
.wp-block-cover-image::after,
.wp-block-cover::after {
content: none; } }
.wp-block-cover-image.aligncenter, .wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
.wp-block-cover.aligncenter,
.wp-block-cover.alignleft,

File diff suppressed because one or more lines are too long

View File

@ -104,19 +104,18 @@
.wp-block-button__link {
background-color: #32373c;
border: none;
border-radius: 23px;
border-radius: 28px;
box-shadow: none;
color: inherit;
cursor: pointer;
display: inline-block;
font-size: 18px;
line-height: 24px;
margin: 0;
padding: 11px 24px;
padding: 12px 24px;
text-align: center;
text-decoration: none;
white-space: normal;
word-break: break-all; }
overflow-wrap: break-word; }
.wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active {
color: inherit; }
@ -287,18 +286,21 @@
.wp-block-cover-image.has-background-dim.has-background-dim-100::before,
.wp-block-cover.has-background-dim.has-background-dim-100::before {
opacity: 1; }
.wp-block-cover-image.components-placeholder,
.wp-block-cover.components-placeholder {
height: inherit; }
[data-align="left"] .wp-block-cover-image,
[data-align="right"] .wp-block-cover-image, .wp-block-cover-image.alignleft, .wp-block-cover-image.alignright, [data-align="left"]
.wp-block-cover,
[data-align="right"]
.wp-block-cover,
.wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
.wp-block-cover.alignleft,
.wp-block-cover.alignright {
max-width: 305px;
width: 100%; }
.wp-block-cover-image::after,
.wp-block-cover::after {
display: block;
content: "";
font-size: 0;
min-height: inherit; }
@supports ((position: -webkit-sticky) or (position: sticky)) {
.wp-block-cover-image::after,
.wp-block-cover::after {
content: none; } }
.wp-block-cover-image.aligncenter, .wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
.wp-block-cover.aligncenter,
.wp-block-cover.alignleft,

File diff suppressed because one or more lines are too long

View File

@ -2369,13 +2369,16 @@ body.is-dragging-components-draggable {
justify-content: space-between;
background: #fff;
align-items: center;
box-sizing: border-box;
height: 56px;
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 10;
margin: 0 -16px 16px; }
@supports (-ms-ime-align: auto) {
.components-modal__header {
position: fixed;
width: 100%; } }
.components-modal__header .components-modal__header-heading {
font-size: 1em;
font-weight: 400; }
@ -2401,6 +2404,9 @@ body.is-dragging-components-draggable {
box-sizing: border-box;
height: 100%;
padding: 0 16px 16px; }
@supports (-ms-ime-align: auto) {
.components-modal__content {
padding-top: 56px; } }
.components-notice {
background-color: #e5f5fa;

File diff suppressed because one or more lines are too long

View File

@ -2369,13 +2369,16 @@ body.is-dragging-components-draggable {
justify-content: space-between;
background: #fff;
align-items: center;
box-sizing: border-box;
height: 56px;
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 10;
margin: 0 -16px 16px; }
@supports (-ms-ime-align: auto) {
.components-modal__header {
position: fixed;
width: 100%; } }
.components-modal__header .components-modal__header-heading {
font-size: 1em;
font-weight: 400; }
@ -2401,6 +2404,9 @@ body.is-dragging-components-draggable {
box-sizing: border-box;
height: 100%;
padding: 0 16px 16px; }
@supports (-ms-ime-align: auto) {
.components-modal__content {
padding-top: 56px; } }
.components-notice {
background-color: #e5f5fa;

File diff suppressed because one or more lines are too long

View File

@ -949,7 +949,8 @@ body.is-fullscreen-mode .components-notice-list {
.edit-post-visual-editor .editor-block-list__block[data-align="full"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar {
width: calc(100% + 30px);
height: 0;
text-align: center; }
text-align: center;
float: right; }
.edit-post-visual-editor .editor-block-list__block[data-align="wide"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar .editor-block-toolbar,
.edit-post-visual-editor .editor-block-list__block[data-align="full"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar .editor-block-toolbar {
max-width: 610px;
@ -958,9 +959,7 @@ body.is-fullscreen-mode .components-notice-list {
.edit-post-visual-editor .editor-block-list__block[data-align="full"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar {
width: 100%;
margin-right: 0;
margin-left: 0; }
.edit-post-visual-editor .editor-block-list__block[data-align="full"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar .editor-block-toolbar {
max-width: 608px; } }
margin-left: 0; } }
@media (min-width: 600px) {
.editor-post-title {

File diff suppressed because one or more lines are too long

View File

@ -949,7 +949,8 @@ body.is-fullscreen-mode .components-notice-list {
.edit-post-visual-editor .editor-block-list__block[data-align="full"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar {
width: calc(100% + 30px);
height: 0;
text-align: center; }
text-align: center;
float: left; }
.edit-post-visual-editor .editor-block-list__block[data-align="wide"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar .editor-block-toolbar,
.edit-post-visual-editor .editor-block-list__block[data-align="full"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar .editor-block-toolbar {
max-width: 610px;
@ -958,9 +959,7 @@ body.is-fullscreen-mode .components-notice-list {
.edit-post-visual-editor .editor-block-list__block[data-align="full"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar {
width: 100%;
margin-left: 0;
margin-right: 0; }
.edit-post-visual-editor .editor-block-list__block[data-align="full"] > .editor-block-list__block-edit > .editor-block-contextual-toolbar .editor-block-toolbar {
max-width: 608px; } }
margin-right: 0; } }
@media (min-width: 600px) {
.editor-post-title {

File diff suppressed because one or more lines are too long

View File

@ -1102,12 +1102,14 @@ body.admin-color-light .editor-block-list__insertion-point-indicator{
display: flex;
height: 60px;
background: #fff; }
.editor-block-styles__item-preview > * {
.editor-block-styles__item-preview .editor-block-preview__content {
transform: scale(0.7);
transform-origin: center center;
font-family: "Noto Serif", serif; }
.editor-block-styles__item-preview .editor-block-preview__content {
width: 100%; }
width: 100%;
margin: 0;
padding: 0;
overflow: visible;
min-height: auto; }
.editor-block-styles__item-label {
text-align: center;
@ -1175,7 +1177,8 @@ body.admin-color-light .editor-block-list__insertion-point-indicator{
outline-offset: -2px; }
.components-popover:not(.is-mobile).editor-block-switcher__popover .components-popover__content {
min-width: 320px; }
min-width: 300px;
max-width: 340px; }
@media (min-width: 782px) {
.editor-block-switcher__popover .components-popover__content {
@ -2292,8 +2295,6 @@ body.admin-color-light .editor-post-text-editor__link{
height: 100%; }
.editor-rich-text__tinymce[data-is-placeholder-visible="true"] > p {
margin-top: 0; }
.editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce {
padding-left: 36px; }
.editor-rich-text__tinymce + .editor-rich-text__tinymce {
pointer-events: none; }
.editor-rich-text__tinymce + .editor-rich-text__tinymce,

File diff suppressed because one or more lines are too long

View File

@ -1114,12 +1114,14 @@ body.admin-color-light .editor-block-list__insertion-point-indicator{
display: flex;
height: 60px;
background: #fff; }
.editor-block-styles__item-preview > * {
.editor-block-styles__item-preview .editor-block-preview__content {
transform: scale(0.7);
transform-origin: center center;
font-family: "Noto Serif", serif; }
.editor-block-styles__item-preview .editor-block-preview__content {
width: 100%; }
width: 100%;
margin: 0;
padding: 0;
overflow: visible;
min-height: auto; }
.editor-block-styles__item-label {
text-align: center;
@ -1187,7 +1189,8 @@ body.admin-color-light .editor-block-list__insertion-point-indicator{
outline-offset: -2px; }
.components-popover:not(.is-mobile).editor-block-switcher__popover .components-popover__content {
min-width: 320px; }
min-width: 300px;
max-width: 340px; }
@media (min-width: 782px) {
.editor-block-switcher__popover .components-popover__content {
@ -2304,8 +2307,6 @@ body.admin-color-light .editor-post-text-editor__link{
height: 100%; }
.editor-rich-text__tinymce[data-is-placeholder-visible="true"] > p {
margin-top: 0; }
.editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce {
padding-right: 36px; }
.editor-rich-text__tinymce + .editor-rich-text__tinymce {
pointer-events: none; }
.editor-rich-text__tinymce + .editor-rich-text__tinymce,

File diff suppressed because one or more lines are too long

View File

@ -8117,7 +8117,7 @@ function (_Component) {
'is-focused': isSelected
});
var isResizable = ['wide', 'full'].indexOf(align) === -1 && isLargeViewport;
var isLinkURLInputDisabled = linkDestination !== LINK_DESTINATION_CUSTOM;
var isLinkURLInputReadOnly = linkDestination !== LINK_DESTINATION_CUSTOM;
var getInspectorControls = function getInspectorControls(imageWidth, imageHeight) {
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_16__["InspectorControls"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_14__["PanelBody"], {
@ -8183,8 +8183,8 @@ function (_Component) {
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__["__"])('Link URL'),
value: href || '',
onChange: _this3.onSetCustomHref,
placeholder: !isLinkURLInputDisabled ? 'https://' : undefined,
disabled: isLinkURLInputDisabled
placeholder: !isLinkURLInputReadOnly ? 'https://' : undefined,
readOnly: isLinkURLInputReadOnly
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_14__["ToggleControl"], {
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_12__["__"])('Open in New Tab'),
onChange: _this3.onSetNewTab,
@ -10320,7 +10320,8 @@ var settings = {
keywords: [Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__["__"])('image'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__["__"])('video')],
attributes: blockAttributes,
supports: {
align: ['wide', 'full']
align: ['wide', 'full'],
html: false
},
transforms: {
from: [{
@ -10562,7 +10563,7 @@ function (_Component) {
var open = _ref.open;
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__["IconButton"], {
className: "components-toolbar__control",
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Edit Media'),
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__["__"])('Edit media'),
icon: "edit",
onClick: open
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9205,7 +9205,8 @@ function (_Component) {
className = _this$props.className,
tooltip = _this$props.tooltip,
shortcut = _this$props.shortcut,
additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["icon", "children", "label", "className", "tooltip", "shortcut"]);
labelPosition = _this$props.labelPosition,
additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["icon", "children", "label", "className", "tooltip", "shortcut", "labelPosition"]);
var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('components-icon-button', className);
var tooltipText = tooltip || label; // Should show the tooltip if...
@ -9227,7 +9228,8 @@ function (_Component) {
if (showTooltip) {
element = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_tooltip__WEBPACK_IMPORTED_MODULE_10__["default"], {
text: tooltipText,
shortcut: shortcut
shortcut: shortcut,
position: labelPosition
}, element);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -590,204 +590,6 @@ function _typeof(obj) {
return _typeof(obj);
}
/***/ }),
/***/ "./node_modules/@wordpress/edit-post/build-module/components/admin-notices/index.js":
/*!******************************************************************************************!*\
!*** ./node_modules/@wordpress/edit-post/build-module/components/admin-notices/index.js ***!
\******************************************************************************************/
/*! exports provided: AdminNotices, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AdminNotices", function() { return AdminNotices; });
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__);
/**
* WordPress dependencies
*/
/**
* Mapping of server-supported notice class names to an equivalent notices
* module status.
*
* @type {Map}
*/
var NOTICE_CLASS_STATUSES = {
'notice-success': 'success',
updated: 'success',
'notice-warning': 'warning',
'notice-error': 'error',
error: 'error',
'notice-info': 'info'
};
/**
* Returns an array of admin notice Elements.
*
* @return {Element[]} Admin notice elements.
*/
function getAdminNotices() {
// The order is reversed to match expectations of rendered order, since a
// NoticesList is itself rendered in reverse order (newest to oldest).
return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__["default"])(document.querySelectorAll('#wpbody-content > .notice')).reverse();
}
/**
* Given an admin notice Element, returns the relevant notice content HTML.
*
* @param {Element} element Admin notice element.
*
* @return {Element} Upgraded notice HTML.
*/
function getNoticeHTML(element) {
var fragments = [];
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = element.childNodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var child = _step.value;
if (child.nodeType !== window.Node.ELEMENT_NODE) {
var value = child.nodeValue.trim();
if (value) {
fragments.push(child.nodeValue);
}
} else if (!child.classList.contains('notice-dismiss')) {
fragments.push(child.outerHTML);
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return fragments.join('');
}
/**
* Given an admin notice Element, returns the upgraded status type, or
* undefined if one cannot be determined (i.e. one is not assigned).
*
* @param {Element} element Admin notice element.
*
* @return {?string} Upgraded status type.
*/
function getNoticeStatus(element) {
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator2 = element.classList[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var className = _step2.value;
if (NOTICE_CLASS_STATUSES.hasOwnProperty(className)) {
return NOTICE_CLASS_STATUSES[className];
}
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
}
var AdminNotices =
/*#__PURE__*/
function (_Component) {
Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(AdminNotices, _Component);
function AdminNotices() {
Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, AdminNotices);
return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(AdminNotices).apply(this, arguments));
}
Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(AdminNotices, [{
key: "componentDidMount",
value: function componentDidMount() {
this.convertNotices();
}
}, {
key: "convertNotices",
value: function convertNotices() {
var createNotice = this.props.createNotice;
getAdminNotices().forEach(function (element) {
// Convert and create.
var status = getNoticeStatus(element);
var content = getNoticeHTML(element);
var isDismissible = element.classList.contains('is-dismissible');
createNotice(status, content, {
speak: false,
__unstableHTML: true,
isDismissible: isDismissible
}); // Remove (now-redundant) admin notice element.
element.parentNode.removeChild(element);
});
}
}, {
key: "render",
value: function render() {
return null;
}
}]);
return AdminNotices;
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]);
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__["withDispatch"])(function (dispatch) {
var _dispatch = dispatch('core/notices'),
createNotice = _dispatch.createNotice;
return {
createNotice: createNotice
};
})(AdminNotices));
/***/ }),
/***/ "./node_modules/@wordpress/edit-post/build-module/components/block-settings-menu/plugin-block-settings-menu-group.js":
@ -1672,6 +1474,7 @@ var MoreMenu = function MoreMenu() {
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["IconButton"], {
icon: "ellipsis",
label: isOpen ? ariaOpen : ariaClosed,
labelPosition: "bottom",
onClick: onToggle,
"aria-expanded": isOpen
});
@ -2603,7 +2406,6 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _sidebar_plugin_post_publish_panel__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../sidebar/plugin-post-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-post-publish-panel/index.js");
/* harmony import */ var _sidebar_plugin_pre_publish_panel__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../sidebar/plugin-pre-publish-panel */ "./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-pre-publish-panel/index.js");
/* harmony import */ var _fullscreen_mode__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../fullscreen-mode */ "./node_modules/@wordpress/edit-post/build-module/components/fullscreen-mode/index.js");
/* harmony import */ var _admin_notices__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../admin-notices */ "./node_modules/@wordpress/edit-post/build-module/components/admin-notices/index.js");
@ -2641,7 +2443,6 @@ __webpack_require__.r(__webpack_exports__);
function Layout(_ref) {
var mode = _ref.mode,
editorSidebarOpened = _ref.editorSidebarOpened,
@ -2668,7 +2469,7 @@ function Layout(_ref) {
};
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
className: className
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_fullscreen_mode__WEBPACK_IMPORTED_MODULE_22__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_browser_url__WEBPACK_IMPORTED_MODULE_10__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["UnsavedChangesWarning"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["AutosaveMonitor"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_admin_notices__WEBPACK_IMPORTED_MODULE_23__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_header__WEBPACK_IMPORTED_MODULE_11__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_fullscreen_mode__WEBPACK_IMPORTED_MODULE_22__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_browser_url__WEBPACK_IMPORTED_MODULE_10__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["UnsavedChangesWarning"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_editor__WEBPACK_IMPORTED_MODULE_5__["AutosaveMonitor"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_header__WEBPACK_IMPORTED_MODULE_11__["default"], null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", {
className: "edit-post-layout__content",
role: "region"
/* translators: accessibility text for the content landmark region. */
@ -4998,16 +4799,16 @@ var SettingsHeader = function SettingsHeader(_ref) {
var blockLabel = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Block');
var _ref2 = sidebarName === 'edit-post/document' ? // translators: ARIA label for the Document Settings sidebar tab, selected.
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Document settings (selected)'), 'is-active'] : // translators: ARIA label for the Document Settings sidebar tab, not selected.
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Document settings'), ''],
var _ref2 = sidebarName === 'edit-post/document' ? // translators: ARIA label for the Document sidebar tab, selected.
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Document (selected)'), 'is-active'] : // translators: ARIA label for the Document sidebar tab, not selected.
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Document'), ''],
_ref3 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref2, 2),
documentAriaLabel = _ref3[0],
documentActiveClass = _ref3[1];
var _ref4 = sidebarName === 'edit-post/block' ? // translators: ARIA label for the Block Settings sidebar tab, selected.
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Block settings (selected)'), 'is-active'] : // translators: ARIA label for the Block Settings sidebar tab, not selected.
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Block settings'), ''],
var _ref4 = sidebarName === 'edit-post/block' ? // translators: ARIA label for the Block sidebar tab, selected.
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Block (selected)'), 'is-active'] : // translators: ARIA label for the Block sidebar tab, not selected.
[Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Block'), ''],
_ref5 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref4, 2),
blockAriaLabel = _ref5[0],
blockActiveClass = _ref5[1];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6538,7 +6538,7 @@ function (_Component) {
return name;
});
var possibleBlockTransformations = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["orderBy"])(Object(lodash__WEBPACK_IMPORTED_MODULE_8__["filter"])(Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_11__["getPossibleBlockTransformations"])(blocks), function (block) {
return !!itemsByName[block.name];
return block && !!itemsByName[block.name];
}), function (block) {
return itemsByName[block.name].frecency;
}, 'desc');
@ -7781,8 +7781,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _item__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./item */ "./node_modules/@wordpress/editor/build-module/components/document-outline/item.js");
/* harmony import */ var _rich_text__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../rich-text */ "./node_modules/@wordpress/editor/build-module/components/rich-text/index.js");
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text");
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _item__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./item */ "./node_modules/@wordpress/editor/build-module/components/document-outline/item.js");
@ -7798,12 +7799,12 @@ __webpack_require__.r(__webpack_exports__);
/**
* Internal dependencies
*/
/**
* Module constants
*/
@ -7892,7 +7893,7 @@ var DocumentOutline = function DocumentOutline(_ref) {
var hasMultipleH1 = countByLevel[1] > 1;
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("div", {
className: "document-outline"
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("ul", null, hasTitle && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_item__WEBPACK_IMPORTED_MODULE_7__["default"], {
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("ul", null, hasTitle && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_item__WEBPACK_IMPORTED_MODULE_8__["default"], {
level: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Title'),
isValid: true,
onClick: focusTitle
@ -7902,7 +7903,7 @@ var DocumentOutline = function DocumentOutline(_ref) {
var isIncorrectLevel = item.level > prevHeadingLevel + 1;
var isValid = !item.isEmpty && !isIncorrectLevel && !!item.level && (item.level !== 1 || !hasMultipleH1 && !hasTitle);
prevHeadingLevel = item.level;
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_item__WEBPACK_IMPORTED_MODULE_7__["default"], {
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_item__WEBPACK_IMPORTED_MODULE_8__["default"], {
key: index,
level: "H".concat(item.level),
isValid: isValid,
@ -7910,10 +7911,9 @@ var DocumentOutline = function DocumentOutline(_ref) {
return onSelectHeading(item.clientId);
},
path: item.path
}, item.isEmpty ? emptyHeadingContent : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_rich_text__WEBPACK_IMPORTED_MODULE_8__["default"].Content, {
tagName: "span",
value: item.attributes.content
}), isIncorrectLevel && incorrectLevelContent, item.level === 1 && hasMultipleH1 && multipleH1Headings, hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings);
}, item.isEmpty ? emptyHeadingContent : Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_7__["getTextContent"])(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_7__["create"])({
html: item.attributes.content
})), isIncorrectLevel && incorrectLevelContent, item.level === 1 && hasMultipleH1 && multipleH1Headings, hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings);
})));
};
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__["withSelect"])(function (select) {
@ -10011,6 +10011,7 @@ var defaultRenderToggle = function defaultRenderToggle(_ref) {
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__["IconButton"], {
icon: "insert",
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Add block'),
labelPosition: "bottom",
onClick: onToggle,
className: "editor-inserter__toggle",
"aria-haspopup": "true",
@ -19889,6 +19890,7 @@ __webpack_require__.r(__webpack_exports__);
var _window = window,
getSelection = _window.getSelection;
var TEXT_NODE = window.Node.TEXT_NODE;
var userAgent = window.navigator.userAgent;
/**
* Zero-width space character used by TinyMCE as a caret landing point for
* inline boundary nodes.
@ -19899,20 +19901,6 @@ var TEXT_NODE = window.Node.TEXT_NODE;
*/
var TINYMCE_ZWSP = "\uFEFF";
/**
* Determines whether we need a fix to provide `input` events for contenteditable.
*
* @param {Element} editorNode The root editor node.
*
* @return {boolean} A boolean indicating whether the fix is needed.
*/
function needsInternetExplorerInputFix(editorNode) {
return (// Rely on userAgent in the absence of a reasonable feature test for contenteditable `input` events.
/Trident/.test(window.navigator.userAgent) && // IE11 dispatches input events for `<input>` and `<textarea>`.
!/input/i.test(editorNode.tagName) && !/textarea/i.test(editorNode.tagName)
);
}
/**
* Applies a fix that provides `input` events for contenteditable in Internet Explorer.
*
@ -19921,7 +19909,6 @@ function needsInternetExplorerInputFix(editorNode) {
* @return {Function} A function to remove the fix (for cleanup).
*/
function applyInternetExplorerInputFix(editorNode) {
/**
* Dispatches `input` events in response to `textinput` events.
@ -19979,6 +19966,13 @@ function applyInternetExplorerInputFix(editorNode) {
}
var IS_PLACEHOLDER_VISIBLE_ATTR_NAME = 'data-is-placeholder-visible';
/**
* Whether or not the user agent is Internet Explorer.
*
* @type {boolean}
*/
var IS_IE = userAgent.indexOf('Trident') >= 0;
var TinyMCE =
/*#__PURE__*/
@ -20130,7 +20124,12 @@ function (_Component) {
editor.shortcuts.remove("access+".concat(number));
}); // Restore the original `setHTML` once initialized.
editor.dom.setHTML = setHTML;
editor.dom.setHTML = setHTML; // In IE11, focus is lost to parent after initialising
// TinyMCE, so we have to set it back.
if (IS_IE && document.activeElement !== _this3.editorNode && document.activeElement.contains(_this3.editorNode)) {
_this3.editorNode.focus();
}
});
editor.on('keydown', _this3.onKeyDown, true);
}
@ -20144,19 +20143,15 @@ function (_Component) {
if (this.props.setRef) {
this.props.setRef(editorNode);
}
/**
* A ref function can be used for cleanup because React calls it with
* `null` when unmounting.
*/
if (this.removeInternetExplorerInputFix) {
this.removeInternetExplorerInputFix();
this.removeInternetExplorerInputFix = null;
}
if (editorNode && needsInternetExplorerInputFix(editorNode)) {
if (IS_IE) {
if (editorNode) {
// Mounting:
this.removeInternetExplorerInputFix = applyInternetExplorerInputFix(editorNode);
} else {
// Unmounting:
this.removeInternetExplorerInputFix();
}
}
}
}, {
@ -20469,6 +20464,7 @@ function TableOfContents(_ref) {
icon: "info-outline",
"aria-expanded": isOpen,
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Content structure'),
labelPosition: "bottom",
disabled: !hasBlocks
});
},
@ -29070,8 +29066,11 @@ function hasSelectedBlock(state) {
function getSelectedBlockClientId(state) {
var _state$blockSelection2 = state.blockSelection,
start = _state$blockSelection2.start,
end = _state$blockSelection2.end;
return start === end && start ? start : null;
end = _state$blockSelection2.end; // We need to check the block exists because the current state.blockSelection reducer
// doesn't take into account the UNDO / REDO actions to update selection.
// To be removed when that's fixed.
return start && start === end && !!state.editor.present.blocks.byClientId[start] ? start : null;
}
/**
* Returns the currently selected block, or null if there is no selected block.
@ -30326,14 +30325,19 @@ function isPermalinkEditable(state) {
*
* @param {Object} state Editor state.
*
* @return {string} The permalink.
* @return {?string} The permalink, or null if the post is not viewable.
*/
function getPermalink(state) {
var _getPermalinkParts = getPermalinkParts(state),
prefix = _getPermalinkParts.prefix,
postName = _getPermalinkParts.postName,
suffix = _getPermalinkParts.suffix;
var permalinkParts = getPermalinkParts(state);
if (!permalinkParts) {
return null;
}
var prefix = permalinkParts.prefix,
postName = permalinkParts.postName,
suffix = permalinkParts.suffix;
if (isPermalinkEditable(state)) {
return prefix + postName + suffix;
@ -30342,15 +30346,22 @@ function getPermalink(state) {
return prefix;
}
/**
* Returns the permalink for a post, split into it's three parts: the prefix, the postName, and the suffix.
* Returns the permalink for a post, split into it's three parts: the prefix,
* the postName, and the suffix.
*
* @param {Object} state Editor state.
*
* @return {Object} The prefix, postName, and suffix for the permalink.
* @return {Object} An object containing the prefix, postName, and suffix for
* the permalink, or null if the post is not viewable.
*/
function getPermalinkParts(state) {
var permalinkTemplate = getEditedPostAttribute(state, 'permalink_template');
if (!permalinkTemplate) {
return null;
}
var postName = getEditedPostAttribute(state, 'slug') || getEditedPostAttribute(state, 'generated_slug');
var _permalinkTemplate$sp = permalinkTemplate.split(PERMALINK_POSTNAME_REGEX),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -210,13 +210,12 @@ function wp_default_packages_scripts( &$scripts ) {
'api-fetch' => '2.2.5',
'a11y' => '2.0.2',
'annotations' => '1.0.3',
'api-fetch' => '2.2.5',
'autop' => '2.0.2',
'blob' => '2.1.0',
'block-library' => '2.2.6',
'block-library' => '2.2.8',
'block-serialization-default-parser' => '2.0.0',
'blocks' => '6.0.2',
'components' => '7.0.1',
'components' => '7.0.3',
'compose' => '3.0.0',
'core-data' => '2.0.14',
'data' => '4.0.1',
@ -224,19 +223,19 @@ function wp_default_packages_scripts( &$scripts ) {
'deprecated' => '2.0.3',
'dom' => '2.0.7',
'dom-ready' => '2.0.2',
'edit-post' => '3.1.1',
'editor' => '9.0.1',
'edit-post' => '3.1.3',
'editor' => '9.0.3',
'element' => '2.1.8',
'escape-html' => '1.0.1',
'format-library' => '1.2.4',
'format-library' => '1.2.6',
'hooks' => '2.0.3',
'html-entities' => '2.0.3',
'i18n' => '3.1.0',
'is-shallow-equal' => '1.1.4',
'keycodes' => '2.0.5',
'list-reusable-blocks' => '1.1.14',
'list-reusable-blocks' => '1.1.16',
'notices' => '1.1.0',
'nux' => '3.0.2',
'nux' => '3.0.4',
'plugins' => '2.0.9',
'redux-routine' => '3.0.3',
'rich-text' => '3.0.2',
@ -277,7 +276,6 @@ function wp_default_packages_scripts( &$scripts ) {
'block-library' => array(
'editor',
'lodash',
'moment',
'wp-api-fetch',
'wp-autop',
'wp-blob',

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-alpha-44272';
$wp_version = '5.1-alpha-44273';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.