mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
e30391f2bd
commit
9f33966e4e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1713,7 +1713,6 @@
|
||||
'supports' => array(
|
||||
'html' => false,
|
||||
'multiple' => false,
|
||||
'inserter' => false,
|
||||
'reusable' => false
|
||||
),
|
||||
'style' => 'wp-block-footnotes'
|
||||
|
@ -35,8 +35,11 @@ function block_core_comment_template_render_comments( $comments, $block ) {
|
||||
* We set commentId context through the `render_block_context` filter so
|
||||
* that dynamically inserted blocks (at `render_block` filter stage)
|
||||
* 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
|
||||
@ -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 ) );
|
||||
|
||||
remove_filter( 'render_block_context', $filter_block_context );
|
||||
remove_filter( 'render_block_context', $filter_block_context, 1 );
|
||||
|
||||
$children = $comment->get_children();
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
"supports": {
|
||||
"html": false,
|
||||
"multiple": false,
|
||||
"inserter": false,
|
||||
"reusable": false
|
||||
},
|
||||
"style": "wp-block-footnotes"
|
||||
|
@ -2,15 +2,16 @@
|
||||
counter-reset:footnotes;
|
||||
}
|
||||
|
||||
[data-fn].fn{
|
||||
a[data-fn].fn{
|
||||
counter-increment:footnotes;
|
||||
display:inline-block;
|
||||
display:inline-flex;
|
||||
font-size:smaller;
|
||||
text-decoration:none;
|
||||
text-indent:-9999999px;
|
||||
vertical-align:super;
|
||||
}
|
||||
|
||||
[data-fn].fn:after{
|
||||
a[data-fn].fn:after{
|
||||
content:"[" counter(footnotes) "]";
|
||||
float:right;
|
||||
text-indent:0;
|
||||
|
@ -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}
|
@ -2,15 +2,16 @@
|
||||
counter-reset:footnotes;
|
||||
}
|
||||
|
||||
[data-fn].fn{
|
||||
a[data-fn].fn{
|
||||
counter-increment:footnotes;
|
||||
display:inline-block;
|
||||
display:inline-flex;
|
||||
font-size:smaller;
|
||||
text-decoration:none;
|
||||
text-indent:-9999999px;
|
||||
vertical-align:super;
|
||||
}
|
||||
|
||||
[data-fn].fn:after{
|
||||
a[data-fn].fn:after{
|
||||
content:"[" counter(footnotes) "]";
|
||||
float:left;
|
||||
text-indent:0;
|
||||
|
2
wp-includes/blocks/footnotes/style.min.css
vendored
2
wp-includes/blocks/footnotes/style.min.css
vendored
@ -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}
|
@ -97,11 +97,13 @@ function render_block_core_post_template( $attributes, $content, $block ) {
|
||||
$context['postId'] = $post_id;
|
||||
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_callback` and ensure that no wrapper markup is included.
|
||||
$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.
|
||||
$post_classes = implode( ' ', get_post_class( 'wp-block-post' ) );
|
||||
|
@ -3227,15 +3227,16 @@ pre.wp-block-verse{
|
||||
counter-reset:footnotes;
|
||||
}
|
||||
|
||||
[data-fn].fn{
|
||||
a[data-fn].fn{
|
||||
counter-increment:footnotes;
|
||||
display:inline-block;
|
||||
display:inline-flex;
|
||||
font-size:smaller;
|
||||
text-decoration:none;
|
||||
text-indent:-9999999px;
|
||||
vertical-align:super;
|
||||
}
|
||||
|
||||
[data-fn].fn:after{
|
||||
a[data-fn].fn:after{
|
||||
content:"[" counter(footnotes) "]";
|
||||
float:right;
|
||||
text-indent:0;
|
||||
|
File diff suppressed because one or more lines are too long
7
wp-includes/css/dist/block-library/style.css
vendored
7
wp-includes/css/dist/block-library/style.css
vendored
@ -3227,15 +3227,16 @@ pre.wp-block-verse{
|
||||
counter-reset:footnotes;
|
||||
}
|
||||
|
||||
[data-fn].fn{
|
||||
a[data-fn].fn{
|
||||
counter-increment:footnotes;
|
||||
display:inline-block;
|
||||
display:inline-flex;
|
||||
font-size:smaller;
|
||||
text-decoration:none;
|
||||
text-indent:-9999999px;
|
||||
vertical-align:super;
|
||||
}
|
||||
|
||||
[data-fn].fn:after{
|
||||
a[data-fn].fn:after{
|
||||
content:"[" counter(footnotes) "]";
|
||||
float:left;
|
||||
text-indent:0;
|
||||
|
File diff suppressed because one or more lines are too long
15
wp-includes/css/dist/edit-post/style-rtl.css
vendored
15
wp-includes/css/dist/edit-post/style-rtl.css
vendored
@ -1689,27 +1689,26 @@ h2.edit-post-template-summary__title{
|
||||
opacity:1;
|
||||
}
|
||||
}
|
||||
|
||||
body.block-editor-page,html.wp-toolbar{
|
||||
body.js.block-editor-page{
|
||||
background:#fff;
|
||||
}
|
||||
body.block-editor-page #wpcontent{
|
||||
body.js.block-editor-page #wpcontent{
|
||||
padding-right:0;
|
||||
}
|
||||
body.block-editor-page #wpbody-content{
|
||||
body.js.block-editor-page #wpbody-content{
|
||||
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;
|
||||
}
|
||||
body.block-editor-page .a11y-speak-region{
|
||||
body.js.block-editor-page .a11y-speak-region{
|
||||
right:-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;
|
||||
}
|
||||
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%;
|
||||
width:auto;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
15
wp-includes/css/dist/edit-post/style.css
vendored
15
wp-includes/css/dist/edit-post/style.css
vendored
@ -1689,27 +1689,26 @@ h2.edit-post-template-summary__title{
|
||||
opacity:1;
|
||||
}
|
||||
}
|
||||
|
||||
body.block-editor-page,html.wp-toolbar{
|
||||
body.js.block-editor-page{
|
||||
background:#fff;
|
||||
}
|
||||
body.block-editor-page #wpcontent{
|
||||
body.js.block-editor-page #wpcontent{
|
||||
padding-left:0;
|
||||
}
|
||||
body.block-editor-page #wpbody-content{
|
||||
body.js.block-editor-page #wpbody-content{
|
||||
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;
|
||||
}
|
||||
body.block-editor-page .a11y-speak-region{
|
||||
body.js.block-editor-page .a11y-speak-region{
|
||||
left:-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;
|
||||
}
|
||||
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%;
|
||||
width:auto;
|
||||
}
|
||||
|
2
wp-includes/css/dist/edit-post/style.min.css
vendored
2
wp-includes/css/dist/edit-post/style.min.css
vendored
File diff suppressed because one or more lines are too long
121
wp-includes/css/dist/edit-site/style-rtl.css
vendored
121
wp-includes/css/dist/edit-site/style-rtl.css
vendored
@ -1327,6 +1327,9 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||
grid-column:2 / 3;
|
||||
overflow:hidden;
|
||||
}
|
||||
.edit-site-document-actions__title .block-editor-block-icon{
|
||||
min-width:24px;
|
||||
}
|
||||
.edit-site-document-actions__title h1{
|
||||
color:var(--wp-block-synced-color);
|
||||
overflow:hidden;
|
||||
@ -1615,9 +1618,17 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||
}
|
||||
|
||||
.edit-site-patterns{
|
||||
background:rgba(0,0,0,.05);
|
||||
background:rgba(0,0,0,.15);
|
||||
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{
|
||||
color:#949494;
|
||||
}
|
||||
@ -1629,35 +1640,82 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||
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{
|
||||
column-gap:24px;
|
||||
display:grid;
|
||||
gap:32px;
|
||||
grid-template-columns:1fr;
|
||||
margin-bottom:32px;
|
||||
padding-top:2px;
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.edit-site-patterns__grid{
|
||||
column-count:2;
|
||||
grid-template-columns:1fr 1fr;
|
||||
}
|
||||
}
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern{
|
||||
break-inside:avoid-column;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
margin-bottom:48px;
|
||||
}
|
||||
.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;
|
||||
overflow:hidden;
|
||||
padding:0;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive{
|
||||
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{
|
||||
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);
|
||||
}
|
||||
.edit-site-patterns__grid .edit-site-patterns__preview{
|
||||
flex:1;
|
||||
flex:0 1 auto;
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
.edit-site-patterns__search.edit-site-patterns__search input[type=search]{
|
||||
background:#2f2f2f;
|
||||
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__load-more{
|
||||
align-self:center;
|
||||
}
|
||||
|
||||
.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{
|
||||
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{
|
||||
display:inline-flex;
|
||||
}
|
||||
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon svg{
|
||||
fill:currentcolor;
|
||||
}
|
||||
|
||||
.edit-site-patterns__no-results{
|
||||
color:#949494;
|
||||
@ -2989,9 +3050,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-patterns__group{
|
||||
border-bottom:1px solid #2f2f2f;
|
||||
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{
|
||||
border-bottom:0;
|
||||
@ -3318,39 +3377,39 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
|
||||
width:100%;
|
||||
}
|
||||
|
||||
html #wpadminbar{
|
||||
body.js #wpadminbar{
|
||||
display:none;
|
||||
}
|
||||
|
||||
html #wpbody,html.wp-toolbar{
|
||||
body.js #wpbody{
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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%;
|
||||
width:auto;
|
||||
}
|
||||
|
||||
body.site-editor-php{
|
||||
body.js.site-editor-php{
|
||||
background:#1e1e1e;
|
||||
}
|
||||
|
||||
@ -3374,6 +3433,10 @@ body.site-editor-php{
|
||||
top:0;
|
||||
}
|
||||
}
|
||||
.no-js .edit-site{
|
||||
min-height:0;
|
||||
position:static;
|
||||
}
|
||||
.edit-site .interface-interface-skeleton{
|
||||
top:0;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
121
wp-includes/css/dist/edit-site/style.css
vendored
121
wp-includes/css/dist/edit-site/style.css
vendored
@ -1327,6 +1327,9 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
||||
grid-column:2 / 3;
|
||||
overflow:hidden;
|
||||
}
|
||||
.edit-site-document-actions__title .block-editor-block-icon{
|
||||
min-width:24px;
|
||||
}
|
||||
.edit-site-document-actions__title h1{
|
||||
color:var(--wp-block-synced-color);
|
||||
overflow:hidden;
|
||||
@ -1615,9 +1618,17 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||
}
|
||||
|
||||
.edit-site-patterns{
|
||||
background:rgba(0,0,0,.05);
|
||||
background:rgba(0,0,0,.15);
|
||||
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{
|
||||
color:#949494;
|
||||
}
|
||||
@ -1629,35 +1640,82 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||
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{
|
||||
column-gap:24px;
|
||||
display:grid;
|
||||
gap:32px;
|
||||
grid-template-columns:1fr;
|
||||
margin-bottom:32px;
|
||||
padding-top:2px;
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.edit-site-patterns__grid{
|
||||
column-count:2;
|
||||
grid-template-columns:1fr 1fr;
|
||||
}
|
||||
}
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern{
|
||||
break-inside:avoid-column;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
margin-bottom:48px;
|
||||
}
|
||||
.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;
|
||||
overflow:hidden;
|
||||
padding:0;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive{
|
||||
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{
|
||||
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);
|
||||
}
|
||||
.edit-site-patterns__grid .edit-site-patterns__preview{
|
||||
flex:1;
|
||||
flex:0 1 auto;
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
.edit-site-patterns__search.edit-site-patterns__search input[type=search]{
|
||||
background:#2f2f2f;
|
||||
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__load-more{
|
||||
align-self:center;
|
||||
}
|
||||
|
||||
.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{
|
||||
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{
|
||||
display:inline-flex;
|
||||
}
|
||||
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon svg{
|
||||
fill:currentcolor;
|
||||
}
|
||||
|
||||
.edit-site-patterns__no-results{
|
||||
color:#949494;
|
||||
@ -2989,9 +3050,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-patterns__group{
|
||||
border-bottom:1px solid #2f2f2f;
|
||||
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{
|
||||
border-bottom:0;
|
||||
@ -3318,39 +3377,39 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
|
||||
width:100%;
|
||||
}
|
||||
|
||||
html #wpadminbar{
|
||||
body.js #wpadminbar{
|
||||
display:none;
|
||||
}
|
||||
|
||||
html #wpbody,html.wp-toolbar{
|
||||
body.js #wpbody{
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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%;
|
||||
width:auto;
|
||||
}
|
||||
|
||||
body.site-editor-php{
|
||||
body.js.site-editor-php{
|
||||
background:#1e1e1e;
|
||||
}
|
||||
|
||||
@ -3374,6 +3433,10 @@ body.site-editor-php{
|
||||
top:0;
|
||||
}
|
||||
}
|
||||
.no-js .edit-site{
|
||||
min-height:0;
|
||||
position:static;
|
||||
}
|
||||
.edit-site .interface-interface-skeleton{
|
||||
top:0;
|
||||
}
|
||||
|
2
wp-includes/css/dist/edit-site/style.min.css
vendored
2
wp-includes/css/dist/edit-site/style.min.css
vendored
File diff suppressed because one or more lines are too long
14
wp-includes/css/dist/edit-widgets/style-rtl.css
vendored
14
wp-includes/css/dist/edit-widgets/style-rtl.css
vendored
@ -894,26 +894,26 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar{
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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%;
|
||||
width:auto;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
14
wp-includes/css/dist/edit-widgets/style.css
vendored
14
wp-includes/css/dist/edit-widgets/style.css
vendored
@ -894,26 +894,26 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar{
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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%;
|
||||
width:auto;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
202
wp-includes/js/dist/block-editor.js
vendored
202
wp-includes/js/dist/block-editor.js
vendored
@ -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({
|
||||
contentRef,
|
||||
children,
|
||||
@ -25217,20 +25187,23 @@ function Iframe({
|
||||
forwardedRef: ref,
|
||||
...props
|
||||
}) {
|
||||
var _assets$styles;
|
||||
|
||||
const assets = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getSettings().__unstableResolvedAssets, []);
|
||||
const [, forceRender] = (0,external_wp_element_namespaceObject.useReducer)(() => ({}));
|
||||
const {
|
||||
styles = '',
|
||||
scripts = ''
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getSettings().__unstableResolvedAssets, []);
|
||||
const [iframeDocument, setIframeDocument] = (0,external_wp_element_namespaceObject.useState)();
|
||||
const [bodyClasses, setBodyClasses] = (0,external_wp_element_namespaceObject.useState)([]);
|
||||
const compatStyles = useCompatibilityStyles();
|
||||
const scripts = useParsedAssets(assets?.scripts);
|
||||
const clearerRef = useBlockSelectionClearer();
|
||||
const [before, writingFlowRef, after] = useWritingFlow();
|
||||
const [contentResizeListener, {
|
||||
height: contentHeight
|
||||
}] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
|
||||
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.
|
||||
|
||||
function preventFileDropDefault(event) {
|
||||
@ -25247,14 +25220,12 @@ function Iframe({
|
||||
} = contentDocument;
|
||||
iFrameDocument = contentDocument;
|
||||
bubbleEvents(contentDocument);
|
||||
setIframeDocument(contentDocument);
|
||||
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
|
||||
// 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'));
|
||||
contentDocument.dir = ownerDocument.dir;
|
||||
documentElement.removeChild(contentDocument.body);
|
||||
|
||||
for (const compatStyle of compatStyles) {
|
||||
if (contentDocument.getElementById(compatStyle.id)) {
|
||||
@ -25277,21 +25248,25 @@ function Iframe({
|
||||
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)({
|
||||
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
|
||||
// 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 = URL.createObjectURL(new window.Blob([html], {
|
||||
type: 'text/html'
|
||||
@ -58131,41 +58106,6 @@ const 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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
|
4
wp-includes/js/dist/block-editor.min.js
vendored
4
wp-includes/js/dist/block-editor.min.js
vendored
File diff suppressed because one or more lines are too long
701
wp-includes/js/dist/block-library.js
vendored
701
wp-includes/js/dist/block-library.js
vendored
@ -23171,99 +23171,144 @@ const html_init = () => initBlock({
|
||||
*/
|
||||
|
||||
|
||||
const image_deprecated_blockAttributes = {
|
||||
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'
|
||||
}
|
||||
};
|
||||
const deprecated_blockSupports = {
|
||||
anchor: true,
|
||||
color: {
|
||||
__experimentalDuotone: 'img',
|
||||
text: false,
|
||||
background: false
|
||||
},
|
||||
__experimentalBorder: {
|
||||
radius: true,
|
||||
__experimentalDefaultControls: {
|
||||
radius: true
|
||||
/**
|
||||
* Deprecation for adding the `wp-image-${id}` class to the image block for
|
||||
* responsive images.
|
||||
*
|
||||
* @see https://github.com/WordPress/gutenberg/pull/4898
|
||||
*/
|
||||
|
||||
const image_deprecated_v1 = {
|
||||
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'
|
||||
}
|
||||
}
|
||||
};
|
||||
const image_deprecated_deprecated = [// The following deprecation moves 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/
|
||||
{
|
||||
attributes: image_deprecated_blockAttributes,
|
||||
supports: deprecated_blockSupports,
|
||||
},
|
||||
|
||||
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
|
||||
}));
|
||||
}
|
||||
|
||||
};
|
||||
/**
|
||||
* 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({
|
||||
attributes
|
||||
@ -23274,19 +23319,93 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
|
||||
caption,
|
||||
align,
|
||||
href,
|
||||
rel,
|
||||
linkClass,
|
||||
width,
|
||||
height,
|
||||
id,
|
||||
linkTarget,
|
||||
sizeSlug,
|
||||
title
|
||||
id
|
||||
} = attributes;
|
||||
const image = (0,external_wp_element_namespaceObject.createElement)("img", {
|
||||
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;
|
||||
const newRel = !rel ? undefined : rel;
|
||||
const classes = classnames_default()({
|
||||
[`align${align}`]: align,
|
||||
[`size-${sizeSlug}`]: sizeSlug,
|
||||
'is-resized': width || height
|
||||
});
|
||||
const image = (0,external_wp_element_namespaceObject.createElement)("img", {
|
||||
@ -23294,37 +23413,97 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
|
||||
alt: alt,
|
||||
className: id ? `wp-image-${id}` : null,
|
||||
width: width,
|
||||
height: height,
|
||||
title: title
|
||||
height: height
|
||||
});
|
||||
const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
|
||||
className: linkClass,
|
||||
href: href,
|
||||
target: linkTarget,
|
||||
rel: newRel
|
||||
return (0,external_wp_element_namespaceObject.createElement)("figure", {
|
||||
className: classes
|
||||
}, 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
|
||||
}));
|
||||
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: {
|
||||
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: deprecated_blockSupports,
|
||||
supports: {
|
||||
anchor: true
|
||||
},
|
||||
|
||||
save({
|
||||
attributes
|
||||
@ -23381,8 +23560,106 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
|
||||
}, 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({
|
||||
attributes
|
||||
@ -23393,12 +23670,19 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
|
||||
caption,
|
||||
align,
|
||||
href,
|
||||
rel,
|
||||
linkClass,
|
||||
width,
|
||||
height,
|
||||
id
|
||||
id,
|
||||
linkTarget,
|
||||
sizeSlug,
|
||||
title
|
||||
} = attributes;
|
||||
const newRel = !rel ? undefined : rel;
|
||||
const classes = classnames_default()({
|
||||
[`align${align}`]: align,
|
||||
[`size-${sizeSlug}`]: sizeSlug,
|
||||
'is-resized': width || height
|
||||
});
|
||||
const image = (0,external_wp_element_namespaceObject.createElement)("img", {
|
||||
@ -23406,21 +23690,33 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
|
||||
alt: alt,
|
||||
className: id ? `wp-image-${id}` : null,
|
||||
width: width,
|
||||
height: height
|
||||
height: height,
|
||||
title: title
|
||||
});
|
||||
return (0,external_wp_element_namespaceObject.createElement)("figure", {
|
||||
className: classes
|
||||
}, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
|
||||
href: href
|
||||
const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
|
||||
className: linkClass,
|
||||
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, {
|
||||
tagName: "figcaption",
|
||||
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({
|
||||
attributes
|
||||
}) {
|
||||
@ -23430,76 +23726,58 @@ const image_deprecated_deprecated = [// The following deprecation moves existing
|
||||
caption,
|
||||
align,
|
||||
href,
|
||||
rel,
|
||||
linkClass,
|
||||
width,
|
||||
height,
|
||||
id
|
||||
aspectRatio,
|
||||
scale,
|
||||
id,
|
||||
linkTarget,
|
||||
sizeSlug,
|
||||
title
|
||||
} = 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", {
|
||||
src: url,
|
||||
alt: alt,
|
||||
className: id ? `wp-image-${id}` : null,
|
||||
className: imageClasses || undefined,
|
||||
style: { ...borderProps.style,
|
||||
aspectRatio,
|
||||
objectFit: scale
|
||||
},
|
||||
width: width,
|
||||
height: height
|
||||
height: height,
|
||||
title: title
|
||||
});
|
||||
return (0,external_wp_element_namespaceObject.createElement)("figure", {
|
||||
className: align ? `align${align}` : null
|
||||
}, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
|
||||
href: href
|
||||
const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
|
||||
className: linkClass,
|
||||
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, {
|
||||
className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
|
||||
tagName: "figcaption",
|
||||
value: caption
|
||||
}));
|
||||
return (0,external_wp_element_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
|
||||
className: classes
|
||||
})
|
||||
}, figure);
|
||||
}
|
||||
|
||||
}, {
|
||||
attributes: image_deprecated_blockAttributes,
|
||||
|
||||
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);
|
||||
};
|
||||
/* harmony default export */ var image_deprecated = ([image_deprecated_v6, image_deprecated_v5, image_deprecated_v4, image_deprecated_v3, image_deprecated_v2, image_deprecated_v1]);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js
|
||||
|
||||
@ -24560,7 +24838,9 @@ function image_save_save({
|
||||
className: imageClasses || undefined,
|
||||
style: { ...borderProps.style,
|
||||
aspectRatio,
|
||||
objectFit: scale
|
||||
objectFit: scale,
|
||||
width,
|
||||
height
|
||||
},
|
||||
width: width,
|
||||
height: height,
|
||||
@ -26498,10 +26778,10 @@ function list_edit_Edit({
|
||||
type: type,
|
||||
...innerBlocksProps
|
||||
}), controls, ordered && (0,external_wp_element_namespaceObject.createElement)(ordered_list_settings, {
|
||||
setAttributes: setAttributes,
|
||||
ordered: ordered,
|
||||
reversed: reversed,
|
||||
start: start
|
||||
setAttributes,
|
||||
reversed,
|
||||
start,
|
||||
type
|
||||
}));
|
||||
}
|
||||
|
||||
@ -34162,7 +34442,10 @@ function NavigationLinkEdit({
|
||||
|
||||
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 {
|
||||
innerBlocks,
|
||||
isAtMaxNesting,
|
||||
@ -34358,7 +34641,9 @@ function NavigationLinkEdit({
|
||||
});
|
||||
},
|
||||
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, {
|
||||
__nextHasNoMarginBottom: true,
|
||||
value: url || '',
|
||||
@ -34411,7 +34696,7 @@ function NavigationLinkEdit({
|
||||
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", {
|
||||
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,
|
||||
identifier: "label",
|
||||
className: "wp-block-navigation-item__label",
|
||||
@ -34433,7 +34718,7 @@ function NavigationLinkEdit({
|
||||
}
|
||||
}), description && (0,external_wp_element_namespaceObject.createElement)("span", {
|
||||
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"
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, {
|
||||
position: "top center",
|
||||
@ -34445,7 +34730,7 @@ function NavigationLinkEdit({
|
||||
// Unescape is used here to "recover" the escaped characters
|
||||
// so they display without encoding.
|
||||
// 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"
|
||||
}, tooltipText))))), isLinkOpen && (0,external_wp_element_namespaceObject.createElement)(LinkUI, {
|
||||
className: "wp-block-navigation-link__inline-link-input",
|
||||
@ -46422,6 +46707,14 @@ const quote_transforms_transforms = {
|
||||
style
|
||||
});
|
||||
}
|
||||
}, {
|
||||
type: 'block',
|
||||
blocks: ['core/paragraph'],
|
||||
transform: ({
|
||||
citation
|
||||
}, innerBlocks) => citation ? [...innerBlocks, (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {
|
||||
content: citation
|
||||
})] : innerBlocks
|
||||
}, {
|
||||
type: 'block',
|
||||
blocks: ['core/group'],
|
||||
@ -58058,6 +58351,9 @@ const video_init = () => initBlock({
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function FootnotesEdit({
|
||||
context: {
|
||||
postType,
|
||||
@ -58066,7 +58362,20 @@ function FootnotesEdit({
|
||||
}) {
|
||||
const [meta, updateMeta] = (0,external_wp_coreData_namespaceObject.useEntityProp)('postType', postType, 'meta', postId);
|
||||
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(({
|
||||
id,
|
||||
content
|
||||
@ -58221,7 +58530,6 @@ const {
|
||||
supports: {
|
||||
html: false,
|
||||
multiple: false,
|
||||
inserter: false,
|
||||
reusable: false
|
||||
},
|
||||
style: "wp-block-footnotes"
|
||||
@ -58229,11 +58537,9 @@ const {
|
||||
const formatName = 'core/footnote';
|
||||
const format = {
|
||||
title: (0,external_wp_i18n_namespaceObject.__)('Footnote'),
|
||||
tagName: 'a',
|
||||
tagName: 'sup',
|
||||
className: 'fn',
|
||||
attributes: {
|
||||
id: 'id',
|
||||
href: 'href',
|
||||
'data-fn': 'data-fn'
|
||||
},
|
||||
contentEditable: false,
|
||||
@ -58260,11 +58566,9 @@ const format = {
|
||||
const newValue = (0,external_wp_richText_namespaceObject.insertObject)(value, {
|
||||
type: formatName,
|
||||
attributes: {
|
||||
href: '#' + id,
|
||||
id: `${id}-link`,
|
||||
'data-fn': id
|
||||
},
|
||||
innerHTML: '*'
|
||||
innerHTML: `<a href="#${id}" id="${id}-link">*</a>`
|
||||
}, value.end, value.end);
|
||||
newValue.start = newValue.end - 1;
|
||||
onChange(newValue); // BFS search to find the first footnote block.
|
||||
@ -58337,7 +58641,6 @@ const footnotes_metadata = {
|
||||
supports: {
|
||||
html: false,
|
||||
multiple: false,
|
||||
inserter: false,
|
||||
reusable: false
|
||||
},
|
||||
style: "wp-block-footnotes"
|
||||
|
4
wp-includes/js/dist/block-library.min.js
vendored
4
wp-includes/js/dist/block-library.min.js
vendored
File diff suppressed because one or more lines are too long
64
wp-includes/js/dist/core-data.js
vendored
64
wp-includes/js/dist/core-data.js
vendored
@ -6322,9 +6322,12 @@ function useEntityBlockEditor(kind, name, {
|
||||
}
|
||||
}, [content]);
|
||||
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 {
|
||||
getRichTextValues
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
@ -6346,11 +6349,61 @@ function useEntityBlockEditor(kind, name, {
|
||||
|
||||
const footnotes = meta.footnotes ? JSON.parse(meta.footnotes) : [];
|
||||
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] || {
|
||||
id: fnId,
|
||||
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,
|
||||
...footnotes.reduce((acc, fn) => {
|
||||
if (!newOrder.includes(fn.id)) {
|
||||
@ -6363,7 +6416,8 @@ function useEntityBlockEditor(kind, name, {
|
||||
return {
|
||||
meta: { ...meta,
|
||||
footnotes: JSON.stringify(newFootnotes)
|
||||
}
|
||||
},
|
||||
blocks: newBlocks
|
||||
};
|
||||
}, [meta]);
|
||||
const onChange = (0,external_wp_element_namespaceObject.useCallback)((newBlocks, options) => {
|
||||
@ -6380,7 +6434,6 @@ function useEntityBlockEditor(kind, name, {
|
||||
// a new undo level.
|
||||
|
||||
const edits = {
|
||||
blocks: newBlocks,
|
||||
selection,
|
||||
content: ({
|
||||
blocks: blocksForSerialization = []
|
||||
@ -6397,7 +6450,6 @@ function useEntityBlockEditor(kind, name, {
|
||||
} = options;
|
||||
const footnotesChanges = updateFootnotes(newBlocks);
|
||||
const edits = {
|
||||
blocks: newBlocks,
|
||||
selection,
|
||||
...footnotesChanges
|
||||
};
|
||||
|
2
wp-includes/js/dist/core-data.min.js
vendored
2
wp-includes/js/dist/core-data.min.js
vendored
File diff suppressed because one or more lines are too long
58
wp-includes/js/dist/edit-post.js
vendored
58
wp-includes/js/dist/edit-post.js
vendored
@ -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"]
|
||||
var external_wp_primitives_namespaceObject = window["wp"]["primitives"];
|
||||
;// 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"];
|
||||
;// CONCATENATED MODULE: external ["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
|
||||
|
||||
|
||||
@ -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);
|
||||
;// CONCATENATED MODULE: external ["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
|
||||
/**
|
||||
* Function returning the current Meta Boxes DOM Node in the editor
|
||||
@ -3834,6 +3834,9 @@ function WelcomeGuideMenuItem() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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', {
|
||||
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, ({
|
||||
onClose
|
||||
}) => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
||||
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, {
|
||||
}) => (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, {
|
||||
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, {
|
||||
role: "menuitem",
|
||||
@ -8921,10 +8948,6 @@ function StartPageOptions() {
|
||||
|
||||
|
||||
|
||||
|
||||
const {
|
||||
BlockRemovalWarningModal
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
const interfaceLabels = {
|
||||
/* translators: accessibility text for the editor top bar landmark region. */
|
||||
header: (0,external_wp_i18n_namespaceObject.__)('Editor top bar'),
|
||||
@ -8941,9 +8964,6 @@ const interfaceLabels = {
|
||||
/* translators: accessibility text for the editor footer landmark region. */
|
||||
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({
|
||||
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, {
|
||||
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, {
|
||||
rules: blockRemovalRules
|
||||
}), (0,external_wp_element_namespaceObject.createElement)(settings_sidebar, null), (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
|
||||
}), (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, {
|
||||
isDistractionFree: isDistractionFree && isLargeViewport,
|
||||
className: className,
|
||||
labels: { ...interfaceLabels,
|
||||
|
2
wp-includes/js/dist/edit-post.min.js
vendored
2
wp-includes/js/dist/edit-post.min.js
vendored
File diff suppressed because one or more lines are too long
870
wp-includes/js/dist/edit-site.js
vendored
870
wp-includes/js/dist/edit-site.js
vendored
File diff suppressed because it is too large
Load Diff
6
wp-includes/js/dist/edit-site.min.js
vendored
6
wp-includes/js/dist/edit-site.min.js
vendored
File diff suppressed because one or more lines are too long
23
wp-includes/js/dist/reusable-blocks.js
vendored
23
wp-includes/js/dist/reusable-blocks.js
vendored
@ -411,21 +411,34 @@ function ReusableBlocksManageButton({
|
||||
const {
|
||||
canRemove,
|
||||
isVisible,
|
||||
innerBlockCount
|
||||
innerBlockCount,
|
||||
managePatternsUrl
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getBlock,
|
||||
canRemoveBlock,
|
||||
getBlockCount
|
||||
getBlockCount,
|
||||
getSettings
|
||||
} = select(external_wp_blockEditor_namespaceObject.store);
|
||||
const {
|
||||
canUser
|
||||
} = select(external_wp_coreData_namespaceObject.store);
|
||||
const reusableBlock = getBlock(clientId);
|
||||
|
||||
const isBlockTheme = getSettings().__unstableIsBlockBasedTheme;
|
||||
|
||||
return {
|
||||
canRemove: canRemoveBlock(clientId),
|
||||
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]);
|
||||
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, {
|
||||
href: (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
|
||||
post_type: 'wp_block'
|
||||
})
|
||||
href: managePatternsUrl
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Manage Patterns')), canRemove && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
||||
onClick: () => convertBlockToStatic(clientId)
|
||||
}, innerBlockCount > 1 ? (0,external_wp_i18n_namespaceObject.__)('Detach patterns') : (0,external_wp_i18n_namespaceObject.__)('Detach pattern')));
|
||||
|
2
wp-includes/js/dist/reusable-blocks.min.js
vendored
2
wp-includes/js/dist/reusable-blocks.min.js
vendored
File diff suppressed because one or more lines are too long
22
wp-includes/js/dist/rich-text.js
vendored
22
wp-includes/js/dist/rich-text.js
vendored
@ -2311,7 +2311,7 @@ function fromFormat({
|
||||
const formatType = get_format_type_getFormatType(type);
|
||||
let elementAttributes = {};
|
||||
|
||||
if (boundaryClass) {
|
||||
if (boundaryClass && isEditableTree) {
|
||||
elementAttributes['data-rich-text-format-boundary'] = 'true';
|
||||
}
|
||||
|
||||
@ -2358,7 +2358,7 @@ function fromFormat({
|
||||
}
|
||||
|
||||
return {
|
||||
type: formatType.tagName === '*' ? tagName : formatType.tagName,
|
||||
type: tagName || formatType.tagName,
|
||||
object: formatType.object,
|
||||
attributes: restoreOnAttributes(elementAttributes, isEditableTree)
|
||||
};
|
||||
@ -2551,7 +2551,12 @@ function toTree({
|
||||
isEditableTree,
|
||||
boundaryClass: start === i && end === i + 1
|
||||
}));
|
||||
if (innerHTML) append(pointer, innerHTML);
|
||||
|
||||
if (innerHTML) {
|
||||
append(pointer, {
|
||||
html: innerHTML
|
||||
});
|
||||
}
|
||||
} else {
|
||||
pointer = append(getParent(pointer), fromFormat({ ...replacement,
|
||||
object: true,
|
||||
@ -2685,6 +2690,10 @@ function getNodeByPath(node, path) {
|
||||
}
|
||||
|
||||
function append(element, child) {
|
||||
if (child.html !== undefined) {
|
||||
return element.innerHTML += child.html;
|
||||
}
|
||||
|
||||
if (typeof child === 'string') {
|
||||
child = element.ownerDocument.createTextNode(child);
|
||||
}
|
||||
@ -3712,8 +3721,11 @@ function useSelectObject() {
|
||||
// happen. This means it's "click-through".
|
||||
|
||||
if (selection.containsNode(target)) return;
|
||||
const range = ownerDocument.createRange();
|
||||
range.selectNode(target);
|
||||
const range = ownerDocument.createRange(); // If the target is within a non editable element, select the non
|
||||
// editable element.
|
||||
|
||||
const nodeToSelect = target.isContentEditable ? target : target.closest('[contenteditable]');
|
||||
range.selectNode(nodeToSelect);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
event.preventDefault();
|
||||
|
2
wp-includes/js/dist/rich-text.min.js
vendored
2
wp-includes/js/dist/rich-text.min.js
vendored
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @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.
|
||||
|
Loading…
Reference in New Issue
Block a user