mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Editor: update npm packages with bug fixes and blessed tasks.
Includes miscellaneous bug fixes and enhancements to the Library task (#58579) and to the site vs content editing task (#58641) Fixes #58701. Built from https://develop.svn.wordpress.org/trunk@56127 git-svn-id: http://core.svn.wordpress.org/trunk@55639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4a7e3080c3
commit
919ea56557
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -59,15 +59,17 @@ function render_block_core_footnotes( $attributes, $content, $block ) {
|
||||
* Registers the `core/footnotes` block on the server.
|
||||
*/
|
||||
function register_block_core_footnotes() {
|
||||
register_post_meta(
|
||||
'post',
|
||||
'footnotes',
|
||||
array(
|
||||
'show_in_rest' => true,
|
||||
'single' => true,
|
||||
'type' => 'string',
|
||||
)
|
||||
);
|
||||
foreach ( array( 'post', 'page' ) as $post_type ) {
|
||||
register_post_meta(
|
||||
$post_type,
|
||||
'footnotes',
|
||||
array(
|
||||
'show_in_rest' => true,
|
||||
'single' => true,
|
||||
'type' => 'string',
|
||||
)
|
||||
);
|
||||
}
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/footnotes',
|
||||
array(
|
||||
|
@ -2,7 +2,7 @@
|
||||
counter-reset:footnotes;
|
||||
}
|
||||
|
||||
.fn{
|
||||
[data-fn].fn{
|
||||
counter-increment:footnotes;
|
||||
display:inline-block;
|
||||
font-size:smaller;
|
||||
@ -10,7 +10,7 @@
|
||||
vertical-align:super;
|
||||
}
|
||||
|
||||
.fn:after{
|
||||
[data-fn].fn:after{
|
||||
content:"[" counter(footnotes) "]";
|
||||
float:right;
|
||||
text-indent:0;
|
||||
|
@ -1 +1 @@
|
||||
.editor-styles-wrapper,.entry-content{counter-reset:footnotes}.fn{counter-increment:footnotes;display:inline-block;font-size:smaller;text-indent:-9999999px;vertical-align:super}.fn:after{content:"[" counter(footnotes) "]";float:right;text-indent:0}
|
||||
.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}
|
@ -2,7 +2,7 @@
|
||||
counter-reset:footnotes;
|
||||
}
|
||||
|
||||
.fn{
|
||||
[data-fn].fn{
|
||||
counter-increment:footnotes;
|
||||
display:inline-block;
|
||||
font-size:smaller;
|
||||
@ -10,7 +10,7 @@
|
||||
vertical-align:super;
|
||||
}
|
||||
|
||||
.fn:after{
|
||||
[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}.fn{counter-increment:footnotes;display:inline-block;font-size:smaller;text-indent:-9999999px;vertical-align:super}.fn:after{content:"[" counter(footnotes) "]";float:left;text-indent:0}
|
||||
.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}
|
@ -47,8 +47,8 @@ function render_block_core_social_link( $attributes, $content, $block ) {
|
||||
$icon = block_core_social_link_get_icon( $service );
|
||||
$wrapper_attributes = get_block_wrapper_attributes(
|
||||
array(
|
||||
'class' => esc_attr( 'wp-social-link wp-social-link-' . $service . block_core_social_link_get_color_classes( $block->context ) ),
|
||||
'style' => esc_attr( block_core_social_link_get_color_styles( $block->context ) ),
|
||||
'class' => 'wp-social-link wp-social-link-' . $service . block_core_social_link_get_color_classes( $block->context ),
|
||||
'style' => block_core_social_link_get_color_styles( $block->context ),
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -577,6 +577,9 @@
|
||||
.block-editor-default-block-appender .block-editor-default-block-appender__content{
|
||||
opacity:.62;
|
||||
}
|
||||
:where(body .is-layout-constrained) .block-editor-default-block-appender>:first-child:first-child{
|
||||
margin-block-start:0;
|
||||
}
|
||||
.block-editor-default-block-appender .components-drop-zone__content-icon{
|
||||
display:none;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -577,6 +577,9 @@
|
||||
.block-editor-default-block-appender .block-editor-default-block-appender__content{
|
||||
opacity:.62;
|
||||
}
|
||||
:where(body .is-layout-constrained) .block-editor-default-block-appender>:first-child:first-child{
|
||||
margin-block-start:0;
|
||||
}
|
||||
.block-editor-default-block-appender .components-drop-zone__content-icon{
|
||||
display:none;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -2453,9 +2453,8 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
||||
}
|
||||
.block-editor-list-view-drop-indicator .block-editor-list-view-drop-indicator__line{
|
||||
background:var(--wp-admin-theme-color);
|
||||
border:1px solid #fff;
|
||||
border-radius:4px;
|
||||
height:6px;
|
||||
height:4px;
|
||||
}
|
||||
|
||||
.block-editor-list-view-placeholder{
|
||||
|
File diff suppressed because one or more lines are too long
3
wp-includes/css/dist/block-editor/style.css
vendored
3
wp-includes/css/dist/block-editor/style.css
vendored
@ -2453,9 +2453,8 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
||||
}
|
||||
.block-editor-list-view-drop-indicator .block-editor-list-view-drop-indicator__line{
|
||||
background:var(--wp-admin-theme-color);
|
||||
border:1px solid #fff;
|
||||
border-radius:4px;
|
||||
height:6px;
|
||||
height:4px;
|
||||
}
|
||||
|
||||
.block-editor-list-view-placeholder{
|
||||
|
File diff suppressed because one or more lines are too long
@ -3227,7 +3227,7 @@ pre.wp-block-verse{
|
||||
counter-reset:footnotes;
|
||||
}
|
||||
|
||||
.fn{
|
||||
[data-fn].fn{
|
||||
counter-increment:footnotes;
|
||||
display:inline-block;
|
||||
font-size:smaller;
|
||||
@ -3235,7 +3235,7 @@ pre.wp-block-verse{
|
||||
vertical-align:super;
|
||||
}
|
||||
|
||||
.fn:after{
|
||||
[data-fn].fn:after{
|
||||
content:"[" counter(footnotes) "]";
|
||||
float:right;
|
||||
text-indent:0;
|
||||
|
File diff suppressed because one or more lines are too long
4
wp-includes/css/dist/block-library/style.css
vendored
4
wp-includes/css/dist/block-library/style.css
vendored
@ -3227,7 +3227,7 @@ pre.wp-block-verse{
|
||||
counter-reset:footnotes;
|
||||
}
|
||||
|
||||
.fn{
|
||||
[data-fn].fn{
|
||||
counter-increment:footnotes;
|
||||
display:inline-block;
|
||||
font-size:smaller;
|
||||
@ -3235,7 +3235,7 @@ pre.wp-block-verse{
|
||||
vertical-align:super;
|
||||
}
|
||||
|
||||
.fn:after{
|
||||
[data-fn].fn:after{
|
||||
content:"[" counter(footnotes) "]";
|
||||
float:left;
|
||||
text-indent:0;
|
||||
|
File diff suppressed because one or more lines are too long
25
wp-includes/css/dist/components/style-rtl.css
vendored
25
wp-includes/css/dist/components/style-rtl.css
vendored
@ -1470,7 +1470,7 @@ body.is-dragging-components-draggable{
|
||||
.components-guide__footer{
|
||||
align-content:center;
|
||||
display:flex;
|
||||
height:30px;
|
||||
height:36px;
|
||||
justify-content:center;
|
||||
margin:0 0 24px;
|
||||
padding:0 32px;
|
||||
@ -1486,14 +1486,17 @@ body.is-dragging-components-draggable{
|
||||
margin:0;
|
||||
}
|
||||
.components-guide__page-control .components-button{
|
||||
color:#e0e0e0;
|
||||
height:30px;
|
||||
margin:-6px 0;
|
||||
min-width:20px;
|
||||
}
|
||||
.components-guide__page-control li[aria-current=step] .components-button{
|
||||
color:var(--wp-components-color-accent, var(--wp-admin-theme-color));
|
||||
}
|
||||
|
||||
.components-modal__frame.components-guide{
|
||||
border:none;
|
||||
height:80vh;
|
||||
max-height:575px;
|
||||
min-width:312px;
|
||||
}
|
||||
@ -1505,28 +1508,12 @@ body.is-dragging-components-draggable{
|
||||
}
|
||||
|
||||
.components-button.components-guide__back-button,.components-button.components-guide__finish-button,.components-button.components-guide__forward-button{
|
||||
height:30px;
|
||||
position:absolute;
|
||||
}
|
||||
.components-button.components-guide__back-button,.components-button.components-guide__forward-button{
|
||||
font-size:13px;
|
||||
padding:4px 2px;
|
||||
}
|
||||
.components-button.components-guide__back-button.has-text svg,.components-button.components-guide__forward-button.has-text svg{
|
||||
margin:0;
|
||||
}
|
||||
.components-button.components-guide__back-button:hover,.components-button.components-guide__forward-button:hover{
|
||||
text-decoration:underline;
|
||||
}
|
||||
.components-button.components-guide__back-button{
|
||||
right:32px;
|
||||
}
|
||||
.components-button.components-guide__forward-button{
|
||||
color:#1386bf;
|
||||
font-weight:700;
|
||||
left:32px;
|
||||
}
|
||||
.components-button.components-guide__finish-button{
|
||||
.components-button.components-guide__finish-button,.components-button.components-guide__forward-button{
|
||||
left:32px;
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
25
wp-includes/css/dist/components/style.css
vendored
25
wp-includes/css/dist/components/style.css
vendored
@ -1470,7 +1470,7 @@ body.is-dragging-components-draggable{
|
||||
.components-guide__footer{
|
||||
align-content:center;
|
||||
display:flex;
|
||||
height:30px;
|
||||
height:36px;
|
||||
justify-content:center;
|
||||
margin:0 0 24px;
|
||||
padding:0 32px;
|
||||
@ -1486,14 +1486,17 @@ body.is-dragging-components-draggable{
|
||||
margin:0;
|
||||
}
|
||||
.components-guide__page-control .components-button{
|
||||
color:#e0e0e0;
|
||||
height:30px;
|
||||
margin:-6px 0;
|
||||
min-width:20px;
|
||||
}
|
||||
.components-guide__page-control li[aria-current=step] .components-button{
|
||||
color:var(--wp-components-color-accent, var(--wp-admin-theme-color));
|
||||
}
|
||||
|
||||
.components-modal__frame.components-guide{
|
||||
border:none;
|
||||
height:80vh;
|
||||
max-height:575px;
|
||||
min-width:312px;
|
||||
}
|
||||
@ -1505,28 +1508,12 @@ body.is-dragging-components-draggable{
|
||||
}
|
||||
|
||||
.components-button.components-guide__back-button,.components-button.components-guide__finish-button,.components-button.components-guide__forward-button{
|
||||
height:30px;
|
||||
position:absolute;
|
||||
}
|
||||
.components-button.components-guide__back-button,.components-button.components-guide__forward-button{
|
||||
font-size:13px;
|
||||
padding:4px 2px;
|
||||
}
|
||||
.components-button.components-guide__back-button.has-text svg,.components-button.components-guide__forward-button.has-text svg{
|
||||
margin:0;
|
||||
}
|
||||
.components-button.components-guide__back-button:hover,.components-button.components-guide__forward-button:hover{
|
||||
text-decoration:underline;
|
||||
}
|
||||
.components-button.components-guide__back-button{
|
||||
left:32px;
|
||||
}
|
||||
.components-button.components-guide__forward-button{
|
||||
color:#1386bf;
|
||||
font-weight:700;
|
||||
right:32px;
|
||||
}
|
||||
.components-button.components-guide__finish-button{
|
||||
.components-button.components-guide__finish-button,.components-button.components-guide__forward-button{
|
||||
right:32px;
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
67
wp-includes/css/dist/edit-site/style-rtl.css
vendored
67
wp-includes/css/dist/edit-site/style-rtl.css
vendored
@ -1604,54 +1604,54 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||
padding:32px;
|
||||
}
|
||||
|
||||
.edit-site-library{
|
||||
.edit-site-patterns{
|
||||
background:rgba(0,0,0,.05);
|
||||
margin:60px 0 0;
|
||||
}
|
||||
.edit-site-library .components-text{
|
||||
.edit-site-patterns .components-text{
|
||||
color:#949494;
|
||||
}
|
||||
.edit-site-library .components-heading{
|
||||
.edit-site-patterns .components-heading{
|
||||
color:#e0e0e0;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.edit-site-library{
|
||||
.edit-site-patterns{
|
||||
margin:0;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-site-library__grid{
|
||||
.edit-site-patterns__grid{
|
||||
column-gap:24px;
|
||||
margin-bottom:32px;
|
||||
padding-top:2px;
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.edit-site-library__grid{
|
||||
.edit-site-patterns__grid{
|
||||
column-count:2;
|
||||
}
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern{
|
||||
break-inside:avoid-column;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
margin-bottom:48px;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern .edit-site-library__preview{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview{
|
||||
border-radius:2px;
|
||||
cursor:pointer;
|
||||
overflow:hidden;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern .edit-site-library__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);
|
||||
outline:2px solid transparent;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern .edit-site-library__preview.is-inactive{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive{
|
||||
cursor:default;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern .edit-site-library__button,.edit-site-library__grid .edit-site-library__pattern .edit-site-library__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;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern.is-placeholder .edit-site-library__preview{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern.is-placeholder .edit-site-patterns__preview{
|
||||
align-items:center;
|
||||
border:1px dashed #2f2f2f;
|
||||
color:#949494;
|
||||
@ -1659,35 +1659,38 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||
justify-content:center;
|
||||
min-height:64px;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern.is-placeholder .edit-site-library__preview:focus{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern.is-placeholder .edit-site-patterns__preview:focus{
|
||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__preview{
|
||||
.edit-site-patterns__grid .edit-site-patterns__preview{
|
||||
flex:1;
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
.edit-site-library__search.edit-site-library__search input[type=search]{
|
||||
.edit-site-patterns__search.edit-site-patterns__search input[type=search]{
|
||||
background:#2f2f2f;
|
||||
color:#e0e0e0;
|
||||
}
|
||||
.edit-site-library__search.edit-site-library__search input[type=search]:focus{
|
||||
.edit-site-patterns__search.edit-site-patterns__search input[type=search]:focus{
|
||||
background:#2f2f2f;
|
||||
}
|
||||
.edit-site-library__search svg{
|
||||
.edit-site-patterns__search svg{
|
||||
fill:#949494;
|
||||
}
|
||||
|
||||
.edit-site-library__pattern-title{
|
||||
.edit-site-patterns__pattern-title{
|
||||
color:#949494;
|
||||
}
|
||||
.edit-site-library__pattern-title svg{
|
||||
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-icon{
|
||||
fill:#fff;
|
||||
background:var(--wp-block-synced-color);
|
||||
border-radius:4px;
|
||||
}
|
||||
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon{
|
||||
display:inline-flex;
|
||||
}
|
||||
|
||||
.edit-site-library__no-results{
|
||||
.edit-site-patterns__no-results{
|
||||
color:#949494;
|
||||
}
|
||||
|
||||
@ -2202,8 +2205,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
|
||||
.edit-site-welcome-guide{
|
||||
width:312px;
|
||||
}
|
||||
.edit-site-welcome-guide__image{
|
||||
.edit-site-welcome-guide.guide-editor .edit-site-welcome-guide__image .edit-site-welcome-guide.guide-styles .edit-site-welcome-guide__image{
|
||||
background:#00a0d2;
|
||||
}
|
||||
.edit-site-welcome-guide.guide-page .edit-site-welcome-guide__video{
|
||||
border-left:16px solid #3858e9;
|
||||
border-top:16px solid #3858e9;
|
||||
}
|
||||
.edit-site-welcome-guide.guide-template .edit-site-welcome-guide__video{
|
||||
border-right:16px solid #3858e9;
|
||||
border-top:16px solid #3858e9;
|
||||
}
|
||||
.edit-site-welcome-guide__image{
|
||||
margin:0 0 16px;
|
||||
}
|
||||
.edit-site-welcome-guide__image>img{
|
||||
@ -2837,10 +2850,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
|
||||
color:#949494;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-library__group{
|
||||
margin-bottom:24px;
|
||||
}
|
||||
|
||||
.sidebar-navigation__more-menu .components-button{
|
||||
color:#e0e0e0;
|
||||
}
|
||||
@ -2955,6 +2964,14 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
|
||||
width:24px;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-pattern__lock-icon{
|
||||
display:inline-flex;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-patterns__group{
|
||||
margin-bottom:24px;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-template__added-by-description{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
|
File diff suppressed because one or more lines are too long
67
wp-includes/css/dist/edit-site/style.css
vendored
67
wp-includes/css/dist/edit-site/style.css
vendored
@ -1604,54 +1604,54 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||
padding:32px;
|
||||
}
|
||||
|
||||
.edit-site-library{
|
||||
.edit-site-patterns{
|
||||
background:rgba(0,0,0,.05);
|
||||
margin:60px 0 0;
|
||||
}
|
||||
.edit-site-library .components-text{
|
||||
.edit-site-patterns .components-text{
|
||||
color:#949494;
|
||||
}
|
||||
.edit-site-library .components-heading{
|
||||
.edit-site-patterns .components-heading{
|
||||
color:#e0e0e0;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.edit-site-library{
|
||||
.edit-site-patterns{
|
||||
margin:0;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-site-library__grid{
|
||||
.edit-site-patterns__grid{
|
||||
column-gap:24px;
|
||||
margin-bottom:32px;
|
||||
padding-top:2px;
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.edit-site-library__grid{
|
||||
.edit-site-patterns__grid{
|
||||
column-count:2;
|
||||
}
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern{
|
||||
break-inside:avoid-column;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
margin-bottom:48px;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern .edit-site-library__preview{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview{
|
||||
border-radius:2px;
|
||||
cursor:pointer;
|
||||
overflow:hidden;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern .edit-site-library__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);
|
||||
outline:2px solid transparent;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern .edit-site-library__preview.is-inactive{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern .edit-site-patterns__preview.is-inactive{
|
||||
cursor:default;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern .edit-site-library__button,.edit-site-library__grid .edit-site-library__pattern .edit-site-library__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;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern.is-placeholder .edit-site-library__preview{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern.is-placeholder .edit-site-patterns__preview{
|
||||
align-items:center;
|
||||
border:1px dashed #2f2f2f;
|
||||
color:#949494;
|
||||
@ -1659,35 +1659,38 @@ body.is-fullscreen-mode .edit-site-list-header{
|
||||
justify-content:center;
|
||||
min-height:64px;
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__pattern.is-placeholder .edit-site-library__preview:focus{
|
||||
.edit-site-patterns__grid .edit-site-patterns__pattern.is-placeholder .edit-site-patterns__preview:focus{
|
||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
||||
}
|
||||
.edit-site-library__grid .edit-site-library__preview{
|
||||
.edit-site-patterns__grid .edit-site-patterns__preview{
|
||||
flex:1;
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
.edit-site-library__search.edit-site-library__search input[type=search]{
|
||||
.edit-site-patterns__search.edit-site-patterns__search input[type=search]{
|
||||
background:#2f2f2f;
|
||||
color:#e0e0e0;
|
||||
}
|
||||
.edit-site-library__search.edit-site-library__search input[type=search]:focus{
|
||||
.edit-site-patterns__search.edit-site-patterns__search input[type=search]:focus{
|
||||
background:#2f2f2f;
|
||||
}
|
||||
.edit-site-library__search svg{
|
||||
.edit-site-patterns__search svg{
|
||||
fill:#949494;
|
||||
}
|
||||
|
||||
.edit-site-library__pattern-title{
|
||||
.edit-site-patterns__pattern-title{
|
||||
color:#949494;
|
||||
}
|
||||
.edit-site-library__pattern-title svg{
|
||||
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-icon{
|
||||
fill:#fff;
|
||||
background:var(--wp-block-synced-color);
|
||||
border-radius:4px;
|
||||
}
|
||||
.edit-site-patterns__pattern-title .edit-site-patterns__pattern-lock-icon{
|
||||
display:inline-flex;
|
||||
}
|
||||
|
||||
.edit-site-library__no-results{
|
||||
.edit-site-patterns__no-results{
|
||||
color:#949494;
|
||||
}
|
||||
|
||||
@ -2202,8 +2205,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
|
||||
.edit-site-welcome-guide{
|
||||
width:312px;
|
||||
}
|
||||
.edit-site-welcome-guide__image{
|
||||
.edit-site-welcome-guide.guide-editor .edit-site-welcome-guide__image .edit-site-welcome-guide.guide-styles .edit-site-welcome-guide__image{
|
||||
background:#00a0d2;
|
||||
}
|
||||
.edit-site-welcome-guide.guide-page .edit-site-welcome-guide__video{
|
||||
border-right:16px solid #3858e9;
|
||||
border-top:16px solid #3858e9;
|
||||
}
|
||||
.edit-site-welcome-guide.guide-template .edit-site-welcome-guide__video{
|
||||
border-left:16px solid #3858e9;
|
||||
border-top:16px solid #3858e9;
|
||||
}
|
||||
.edit-site-welcome-guide__image{
|
||||
margin:0 0 16px;
|
||||
}
|
||||
.edit-site-welcome-guide__image>img{
|
||||
@ -2837,10 +2850,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
|
||||
color:#949494;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-library__group{
|
||||
margin-bottom:24px;
|
||||
}
|
||||
|
||||
.sidebar-navigation__more-menu .components-button{
|
||||
color:#e0e0e0;
|
||||
}
|
||||
@ -2955,6 +2964,14 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
|
||||
width:24px;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-pattern__lock-icon{
|
||||
display:inline-flex;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-patterns__group{
|
||||
margin-bottom:24px;
|
||||
}
|
||||
|
||||
.edit-site-sidebar-navigation-screen-template__added-by-description{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
|
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
4
wp-includes/css/dist/editor/style-rtl.css
vendored
4
wp-includes/css/dist/editor/style-rtl.css
vendored
@ -538,8 +538,8 @@
|
||||
flex-shrink:0;
|
||||
width:45%;
|
||||
}
|
||||
.edit-post-sync-status .components-base-control{
|
||||
padding-right:6px;
|
||||
.edit-post-sync-status>div{
|
||||
padding-right:12px;
|
||||
}
|
||||
|
||||
.editor-post-taxonomies__hierarchical-terms-list{
|
||||
|
File diff suppressed because one or more lines are too long
4
wp-includes/css/dist/editor/style.css
vendored
4
wp-includes/css/dist/editor/style.css
vendored
@ -538,8 +538,8 @@
|
||||
flex-shrink:0;
|
||||
width:45%;
|
||||
}
|
||||
.edit-post-sync-status .components-base-control{
|
||||
padding-left:6px;
|
||||
.edit-post-sync-status>div{
|
||||
padding-left:12px;
|
||||
}
|
||||
|
||||
.editor-post-taxonomies__hierarchical-terms-list{
|
||||
|
2
wp-includes/css/dist/editor/style.min.css
vendored
2
wp-includes/css/dist/editor/style.min.css
vendored
File diff suppressed because one or more lines are too long
10
wp-includes/js/dist/annotations.js
vendored
10
wp-includes/js/dist/annotations.js
vendored
@ -811,7 +811,7 @@ function __experimentalGetAnnotations(state) {
|
||||
return Object.values(state).flat();
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/rng.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js
|
||||
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
||||
// require the crypto API and do not support built-in fallback to lower quality random number
|
||||
// generators (like Math.random()).
|
||||
@ -831,9 +831,9 @@ function rng() {
|
||||
|
||||
return getRandomValues(rnds8);
|
||||
}
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/regex.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/regex.js
|
||||
/* harmony default export */ var regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/validate.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/validate.js
|
||||
|
||||
|
||||
function validate(uuid) {
|
||||
@ -841,7 +841,7 @@ function validate(uuid) {
|
||||
}
|
||||
|
||||
/* harmony default export */ var esm_browser_validate = (validate);
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/stringify.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js
|
||||
|
||||
/**
|
||||
* Convert array of 16 byte values to UUID string format of the form:
|
||||
@ -872,7 +872,7 @@ function stringify(arr) {
|
||||
}
|
||||
|
||||
/* harmony default export */ var esm_browser_stringify = (stringify);
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/v4.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js
|
||||
|
||||
|
||||
|
||||
|
113
wp-includes/js/dist/block-editor.js
vendored
113
wp-includes/js/dist/block-editor.js
vendored
@ -8251,7 +8251,6 @@ const buildBlockTypeItem = (state, {
|
||||
*
|
||||
* @param {Object} state Editor state.
|
||||
* @param {?string} rootClientId Optional root client ID of block list.
|
||||
* @param {?string} syncStatus Optional sync status to filter pattern blocks by.
|
||||
*
|
||||
* @return {WPEditorInserterItem[]} Items that appear in inserter.
|
||||
*
|
||||
@ -8269,10 +8268,7 @@ const buildBlockTypeItem = (state, {
|
||||
*/
|
||||
|
||||
|
||||
const getInserterItems = rememo((state, rootClientId = null, syncStatus) => {
|
||||
const buildBlockTypeInserterItem = buildBlockTypeItem(state, {
|
||||
buildScope: 'inserter'
|
||||
});
|
||||
const getInserterItems = rememo((state, rootClientId = null) => {
|
||||
/*
|
||||
* Matches block comment delimiters amid serialized content.
|
||||
*
|
||||
@ -8286,7 +8282,6 @@ const getInserterItems = rememo((state, rootClientId = null, syncStatus) => {
|
||||
* - prepended ^\s*
|
||||
*
|
||||
*/
|
||||
|
||||
const blockParserTokenizer = /^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/;
|
||||
|
||||
const buildReusableBlockInserterItem = reusableBlock => {
|
||||
@ -8338,8 +8333,13 @@ const getInserterItems = rememo((state, rootClientId = null, syncStatus) => {
|
||||
};
|
||||
};
|
||||
|
||||
const syncedPatternInserterItems = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).filter(reusableBlock => // Filter to either fully synced patterns (sync_status === 'fully'),
|
||||
// or old school reusable blocks (sync_status === '').
|
||||
reusableBlock.meta?.sync_status === 'fully' || reusableBlock.meta?.sync_status === '' || !reusableBlock.meta?.sync_status).map(buildReusableBlockInserterItem) : [];
|
||||
const buildBlockTypeInserterItem = buildBlockTypeItem(state, {
|
||||
buildScope: 'inserter'
|
||||
});
|
||||
const blockTypeInserterItems = (0,external_wp_blocks_namespaceObject.getBlockTypes)().filter(blockType => canIncludeBlockTypeInInserter(state, blockType, rootClientId)).map(buildBlockTypeInserterItem);
|
||||
const reusableBlockInserterItems = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).filter(reusableBlock => syncStatus === reusableBlock.meta?.sync_status || !syncStatus && reusableBlock.meta?.sync_status === '').map(buildReusableBlockInserterItem) : [];
|
||||
const items = blockTypeInserterItems.reduce((accumulator, item) => {
|
||||
const {
|
||||
variations = []
|
||||
@ -8381,7 +8381,7 @@ const getInserterItems = rememo((state, rootClientId = null, syncStatus) => {
|
||||
noncore: []
|
||||
});
|
||||
const sortedBlockTypes = [...coreItems, ...nonCoreItems];
|
||||
return [...sortedBlockTypes, ...reusableBlockInserterItems];
|
||||
return [...sortedBlockTypes, ...syncedPatternInserterItems];
|
||||
}, (state, rootClientId) => [state.blockListSettings[rootClientId], state.blocks.byClientId, state.blocks.order, state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks(state), (0,external_wp_blocks_namespaceObject.getBlockTypes)()]);
|
||||
/**
|
||||
* Determines the items that appear in the available block transforms list.
|
||||
@ -8525,9 +8525,24 @@ const checkAllowListRecursive = (blocks, allowedBlockTypes) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
function getUnsyncedPatterns(state) {
|
||||
var _state$settings$__exp;
|
||||
|
||||
const reusableBlocks = (_state$settings$__exp = state?.settings?.__experimentalReusableBlocks) !== null && _state$settings$__exp !== void 0 ? _state$settings$__exp : EMPTY_ARRAY;
|
||||
return reusableBlocks.filter(reusableBlock => reusableBlock.meta?.sync_status === 'unsynced').map(reusableBlock => {
|
||||
return {
|
||||
name: `core/block/${reusableBlock.id}`,
|
||||
title: reusableBlock.title.raw,
|
||||
categories: ['custom'],
|
||||
content: reusableBlock.content.raw
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
const __experimentalGetParsedPattern = rememo((state, patternName) => {
|
||||
const patterns = state.settings.__experimentalBlockPatterns;
|
||||
const pattern = patterns.find(({
|
||||
const unsyncedPatterns = getUnsyncedPatterns(state);
|
||||
const pattern = [...patterns, ...unsyncedPatterns].find(({
|
||||
name
|
||||
}) => name === patternName);
|
||||
|
||||
@ -8540,13 +8555,14 @@ const __experimentalGetParsedPattern = rememo((state, patternName) => {
|
||||
__unstableSkipMigrationLogs: true
|
||||
})
|
||||
};
|
||||
}, state => [state.settings.__experimentalBlockPatterns]);
|
||||
}, state => [state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks]);
|
||||
const getAllAllowedPatterns = rememo(state => {
|
||||
const patterns = state.settings.__experimentalBlockPatterns;
|
||||
const unsyncedPatterns = getUnsyncedPatterns(state);
|
||||
const {
|
||||
allowedBlockTypes
|
||||
} = getSettings(state);
|
||||
const parsedPatterns = patterns.filter(({
|
||||
const parsedPatterns = [...patterns, ...unsyncedPatterns].filter(({
|
||||
inserter = true
|
||||
}) => !!inserter).map(({
|
||||
name
|
||||
@ -8555,7 +8571,7 @@ const getAllAllowedPatterns = rememo(state => {
|
||||
blocks
|
||||
}) => checkAllowListRecursive(blocks, allowedBlockTypes));
|
||||
return allowedPatterns;
|
||||
}, state => [state.settings.__experimentalBlockPatterns, state.settings.allowedBlockTypes]);
|
||||
}, state => [state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks, state.settings.allowedBlockTypes]);
|
||||
/**
|
||||
* Returns the list of allowed patterns for inner blocks children.
|
||||
*
|
||||
@ -8573,7 +8589,7 @@ const __experimentalGetAllowedPatterns = rememo((state, rootClientId = null) =>
|
||||
name
|
||||
}) => canInsertBlockType(state, name, rootClientId)));
|
||||
return patternsAllowed;
|
||||
}, (state, rootClientId) => [state.settings.__experimentalBlockPatterns, state.settings.allowedBlockTypes, state.settings.templateLock, state.blockListSettings[rootClientId], state.blocks.byClientId.get(rootClientId)]);
|
||||
}, (state, rootClientId) => [state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks, state.settings.allowedBlockTypes, state.settings.templateLock, state.blockListSettings[rootClientId], state.blocks.byClientId.get(rootClientId)]);
|
||||
/**
|
||||
* Returns the list of patterns based on their declared `blockTypes`
|
||||
* and a block's name.
|
||||
@ -8797,9 +8813,9 @@ function __experimentalGetLastBlockAttributeChanges(state) {
|
||||
*/
|
||||
|
||||
function getReusableBlocks(state) {
|
||||
var _state$settings$__exp;
|
||||
var _state$settings$__exp2;
|
||||
|
||||
return (_state$settings$__exp = state?.settings?.__experimentalReusableBlocks) !== null && _state$settings$__exp !== void 0 ? _state$settings$__exp : EMPTY_ARRAY;
|
||||
return (_state$settings$__exp2 = state?.settings?.__experimentalReusableBlocks) !== null && _state$settings$__exp2 !== void 0 ? _state$settings$__exp2 : EMPTY_ARRAY;
|
||||
}
|
||||
/**
|
||||
* Returns whether the navigation mode is enabled.
|
||||
@ -9101,7 +9117,7 @@ function BlockRemovalWarningModal() {
|
||||
}
|
||||
}, blockNamesForPrompt.map(name => (0,external_wp_element_namespaceObject.createElement)("li", {
|
||||
key: name
|
||||
}, blockTypePromptMessages[name]))), (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject._n)('Removing this block is not advised.', 'Removing these blocks is not advised.', blockNamesForPrompt.length)), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
|
||||
}, blockTypePromptMessages[name]))), (0,external_wp_element_namespaceObject.createElement)("p", null, blockNamesForPrompt.length > 1 ? (0,external_wp_i18n_namespaceObject.__)('Removing these blocks is not advised.') : (0,external_wp_i18n_namespaceObject.__)('Removing this block is not advised.')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
|
||||
justify: "right"
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
|
||||
variant: "tertiary",
|
||||
@ -27546,11 +27562,10 @@ function InserterPanel({
|
||||
*
|
||||
* @param {string=} rootClientId Insertion's root client ID.
|
||||
* @param {Function} onInsert function called when inserter a list of blocks.
|
||||
* @param {?string} syncStatus Optional sync status to filter pattern blocks by.
|
||||
* @return {Array} Returns the block types state. (block types, categories, collections, onSelect handler)
|
||||
*/
|
||||
|
||||
const useBlockTypesState = (rootClientId, onInsert, syncStatus) => {
|
||||
const useBlockTypesState = (rootClientId, onInsert) => {
|
||||
const {
|
||||
categories,
|
||||
collections,
|
||||
@ -27566,9 +27581,9 @@ const useBlockTypesState = (rootClientId, onInsert, syncStatus) => {
|
||||
return {
|
||||
categories: getCategories(),
|
||||
collections: getCollections(),
|
||||
items: getInserterItems(rootClientId, syncStatus)
|
||||
items: getInserterItems(rootClientId)
|
||||
};
|
||||
}, [rootClientId, syncStatus]);
|
||||
}, [rootClientId]);
|
||||
const onSelectItem = (0,external_wp_element_namespaceObject.useCallback)(({
|
||||
name,
|
||||
initialAttributes,
|
||||
@ -27767,6 +27782,11 @@ var external_wp_notices_namespaceObject = window["wp"]["notices"];
|
||||
*/
|
||||
|
||||
|
||||
const CUSTOM_CATEGORY = {
|
||||
name: 'custom',
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('My patterns'),
|
||||
description: (0,external_wp_i18n_namespaceObject.__)('Custom patterns add by site users')
|
||||
};
|
||||
/**
|
||||
* Retrieves the block patterns inserter state.
|
||||
*
|
||||
@ -27790,6 +27810,7 @@ const usePatternsState = (onInsert, rootClientId) => {
|
||||
patternCategories: getSettings().__experimentalBlockPatternCategories
|
||||
};
|
||||
}, [rootClientId]);
|
||||
const allCategories = (0,external_wp_element_namespaceObject.useMemo)(() => [...patternCategories, CUSTOM_CATEGORY], [patternCategories]);
|
||||
const {
|
||||
createSuccessNotice
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
|
||||
@ -27800,8 +27821,8 @@ const usePatternsState = (onInsert, rootClientId) => {
|
||||
(0,external_wp_i18n_namespaceObject.__)('Block pattern "%s" inserted.'), pattern.title), {
|
||||
type: 'snackbar'
|
||||
});
|
||||
}, []);
|
||||
return [patterns, patternCategories, onClickPattern];
|
||||
}, [createSuccessNotice, onInsert]);
|
||||
return [patterns, allCategories, onClickPattern];
|
||||
};
|
||||
|
||||
/* harmony default export */ var use_patterns_state = (usePatternsState);
|
||||
@ -28388,7 +28409,7 @@ function PatternList({
|
||||
}
|
||||
|
||||
return searchItems(allPatterns, filterValue);
|
||||
}, [filterValue, selectedCategory, allPatterns]); // Announce search results on change.
|
||||
}, [filterValue, allPatterns, selectedCategory, registeredPatternCategories]); // Announce search results on change.
|
||||
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
if (!filterValue) {
|
||||
@ -28400,7 +28421,7 @@ function PatternList({
|
||||
/* translators: %d: number of results. */
|
||||
(0,external_wp_i18n_namespaceObject._n)('%d result found.', '%d results found.', count), count);
|
||||
debouncedSpeak(resultsFoundMessage);
|
||||
}, [filterValue, debouncedSpeak]);
|
||||
}, [filterValue, debouncedSpeak, filteredBlockPatterns.length]);
|
||||
const currentShownPatterns = (0,external_wp_compose_namespaceObject.useAsyncList)(filteredBlockPatterns, {
|
||||
step: INITIAL_INSERTER_RESULTS
|
||||
});
|
||||
@ -28543,7 +28564,6 @@ function MobileTabNavigation({
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@ -28553,21 +28573,14 @@ function MobileTabNavigation({
|
||||
|
||||
|
||||
|
||||
|
||||
const block_patterns_tab_noop = () => {}; // Preferred order of pattern categories. Any other categories should
|
||||
// be at the bottom without any re-ordering.
|
||||
|
||||
|
||||
const patternCategoriesOrder = ['featured', 'posts', 'text', 'gallery', 'call-to-action', 'banner', 'header', 'footer'];
|
||||
const patternCategoriesOrder = ['custom', 'featured', 'posts', 'text', 'gallery', 'call-to-action', 'banner', 'header', 'footer'];
|
||||
|
||||
function usePatternsCategories(rootClientId) {
|
||||
const [allPatterns, allCategories] = use_patterns_state(undefined, rootClientId);
|
||||
const [unsyncedPatterns] = use_block_types_state(rootClientId, undefined, 'unsynced');
|
||||
const filteredUnsyncedPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
return unsyncedPatterns.filter(({
|
||||
category: unsyncedPatternCategory
|
||||
}) => unsyncedPatternCategory === 'reusable');
|
||||
}, [unsyncedPatterns]);
|
||||
const hasRegisteredCategory = (0,external_wp_element_namespaceObject.useCallback)(pattern => {
|
||||
if (!pattern.categories || !pattern.categories.length) {
|
||||
return false;
|
||||
@ -28598,15 +28611,8 @@ function usePatternsCategories(rootClientId) {
|
||||
});
|
||||
}
|
||||
|
||||
if (filteredUnsyncedPatterns.length > 0) {
|
||||
categories.push({
|
||||
name: 'reusable',
|
||||
label: (0,external_wp_i18n_namespaceObject._x)('Custom patterns')
|
||||
});
|
||||
}
|
||||
|
||||
return categories;
|
||||
}, [allCategories, allPatterns, filteredUnsyncedPatterns.length, hasRegisteredCategory]);
|
||||
}, [allCategories, allPatterns, hasRegisteredCategory]);
|
||||
return populatedCategories;
|
||||
}
|
||||
|
||||
@ -28644,16 +28650,6 @@ function BlockPatternsCategoryPanel({
|
||||
showTitlesAsTooltip
|
||||
}) {
|
||||
const [allPatterns,, onClick] = use_patterns_state(onInsert, rootClientId);
|
||||
const [unsyncedPatterns] = use_block_types_state(rootClientId, onInsert, 'unsynced');
|
||||
const filteredUnsyncedPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
return unsyncedPatterns.filter(({
|
||||
category: unsyncedPatternCategory
|
||||
}) => unsyncedPatternCategory === 'reusable').map(syncedPattern => ({ ...syncedPattern,
|
||||
blocks: (0,external_wp_blocks_namespaceObject.parse)(syncedPattern.content, {
|
||||
__unstableSkipMigrationLogs: true
|
||||
})
|
||||
}));
|
||||
}, [unsyncedPatterns]);
|
||||
const availableCategories = usePatternsCategories(rootClientId);
|
||||
const currentCategoryPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => allPatterns.filter(pattern => {
|
||||
var _pattern$categories$f;
|
||||
@ -28666,13 +28662,12 @@ function BlockPatternsCategoryPanel({
|
||||
|
||||
const availablePatternCategories = (_pattern$categories$f = pattern.categories?.filter(cat => availableCategories.find(availableCategory => availableCategory.name === cat))) !== null && _pattern$categories$f !== void 0 ? _pattern$categories$f : [];
|
||||
return availablePatternCategories.length === 0;
|
||||
}), [allPatterns, category]);
|
||||
const patterns = category.name === 'reusable' ? filteredUnsyncedPatterns : currentCategoryPatterns;
|
||||
const currentShownPatterns = (0,external_wp_compose_namespaceObject.useAsyncList)(patterns); // Hide block pattern preview on unmount.
|
||||
}), [allPatterns, availableCategories, category.name]);
|
||||
const categoryPatternsList = (0,external_wp_compose_namespaceObject.useAsyncList)(currentCategoryPatterns); // Hide block pattern preview on unmount.
|
||||
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => () => onHover(null), []);
|
||||
|
||||
if (!currentCategoryPatterns.length && !filteredUnsyncedPatterns.length) {
|
||||
if (!currentCategoryPatterns.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -28681,8 +28676,8 @@ function BlockPatternsCategoryPanel({
|
||||
}, (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
className: "block-editor-inserter__patterns-category-panel-title"
|
||||
}, category.label), (0,external_wp_element_namespaceObject.createElement)("p", null, category.description), (0,external_wp_element_namespaceObject.createElement)(block_patterns_list, {
|
||||
shownPatterns: currentShownPatterns,
|
||||
blockPatterns: patterns,
|
||||
shownPatterns: categoryPatternsList,
|
||||
blockPatterns: currentCategoryPatterns,
|
||||
onClickPattern: onClick,
|
||||
onHover: onHover,
|
||||
label: category.label,
|
||||
@ -28817,7 +28812,7 @@ function ReusableBlocksTab({
|
||||
href: (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
|
||||
post_type: 'wp_block'
|
||||
})
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Manage custom patterns'))));
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Manage my patterns'))));
|
||||
}
|
||||
/* harmony default export */ var reusable_blocks_tab = (ReusableBlocksTab);
|
||||
|
||||
@ -45484,7 +45479,7 @@ function FiltersToolsPanel({
|
||||
};
|
||||
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Filters'),
|
||||
label: (0,external_wp_i18n_namespaceObject._x)('Filters', 'Name for applying graphical effects'),
|
||||
resetAll: resetAll,
|
||||
panelId: panelId
|
||||
}, children);
|
||||
|
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
30
wp-includes/js/dist/block-library.js
vendored
30
wp-includes/js/dist/block-library.js
vendored
@ -32276,6 +32276,8 @@ function LinkUI(props) {
|
||||
const {
|
||||
saveEntityRecord
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
|
||||
const pagesPermissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)('pages');
|
||||
const postsPermissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)('posts');
|
||||
|
||||
async function handleCreate(pageTitle) {
|
||||
const postType = props.link.type || 'page';
|
||||
@ -32308,9 +32310,17 @@ function LinkUI(props) {
|
||||
opensInNewTab,
|
||||
type,
|
||||
kind
|
||||
} = props.link; // Memoize link value to avoid overriding the LinkControl's internal state.
|
||||
} = props.link;
|
||||
let userCanCreate = false;
|
||||
|
||||
if (!type || type === 'page') {
|
||||
userCanCreate = pagesPermissions.canCreate;
|
||||
} else if (type === 'post') {
|
||||
userCanCreate = postsPermissions.canCreate;
|
||||
} // Memoize link value to avoid overriding the LinkControl's internal state.
|
||||
// This is a temporary fix. See https://github.com/WordPress/gutenberg/issues/50976#issuecomment-1568226407.
|
||||
|
||||
|
||||
const link = (0,external_wp_element_namespaceObject.useMemo)(() => ({
|
||||
url,
|
||||
opensInNewTab,
|
||||
@ -32327,7 +32337,7 @@ function LinkUI(props) {
|
||||
className: props.className,
|
||||
value: link,
|
||||
showInitialSuggestions: true,
|
||||
withCreateSuggestion: props.hasCreateSuggestion,
|
||||
withCreateSuggestion: userCanCreate,
|
||||
createSuggestion: handleCreate,
|
||||
createSuggestionButtonText: searchTerm => {
|
||||
let format;
|
||||
@ -32413,7 +32423,6 @@ function AdditionalBlockContent({
|
||||
onClose: () => {
|
||||
setInsertedBlock(null);
|
||||
},
|
||||
hasCreateSuggestion: false,
|
||||
onChange: updatedValue => {
|
||||
updateAttributes(updatedValue, setInsertedBlockAttributes(insertedBlock?.clientId), insertedBlock?.attributes);
|
||||
setInsertedBlock(null);
|
||||
@ -32670,7 +32679,7 @@ function Navigation({
|
||||
const hasUnsavedBlocks = hasUncontrolledInnerBlocks && !isEntityAvailable;
|
||||
const {
|
||||
getNavigationFallbackId
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store);
|
||||
} = unlock((0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store));
|
||||
const navigationFallbackId = !(ref || hasUnsavedBlocks) ? getNavigationFallbackId() : null;
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
// If:
|
||||
@ -34116,8 +34125,6 @@ function NavigationLinkEdit({
|
||||
const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)('Add label…');
|
||||
|
||||
const ref = (0,external_wp_element_namespaceObject.useRef)();
|
||||
const pagesPermissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)('pages');
|
||||
const postsPermissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)('posts');
|
||||
const {
|
||||
innerBlocks,
|
||||
isAtMaxNesting,
|
||||
@ -34234,14 +34241,6 @@ function NavigationLinkEdit({
|
||||
setIsLinkOpen(false);
|
||||
}
|
||||
|
||||
let userCanCreate = false;
|
||||
|
||||
if (!type || type === 'page') {
|
||||
userCanCreate = pagesPermissions.canCreate;
|
||||
} else if (type === 'post') {
|
||||
userCanCreate = postsPermissions.canCreate;
|
||||
}
|
||||
|
||||
const {
|
||||
textColor,
|
||||
customTextColor,
|
||||
@ -34416,7 +34415,6 @@ function NavigationLinkEdit({
|
||||
link: attributes,
|
||||
onClose: () => setIsLinkOpen(false),
|
||||
anchor: popoverAnchor,
|
||||
hasCreateSuggestion: userCanCreate,
|
||||
onRemove: removeLink,
|
||||
onChange: updatedValue => {
|
||||
updateAttributes(updatedValue, setAttributes, attributes);
|
||||
@ -46618,7 +46616,7 @@ function ReusableBlockEdit({
|
||||
uniqueId: ref
|
||||
}, canRemove && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
|
||||
onClick: () => convertBlockToStatic(clientId),
|
||||
label: innerBlockCount > 1 ? (0,external_wp_i18n_namespaceObject.__)('Convert to regular blocks') : (0,external_wp_i18n_namespaceObject.__)('Convert to regular block'),
|
||||
label: innerBlockCount > 1 ? (0,external_wp_i18n_namespaceObject.__)('Detach patterns') : (0,external_wp_i18n_namespaceObject.__)('Detach pattern'),
|
||||
icon: library_ungroup,
|
||||
showTooltip: true
|
||||
}))), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.InspectorControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
|
||||
|
2
wp-includes/js/dist/block-library.min.js
vendored
2
wp-includes/js/dist/block-library.min.js
vendored
File diff suppressed because one or more lines are too long
10
wp-includes/js/dist/blocks.js
vendored
10
wp-includes/js/dist/blocks.js
vendored
@ -7529,7 +7529,7 @@ const unregisterBlockVariation = (blockName, variationName) => {
|
||||
(0,external_wp_data_namespaceObject.dispatch)(store).removeBlockVariations(blockName, variationName);
|
||||
};
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/node_modules/uuid/dist/esm-browser/rng.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js
|
||||
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
||||
// require the crypto API and do not support built-in fallback to lower quality random number
|
||||
// generators (like Math.random()).
|
||||
@ -7549,9 +7549,9 @@ function rng() {
|
||||
|
||||
return getRandomValues(rnds8);
|
||||
}
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/node_modules/uuid/dist/esm-browser/regex.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/regex.js
|
||||
/* harmony default export */ var regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/node_modules/uuid/dist/esm-browser/validate.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/validate.js
|
||||
|
||||
|
||||
function validate(uuid) {
|
||||
@ -7559,7 +7559,7 @@ function validate(uuid) {
|
||||
}
|
||||
|
||||
/* harmony default export */ var esm_browser_validate = (validate);
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/node_modules/uuid/dist/esm-browser/stringify.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js
|
||||
|
||||
/**
|
||||
* Convert array of 16 byte values to UUID string format of the form:
|
||||
@ -7590,7 +7590,7 @@ function stringify(arr) {
|
||||
}
|
||||
|
||||
/* harmony default export */ var esm_browser_stringify = (stringify);
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/node_modules/uuid/dist/esm-browser/v4.js
|
||||
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js
|
||||
|
||||
|
||||
|
||||
|
522
wp-includes/js/dist/components.js
vendored
522
wp-includes/js/dist/components.js
vendored
File diff suppressed because it is too large
Load Diff
6
wp-includes/js/dist/components.min.js
vendored
6
wp-includes/js/dist/components.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/core-commands.js
vendored
4
wp-includes/js/dist/core-commands.js
vendored
@ -106,7 +106,7 @@ function useAdminNavigationCommands() {
|
||||
});
|
||||
(0,external_wp_commands_namespaceObject.useCommand)({
|
||||
name: 'core/manage-reusable-blocks',
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Manage all custom patterns'),
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Manage all of my patterns'),
|
||||
callback: () => {
|
||||
document.location.href = 'edit.php?post_type=wp_block';
|
||||
},
|
||||
@ -416,7 +416,7 @@ function useSiteEditorBasicNavigationCommands() {
|
||||
close
|
||||
}) => {
|
||||
const args = {
|
||||
path: '/library'
|
||||
path: '/patterns'
|
||||
};
|
||||
const targetUrl = (0,external_wp_url_namespaceObject.addQueryArgs)('site-editor.php', args);
|
||||
|
||||
|
2
wp-includes/js/dist/core-commands.min.js
vendored
2
wp-includes/js/dist/core-commands.min.js
vendored
File diff suppressed because one or more lines are too long
50
wp-includes/js/dist/core-data.js
vendored
50
wp-includes/js/dist/core-data.js
vendored
@ -549,7 +549,6 @@ __webpack_require__.d(build_module_selectors_namespaceObject, {
|
||||
"getEntityRecords": function() { return getEntityRecords; },
|
||||
"getLastEntityDeleteError": function() { return getLastEntityDeleteError; },
|
||||
"getLastEntitySaveError": function() { return getLastEntitySaveError; },
|
||||
"getNavigationFallbackId": function() { return getNavigationFallbackId; },
|
||||
"getRawEntityRecord": function() { return getRawEntityRecord; },
|
||||
"getRedoEdit": function() { return getRedoEdit; },
|
||||
"getReferenceByDistinctEdits": function() { return getReferenceByDistinctEdits; },
|
||||
@ -1677,6 +1676,16 @@ function getUndoEdits(state) {
|
||||
function getRedoEdits(state) {
|
||||
return state.undo.list[state.undo.list.length + state.undo.offset];
|
||||
}
|
||||
/**
|
||||
* Retrieve the fallback Navigation.
|
||||
*
|
||||
* @param state Data state.
|
||||
* @return The ID for the fallback Navigation post.
|
||||
*/
|
||||
|
||||
function getNavigationFallbackId(state) {
|
||||
return state.navigationFallbackId;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/actions.js
|
||||
/**
|
||||
@ -5245,16 +5254,6 @@ function getBlockPatterns(state) {
|
||||
function getBlockPatternCategories(state) {
|
||||
return state.blockPatternCategories;
|
||||
}
|
||||
/**
|
||||
* Retrieve the fallback Navigation.
|
||||
*
|
||||
* @param state Data state.
|
||||
* @return The ID for the fallback Navigation post.
|
||||
*/
|
||||
|
||||
function getNavigationFallbackId(state) {
|
||||
return state.navigationFallbackId;
|
||||
}
|
||||
/**
|
||||
* Returns the revisions of the current global styles theme.
|
||||
*
|
||||
@ -5813,7 +5812,8 @@ const resolvers_getBlockPatternCategories = () => async ({
|
||||
});
|
||||
};
|
||||
const resolvers_getNavigationFallbackId = () => async ({
|
||||
dispatch
|
||||
dispatch,
|
||||
select
|
||||
}) => {
|
||||
const fallback = await external_wp_apiFetch_default()({
|
||||
path: (0,external_wp_url_namespaceObject.addQueryArgs)('/wp-block-editor/v1/navigation-fallback', {
|
||||
@ -5824,7 +5824,11 @@ const resolvers_getNavigationFallbackId = () => async ({
|
||||
dispatch.receiveNavigationFallbackId(fallback?.id);
|
||||
|
||||
if (record) {
|
||||
const invalidateNavigationQueries = true;
|
||||
// If the fallback is already in the store, don't invalidate navigation queries.
|
||||
// Otherwise, invalidate the cache for the scenario where there were no Navigation
|
||||
// posts in the state and the fallback created one.
|
||||
const existingFallbackEntityRecord = select.getEntityRecord('postType', 'wp_navigation', fallback?.id);
|
||||
const invalidateNavigationQueries = !existingFallbackEntityRecord;
|
||||
dispatch.receiveEntityRecords('postType', 'wp_navigation', record, undefined, invalidateNavigationQueries); // Resolve to avoid further network requests.
|
||||
|
||||
dispatch.finishResolution('getEntityRecord', ['postType', 'wp_navigation', fallback?.id]);
|
||||
@ -6107,12 +6111,6 @@ function createLocksActions() {
|
||||
};
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","element"]
|
||||
var external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
;// CONCATENATED MODULE: external ["wp","blocks"]
|
||||
var external_wp_blocks_namespaceObject = window["wp"]["blocks"];
|
||||
;// CONCATENATED MODULE: external ["wp","blockEditor"]
|
||||
var external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
|
||||
;// CONCATENATED MODULE: external ["wp","privateApis"]
|
||||
var external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/private-apis.js
|
||||
@ -6125,6 +6123,12 @@ const {
|
||||
unlock
|
||||
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/core-data');
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","element"]
|
||||
var external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
;// CONCATENATED MODULE: external ["wp","blocks"]
|
||||
var external_wp_blocks_namespaceObject = window["wp"]["blocks"];
|
||||
;// CONCATENATED MODULE: external ["wp","blockEditor"]
|
||||
var external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/entity-provider.js
|
||||
|
||||
|
||||
@ -7391,6 +7395,8 @@ function __experimentalUseResourcePermissions(resource, id) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// The entity selectors/resolvers and actions are shortcuts to their generic equivalents
|
||||
// (getEntityRecord, getEntityRecords, updateEntityRecord, updateEntityRecords)
|
||||
// Instead of getEntityRecord, the consumer could use more user-friendly named selector: getPostType, getTaxonomy...
|
||||
@ -7458,7 +7464,11 @@ const storeConfig = () => ({
|
||||
|
||||
|
||||
const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, storeConfig());
|
||||
(0,external_wp_data_namespaceObject.register)(store);
|
||||
unlock(store).registerPrivateSelectors({
|
||||
getNavigationFallbackId: getNavigationFallbackId
|
||||
});
|
||||
(0,external_wp_data_namespaceObject.register)(store); // Register store after unlocking private selectors to allow resolvers to use them.
|
||||
|
||||
|
||||
|
||||
|
||||
|
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
65
wp-includes/js/dist/data.js
vendored
65
wp-includes/js/dist/data.js
vendored
@ -2402,11 +2402,11 @@ function createResolversCache() {
|
||||
function createBindingCache(bind) {
|
||||
const cache = new WeakMap();
|
||||
return {
|
||||
get(item) {
|
||||
get(item, itemName) {
|
||||
let boundItem = cache.get(item);
|
||||
|
||||
if (!boundItem) {
|
||||
boundItem = bind(item);
|
||||
boundItem = bind(item, itemName);
|
||||
cache.set(item, boundItem);
|
||||
}
|
||||
|
||||
@ -2493,15 +2493,16 @@ function createReduxStore(key, options) {
|
||||
const allActions = new Proxy(() => {}, {
|
||||
get: (target, prop) => {
|
||||
const privateAction = privateActions[prop];
|
||||
return privateAction ? boundPrivateActions.get(privateAction) : actions[prop];
|
||||
return privateAction ? boundPrivateActions.get(privateAction, prop) : actions[prop];
|
||||
}
|
||||
});
|
||||
const thunkActions = new Proxy(allActions, {
|
||||
apply: (target, thisArg, [action]) => store.dispatch(action)
|
||||
});
|
||||
lock(actions, allActions);
|
||||
const resolvers = options.resolvers ? mapResolvers(options.resolvers) : {};
|
||||
|
||||
function bindSelector(selector) {
|
||||
function bindSelector(selector, selectorName) {
|
||||
if (selector.isRegistrySelector) {
|
||||
selector.registry = registry;
|
||||
}
|
||||
@ -2512,8 +2513,14 @@ function createReduxStore(key, options) {
|
||||
return selector(state.root, ...args);
|
||||
};
|
||||
|
||||
boundSelector.hasResolver = false;
|
||||
return boundSelector;
|
||||
const resolver = resolvers[selectorName];
|
||||
|
||||
if (!resolver) {
|
||||
boundSelector.hasResolver = false;
|
||||
return boundSelector;
|
||||
}
|
||||
|
||||
return mapSelectorWithResolver(boundSelector, selectorName, resolver, store, resolversCache);
|
||||
}
|
||||
|
||||
function bindMetadataSelector(selector) {
|
||||
@ -2527,27 +2534,20 @@ function createReduxStore(key, options) {
|
||||
return boundSelector;
|
||||
}
|
||||
|
||||
let selectors = { ...mapValues(selectors_namespaceObject, bindMetadataSelector),
|
||||
const selectors = { ...mapValues(selectors_namespaceObject, bindMetadataSelector),
|
||||
...mapValues(options.selectors, bindSelector)
|
||||
};
|
||||
let resolvers;
|
||||
|
||||
if (options.resolvers) {
|
||||
resolvers = mapResolvers(options.resolvers);
|
||||
selectors = mapSelectorsWithResolvers(selectors, resolvers, store, resolversCache);
|
||||
}
|
||||
|
||||
const boundPrivateSelectors = createBindingCache(bindSelector); // Pre-bind the private selectors that have been registered by the time of
|
||||
// instantiation, so that registry selectors are bound to the registry.
|
||||
|
||||
for (const privateSelector of Object.values(privateSelectors)) {
|
||||
boundPrivateSelectors.get(privateSelector);
|
||||
for (const [selectorName, selector] of Object.entries(privateSelectors)) {
|
||||
boundPrivateSelectors.get(selector, selectorName);
|
||||
}
|
||||
|
||||
const allSelectors = new Proxy(() => {}, {
|
||||
get: (target, prop) => {
|
||||
const privateSelector = privateSelectors[prop];
|
||||
return privateSelector ? boundPrivateSelectors.get(privateSelector) : selectors[prop];
|
||||
return privateSelector ? boundPrivateSelectors.get(privateSelector, prop) : selectors[prop];
|
||||
}
|
||||
});
|
||||
const thunkSelectors = new Proxy(allSelectors, {
|
||||
@ -2777,19 +2777,20 @@ function mapResolvers(resolvers) {
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Returns resolvers with matched selectors for a given namespace.
|
||||
* Returns a selector with a matched resolver.
|
||||
* Resolvers are side effects invoked once per argument set of a given selector call,
|
||||
* used in ensuring that the data needs for the selector are satisfied.
|
||||
*
|
||||
* @param {Object} selectors The current selectors to be modified.
|
||||
* @param {Object} resolvers Resolvers to register.
|
||||
* @param {Object} selector The selector function to be bound.
|
||||
* @param {string} selectorName The selector name.
|
||||
* @param {Object} resolver Resolver to call.
|
||||
* @param {Object} store The redux store to which the resolvers should be mapped.
|
||||
* @param {Object} resolversCache Resolvers Cache.
|
||||
*/
|
||||
|
||||
|
||||
function mapSelectorsWithResolvers(selectors, resolvers, store, resolversCache) {
|
||||
function fulfillSelector(resolver, selectorName, args) {
|
||||
function mapSelectorWithResolver(selector, selectorName, resolver, store, resolversCache) {
|
||||
function fulfillSelector(args) {
|
||||
const state = store.getState();
|
||||
|
||||
if (resolversCache.isRunning(selectorName, args) || typeof resolver.isFulfilled === 'function' && resolver.isFulfilled(state, ...args)) {
|
||||
@ -2823,21 +2824,13 @@ function mapSelectorsWithResolvers(selectors, resolvers, store, resolversCache)
|
||||
}, 0);
|
||||
}
|
||||
|
||||
return mapValues(selectors, (selector, selectorName) => {
|
||||
const resolver = resolvers[selectorName];
|
||||
const selectorResolver = (...args) => {
|
||||
fulfillSelector(args);
|
||||
return selector(...args);
|
||||
};
|
||||
|
||||
if (!resolver) {
|
||||
return selector;
|
||||
}
|
||||
|
||||
const selectorResolver = (...args) => {
|
||||
fulfillSelector(resolver, selectorName, args);
|
||||
return selector(...args);
|
||||
};
|
||||
|
||||
selectorResolver.hasResolver = true;
|
||||
return selectorResolver;
|
||||
});
|
||||
selectorResolver.hasResolver = true;
|
||||
return selectorResolver;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/utils/emitter.js
|
||||
|
2
wp-includes/js/dist/data.min.js
vendored
2
wp-includes/js/dist/data.min.js
vendored
File diff suppressed because one or more lines are too long
2470
wp-includes/js/dist/edit-site.js
vendored
2470
wp-includes/js/dist/edit-site.js
vendored
File diff suppressed because it is too large
Load Diff
4
wp-includes/js/dist/edit-site.min.js
vendored
4
wp-includes/js/dist/edit-site.min.js
vendored
File diff suppressed because one or more lines are too long
22
wp-includes/js/dist/editor.js
vendored
22
wp-includes/js/dist/editor.js
vendored
@ -11611,9 +11611,6 @@ function PostSwitchToDraftButton({
|
||||
|
||||
|
||||
function PostSyncStatus() {
|
||||
const {
|
||||
editPost
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
|
||||
const {
|
||||
meta,
|
||||
postType
|
||||
@ -11631,26 +11628,11 @@ function PostSyncStatus() {
|
||||
return null;
|
||||
}
|
||||
|
||||
const onUpdateSync = syncStatus => editPost({
|
||||
meta: { ...meta,
|
||||
wp_block: syncStatus === 'unsynced' ? {
|
||||
sync_status: syncStatus
|
||||
} : null
|
||||
}
|
||||
});
|
||||
|
||||
const syncStatus = meta?.wp_block?.sync_status;
|
||||
const syncStatus = meta?.sync_status;
|
||||
const isFullySynced = !syncStatus;
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelRow, {
|
||||
className: "edit-post-sync-status"
|
||||
}, (0,external_wp_element_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Syncing')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
|
||||
__nextHasNoMarginBottom: true,
|
||||
label: isFullySynced ? (0,external_wp_i18n_namespaceObject.__)('Fully synced') : (0,external_wp_i18n_namespaceObject.__)('Not synced'),
|
||||
checked: isFullySynced,
|
||||
onChange: () => {
|
||||
onUpdateSync(syncStatus === 'unsynced' ? 'fully' : 'unsynced');
|
||||
}
|
||||
}));
|
||||
}, (0,external_wp_element_namespaceObject.createElement)("span", null, (0,external_wp_i18n_namespaceObject.__)('Sync status')), (0,external_wp_element_namespaceObject.createElement)("div", null, isFullySynced ? (0,external_wp_i18n_namespaceObject.__)('Fully synced') : (0,external_wp_i18n_namespaceObject.__)('Not synced')));
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-taxonomies/index.js
|
||||
|
2
wp-includes/js/dist/editor.min.js
vendored
2
wp-includes/js/dist/editor.min.js
vendored
File diff suppressed because one or more lines are too long
7
wp-includes/js/dist/reusable-blocks.js
vendored
7
wp-includes/js/dist/reusable-blocks.js
vendored
@ -357,7 +357,8 @@ function ReusableBlockConvertButton({
|
||||
__nextHasNoMarginBottom: true,
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Name'),
|
||||
value: title,
|
||||
onChange: setTitle
|
||||
onChange: setTitle,
|
||||
placeholder: (0,external_wp_i18n_namespaceObject.__)('My pattern')
|
||||
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToggleControl, {
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Keep all pattern instances in sync'),
|
||||
help: (0,external_wp_i18n_namespaceObject.__)('Editing the original pattern will also update anywhere the pattern is used.'),
|
||||
@ -376,7 +377,7 @@ function ReusableBlockConvertButton({
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Cancel')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
|
||||
variant: "primary",
|
||||
type: "submit"
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Save'))))))));
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Create'))))))));
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","url"]
|
||||
@ -437,7 +438,7 @@ function ReusableBlocksManageButton({
|
||||
})
|
||||
}, (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.__)('Convert to regular blocks') : (0,external_wp_i18n_namespaceObject.__)('Convert to regular block')));
|
||||
}, innerBlockCount > 1 ? (0,external_wp_i18n_namespaceObject.__)('Detach patterns') : (0,external_wp_i18n_namespaceObject.__)('Detach pattern')));
|
||||
}
|
||||
|
||||
/* harmony default export */ var reusable_blocks_manage_button = (ReusableBlocksManageButton);
|
||||
|
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
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-beta2-56126';
|
||||
$wp_version = '6.3-beta2-56127';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user