Editor: update npm packages with bug fixes and blessed tasks.

Includes miscellaneous bug fixes and enhancements to the Library task (#58579).

Props andrewserong, ramonopoly.
Fixes #58745.

Built from https://develop.svn.wordpress.org/trunk@56205


git-svn-id: http://core.svn.wordpress.org/trunk@55717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
isabel_brison 2023-07-11 06:59:09 +00:00
parent e30391f2bd
commit 9f33966e4e
41 changed files with 1614 additions and 717 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1713,7 +1713,6 @@
'supports' => array( 'supports' => array(
'html' => false, 'html' => false,
'multiple' => false, 'multiple' => false,
'inserter' => false,
'reusable' => false 'reusable' => false
), ),
'style' => 'wp-block-footnotes' 'style' => 'wp-block-footnotes'

View File

@ -35,8 +35,11 @@ function block_core_comment_template_render_comments( $comments, $block ) {
* We set commentId context through the `render_block_context` filter so * We set commentId context through the `render_block_context` filter so
* that dynamically inserted blocks (at `render_block` filter stage) * that dynamically inserted blocks (at `render_block` filter stage)
* will also receive that context. * will also receive that context.
*
* Use an early priority to so that other 'render_block_context' filters
* have access to the values.
*/ */
add_filter( 'render_block_context', $filter_block_context ); add_filter( 'render_block_context', $filter_block_context, 1 );
/* /*
* We construct a new WP_Block instance from the parsed block so that * We construct a new WP_Block instance from the parsed block so that
@ -44,7 +47,7 @@ function block_core_comment_template_render_comments( $comments, $block ) {
*/ */
$block_content = ( new WP_Block( $block->parsed_block ) )->render( array( 'dynamic' => false ) ); $block_content = ( new WP_Block( $block->parsed_block ) )->render( array( 'dynamic' => false ) );
remove_filter( 'render_block_context', $filter_block_context ); remove_filter( 'render_block_context', $filter_block_context, 1 );
$children = $comment->get_children(); $children = $comment->get_children();

View File

@ -11,7 +11,6 @@
"supports": { "supports": {
"html": false, "html": false,
"multiple": false, "multiple": false,
"inserter": false,
"reusable": false "reusable": false
}, },
"style": "wp-block-footnotes" "style": "wp-block-footnotes"

View File

@ -2,15 +2,16 @@
counter-reset:footnotes; counter-reset:footnotes;
} }
[data-fn].fn{ a[data-fn].fn{
counter-increment:footnotes; counter-increment:footnotes;
display:inline-block; display:inline-flex;
font-size:smaller; font-size:smaller;
text-decoration:none;
text-indent:-9999999px; text-indent:-9999999px;
vertical-align:super; vertical-align:super;
} }
[data-fn].fn:after{ a[data-fn].fn:after{
content:"[" counter(footnotes) "]"; content:"[" counter(footnotes) "]";
float:right; float:right;
text-indent:0; text-indent:0;

View File

@ -1 +1 @@
.editor-styles-wrapper,.entry-content{counter-reset:footnotes}[data-fn].fn{counter-increment:footnotes;display:inline-block;font-size:smaller;text-indent:-9999999px;vertical-align:super}[data-fn].fn:after{content:"[" counter(footnotes) "]";float:right;text-indent:0} .editor-styles-wrapper,.entry-content{counter-reset:footnotes}a[data-fn].fn{counter-increment:footnotes;display:inline-flex;font-size:smaller;text-decoration:none;text-indent:-9999999px;vertical-align:super}a[data-fn].fn:after{content:"[" counter(footnotes) "]";float:right;text-indent:0}

View File

@ -2,15 +2,16 @@
counter-reset:footnotes; counter-reset:footnotes;
} }
[data-fn].fn{ a[data-fn].fn{
counter-increment:footnotes; counter-increment:footnotes;
display:inline-block; display:inline-flex;
font-size:smaller; font-size:smaller;
text-decoration:none;
text-indent:-9999999px; text-indent:-9999999px;
vertical-align:super; vertical-align:super;
} }
[data-fn].fn:after{ a[data-fn].fn:after{
content:"[" counter(footnotes) "]"; content:"[" counter(footnotes) "]";
float:left; float:left;
text-indent:0; text-indent:0;

View File

@ -1 +1 @@
.editor-styles-wrapper,.entry-content{counter-reset:footnotes}[data-fn].fn{counter-increment:footnotes;display:inline-block;font-size:smaller;text-indent:-9999999px;vertical-align:super}[data-fn].fn:after{content:"[" counter(footnotes) "]";float:left;text-indent:0} .editor-styles-wrapper,.entry-content{counter-reset:footnotes}a[data-fn].fn{counter-increment:footnotes;display:inline-flex;font-size:smaller;text-decoration:none;text-indent:-9999999px;vertical-align:super}a[data-fn].fn:after{content:"[" counter(footnotes) "]";float:left;text-indent:0}

View File

@ -97,11 +97,13 @@ function render_block_core_post_template( $attributes, $content, $block ) {
$context['postId'] = $post_id; $context['postId'] = $post_id;
return $context; return $context;
}; };
add_filter( 'render_block_context', $filter_block_context );
// Use an early priority to so that other 'render_block_context' filters have access to the values.
add_filter( 'render_block_context', $filter_block_context, 1 );
// Render the inner blocks of the Post Template block with `dynamic` set to `false` to prevent calling // Render the inner blocks of the Post Template block with `dynamic` set to `false` to prevent calling
// `render_callback` and ensure that no wrapper markup is included. // `render_callback` and ensure that no wrapper markup is included.
$block_content = ( new WP_Block( $block_instance ) )->render( array( 'dynamic' => false ) ); $block_content = ( new WP_Block( $block_instance ) )->render( array( 'dynamic' => false ) );
remove_filter( 'render_block_context', $filter_block_context ); remove_filter( 'render_block_context', $filter_block_context, 1 );
// Wrap the render inner blocks in a `li` element with the appropriate post classes. // Wrap the render inner blocks in a `li` element with the appropriate post classes.
$post_classes = implode( ' ', get_post_class( 'wp-block-post' ) ); $post_classes = implode( ' ', get_post_class( 'wp-block-post' ) );

View File

@ -3227,15 +3227,16 @@ pre.wp-block-verse{
counter-reset:footnotes; counter-reset:footnotes;
} }
[data-fn].fn{ a[data-fn].fn{
counter-increment:footnotes; counter-increment:footnotes;
display:inline-block; display:inline-flex;
font-size:smaller; font-size:smaller;
text-decoration:none;
text-indent:-9999999px; text-indent:-9999999px;
vertical-align:super; vertical-align:super;
} }
[data-fn].fn:after{ a[data-fn].fn:after{
content:"[" counter(footnotes) "]"; content:"[" counter(footnotes) "]";
float:right; float:right;
text-indent:0; text-indent:0;

File diff suppressed because one or more lines are too long

View File

@ -3227,15 +3227,16 @@ pre.wp-block-verse{
counter-reset:footnotes; counter-reset:footnotes;
} }
[data-fn].fn{ a[data-fn].fn{
counter-increment:footnotes; counter-increment:footnotes;
display:inline-block; display:inline-flex;
font-size:smaller; font-size:smaller;
text-decoration:none;
text-indent:-9999999px; text-indent:-9999999px;
vertical-align:super; vertical-align:super;
} }
[data-fn].fn:after{ a[data-fn].fn:after{
content:"[" counter(footnotes) "]"; content:"[" counter(footnotes) "]";
float:left; float:left;
text-indent:0; text-indent:0;

File diff suppressed because one or more lines are too long

View File

@ -1689,27 +1689,26 @@ h2.edit-post-template-summary__title{
opacity:1; opacity:1;
} }
} }
body.js.block-editor-page{
body.block-editor-page,html.wp-toolbar{
background:#fff; background:#fff;
} }
body.block-editor-page #wpcontent{ body.js.block-editor-page #wpcontent{
padding-right:0; padding-right:0;
} }
body.block-editor-page #wpbody-content{ body.js.block-editor-page #wpbody-content{
padding-bottom:0; padding-bottom:0;
} }
body.block-editor-page #wpbody-content>div:not(.block-editor):not(#screen-meta),body.block-editor-page #wpfooter{ body.js.block-editor-page #wpbody-content>div:not(.block-editor):not(#screen-meta),body.js.block-editor-page #wpfooter{
display:none; display:none;
} }
body.block-editor-page .a11y-speak-region{ body.js.block-editor-page .a11y-speak-region{
right:-1px; right:-1px;
top:-1px; top:-1px;
} }
body.block-editor-page ul#adminmenu a.wp-has-current-submenu:after,body.block-editor-page ul#adminmenu>li.current>a.current:after{ body.js.block-editor-page ul#adminmenu a.wp-has-current-submenu:after,body.js.block-editor-page ul#adminmenu>li.current>a.current:after{
border-left-color:#fff; border-left-color:#fff;
} }
body.block-editor-page .media-frame select.attachment-filters:last-of-type{ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type{
max-width:100%; max-width:100%;
width:auto; width:auto;
} }

File diff suppressed because one or more lines are too long

View File

@ -1689,27 +1689,26 @@ h2.edit-post-template-summary__title{
opacity:1; opacity:1;
} }
} }
body.js.block-editor-page{
body.block-editor-page,html.wp-toolbar{
background:#fff; background:#fff;
} }
body.block-editor-page #wpcontent{ body.js.block-editor-page #wpcontent{
padding-left:0; padding-left:0;
} }
body.block-editor-page #wpbody-content{ body.js.block-editor-page #wpbody-content{
padding-bottom:0; padding-bottom:0;
} }
body.block-editor-page #wpbody-content>div:not(.block-editor):not(#screen-meta),body.block-editor-page #wpfooter{ body.js.block-editor-page #wpbody-content>div:not(.block-editor):not(#screen-meta),body.js.block-editor-page #wpfooter{
display:none; display:none;
} }
body.block-editor-page .a11y-speak-region{ body.js.block-editor-page .a11y-speak-region{
left:-1px; left:-1px;
top:-1px; top:-1px;
} }
body.block-editor-page ul#adminmenu a.wp-has-current-submenu:after,body.block-editor-page ul#adminmenu>li.current>a.current:after{ body.js.block-editor-page ul#adminmenu a.wp-has-current-submenu:after,body.js.block-editor-page ul#adminmenu>li.current>a.current:after{
border-right-color:#fff; border-right-color:#fff;
} }
body.block-editor-page .media-frame select.attachment-filters:last-of-type{ body.js.block-editor-page .media-frame select.attachment-filters:last-of-type{
max-width:100%; max-width:100%;
width:auto; width:auto;
} }

File diff suppressed because one or more lines are too long

View File

@ -1327,6 +1327,9 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
grid-column:2 / 3; grid-column:2 / 3;
overflow:hidden; overflow:hidden;
} }
.edit-site-document-actions__title .block-editor-block-icon{
min-width:24px;
}
.edit-site-document-actions__title h1{ .edit-site-document-actions__title h1{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
overflow:hidden; overflow:hidden;
@ -1615,9 +1618,17 @@ body.is-fullscreen-mode .edit-site-list-header{
} }
.edit-site-patterns{ .edit-site-patterns{
background:rgba(0,0,0,.05); background:rgba(0,0,0,.15);
margin:60px 0 0; margin:60px 0 0;
} }
.edit-site-patterns .components-base-control{
width:100%;
}
@media (min-width:782px){
.edit-site-patterns .components-base-control{
width:auto;
}
}
.edit-site-patterns .components-text{ .edit-site-patterns .components-text{
color:#949494; color:#949494;
} }
@ -1629,35 +1640,82 @@ body.is-fullscreen-mode .edit-site-list-header{
margin:0; margin:0;
} }
} }
.edit-site-patterns .edit-site-patterns__search-block{
flex-grow:1;
min-width:-moz-fit-content;
min-width:fit-content;
}
.edit-site-patterns .edit-site-patterns__search input[type=search]{
background:#2f2f2f;
color:#e0e0e0;
height:40px;
}
.edit-site-patterns .edit-site-patterns__search input[type=search]:focus{
background:#2f2f2f;
}
.edit-site-patterns .edit-site-patterns__search svg{
fill:#949494;
}
.edit-site-patterns .edit-site-patterns__sync-status-filter{
background:#2f2f2f;
border:none;
height:40px;
max-width:100%;
min-width:max-content;
width:100%;
}
@media (min-width:782px){
.edit-site-patterns .edit-site-patterns__sync-status-filter{
width:300px;
}
}
.edit-site-patterns .edit-site-patterns__sync-status-filter-option:active{
background:#757575;
color:#f0f0f0;
}
.edit-site-patterns__section-header .screen-reader-shortcut:focus{
top:0;
}
.edit-site-patterns__grid{ .edit-site-patterns__grid{
column-gap:24px; display:grid;
gap:32px;
grid-template-columns:1fr;
margin-bottom:32px; margin-bottom:32px;
padding-top:2px; padding-top:2px;
} }
@media (min-width:960px){ @media (min-width:960px){
.edit-site-patterns__grid{ .edit-site-patterns__grid{
column-count:2; grid-template-columns:1fr 1fr;
} }
} }
.edit-site-patterns__grid .edit-site-patterns__pattern{ .edit-site-patterns__grid .edit-site-patterns__pattern{
break-inside:avoid-column; break-inside:avoid-column;
display:flex; display:flex;
flex-direction:column; flex-direction:column;
margin-bottom:48px;
} }
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview{ .edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview{
border-radius:2px; background-color:unset;
border:none;
border-radius:4px;
box-shadow:none;
box-sizing:border-box;
cursor:pointer; cursor:pointer;
overflow:hidden; overflow:hidden;
padding:0;
} }
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview:focus{ .edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview:focus{
box-shadow:inset 0 0 0 2px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); box-shadow:inset 0 0 0 0 #fff, 0 0 0 2px var(--wp-admin-theme-color);
outline:2px solid transparent; outline:2px solid transparent;
} }
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive{ .edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive{
cursor:default; cursor:default;
} }
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive:focus{
box-shadow:0 0 0 var(--wp-admin-border-width-focus) #2f2f2f;
opacity:.8;
}
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__button,.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__footer{ .edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__button,.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__footer{
color:#949494; color:#949494;
} }
@ -1673,23 +1731,23 @@ body.is-fullscreen-mode .edit-site-list-header{
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
} }
.edit-site-patterns__grid .edit-site-patterns__preview{ .edit-site-patterns__grid .edit-site-patterns__preview{
flex:1; flex:0 1 auto;
margin-bottom:16px; margin-bottom:16px;
} }
.edit-site-patterns__search.edit-site-patterns__search input[type=search]{ .edit-site-patterns__load-more{
background:#2f2f2f; align-self:center;
color:#e0e0e0;
}
.edit-site-patterns__search.edit-site-patterns__search input[type=search]:focus{
background:#2f2f2f;
}
.edit-site-patterns__search svg{
fill:#949494;
} }
.edit-site-patterns__pattern-title{ .edit-site-patterns__pattern-title{
color:#949494; color:#e0e0e0;
}
.edit-site-patterns__pattern-title .is-link{
color:#e0e0e0;
text-decoration:none;
}
.edit-site-patterns__pattern-title .is-link:focus,.edit-site-patterns__pattern-title .is-link:hover{
color:#fff;
} }
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-icon{ .edit-site-patterns__pattern-title .edit-site-patterns__pattern-icon{
fill:#fff; fill:#fff;
@ -1699,6 +1757,9 @@ body.is-fullscreen-mode .edit-site-list-header{
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon{ .edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon{
display:inline-flex; display:inline-flex;
} }
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon svg{
fill:currentcolor;
}
.edit-site-patterns__no-results{ .edit-site-patterns__no-results{
color:#949494; color:#949494;
@ -2989,9 +3050,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
} }
.edit-site-sidebar-navigation-screen-patterns__group{ .edit-site-sidebar-navigation-screen-patterns__group{
border-bottom:1px solid #2f2f2f;
margin-bottom:32px; margin-bottom:32px;
padding-bottom:24px;
} }
.edit-site-sidebar-navigation-screen-patterns__group:first-of-type,.edit-site-sidebar-navigation-screen-patterns__group:last-of-type{ .edit-site-sidebar-navigation-screen-patterns__group:first-of-type,.edit-site-sidebar-navigation-screen-patterns__group:last-of-type{
border-bottom:0; border-bottom:0;
@ -3318,39 +3377,39 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
width:100%; width:100%;
} }
html #wpadminbar{ body.js #wpadminbar{
display:none; display:none;
} }
html #wpbody,html.wp-toolbar{ body.js #wpbody{
padding-top:0; padding-top:0;
} }
body.appearance_page_gutenberg-template-parts,body.site-editor-php,html.wp-toolbar{ body.js.appearance_page_gutenberg-template-parts,body.js.site-editor-php{
background:#fff; background:#fff;
} }
body.appearance_page_gutenberg-template-parts #wpcontent,body.site-editor-php #wpcontent{ body.js.appearance_page_gutenberg-template-parts #wpcontent,body.js.site-editor-php #wpcontent{
padding-right:0; padding-right:0;
} }
body.appearance_page_gutenberg-template-parts #wpbody-content,body.site-editor-php #wpbody-content{ body.js.appearance_page_gutenberg-template-parts #wpbody-content,body.js.site-editor-php #wpbody-content{
padding-bottom:0; padding-bottom:0;
} }
body.appearance_page_gutenberg-template-parts #wpbody-content>div:not(.edit-site):not(#screen-meta),body.appearance_page_gutenberg-template-parts #wpfooter,body.site-editor-php #wpbody-content>div:not(.edit-site):not(#screen-meta),body.site-editor-php #wpfooter{ body.js.appearance_page_gutenberg-template-parts #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.appearance_page_gutenberg-template-parts #wpfooter,body.js.site-editor-php #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.site-editor-php #wpfooter{
display:none; display:none;
} }
body.appearance_page_gutenberg-template-parts .a11y-speak-region,body.site-editor-php .a11y-speak-region{ body.js.appearance_page_gutenberg-template-parts .a11y-speak-region,body.js.site-editor-php .a11y-speak-region{
right:-1px; right:-1px;
top:-1px; top:-1px;
} }
body.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu:after,body.appearance_page_gutenberg-template-parts ul#adminmenu>li.current>a.current:after,body.site-editor-php ul#adminmenu a.wp-has-current-submenu:after,body.site-editor-php ul#adminmenu>li.current>a.current:after{ body.js.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu:after,body.js.appearance_page_gutenberg-template-parts ul#adminmenu>li.current>a.current:after,body.js.site-editor-php ul#adminmenu a.wp-has-current-submenu:after,body.js.site-editor-php ul#adminmenu>li.current>a.current:after{
border-left-color:#fff; border-left-color:#fff;
} }
body.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,body.site-editor-php .media-frame select.attachment-filters:last-of-type{ body.js.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,body.js.site-editor-php .media-frame select.attachment-filters:last-of-type{
max-width:100%; max-width:100%;
width:auto; width:auto;
} }
body.site-editor-php{ body.js.site-editor-php{
background:#1e1e1e; background:#1e1e1e;
} }
@ -3374,6 +3433,10 @@ body.site-editor-php{
top:0; top:0;
} }
} }
.no-js .edit-site{
min-height:0;
position:static;
}
.edit-site .interface-interface-skeleton{ .edit-site .interface-interface-skeleton{
top:0; top:0;
} }

File diff suppressed because one or more lines are too long

View File

@ -1327,6 +1327,9 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
grid-column:2 / 3; grid-column:2 / 3;
overflow:hidden; overflow:hidden;
} }
.edit-site-document-actions__title .block-editor-block-icon{
min-width:24px;
}
.edit-site-document-actions__title h1{ .edit-site-document-actions__title h1{
color:var(--wp-block-synced-color); color:var(--wp-block-synced-color);
overflow:hidden; overflow:hidden;
@ -1615,9 +1618,17 @@ body.is-fullscreen-mode .edit-site-list-header{
} }
.edit-site-patterns{ .edit-site-patterns{
background:rgba(0,0,0,.05); background:rgba(0,0,0,.15);
margin:60px 0 0; margin:60px 0 0;
} }
.edit-site-patterns .components-base-control{
width:100%;
}
@media (min-width:782px){
.edit-site-patterns .components-base-control{
width:auto;
}
}
.edit-site-patterns .components-text{ .edit-site-patterns .components-text{
color:#949494; color:#949494;
} }
@ -1629,35 +1640,82 @@ body.is-fullscreen-mode .edit-site-list-header{
margin:0; margin:0;
} }
} }
.edit-site-patterns .edit-site-patterns__search-block{
flex-grow:1;
min-width:-moz-fit-content;
min-width:fit-content;
}
.edit-site-patterns .edit-site-patterns__search input[type=search]{
background:#2f2f2f;
color:#e0e0e0;
height:40px;
}
.edit-site-patterns .edit-site-patterns__search input[type=search]:focus{
background:#2f2f2f;
}
.edit-site-patterns .edit-site-patterns__search svg{
fill:#949494;
}
.edit-site-patterns .edit-site-patterns__sync-status-filter{
background:#2f2f2f;
border:none;
height:40px;
max-width:100%;
min-width:max-content;
width:100%;
}
@media (min-width:782px){
.edit-site-patterns .edit-site-patterns__sync-status-filter{
width:300px;
}
}
.edit-site-patterns .edit-site-patterns__sync-status-filter-option:active{
background:#757575;
color:#f0f0f0;
}
.edit-site-patterns__section-header .screen-reader-shortcut:focus{
top:0;
}
.edit-site-patterns__grid{ .edit-site-patterns__grid{
column-gap:24px; display:grid;
gap:32px;
grid-template-columns:1fr;
margin-bottom:32px; margin-bottom:32px;
padding-top:2px; padding-top:2px;
} }
@media (min-width:960px){ @media (min-width:960px){
.edit-site-patterns__grid{ .edit-site-patterns__grid{
column-count:2; grid-template-columns:1fr 1fr;
} }
} }
.edit-site-patterns__grid .edit-site-patterns__pattern{ .edit-site-patterns__grid .edit-site-patterns__pattern{
break-inside:avoid-column; break-inside:avoid-column;
display:flex; display:flex;
flex-direction:column; flex-direction:column;
margin-bottom:48px;
} }
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview{ .edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview{
border-radius:2px; background-color:unset;
border:none;
border-radius:4px;
box-shadow:none;
box-sizing:border-box;
cursor:pointer; cursor:pointer;
overflow:hidden; overflow:hidden;
padding:0;
} }
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview:focus{ .edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview:focus{
box-shadow:inset 0 0 0 2px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); box-shadow:inset 0 0 0 0 #fff, 0 0 0 2px var(--wp-admin-theme-color);
outline:2px solid transparent; outline:2px solid transparent;
} }
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive{ .edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive{
cursor:default; cursor:default;
} }
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive:focus{
box-shadow:0 0 0 var(--wp-admin-border-width-focus) #2f2f2f;
opacity:.8;
}
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__button,.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__footer{ .edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__button,.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__footer{
color:#949494; color:#949494;
} }
@ -1673,23 +1731,23 @@ body.is-fullscreen-mode .edit-site-list-header{
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
} }
.edit-site-patterns__grid .edit-site-patterns__preview{ .edit-site-patterns__grid .edit-site-patterns__preview{
flex:1; flex:0 1 auto;
margin-bottom:16px; margin-bottom:16px;
} }
.edit-site-patterns__search.edit-site-patterns__search input[type=search]{ .edit-site-patterns__load-more{
background:#2f2f2f; align-self:center;
color:#e0e0e0;
}
.edit-site-patterns__search.edit-site-patterns__search input[type=search]:focus{
background:#2f2f2f;
}
.edit-site-patterns__search svg{
fill:#949494;
} }
.edit-site-patterns__pattern-title{ .edit-site-patterns__pattern-title{
color:#949494; color:#e0e0e0;
}
.edit-site-patterns__pattern-title .is-link{
color:#e0e0e0;
text-decoration:none;
}
.edit-site-patterns__pattern-title .is-link:focus,.edit-site-patterns__pattern-title .is-link:hover{
color:#fff;
} }
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-icon{ .edit-site-patterns__pattern-title .edit-site-patterns__pattern-icon{
fill:#fff; fill:#fff;
@ -1699,6 +1757,9 @@ body.is-fullscreen-mode .edit-site-list-header{
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon{ .edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon{
display:inline-flex; display:inline-flex;
} }
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon svg{
fill:currentcolor;
}
.edit-site-patterns__no-results{ .edit-site-patterns__no-results{
color:#949494; color:#949494;
@ -2989,9 +3050,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
} }
.edit-site-sidebar-navigation-screen-patterns__group{ .edit-site-sidebar-navigation-screen-patterns__group{
border-bottom:1px solid #2f2f2f;
margin-bottom:32px; margin-bottom:32px;
padding-bottom:24px;
} }
.edit-site-sidebar-navigation-screen-patterns__group:first-of-type,.edit-site-sidebar-navigation-screen-patterns__group:last-of-type{ .edit-site-sidebar-navigation-screen-patterns__group:first-of-type,.edit-site-sidebar-navigation-screen-patterns__group:last-of-type{
border-bottom:0; border-bottom:0;
@ -3318,39 +3377,39 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
width:100%; width:100%;
} }
html #wpadminbar{ body.js #wpadminbar{
display:none; display:none;
} }
html #wpbody,html.wp-toolbar{ body.js #wpbody{
padding-top:0; padding-top:0;
} }
body.appearance_page_gutenberg-template-parts,body.site-editor-php,html.wp-toolbar{ body.js.appearance_page_gutenberg-template-parts,body.js.site-editor-php{
background:#fff; background:#fff;
} }
body.appearance_page_gutenberg-template-parts #wpcontent,body.site-editor-php #wpcontent{ body.js.appearance_page_gutenberg-template-parts #wpcontent,body.js.site-editor-php #wpcontent{
padding-left:0; padding-left:0;
} }
body.appearance_page_gutenberg-template-parts #wpbody-content,body.site-editor-php #wpbody-content{ body.js.appearance_page_gutenberg-template-parts #wpbody-content,body.js.site-editor-php #wpbody-content{
padding-bottom:0; padding-bottom:0;
} }
body.appearance_page_gutenberg-template-parts #wpbody-content>div:not(.edit-site):not(#screen-meta),body.appearance_page_gutenberg-template-parts #wpfooter,body.site-editor-php #wpbody-content>div:not(.edit-site):not(#screen-meta),body.site-editor-php #wpfooter{ body.js.appearance_page_gutenberg-template-parts #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.appearance_page_gutenberg-template-parts #wpfooter,body.js.site-editor-php #wpbody-content>div:not(.edit-site):not(#screen-meta),body.js.site-editor-php #wpfooter{
display:none; display:none;
} }
body.appearance_page_gutenberg-template-parts .a11y-speak-region,body.site-editor-php .a11y-speak-region{ body.js.appearance_page_gutenberg-template-parts .a11y-speak-region,body.js.site-editor-php .a11y-speak-region{
left:-1px; left:-1px;
top:-1px; top:-1px;
} }
body.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu:after,body.appearance_page_gutenberg-template-parts ul#adminmenu>li.current>a.current:after,body.site-editor-php ul#adminmenu a.wp-has-current-submenu:after,body.site-editor-php ul#adminmenu>li.current>a.current:after{ body.js.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu:after,body.js.appearance_page_gutenberg-template-parts ul#adminmenu>li.current>a.current:after,body.js.site-editor-php ul#adminmenu a.wp-has-current-submenu:after,body.js.site-editor-php ul#adminmenu>li.current>a.current:after{
border-right-color:#fff; border-right-color:#fff;
} }
body.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,body.site-editor-php .media-frame select.attachment-filters:last-of-type{ body.js.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,body.js.site-editor-php .media-frame select.attachment-filters:last-of-type{
max-width:100%; max-width:100%;
width:auto; width:auto;
} }
body.site-editor-php{ body.js.site-editor-php{
background:#1e1e1e; background:#1e1e1e;
} }
@ -3374,6 +3433,10 @@ body.site-editor-php{
top:0; top:0;
} }
} }
.no-js .edit-site{
min-height:0;
position:static;
}
.edit-site .interface-interface-skeleton{ .edit-site .interface-interface-skeleton{
top:0; top:0;
} }

File diff suppressed because one or more lines are too long

View File

@ -894,26 +894,26 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar{
padding-right:16px; padding-right:16px;
} }
body.appearance_page_gutenberg-widgets,body.widgets-php,html.wp-toolbar{ body.js.appearance_page_gutenberg-widgets,body.js.widgets-php{
background:#fff; background:#fff;
} }
body.appearance_page_gutenberg-widgets #wpcontent,body.widgets-php #wpcontent{ body.js.appearance_page_gutenberg-widgets #wpcontent,body.js.widgets-php #wpcontent{
padding-right:0; padding-right:0;
} }
body.appearance_page_gutenberg-widgets #wpbody-content,body.widgets-php #wpbody-content{ body.js.appearance_page_gutenberg-widgets #wpbody-content,body.js.widgets-php #wpbody-content{
padding-bottom:0; padding-bottom:0;
} }
body.appearance_page_gutenberg-widgets #wpbody-content>div:not(.blocks-widgets-container):not(#screen-meta),body.appearance_page_gutenberg-widgets #wpfooter,body.widgets-php #wpbody-content>div:not(.blocks-widgets-container):not(#screen-meta),body.widgets-php #wpfooter{ body.js.appearance_page_gutenberg-widgets #wpbody-content>div:not(.blocks-widgets-container):not(#screen-meta),body.js.appearance_page_gutenberg-widgets #wpfooter,body.js.widgets-php #wpbody-content>div:not(.blocks-widgets-container):not(#screen-meta),body.js.widgets-php #wpfooter{
display:none; display:none;
} }
body.appearance_page_gutenberg-widgets .a11y-speak-region,body.widgets-php .a11y-speak-region{ body.js.appearance_page_gutenberg-widgets .a11y-speak-region,body.js.widgets-php .a11y-speak-region{
right:-1px; right:-1px;
top:-1px; top:-1px;
} }
body.appearance_page_gutenberg-widgets ul#adminmenu a.wp-has-current-submenu:after,body.appearance_page_gutenberg-widgets ul#adminmenu>li.current>a.current:after,body.widgets-php ul#adminmenu a.wp-has-current-submenu:after,body.widgets-php ul#adminmenu>li.current>a.current:after{ body.js.appearance_page_gutenberg-widgets ul#adminmenu a.wp-has-current-submenu:after,body.js.appearance_page_gutenberg-widgets ul#adminmenu>li.current>a.current:after,body.js.widgets-php ul#adminmenu a.wp-has-current-submenu:after,body.js.widgets-php ul#adminmenu>li.current>a.current:after{
border-left-color:#fff; border-left-color:#fff;
} }
body.appearance_page_gutenberg-widgets .media-frame select.attachment-filters:last-of-type,body.widgets-php .media-frame select.attachment-filters:last-of-type{ body.js.appearance_page_gutenberg-widgets .media-frame select.attachment-filters:last-of-type,body.js.widgets-php .media-frame select.attachment-filters:last-of-type{
max-width:100%; max-width:100%;
width:auto; width:auto;
} }

File diff suppressed because one or more lines are too long

View File

@ -894,26 +894,26 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar{
padding-right:4px; padding-right:4px;
} }
body.appearance_page_gutenberg-widgets,body.widgets-php,html.wp-toolbar{ body.js.appearance_page_gutenberg-widgets,body.js.widgets-php{
background:#fff; background:#fff;
} }
body.appearance_page_gutenberg-widgets #wpcontent,body.widgets-php #wpcontent{ body.js.appearance_page_gutenberg-widgets #wpcontent,body.js.widgets-php #wpcontent{
padding-left:0; padding-left:0;
} }
body.appearance_page_gutenberg-widgets #wpbody-content,body.widgets-php #wpbody-content{ body.js.appearance_page_gutenberg-widgets #wpbody-content,body.js.widgets-php #wpbody-content{
padding-bottom:0; padding-bottom:0;
} }
body.appearance_page_gutenberg-widgets #wpbody-content>div:not(.blocks-widgets-container):not(#screen-meta),body.appearance_page_gutenberg-widgets #wpfooter,body.widgets-php #wpbody-content>div:not(.blocks-widgets-container):not(#screen-meta),body.widgets-php #wpfooter{ body.js.appearance_page_gutenberg-widgets #wpbody-content>div:not(.blocks-widgets-container):not(#screen-meta),body.js.appearance_page_gutenberg-widgets #wpfooter,body.js.widgets-php #wpbody-content>div:not(.blocks-widgets-container):not(#screen-meta),body.js.widgets-php #wpfooter{
display:none; display:none;
} }
body.appearance_page_gutenberg-widgets .a11y-speak-region,body.widgets-php .a11y-speak-region{ body.js.appearance_page_gutenberg-widgets .a11y-speak-region,body.js.widgets-php .a11y-speak-region{
left:-1px; left:-1px;
top:-1px; top:-1px;
} }
body.appearance_page_gutenberg-widgets ul#adminmenu a.wp-has-current-submenu:after,body.appearance_page_gutenberg-widgets ul#adminmenu>li.current>a.current:after,body.widgets-php ul#adminmenu a.wp-has-current-submenu:after,body.widgets-php ul#adminmenu>li.current>a.current:after{ body.js.appearance_page_gutenberg-widgets ul#adminmenu a.wp-has-current-submenu:after,body.js.appearance_page_gutenberg-widgets ul#adminmenu>li.current>a.current:after,body.js.widgets-php ul#adminmenu a.wp-has-current-submenu:after,body.js.widgets-php ul#adminmenu>li.current>a.current:after{
border-right-color:#fff; border-right-color:#fff;
} }
body.appearance_page_gutenberg-widgets .media-frame select.attachment-filters:last-of-type,body.widgets-php .media-frame select.attachment-filters:last-of-type{ body.js.appearance_page_gutenberg-widgets .media-frame select.attachment-filters:last-of-type,body.js.widgets-php .media-frame select.attachment-filters:last-of-type{
max-width:100%; max-width:100%;
width:auto; width:auto;
} }

File diff suppressed because one or more lines are too long

View File

@ -25176,36 +25176,6 @@ function bubbleEvents(doc) {
} }
} }
function useParsedAssets(html) {
return (0,external_wp_element_namespaceObject.useMemo)(() => {
const doc = document.implementation.createHTMLDocument('');
doc.body.innerHTML = html;
return Array.from(doc.body.children);
}, [html]);
}
async function loadScript(head, {
id,
src
}) {
return new Promise((resolve, reject) => {
const script = head.ownerDocument.createElement('script');
script.id = id;
if (src) {
script.src = src;
script.onload = () => resolve();
script.onerror = () => reject();
} else {
resolve();
}
head.appendChild(script);
});
}
function Iframe({ function Iframe({
contentRef, contentRef,
children, children,
@ -25217,20 +25187,23 @@ function Iframe({
forwardedRef: ref, forwardedRef: ref,
...props ...props
}) { }) {
var _assets$styles; const {
styles = '',
const assets = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getSettings().__unstableResolvedAssets, []); scripts = ''
const [, forceRender] = (0,external_wp_element_namespaceObject.useReducer)(() => ({})); } = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getSettings().__unstableResolvedAssets, []);
const [iframeDocument, setIframeDocument] = (0,external_wp_element_namespaceObject.useState)(); const [iframeDocument, setIframeDocument] = (0,external_wp_element_namespaceObject.useState)();
const [bodyClasses, setBodyClasses] = (0,external_wp_element_namespaceObject.useState)([]); const [bodyClasses, setBodyClasses] = (0,external_wp_element_namespaceObject.useState)([]);
const compatStyles = useCompatibilityStyles(); const compatStyles = useCompatibilityStyles();
const scripts = useParsedAssets(assets?.scripts);
const clearerRef = useBlockSelectionClearer(); const clearerRef = useBlockSelectionClearer();
const [before, writingFlowRef, after] = useWritingFlow(); const [before, writingFlowRef, after] = useWritingFlow();
const [contentResizeListener, { const [contentResizeListener, {
height: contentHeight height: contentHeight
}] = (0,external_wp_compose_namespaceObject.useResizeObserver)(); }] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
const setRef = (0,external_wp_compose_namespaceObject.useRefEffect)(node => { const setRef = (0,external_wp_compose_namespaceObject.useRefEffect)(node => {
node._load = () => {
setIframeDocument(node.contentDocument);
};
let iFrameDocument; // Prevent the default browser action for files dropped outside of dropzones. let iFrameDocument; // Prevent the default browser action for files dropped outside of dropzones.
function preventFileDropDefault(event) { function preventFileDropDefault(event) {
@ -25247,14 +25220,12 @@ function Iframe({
} = contentDocument; } = contentDocument;
iFrameDocument = contentDocument; iFrameDocument = contentDocument;
bubbleEvents(contentDocument); bubbleEvents(contentDocument);
setIframeDocument(contentDocument);
clearerRef(documentElement); // Ideally ALL classes that are added through get_body_class should clearerRef(documentElement); // Ideally ALL classes that are added through get_body_class should
// be added in the editor too, which we'll somehow have to get from // be added in the editor too, which we'll somehow have to get from
// the server in the future (which will run the PHP filters). // the server in the future (which will run the PHP filters).
setBodyClasses(Array.from(ownerDocument.body.classList).filter(name => name.startsWith('admin-color-') || name.startsWith('post-type-') || name === 'wp-embed-responsive')); setBodyClasses(Array.from(ownerDocument.body.classList).filter(name => name.startsWith('admin-color-') || name.startsWith('post-type-') || name === 'wp-embed-responsive'));
contentDocument.dir = ownerDocument.dir; contentDocument.dir = ownerDocument.dir;
documentElement.removeChild(contentDocument.body);
for (const compatStyle of compatStyles) { for (const compatStyle of compatStyles) {
if (contentDocument.getElementById(compatStyle.id)) { if (contentDocument.getElementById(compatStyle.id)) {
@ -25277,21 +25248,25 @@ function Iframe({
iFrameDocument?.removeEventListener('drop', preventFileDropDefault); iFrameDocument?.removeEventListener('drop', preventFileDropDefault);
}; };
}, []); }, []);
const headRef = (0,external_wp_compose_namespaceObject.useRefEffect)(element => {
scripts.reduce((promise, script) => promise.then(() => loadScript(element, script)), Promise.resolve()).finally(() => {
// When script are loaded, re-render blocks to allow them
// to initialise.
forceRender();
});
}, []);
const disabledRef = (0,external_wp_compose_namespaceObject.useDisabled)({ const disabledRef = (0,external_wp_compose_namespaceObject.useDisabled)({
isDisabled: !readonly isDisabled: !readonly
}); });
const bodyRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([contentRef, clearerRef, writingFlowRef, disabledRef, headRef]); // Correct doctype is required to enable rendering in standards const bodyRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([contentRef, clearerRef, writingFlowRef, disabledRef]); // Correct doctype is required to enable rendering in standards
// mode. Also preload the styles to avoid a flash of unstyled // mode. Also preload the styles to avoid a flash of unstyled
// content. // content.
const html = '<!doctype html>' + '<style>html{height:auto!important;min-height:100%;}body{margin:0}</style>' + ((_assets$styles = assets?.styles) !== null && _assets$styles !== void 0 ? _assets$styles : ''); const html = `<!doctype html>
<html>
<head>
<script>window.frameElement._load()</script>
<style>html{height:auto!important;min-height:100%;}body{margin:0}</style>
${styles}
${scripts}
</head>
<body>
<script>document.currentScript.parentElement.remove()</script>
</body>
</html>`;
const [src, cleanup] = (0,external_wp_element_namespaceObject.useMemo)(() => { const [src, cleanup] = (0,external_wp_element_namespaceObject.useMemo)(() => {
const _src = URL.createObjectURL(new window.Blob([html], { const _src = URL.createObjectURL(new window.Blob([html], {
type: 'text/html' type: 'text/html'
@ -58131,41 +58106,6 @@ const Content = ({
return content; return content;
}; };
Content.__unstableIsRichTextContent = {};
function findContent(blocks, richTextValues = []) {
if (!Array.isArray(blocks)) {
blocks = [blocks];
}
for (const block of blocks) {
if (block?.type?.__unstableIsRichTextContent === Content.__unstableIsRichTextContent) {
richTextValues.push(block.props.value);
continue;
}
if (block?.props?.children) {
findContent(block.props.children, richTextValues);
}
}
return richTextValues;
}
function _getSaveElement({
name,
attributes,
innerBlocks
}) {
return (0,external_wp_blocks_namespaceObject.getSaveElement)(name, attributes, innerBlocks.map(_getSaveElement));
}
function getRichTextValues(blocks = []) {
external_wp_blocks_namespaceObject.__unstableGetBlockProps.skipFilters = true;
const values = findContent((Array.isArray(blocks) ? blocks : [blocks]).map(_getSaveElement));
external_wp_blocks_namespaceObject.__unstableGetBlockProps.skipFilters = false;
return values;
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/index.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/index.js
@ -63331,6 +63271,106 @@ function AdvancedPanel({
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/get-rich-text-values.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
/*
* This function is similar to `@wordpress/element`'s `renderToString` function,
* except that it does not render the elements to a string, but instead collects
* the values of all rich text `Content` elements.
*/
function addValuesForElement(element, ...args) {
if (null === element || undefined === element || false === element) {
return;
}
if (Array.isArray(element)) {
return addValuesForElements(element, ...args);
}
switch (typeof element) {
case 'string':
case 'number':
return;
}
const {
type,
props
} = element;
switch (type) {
case external_wp_element_namespaceObject.StrictMode:
case external_wp_element_namespaceObject.Fragment:
return addValuesForElements(props.children, ...args);
case external_wp_element_namespaceObject.RawHTML:
return;
case inner_blocks.Content:
return addValuesForBlocks(...args);
case Content:
const [values] = args;
values.push(props.value);
return;
}
switch (typeof type) {
case 'string':
if (typeof props.children !== 'undefined') {
return addValuesForElements(props.children, ...args);
}
return;
case 'function':
if (type.prototype && typeof type.prototype.render === 'function') {
return addValuesForElement(new type(props).render(), ...args);
}
return addValuesForElement(type(props), ...args);
}
}
function addValuesForElements(children, ...args) {
children = Array.isArray(children) ? children : [children];
for (let i = 0; i < children.length; i++) {
addValuesForElement(children[i], ...args);
}
}
function addValuesForBlocks(values, blocks) {
for (let i = 0; i < blocks.length; i++) {
const {
name,
attributes,
innerBlocks
} = blocks[i];
const saveElement = (0,external_wp_blocks_namespaceObject.getSaveElement)(name, attributes);
addValuesForElement(saveElement, values, innerBlocks);
}
}
function getRichTextValues(blocks = []) {
external_wp_blocks_namespaceObject.__unstableGetBlockProps.skipFilters = true;
const values = [];
addValuesForBlocks(values, blocks);
external_wp_blocks_namespaceObject.__unstableGetBlockProps.skipFilters = false;
return values;
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/resizable-box-popover/index.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/resizable-box-popover/index.js

File diff suppressed because one or more lines are too long

View File

@ -23171,99 +23171,144 @@ const html_init = () => initBlock({
*/ */
const image_deprecated_blockAttributes = { /**
align: { * Deprecation for adding the `wp-image-${id}` class to the image block for
type: 'string' * responsive images.
}, *
url: { * @see https://github.com/WordPress/gutenberg/pull/4898
type: 'string', */
source: 'attribute',
selector: 'img', const image_deprecated_v1 = {
attribute: 'src' attributes: {
}, url: {
alt: { type: 'string',
type: 'string', source: 'attribute',
source: 'attribute', selector: 'img',
selector: 'img', attribute: 'src'
attribute: 'alt', },
default: '' alt: {
}, type: 'string',
caption: { source: 'attribute',
type: 'string', selector: 'img',
source: 'html', attribute: 'alt',
selector: 'figcaption' default: ''
}, },
title: { caption: {
type: 'string', type: 'array',
source: 'attribute', source: 'children',
selector: 'img', selector: 'figcaption'
attribute: 'title' },
}, href: {
href: { type: 'string',
type: 'string', source: 'attribute',
source: 'attribute', selector: 'a',
selector: 'figure > a', attribute: 'href'
attribute: 'href' },
}, id: {
rel: { type: 'number'
type: 'string', },
source: 'attribute', align: {
selector: 'figure > a', type: 'string'
attribute: 'rel' },
}, width: {
linkClass: { type: 'number'
type: 'string', },
source: 'attribute', height: {
selector: 'figure > a', type: 'number'
attribute: 'class'
},
id: {
type: 'number'
},
width: {
type: 'number'
},
height: {
type: 'number'
},
sizeSlug: {
type: 'string'
},
linkDestination: {
type: 'string'
},
linkTarget: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'target'
}
};
const deprecated_blockSupports = {
anchor: true,
color: {
__experimentalDuotone: 'img',
text: false,
background: false
},
__experimentalBorder: {
radius: true,
__experimentalDefaultControls: {
radius: true
} }
} },
};
const image_deprecated_deprecated = [// The following deprecation moves existing border radius styles onto the save({
// inner img element where new border block support styles must be applied. attributes
// It will also add a new `.has-custom-border` class for existing blocks }) {
// with border radii set. This class is required to improve caption position const {
// and styling when an image within a gallery has a custom border or url,
// rounded corners. alt,
// caption,
// See: https://github.com/WordPress/gutenberg/pull/31366/ align,
{ href,
attributes: image_deprecated_blockAttributes, width,
supports: deprecated_blockSupports, height
} = attributes;
const extraImageProps = width || height ? {
width,
height
} : {};
const image = (0,external_wp_element_namespaceObject.createElement)("img", {
src: url,
alt: alt,
...extraImageProps
});
let figureStyle = {};
if (width) {
figureStyle = {
width
};
} else if (align === 'left' || align === 'right') {
figureStyle = {
maxWidth: '50%'
};
}
return (0,external_wp_element_namespaceObject.createElement)("figure", {
className: align ? `align${align}` : null,
style: figureStyle
}, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
href: href
}, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "figcaption",
value: caption
}));
}
};
/**
* Deprecation for adding the `is-resized` class to the image block to fix
* captions on resized images.
*
* @see https://github.com/WordPress/gutenberg/pull/6496
*/
const image_deprecated_v2 = {
attributes: {
url: {
type: 'string',
source: 'attribute',
selector: 'img',
attribute: 'src'
},
alt: {
type: 'string',
source: 'attribute',
selector: 'img',
attribute: 'alt',
default: ''
},
caption: {
type: 'array',
source: 'children',
selector: 'figcaption'
},
href: {
type: 'string',
source: 'attribute',
selector: 'a',
attribute: 'href'
},
id: {
type: 'number'
},
align: {
type: 'string'
},
width: {
type: 'number'
},
height: {
type: 'number'
}
},
save({ save({
attributes attributes
@ -23274,19 +23319,93 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
caption, caption,
align, align,
href, href,
rel,
linkClass,
width, width,
height, height,
id, id
linkTarget, } = attributes;
sizeSlug, const image = (0,external_wp_element_namespaceObject.createElement)("img", {
title src: url,
alt: alt,
className: id ? `wp-image-${id}` : null,
width: width,
height: height
});
return (0,external_wp_element_namespaceObject.createElement)("figure", {
className: align ? `align${align}` : null
}, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
href: href
}, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "figcaption",
value: caption
}));
}
};
/**
* Deprecation for image floats including a wrapping div.
*
* @see https://github.com/WordPress/gutenberg/pull/7721
*/
const image_deprecated_v3 = {
attributes: {
url: {
type: 'string',
source: 'attribute',
selector: 'img',
attribute: 'src'
},
alt: {
type: 'string',
source: 'attribute',
selector: 'img',
attribute: 'alt',
default: ''
},
caption: {
type: 'array',
source: 'children',
selector: 'figcaption'
},
href: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'href'
},
id: {
type: 'number'
},
align: {
type: 'string'
},
width: {
type: 'number'
},
height: {
type: 'number'
},
linkDestination: {
type: 'string',
default: 'none'
}
},
save({
attributes
}) {
const {
url,
alt,
caption,
align,
href,
width,
height,
id
} = attributes; } = attributes;
const newRel = !rel ? undefined : rel;
const classes = classnames_default()({ const classes = classnames_default()({
[`align${align}`]: align, [`align${align}`]: align,
[`size-${sizeSlug}`]: sizeSlug,
'is-resized': width || height 'is-resized': width || height
}); });
const image = (0,external_wp_element_namespaceObject.createElement)("img", { const image = (0,external_wp_element_namespaceObject.createElement)("img", {
@ -23294,37 +23413,97 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
alt: alt, alt: alt,
className: id ? `wp-image-${id}` : null, className: id ? `wp-image-${id}` : null,
width: width, width: width,
height: height, height: height
title: title
}); });
const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", { return (0,external_wp_element_namespaceObject.createElement)("figure", {
className: linkClass, className: classes
href: href, }, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
target: linkTarget, href: href
rel: newRel
}, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "figcaption", tagName: "figcaption",
value: caption value: caption
})); }));
return (0,external_wp_element_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes
})
}, figure);
} }
}, { };
attributes: { ...image_deprecated_blockAttributes, /**
* Deprecation for removing the outer div wrapper around aligned images.
*
* @see https://github.com/WordPress/gutenberg/pull/38657
*/
const image_deprecated_v4 = {
attributes: {
align: {
type: 'string'
},
url: {
type: 'string',
source: 'attribute',
selector: 'img',
attribute: 'src'
},
alt: {
type: 'string',
source: 'attribute',
selector: 'img',
attribute: 'alt',
default: ''
},
caption: {
type: 'string',
source: 'html',
selector: 'figcaption'
},
title: { title: {
type: 'string', type: 'string',
source: 'attribute', source: 'attribute',
selector: 'img', selector: 'img',
attribute: 'title' attribute: 'title'
}, },
href: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'href'
},
rel: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'rel'
},
linkClass: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'class'
},
id: {
type: 'number'
},
width: {
type: 'number'
},
height: {
type: 'number'
},
sizeSlug: { sizeSlug: {
type: 'string' type: 'string'
},
linkDestination: {
type: 'string'
},
linkTarget: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'target'
} }
}, },
supports: deprecated_blockSupports, supports: {
anchor: true
},
save({ save({
attributes attributes
@ -23381,8 +23560,106 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
}, figure); }, figure);
} }
}, { };
attributes: image_deprecated_blockAttributes, /**
* Deprecation for moving existing border radius styles onto the inner img
* element where new border block support styles must be applied.
* It will also add a new `.has-custom-border` class for existing blocks
* with border radii set. This class is required to improve caption position
* and styling when an image within a gallery has a custom border or
* rounded corners.
*
* @see https://github.com/WordPress/gutenberg/pull/31366
*/
const image_deprecated_v5 = {
attributes: {
align: {
type: 'string'
},
url: {
type: 'string',
source: 'attribute',
selector: 'img',
attribute: 'src'
},
alt: {
type: 'string',
source: 'attribute',
selector: 'img',
attribute: 'alt',
default: ''
},
caption: {
type: 'string',
source: 'html',
selector: 'figcaption'
},
title: {
type: 'string',
source: 'attribute',
selector: 'img',
attribute: 'title'
},
href: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'href'
},
rel: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'rel'
},
linkClass: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'class'
},
id: {
type: 'number'
},
width: {
type: 'number'
},
height: {
type: 'number'
},
sizeSlug: {
type: 'string'
},
linkDestination: {
type: 'string'
},
linkTarget: {
type: 'string',
source: 'attribute',
selector: 'figure > a',
attribute: 'target'
}
},
supports: {
anchor: true,
color: {
__experimentalDuotone: 'img',
text: false,
background: false
},
__experimentalBorder: {
radius: true,
__experimentalDefaultControls: {
radius: true
}
},
__experimentalStyle: {
spacing: {
margin: '0 0 1em 0'
}
}
},
save({ save({
attributes attributes
@ -23393,12 +23670,19 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
caption, caption,
align, align,
href, href,
rel,
linkClass,
width, width,
height, height,
id id,
linkTarget,
sizeSlug,
title
} = attributes; } = attributes;
const newRel = !rel ? undefined : rel;
const classes = classnames_default()({ const classes = classnames_default()({
[`align${align}`]: align, [`align${align}`]: align,
[`size-${sizeSlug}`]: sizeSlug,
'is-resized': width || height 'is-resized': width || height
}); });
const image = (0,external_wp_element_namespaceObject.createElement)("img", { const image = (0,external_wp_element_namespaceObject.createElement)("img", {
@ -23406,21 +23690,33 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
alt: alt, alt: alt,
className: id ? `wp-image-${id}` : null, className: id ? `wp-image-${id}` : null,
width: width, width: width,
height: height height: height,
title: title
}); });
return (0,external_wp_element_namespaceObject.createElement)("figure", { const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
className: classes className: linkClass,
}, href ? (0,external_wp_element_namespaceObject.createElement)("a", { href: href,
href: href target: linkTarget,
rel: newRel
}, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "figcaption", tagName: "figcaption",
value: caption value: caption
})); }));
return (0,external_wp_element_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes
})
}, figure);
} }
}, { };
attributes: image_deprecated_blockAttributes, /**
* Deprecation for adding width and height as style rules on the inner img.
* It also updates the widht and height attributes to be strings instead of numbers.
*
* @see https://github.com/WordPress/gutenberg/pull/31366
*/
const image_deprecated_v6 = {
save({ save({
attributes attributes
}) { }) {
@ -23430,76 +23726,58 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
caption, caption,
align, align,
href, href,
rel,
linkClass,
width, width,
height, height,
id aspectRatio,
scale,
id,
linkTarget,
sizeSlug,
title
} = attributes; } = attributes;
const newRel = !rel ? undefined : rel;
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(attributes);
const classes = classnames_default()({
[`align${align}`]: align,
[`size-${sizeSlug}`]: sizeSlug,
'is-resized': width || height,
'has-custom-border': !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
});
const imageClasses = classnames_default()(borderProps.className, {
[`wp-image-${id}`]: !!id
});
const image = (0,external_wp_element_namespaceObject.createElement)("img", { const image = (0,external_wp_element_namespaceObject.createElement)("img", {
src: url, src: url,
alt: alt, alt: alt,
className: id ? `wp-image-${id}` : null, className: imageClasses || undefined,
style: { ...borderProps.style,
aspectRatio,
objectFit: scale
},
width: width, width: width,
height: height height: height,
title: title
}); });
return (0,external_wp_element_namespaceObject.createElement)("figure", { const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
className: align ? `align${align}` : null className: linkClass,
}, href ? (0,external_wp_element_namespaceObject.createElement)("a", { href: href,
href: href target: linkTarget,
rel: newRel
}, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, { }, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
tagName: "figcaption", tagName: "figcaption",
value: caption value: caption
})); }));
return (0,external_wp_element_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
className: classes
})
}, figure);
} }
}, { };
attributes: image_deprecated_blockAttributes, /* harmony default export */ var image_deprecated = ([image_deprecated_v6, image_deprecated_v5, image_deprecated_v4, image_deprecated_v3, image_deprecated_v2, image_deprecated_v1]);
save({
attributes
}) {
const {
url,
alt,
caption,
align,
href,
width,
height
} = attributes;
const extraImageProps = width || height ? {
width,
height
} : {};
const image = (0,external_wp_element_namespaceObject.createElement)("img", {
src: url,
alt: alt,
...extraImageProps
});
let figureStyle = {};
if (width) {
figureStyle = {
width
};
} else if (align === 'left' || align === 'right') {
figureStyle = {
maxWidth: '50%'
};
}
return (0,external_wp_element_namespaceObject.createElement)("figure", {
className: align ? `align${align}` : null,
style: figureStyle
}, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
href: href
}, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
tagName: "figcaption",
value: caption
}));
}
}];
/* harmony default export */ var image_deprecated = (image_deprecated_deprecated);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js
@ -24560,7 +24838,9 @@ function image_save_save({
className: imageClasses || undefined, className: imageClasses || undefined,
style: { ...borderProps.style, style: { ...borderProps.style,
aspectRatio, aspectRatio,
objectFit: scale objectFit: scale,
width,
height
}, },
width: width, width: width,
height: height, height: height,
@ -26498,10 +26778,10 @@ function list_edit_Edit({
type: type, type: type,
...innerBlocksProps ...innerBlocksProps
}), controls, ordered && (0,external_wp_element_namespaceObject.createElement)(ordered_list_settings, { }), controls, ordered && (0,external_wp_element_namespaceObject.createElement)(ordered_list_settings, {
setAttributes: setAttributes, setAttributes,
ordered: ordered, reversed,
reversed: reversed, start,
start: start type
})); }));
} }
@ -34162,7 +34442,10 @@ function NavigationLinkEdit({
const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)('Add label…'); const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)('Add label…');
const ref = (0,external_wp_element_namespaceObject.useRef)(); const ref = (0,external_wp_element_namespaceObject.useRef)(); // Change the label using inspector causes rich text to change focus on firefox.
// This is a workaround to keep the focus on the label field when label filed is focused we don't render the rich text.
const [isLabelFieldFocused, setIsLabelFieldFocused] = (0,external_wp_element_namespaceObject.useState)(false);
const { const {
innerBlocks, innerBlocks,
isAtMaxNesting, isAtMaxNesting,
@ -34358,7 +34641,9 @@ function NavigationLinkEdit({
}); });
}, },
label: (0,external_wp_i18n_namespaceObject.__)('Label'), label: (0,external_wp_i18n_namespaceObject.__)('Label'),
autoComplete: "off" autoComplete: "off",
onFocus: () => setIsLabelFieldFocused(true),
onBlur: () => setIsLabelFieldFocused(false)
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, { }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
__nextHasNoMarginBottom: true, __nextHasNoMarginBottom: true,
value: url || '', value: url || '',
@ -34411,7 +34696,7 @@ function NavigationLinkEdit({
text: tooltipText text: tooltipText
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("span", null, missingText), (0,external_wp_element_namespaceObject.createElement)("span", { }, (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("span", null, missingText), (0,external_wp_element_namespaceObject.createElement)("span", {
className: "wp-block-navigation-link__missing_text-tooltip" className: "wp-block-navigation-link__missing_text-tooltip"
}, tooltipText)))) : (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !isInvalid && !isDraft && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, { }, tooltipText)))) : (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !isInvalid && !isDraft && !isLabelFieldFocused && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
ref: ref, ref: ref,
identifier: "label", identifier: "label",
className: "wp-block-navigation-item__label", className: "wp-block-navigation-item__label",
@ -34433,7 +34718,7 @@ function NavigationLinkEdit({
} }
}), description && (0,external_wp_element_namespaceObject.createElement)("span", { }), description && (0,external_wp_element_namespaceObject.createElement)("span", {
className: "wp-block-navigation-item__description" className: "wp-block-navigation-item__description"
}, description)), (isInvalid || isDraft) && (0,external_wp_element_namespaceObject.createElement)("div", { }, description)), (isInvalid || isDraft || isLabelFieldFocused) && (0,external_wp_element_namespaceObject.createElement)("div", {
className: "wp-block-navigation-link__placeholder-text wp-block-navigation-link__label" className: "wp-block-navigation-link__placeholder-text wp-block-navigation-link__label"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, { }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, {
position: "top center", position: "top center",
@ -34445,7 +34730,7 @@ function NavigationLinkEdit({
// Unescape is used here to "recover" the escaped characters // Unescape is used here to "recover" the escaped characters
// so they display without encoding. // so they display without encoding.
// See `updateAttributes` for more details. // See `updateAttributes` for more details.
`${(0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)} ${placeholderText}`.trim()), (0,external_wp_element_namespaceObject.createElement)("span", { `${(0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)} ${isInvalid || isDraft ? placeholderText : ''}`.trim()), (0,external_wp_element_namespaceObject.createElement)("span", {
className: "wp-block-navigation-link__missing_text-tooltip" className: "wp-block-navigation-link__missing_text-tooltip"
}, tooltipText))))), isLinkOpen && (0,external_wp_element_namespaceObject.createElement)(LinkUI, { }, tooltipText))))), isLinkOpen && (0,external_wp_element_namespaceObject.createElement)(LinkUI, {
className: "wp-block-navigation-link__inline-link-input", className: "wp-block-navigation-link__inline-link-input",
@ -46422,6 +46707,14 @@ const quote_transforms_transforms = {
style style
}); });
} }
}, {
type: 'block',
blocks: ['core/paragraph'],
transform: ({
citation
}, innerBlocks) => citation ? [...innerBlocks, (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {
content: citation
})] : innerBlocks
}, { }, {
type: 'block', type: 'block',
blocks: ['core/group'], blocks: ['core/group'],
@ -58058,6 +58351,9 @@ const video_init = () => initBlock({
*/ */
function FootnotesEdit({ function FootnotesEdit({
context: { context: {
postType, postType,
@ -58066,7 +58362,20 @@ function FootnotesEdit({
}) { }) {
const [meta, updateMeta] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postType, 'meta', postId); const [meta, updateMeta] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postType, 'meta', postId);
const footnotes = meta?.footnotes ? JSON.parse(meta.footnotes) : []; const footnotes = meta?.footnotes ? JSON.parse(meta.footnotes) : [];
return (0,external_wp_element_namespaceObject.createElement)("ol", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)() const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
if (!footnotes.length) {
return (0,external_wp_element_namespaceObject.createElement)("div", { ...blockProps
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
icon: format_list_numbered
}),
label: (0,external_wp_i18n_namespaceObject.__)('Footnotes'),
instructions: (0,external_wp_i18n_namespaceObject.__)('Footnotes found in blocks within this document will be displayed here.')
}));
}
return (0,external_wp_element_namespaceObject.createElement)("ol", { ...blockProps
}, footnotes.map(({ }, footnotes.map(({
id, id,
content content
@ -58221,7 +58530,6 @@ const {
supports: { supports: {
html: false, html: false,
multiple: false, multiple: false,
inserter: false,
reusable: false reusable: false
}, },
style: "wp-block-footnotes" style: "wp-block-footnotes"
@ -58229,11 +58537,9 @@ const {
const formatName = 'core/footnote'; const formatName = 'core/footnote';
const format = { const format = {
title: (0,external_wp_i18n_namespaceObject.__)('Footnote'), title: (0,external_wp_i18n_namespaceObject.__)('Footnote'),
tagName: 'a', tagName: 'sup',
className: 'fn', className: 'fn',
attributes: { attributes: {
id: 'id',
href: 'href',
'data-fn': 'data-fn' 'data-fn': 'data-fn'
}, },
contentEditable: false, contentEditable: false,
@ -58260,11 +58566,9 @@ const format = {
const newValue = (0,external_wp_richText_namespaceObject.insertObject)(value, { const newValue = (0,external_wp_richText_namespaceObject.insertObject)(value, {
type: formatName, type: formatName,
attributes: { attributes: {
href: '#' + id,
id: `${id}-link`,
'data-fn': id 'data-fn': id
}, },
innerHTML: '*' innerHTML: `<a href="#${id}" id="${id}-link">*</a>`
}, value.end, value.end); }, value.end, value.end);
newValue.start = newValue.end - 1; newValue.start = newValue.end - 1;
onChange(newValue); // BFS search to find the first footnote block. onChange(newValue); // BFS search to find the first footnote block.
@ -58337,7 +58641,6 @@ const footnotes_metadata = {
supports: { supports: {
html: false, html: false,
multiple: false, multiple: false,
inserter: false,
reusable: false reusable: false
}, },
style: "wp-block-footnotes" style: "wp-block-footnotes"

File diff suppressed because one or more lines are too long

View File

@ -6322,9 +6322,12 @@ function useEntityBlockEditor(kind, name, {
} }
}, [content]); }, [content]);
const updateFootnotes = (0,external_wp_element_namespaceObject.useCallback)(_blocks => { const updateFootnotes = (0,external_wp_element_namespaceObject.useCallback)(_blocks => {
if (!meta) return; // If meta.footnotes is empty, it means the meta is not registered. const output = {
blocks: _blocks
};
if (!meta) return output; // If meta.footnotes is empty, it means the meta is not registered.
if (meta.footnotes === undefined) return {}; if (meta.footnotes === undefined) return output;
const { const {
getRichTextValues getRichTextValues
} = unlock(external_wp_blockEditor_namespaceObject.privateApis); } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
@ -6346,11 +6349,61 @@ function useEntityBlockEditor(kind, name, {
const footnotes = meta.footnotes ? JSON.parse(meta.footnotes) : []; const footnotes = meta.footnotes ? JSON.parse(meta.footnotes) : [];
const currentOrder = footnotes.map(fn => fn.id); const currentOrder = footnotes.map(fn => fn.id);
if (currentOrder.join('') === newOrder.join('')) return; if (currentOrder.join('') === newOrder.join('')) return output;
const newFootnotes = newOrder.map(fnId => footnotes.find(fn => fn.id === fnId) || oldFootnotes[fnId] || { const newFootnotes = newOrder.map(fnId => footnotes.find(fn => fn.id === fnId) || oldFootnotes[fnId] || {
id: fnId, id: fnId,
content: '' content: ''
}); });
function updateAttributes(attributes) {
attributes = { ...attributes
};
for (const key in attributes) {
const value = attributes[key];
if (Array.isArray(value)) {
attributes[key] = value.map(updateAttributes);
continue;
}
if (typeof value !== 'string') {
continue;
}
if (value.indexOf('data-fn') === -1) {
continue;
} // When we store rich text values, this would no longer
// require a regex.
const regex = /(<sup[^>]+data-fn="([^"]+)"[^>]*><a[^>]*>)[\d*]*<\/a><\/sup>/g;
attributes[key] = value.replace(regex, (match, opening, fnId) => {
const index = newOrder.indexOf(fnId);
return `${opening}${index + 1}</a></sup>`;
});
const compatRegex = /<a[^>]+data-fn="([^"]+)"[^>]*>\*<\/a>/g;
attributes[key] = attributes[key].replace(compatRegex, (match, fnId) => {
const index = newOrder.indexOf(fnId);
return `<sup data-fn="${fnId}" class="fn"><a href="#${fnId}" id="${fnId}-link">${index + 1}</a></sup>`;
});
}
return attributes;
}
function updateBlocksAttributes(__blocks) {
return __blocks.map(block => {
return { ...block,
attributes: updateAttributes(block.attributes),
innerBlocks: updateBlocksAttributes(block.innerBlocks)
};
});
} // We need to go through all block attributs deeply and update the
// footnote anchor numbering (textContent) to match the new order.
const newBlocks = updateBlocksAttributes(_blocks);
oldFootnotes = { ...oldFootnotes, oldFootnotes = { ...oldFootnotes,
...footnotes.reduce((acc, fn) => { ...footnotes.reduce((acc, fn) => {
if (!newOrder.includes(fn.id)) { if (!newOrder.includes(fn.id)) {
@ -6363,7 +6416,8 @@ function useEntityBlockEditor(kind, name, {
return { return {
meta: { ...meta, meta: { ...meta,
footnotes: JSON.stringify(newFootnotes) footnotes: JSON.stringify(newFootnotes)
} },
blocks: newBlocks
}; };
}, [meta]); }, [meta]);
const onChange = (0,external_wp_element_namespaceObject.useCallback)((newBlocks, options) => { const onChange = (0,external_wp_element_namespaceObject.useCallback)((newBlocks, options) => {
@ -6380,7 +6434,6 @@ function useEntityBlockEditor(kind, name, {
// a new undo level. // a new undo level.
const edits = { const edits = {
blocks: newBlocks,
selection, selection,
content: ({ content: ({
blocks: blocksForSerialization = [] blocks: blocksForSerialization = []
@ -6397,7 +6450,6 @@ function useEntityBlockEditor(kind, name, {
} = options; } = options;
const footnotesChanges = updateFootnotes(newBlocks); const footnotesChanges = updateFootnotes(newBlocks);
const edits = { const edits = {
blocks: newBlocks,
selection, selection,
...footnotesChanges ...footnotesChanges
}; };

File diff suppressed because one or more lines are too long

View File

@ -411,6 +411,10 @@ function getOutboundType(blockName) {
;// CONCATENATED MODULE: external ["wp","coreData"]
var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
;// CONCATENATED MODULE: external ["wp","editor"]
var external_wp_editor_namespaceObject = window["wp"]["editor"];
;// CONCATENATED MODULE: external ["wp","primitives"] ;// CONCATENATED MODULE: external ["wp","primitives"]
var external_wp_primitives_namespaceObject = window["wp"]["primitives"]; var external_wp_primitives_namespaceObject = window["wp"]["primitives"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
@ -434,8 +438,6 @@ var external_wp_plugins_namespaceObject = window["wp"]["plugins"];
var external_wp_url_namespaceObject = window["wp"]["url"]; var external_wp_url_namespaceObject = window["wp"]["url"];
;// CONCATENATED MODULE: external ["wp","notices"] ;// CONCATENATED MODULE: external ["wp","notices"]
var external_wp_notices_namespaceObject = window["wp"]["notices"]; var external_wp_notices_namespaceObject = window["wp"]["notices"];
;// CONCATENATED MODULE: external ["wp","editor"]
var external_wp_editor_namespaceObject = window["wp"]["editor"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/copy-content-menu-item/index.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/copy-content-menu-item/index.js
@ -2463,8 +2465,6 @@ var external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
;// CONCATENATED MODULE: external ["wp","a11y"] ;// CONCATENATED MODULE: external ["wp","a11y"]
var external_wp_a11y_namespaceObject = window["wp"]["a11y"]; var external_wp_a11y_namespaceObject = window["wp"]["a11y"];
;// CONCATENATED MODULE: external ["wp","coreData"]
var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/utils/meta-boxes.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/utils/meta-boxes.js
/** /**
* Function returning the current Meta Boxes DOM Node in the editor * Function returning the current Meta Boxes DOM Node in the editor
@ -3834,6 +3834,9 @@ function WelcomeGuideMenuItem() {
/** /**
* Internal dependencies * Internal dependencies
*/ */
@ -3842,16 +3845,40 @@ function WelcomeGuideMenuItem() {
function ManagePatternsMenuItem() {
const url = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
canUser
} = select(external_wp_coreData_namespaceObject.store);
const {
getEditorSettings
} = select(external_wp_editor_namespaceObject.store);
const isBlockTheme = getEditorSettings().__unstableIsBlockBasedTheme;
const defaultUrl = (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
post_type: 'wp_block'
});
const patternsUrl = (0,external_wp_url_namespaceObject.addQueryArgs)('site-editor.php', {
path: '/patterns'
}); // The site editor and templates both check whether the user has
// edit_theme_options capabilities. We can leverage that here and not
// display the manage patterns link if the user can't access it.
return canUser('read', 'templates') && isBlockTheme ? patternsUrl : defaultUrl;
}, []);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
role: "menuitem",
href: url
}, (0,external_wp_i18n_namespaceObject.__)('Manage Patterns'));
}
(0,external_wp_plugins_namespaceObject.registerPlugin)('edit-post', { (0,external_wp_plugins_namespaceObject.registerPlugin)('edit-post', {
render() { render() {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(tools_more_menu_group, null, ({ return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(tools_more_menu_group, null, ({
onClose onClose
}) => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { }) => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(ManagePatternsMenuItem, null), (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts_help_menu_item, {
role: "menuitem",
href: (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
post_type: 'wp_block'
})
}, (0,external_wp_i18n_namespaceObject.__)('Manage Patterns')), (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts_help_menu_item, {
onSelect: onClose onSelect: onClose
}), (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideMenuItem, null), (0,external_wp_element_namespaceObject.createElement)(CopyContentMenuItem, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { }), (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideMenuItem, null), (0,external_wp_element_namespaceObject.createElement)(CopyContentMenuItem, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
role: "menuitem", role: "menuitem",
@ -8921,10 +8948,6 @@ function StartPageOptions() {
const {
BlockRemovalWarningModal
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const interfaceLabels = { const interfaceLabels = {
/* translators: accessibility text for the editor top bar landmark region. */ /* translators: accessibility text for the editor top bar landmark region. */
header: (0,external_wp_i18n_namespaceObject.__)('Editor top bar'), header: (0,external_wp_i18n_namespaceObject.__)('Editor top bar'),
@ -8941,9 +8964,6 @@ const interfaceLabels = {
/* translators: accessibility text for the editor footer landmark region. */ /* translators: accessibility text for the editor footer landmark region. */
footer: (0,external_wp_i18n_namespaceObject.__)('Editor footer') footer: (0,external_wp_i18n_namespaceObject.__)('Editor footer')
}; };
const blockRemovalRules = {
'core/footnotes': (0,external_wp_i18n_namespaceObject.__)('The Footnotes block displays all footnotes found in the content. Note that any footnotes in the content will persist after removing this block.')
};
function Layout({ function Layout({
styles styles
@ -9056,9 +9076,7 @@ function Layout({
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(fullscreen_mode, { return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(fullscreen_mode, {
isActive: isFullscreenActive isActive: isFullscreenActive
}), (0,external_wp_element_namespaceObject.createElement)(browser_url, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.UnsavedChangesWarning, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.AutosaveMonitor, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.LocalAutosaveMonitor, null), (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.EditorKeyboardShortcutsRegister, null), (0,external_wp_element_namespaceObject.createElement)(BlockRemovalWarningModal, { }), (0,external_wp_element_namespaceObject.createElement)(browser_url, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.UnsavedChangesWarning, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.AutosaveMonitor, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.LocalAutosaveMonitor, null), (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.EditorKeyboardShortcutsRegister, null), (0,external_wp_element_namespaceObject.createElement)(settings_sidebar, null), (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
rules: blockRemovalRules
}), (0,external_wp_element_namespaceObject.createElement)(settings_sidebar, null), (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
isDistractionFree: isDistractionFree && isLargeViewport, isDistractionFree: isDistractionFree && isLargeViewport,
className: className, className: className,
labels: { ...interfaceLabels, labels: { ...interfaceLabels,

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -411,21 +411,34 @@ function ReusableBlocksManageButton({
const { const {
canRemove, canRemove,
isVisible, isVisible,
innerBlockCount innerBlockCount,
managePatternsUrl
} = (0,external_wp_data_namespaceObject.useSelect)(select => { } = (0,external_wp_data_namespaceObject.useSelect)(select => {
const { const {
getBlock, getBlock,
canRemoveBlock, canRemoveBlock,
getBlockCount getBlockCount,
getSettings
} = select(external_wp_blockEditor_namespaceObject.store); } = select(external_wp_blockEditor_namespaceObject.store);
const { const {
canUser canUser
} = select(external_wp_coreData_namespaceObject.store); } = select(external_wp_coreData_namespaceObject.store);
const reusableBlock = getBlock(clientId); const reusableBlock = getBlock(clientId);
const isBlockTheme = getSettings().__unstableIsBlockBasedTheme;
return { return {
canRemove: canRemoveBlock(clientId), canRemove: canRemoveBlock(clientId),
isVisible: !!reusableBlock && (0,external_wp_blocks_namespaceObject.isReusableBlock)(reusableBlock) && !!canUser('update', 'blocks', reusableBlock.attributes.ref), isVisible: !!reusableBlock && (0,external_wp_blocks_namespaceObject.isReusableBlock)(reusableBlock) && !!canUser('update', 'blocks', reusableBlock.attributes.ref),
innerBlockCount: getBlockCount(clientId) innerBlockCount: getBlockCount(clientId),
// The site editor and templates both check whether the user
// has edit_theme_options capabilities. We can leverage that here
// and omit the manage patterns link if the user can't access it.
managePatternsUrl: isBlockTheme && canUser('read', 'templates') ? (0,external_wp_url_namespaceObject.addQueryArgs)('site-editor.php', {
path: '/patterns'
}) : (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
post_type: 'wp_block'
})
}; };
}, [clientId]); }, [clientId]);
const { const {
@ -437,9 +450,7 @@ function ReusableBlocksManageButton({
} }
return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
href: (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', { href: managePatternsUrl
post_type: 'wp_block'
})
}, (0,external_wp_i18n_namespaceObject.__)('Manage Patterns')), canRemove && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, { }, (0,external_wp_i18n_namespaceObject.__)('Manage Patterns')), canRemove && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
onClick: () => convertBlockToStatic(clientId) onClick: () => convertBlockToStatic(clientId)
}, innerBlockCount > 1 ? (0,external_wp_i18n_namespaceObject.__)('Detach patterns') : (0,external_wp_i18n_namespaceObject.__)('Detach pattern'))); }, innerBlockCount > 1 ? (0,external_wp_i18n_namespaceObject.__)('Detach patterns') : (0,external_wp_i18n_namespaceObject.__)('Detach pattern')));

File diff suppressed because one or more lines are too long

View File

@ -2311,7 +2311,7 @@ function fromFormat({
const formatType = get_format_type_getFormatType(type); const formatType = get_format_type_getFormatType(type);
let elementAttributes = {}; let elementAttributes = {};
if (boundaryClass) { if (boundaryClass && isEditableTree) {
elementAttributes['data-rich-text-format-boundary'] = 'true'; elementAttributes['data-rich-text-format-boundary'] = 'true';
} }
@ -2358,7 +2358,7 @@ function fromFormat({
} }
return { return {
type: formatType.tagName === '*' ? tagName : formatType.tagName, type: tagName || formatType.tagName,
object: formatType.object, object: formatType.object,
attributes: restoreOnAttributes(elementAttributes, isEditableTree) attributes: restoreOnAttributes(elementAttributes, isEditableTree)
}; };
@ -2551,7 +2551,12 @@ function toTree({
isEditableTree, isEditableTree,
boundaryClass: start === i && end === i + 1 boundaryClass: start === i && end === i + 1
})); }));
if (innerHTML) append(pointer, innerHTML);
if (innerHTML) {
append(pointer, {
html: innerHTML
});
}
} else { } else {
pointer = append(getParent(pointer), fromFormat({ ...replacement, pointer = append(getParent(pointer), fromFormat({ ...replacement,
object: true, object: true,
@ -2685,6 +2690,10 @@ function getNodeByPath(node, path) {
} }
function append(element, child) { function append(element, child) {
if (child.html !== undefined) {
return element.innerHTML += child.html;
}
if (typeof child === 'string') { if (typeof child === 'string') {
child = element.ownerDocument.createTextNode(child); child = element.ownerDocument.createTextNode(child);
} }
@ -3712,8 +3721,11 @@ function useSelectObject() {
// happen. This means it's "click-through". // happen. This means it's "click-through".
if (selection.containsNode(target)) return; if (selection.containsNode(target)) return;
const range = ownerDocument.createRange(); const range = ownerDocument.createRange(); // If the target is within a non editable element, select the non
range.selectNode(target); // editable element.
const nodeToSelect = target.isContentEditable ? target : target.closest('[contenteditable]');
range.selectNode(nodeToSelect);
selection.removeAllRanges(); selection.removeAllRanges();
selection.addRange(range); selection.addRange(range);
event.preventDefault(); event.preventDefault();

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.3-beta3-56204'; $wp_version = '6.3-beta3-56205';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.