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

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

See #58745.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
isabel_brison 2023-07-07 07:21:17 +00:00
parent d6e978dba3
commit 2405b7fbf7
58 changed files with 1415 additions and 749 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,11 @@
"html": false,
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,

View File

@ -49,7 +49,11 @@
"align": true,
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
}
},
"editorStyle": "wp-block-audio-editor",

View File

@ -30,7 +30,11 @@
'html' => false,
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'typography' => array(
'fontSize' => true,
@ -104,7 +108,11 @@
'align' => true,
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
)
),
'editorStyle' => 'wp-block-audio-editor',
@ -457,7 +465,11 @@
'html' => false,
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'typography' => array(
'fontSize' => true,
@ -514,7 +526,11 @@
'top',
'bottom'
),
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'__experimentalBorder' => array(
'radius' => true,
@ -1528,7 +1544,11 @@
'html' => false,
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'typography' => array(
'fontSize' => true,
@ -1856,7 +1876,9 @@
'blockGap'
),
'__experimentalDefaultControls' => array(
'blockGap' => true
'blockGap' => true,
'margin' => false,
'padding' => false
)
),
'color' => array(
@ -2027,7 +2049,11 @@
),
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'typography' => array(
'fontSize' => true,
@ -2537,7 +2563,11 @@
),
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'__unstablePasteTextInline' => true,
'__experimentalSelector' => 'ol,ul',
@ -4978,7 +5008,11 @@
),
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
)
),
'styles' => array(
@ -5029,7 +5063,11 @@
),
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'typography' => array(
'fontSize' => true,
@ -5092,7 +5130,11 @@
),
'spacing' => array(
'padding' => true,
'margin' => true
'margin' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'typography' => array(
'fontSize' => true,
@ -5244,7 +5286,9 @@
'vw'
),
'__experimentalDefaultControls' => array(
'blockGap' => true
'blockGap' => true,
'margin' => true,
'padding' => false
)
)
),
@ -5481,7 +5525,11 @@
),
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'typography' => array(
'fontSize' => true,
@ -5752,7 +5800,11 @@
),
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
),
'__experimentalBorder' => array(
'radius' => true,
@ -5853,7 +5905,11 @@
'align' => true,
'spacing' => array(
'margin' => true,
'padding' => true
'padding' => true,
'__experimentalDefaultControls' => array(
'margin' => false,
'padding' => false
)
)
),
'editorStyle' => 'wp-block-video-editor',

View File

@ -33,7 +33,11 @@
"html": false,
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,

View File

@ -31,7 +31,11 @@
},
"spacing": {
"margin": [ "top", "bottom" ],
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"__experimentalBorder": {
"radius": true,

View File

@ -34,7 +34,11 @@
"html": false,
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,

View File

@ -115,7 +115,9 @@
"blockGap": [ "horizontal", "vertical" ],
"__experimentalSkipSerialization": [ "blockGap" ],
"__experimentalDefaultControls": {
"blockGap": true
"blockGap": true,
"margin": false,
"padding": false
}
},
"color": {

View File

@ -40,7 +40,11 @@
},
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,

View File

@ -61,7 +61,11 @@
},
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"__unstablePasteTextInline": true,
"__experimentalSelector": "ol,ul",

View File

@ -19,8 +19,11 @@ function render_block_core_post_title( $attributes, $content, $block ) {
return '';
}
$post = get_post( $block->context['postId'] );
$title = get_the_title( $post );
/**
* The `$post` argument is intentionally omitted so that changes are reflected when previewing a post.
* See: https://github.com/WordPress/gutenberg/pull/37622#issuecomment-1000932816.
*/
$title = get_the_title();
if ( ! $title ) {
return '';
@ -33,7 +36,7 @@ function render_block_core_post_title( $attributes, $content, $block ) {
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
$rel = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : '';
$title = sprintf( '<a href="%1$s" target="%2$s" %3$s>%4$s</a>', get_the_permalink( $post ), esc_attr( $attributes['linkTarget'] ), $rel, $title );
$title = sprintf( '<a href="%1$s" target="%2$s" %3$s>%4$s</a>', get_the_permalink( $block->context['postId'] ), esc_attr( $attributes['linkTarget'] ), $rel, $title );
}
$classes = array();

View File

@ -40,7 +40,11 @@
},
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
}
},
"styles": [

View File

@ -25,7 +25,11 @@
},
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,

View File

@ -40,7 +40,11 @@
},
"spacing": {
"padding": true,
"margin": true
"margin": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,

View File

@ -73,7 +73,9 @@
"padding": true,
"units": [ "px", "em", "rem", "vh", "vw" ],
"__experimentalDefaultControls": {
"blockGap": true
"blockGap": true,
"margin": true,
"padding": false
}
}
},

View File

@ -166,7 +166,11 @@
},
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,

View File

@ -46,7 +46,11 @@
},
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"__experimentalBorder": {
"radius": true,

View File

@ -83,7 +83,11 @@
"align": true,
"spacing": {
"margin": true,
"padding": true
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
}
},
"editorStyle": "wp-block-video-editor",

View File

@ -225,40 +225,70 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
.block-editor-block-contextual-toolbar.is-fixed{
border-bottom:none;
display:flex;
margin-right:64px;
margin-right:180px;
min-height:auto;
position:fixed;
top:40px;
top:39px;
}
.block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
margin-right:216px;
width:auto;
}
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
margin-right:120px;
top:8px;
margin-right:240px;
top:7px;
}
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
margin-right:280px;
width:auto;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar.is-showing-movers{
flex-grow:0;
width:auto;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar.is-showing-movers:before{
background-color:#ddd;
content:"";
height:24px;
margin-left:0;
margin-top:12px;
position:relative;
right:-2px;
top:-1px;
width:1px;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar{
border:none;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar:after{
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar .components-button.has-icon svg{
display:none;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar .components-button.has-icon:after{
content:attr(aria-label);
font-size:12px;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar:before{
background-color:#ddd;
content:"";
height:24px;
margin-bottom:12px;
margin-left:8px;
margin-top:12px;
position:absolute;
right:44px;
position:relative;
right:0;
top:-1px;
width:1px;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar{
border:none;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar{
width:256px;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar .components-button.has-icon svg{
display:none;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar .components-button.has-icon:after{
content:attr(aria-label);
font-size:12px;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar:before{
background-color:#ddd;
content:"";
@ -266,20 +296,15 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
margin-bottom:12px;
margin-top:12px;
position:relative;
right:-12px;
right:-8px;
top:-1px;
width:1px;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed{
margin-right:64px;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
margin-right:384px;
margin-right:80px;
}
.is-fullscreen-mode .show-icon-labels .block-editor-block-contextual-toolbar.is-fixed{
margin-right:128px;
}
.is-fullscreen-mode .show-icon-labels .block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
margin-right:448px;
margin-right:144px;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed .block-editor-block-parent-selector .block-editor-block-parent-selector__button:after{
right:0;
@ -335,7 +360,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
}
@media (min-width:960px){
.block-editor-block-contextual-toolbar.is-fixed{
width:auto;
width:calc(100% - 496px);
}
}
.block-editor-block-list__block-selection-button{
@ -3815,6 +3840,32 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
margin:0;
}
.block-editor-inserter__hint{
margin:16px 16px 0;
}
.reusable-blocks-menu-items__rename-hint{
align-items:top;
background:#f0f0f0;
border-radius:2px;
color:#1e1e1e;
display:flex;
flex-direction:row;
max-width:380px;
}
.reusable-blocks-menu-items__rename-hint-content{
margin:12px 12px 12px 0;
}
.reusable-blocks-menu-items__rename-hint-dismiss{
margin:4px 0 4px 4px;
}
.components-menu-group .reusable-blocks-menu-items__rename-hint{
margin:0;
}
.block-editor-post-preview__dropdown{
padding:0;
}

File diff suppressed because one or more lines are too long

View File

@ -225,61 +225,86 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
.block-editor-block-contextual-toolbar.is-fixed{
border-bottom:none;
display:flex;
margin-left:64px;
margin-left:180px;
min-height:auto;
position:fixed;
top:40px;
top:39px;
}
.block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
margin-left:216px;
width:auto;
}
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
margin-left:120px;
top:8px;
margin-left:240px;
top:7px;
}
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
margin-left:280px;
width:auto;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar.is-showing-movers{
flex-grow:0;
width:auto;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar.is-showing-movers:before{
background-color:#ddd;
content:"";
height:24px;
left:-2px;
margin-right:0;
margin-top:12px;
position:relative;
top:-1px;
width:1px;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar{
border:none;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar:after{
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar .components-button.has-icon svg{
display:none;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar .components-button.has-icon:after{
content:attr(aria-label);
font-size:12px;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-collapse-fixed-toolbar:before{
background-color:#ddd;
content:"";
height:24px;
left:44px;
margin-bottom:12px;
left:0;
margin-right:8px;
margin-top:12px;
position:absolute;
position:relative;
top:-1px;
width:1px;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar{
border:none;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar{
width:256px;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar .components-button.has-icon svg{
display:none;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar .components-button.has-icon:after{
content:attr(aria-label);
font-size:12px;
}
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar__group-expand-fixed-toolbar:before{
background-color:#ddd;
content:"";
height:24px;
left:-12px;
left:-8px;
margin-bottom:12px;
margin-top:12px;
position:relative;
top:-1px;
width:1px;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed{
margin-left:64px;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
margin-left:384px;
margin-left:80px;
}
.is-fullscreen-mode .show-icon-labels .block-editor-block-contextual-toolbar.is-fixed{
margin-left:128px;
}
.is-fullscreen-mode .show-icon-labels .block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
margin-left:448px;
margin-left:144px;
}
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed .block-editor-block-parent-selector .block-editor-block-parent-selector__button:after{
left:0;
@ -335,7 +360,7 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
}
@media (min-width:960px){
.block-editor-block-contextual-toolbar.is-fixed{
width:auto;
width:calc(100% - 496px);
}
}
.block-editor-block-list__block-selection-button{
@ -3815,6 +3840,32 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
margin:0;
}
.block-editor-inserter__hint{
margin:16px 16px 0;
}
.reusable-blocks-menu-items__rename-hint{
align-items:top;
background:#f0f0f0;
border-radius:2px;
color:#1e1e1e;
display:flex;
flex-direction:row;
max-width:380px;
}
.reusable-blocks-menu-items__rename-hint-content{
margin:12px 0 12px 12px;
}
.reusable-blocks-menu-items__rename-hint-dismiss{
margin:4px 4px 4px 0;
}
.components-menu-group .reusable-blocks-menu-items__rename-hint{
margin:0;
}
.block-editor-post-preview__dropdown{
padding:0;
}

File diff suppressed because one or more lines are too long

View File

@ -1065,7 +1065,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar{
background-color:#fff;
padding:16px 0;
position:sticky;
top:0;
top:-4px;
z-index:1;
}
.edit-post-block-manager__category-title .components-checkbox-control__label{

File diff suppressed because one or more lines are too long

View File

@ -1065,7 +1065,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar{
background-color:#fff;
padding:16px 0;
position:sticky;
top:0;
top:-4px;
z-index:1;
}
.edit-post-block-manager__category-title .components-checkbox-control__label{

File diff suppressed because one or more lines are too long

View File

@ -1303,6 +1303,16 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
background:#e0e0e0;
color:currentColor;
}
@media (min-width:782px){
.edit-site-document-actions{
width:50%;
}
}
@media (min-width:960px){
.edit-site-document-actions{
width:min(100%, 450px);
}
}
.edit-site-document-actions__command{
display:grid;
@ -2341,11 +2351,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
flex-direction:column;
height:100%;
}
@media (min-width:782px){
.edit-site-layout .block-editor-block-contextual-toolbar.is-fixed{
width:calc(100% - 360px);
}
}
.edit-site-layout__hub{
height:60px;
@ -2817,11 +2822,26 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
padding:16px 0;
position:sticky;
}
.edit-site-sidebar__notice{
background:#2f2f2f;
color:#ddd;
margin:24px 0;
}
.edit-site-sidebar__notice.is-dismissible{
padding-left:8px;
}
.edit-site-sidebar__notice .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):focus,.edit-site-sidebar__notice .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):active,.edit-site-sidebar__notice .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{
color:#f0f0f0;
}
.edit-site-sidebar-navigation-screen__input-control{
width:100%;
}
.edit-site-sidebar-navigation-screen__input-control .components-input-control__container{
background:transparent;
background:#2f2f2f;
}
.edit-site-sidebar-navigation-screen__input-control .components-input-control__container .components-button{
color:#e0e0e0 !important;
}
.edit-site-sidebar-navigation-screen__input-control .components-input-control__input{
background:#2f2f2f !important;
@ -2969,7 +2989,26 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
}
.edit-site-sidebar-navigation-screen-patterns__group{
margin-bottom:24px;
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;
margin-bottom:0;
padding-bottom:0;
}
.edit-site-sidebar-navigation-screen-patterns__group:first-of-type{
margin-bottom:32px;
}
.edit-site-sidebar-navigation-screen-patterns__group-header p{
color:#949494;
}
.edit-site-sidebar-navigation-screen-patterns__group-header h2{
font-size:11px;
font-weight:500;
text-transform:uppercase;
}
.edit-site-sidebar-navigation-screen-template__added-by-description{

File diff suppressed because one or more lines are too long

View File

@ -1303,6 +1303,16 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
background:#e0e0e0;
color:currentColor;
}
@media (min-width:782px){
.edit-site-document-actions{
width:50%;
}
}
@media (min-width:960px){
.edit-site-document-actions{
width:min(100%, 450px);
}
}
.edit-site-document-actions__command{
display:grid;
@ -2341,11 +2351,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
flex-direction:column;
height:100%;
}
@media (min-width:782px){
.edit-site-layout .block-editor-block-contextual-toolbar.is-fixed{
width:calc(100% - 360px);
}
}
.edit-site-layout__hub{
height:60px;
@ -2817,11 +2822,26 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
padding:16px 0;
position:sticky;
}
.edit-site-sidebar__notice{
background:#2f2f2f;
color:#ddd;
margin:24px 0;
}
.edit-site-sidebar__notice.is-dismissible{
padding-right:8px;
}
.edit-site-sidebar__notice .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):focus,.edit-site-sidebar__notice .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):active,.edit-site-sidebar__notice .components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{
color:#f0f0f0;
}
.edit-site-sidebar-navigation-screen__input-control{
width:100%;
}
.edit-site-sidebar-navigation-screen__input-control .components-input-control__container{
background:transparent;
background:#2f2f2f;
}
.edit-site-sidebar-navigation-screen__input-control .components-input-control__container .components-button{
color:#e0e0e0 !important;
}
.edit-site-sidebar-navigation-screen__input-control .components-input-control__input{
background:#2f2f2f !important;
@ -2969,7 +2989,26 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar{
}
.edit-site-sidebar-navigation-screen-patterns__group{
margin-bottom:24px;
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;
margin-bottom:0;
padding-bottom:0;
}
.edit-site-sidebar-navigation-screen-patterns__group:first-of-type{
margin-bottom:32px;
}
.edit-site-sidebar-navigation-screen-patterns__group-header p{
color:#949494;
}
.edit-site-sidebar-navigation-screen-patterns__group-header h2{
font-size:11px;
font-weight:500;
text-transform:uppercase;
}
.edit-site-sidebar-navigation-screen-template__added-by-description{

File diff suppressed because one or more lines are too long

View File

@ -759,8 +759,8 @@
}
.editor-post-trash.components-button{
display:block;
width:100%;
flex-grow:1;
justify-content:center;
}
.table-of-contents__popover.components-popover .components-popover__content{

File diff suppressed because one or more lines are too long

View File

@ -759,8 +759,8 @@
}
.editor-post-trash.components-button{
display:block;
width:100%;
flex-grow:1;
justify-content:center;
}
.table-of-contents__popover.components-popover .components-popover__content{

File diff suppressed because one or more lines are too long

View File

@ -3314,6 +3314,7 @@ __webpack_require__.d(__webpack_exports__, {
"ObserveTyping": function() { return /* reexport */ observe_typing; },
"PanelColorSettings": function() { return /* reexport */ panel_color_settings; },
"PlainText": function() { return /* reexport */ plain_text; },
"ReusableBlocksRenameHint": function() { return /* reexport */ ReusableBlocksRenameHint; },
"RichText": function() { return /* reexport */ rich_text; },
"RichTextShortcut": function() { return /* reexport */ RichTextShortcut; },
"RichTextToolbarButton": function() { return /* reexport */ RichTextToolbarButton; },
@ -3429,8 +3430,8 @@ __webpack_require__.r(private_selectors_namespaceObject);
__webpack_require__.d(private_selectors_namespaceObject, {
"getBlockEditingMode": function() { return getBlockEditingMode; },
"getEnabledBlockParents": function() { return getEnabledBlockParents; },
"getEnabledClientIdsTree": function() { return getEnabledClientIdsTree; },
"getLastInsertedBlocksClientIds": function() { return getLastInsertedBlocksClientIds; },
"getListViewClientIdsTree": function() { return getListViewClientIdsTree; },
"getRemovalPromptData": function() { return getRemovalPromptData; },
"isBlockInterfaceHidden": function() { return private_selectors_isBlockInterfaceHidden; },
"isBlockSubtreeDisabled": function() { return isBlockSubtreeDisabled; },
@ -6432,16 +6433,16 @@ const isBlockSubtreeDisabled = rememo((state, clientId) => {
* @return {Object[]} Tree of block objects with only clientID and innerBlocks set.
*/
const getListViewClientIdsTree = rememo((state, rootClientId = '') => {
const getEnabledClientIdsTree = rememo((state, rootClientId = '') => {
return getBlockOrder(state, rootClientId).flatMap(clientId => {
if (getBlockEditingMode(state, clientId) !== 'disabled') {
return [{
clientId,
innerBlocks: getListViewClientIdsTree(state, clientId)
innerBlocks: getEnabledClientIdsTree(state, clientId)
}];
}
return getListViewClientIdsTree(state, clientId);
return getEnabledClientIdsTree(state, clientId);
});
}, state => [state.blocks.order, state.blockEditingModes, state.settings.templateLock, state.blockListSettings]);
/**
@ -8333,9 +8334,11 @@ const getInserterItems = rememo((state, rootClientId = null) => {
};
};
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 syncedPatternInserterItems = canInsertBlockTypeUnmemoized(state, 'core/block', rootClientId) ? getReusableBlocks(state).filter(reusableBlock => // Reusable blocks that are fully synced should have no sync status set
// for backwards compat between patterns and old reusable blocks, but
// some in release 16.1 may have had sync status inadvertantly set to
// 'fully' if created in the site editor.
reusableBlock.wp_pattern_sync_status === 'fully' || reusableBlock.wp_pattern_sync_status === '' || !reusableBlock.wp_pattern_sync_status).map(buildReusableBlockInserterItem) : [];
const buildBlockTypeInserterItem = buildBlockTypeItem(state, {
buildScope: 'inserter'
});
@ -8529,7 +8532,7 @@ 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 reusableBlocks.filter(reusableBlock => reusableBlock.wp_pattern_sync_status === 'unsynced').map(reusableBlock => {
return {
name: `core/block/${reusableBlock.id}`,
title: reusableBlock.title.raw,
@ -9109,7 +9112,10 @@ function BlockRemovalWarningModal() {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
title: (0,external_wp_i18n_namespaceObject.__)('Are you sure?'),
onRequestClose: clearRemovalPrompt
onRequestClose: clearRemovalPrompt,
style: {
maxWidth: '40rem'
}
}, blockNamesForPrompt.length === 1 ? (0,external_wp_element_namespaceObject.createElement)("p", null, blockTypePromptMessages[blockNamesForPrompt[0]]) : (0,external_wp_element_namespaceObject.createElement)("ul", {
style: {
listStyleType: 'disc',
@ -16724,7 +16730,28 @@ function BlockContextProvider({
*/
const DEFAULT_BLOCK_CONTEXT = {};
const Edit = props => {
const {
name
} = props;
const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(name);
if (!blockType) {
return null;
} // `edit` and `save` are functions or components describing the markup
// with which a block is displayed. If `blockType` is valid, assign
// them preferentially as the render value for the block.
const Component = blockType.edit || blockType.save;
return (0,external_wp_element_namespaceObject.createElement)(Component, { ...props
});
};
const EditWithFilters = (0,external_wp_components_namespaceObject.withFilters)('editor.BlockEdit')(Edit);
const EditWithGeneratedProps = props => {
const {
attributes = {},
name
@ -16738,15 +16765,10 @@ const Edit = props => {
if (!blockType) {
return null;
} // `edit` and `save` are functions or components describing the markup
// with which a block is displayed. If `blockType` is valid, assign
// them preferentially as the render value for the block.
const Component = blockType.edit || blockType.save;
}
if (blockType.apiVersion > 1) {
return (0,external_wp_element_namespaceObject.createElement)(Component, { ...props,
return (0,external_wp_element_namespaceObject.createElement)(EditWithFilters, { ...props,
context: context
});
} // Generate a class name for the block's editable form.
@ -16754,12 +16776,13 @@ const Edit = props => {
const generatedClassName = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, 'className', true) ? (0,external_wp_blocks_namespaceObject.getBlockDefaultClassName)(name) : null;
const className = classnames_default()(generatedClassName, attributes.className, props.className);
return (0,external_wp_element_namespaceObject.createElement)(Component, { ...props,
return (0,external_wp_element_namespaceObject.createElement)(EditWithFilters, { ...props,
context: context,
className: className
});
};
/* harmony default export */ var edit = ((0,external_wp_components_namespaceObject.withFilters)('editor.BlockEdit')(Edit));
/* harmony default export */ var edit = (EditWithGeneratedProps);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-edit/index.js
@ -28738,6 +28761,72 @@ function BlockPatternsTabs({
;// CONCATENATED MODULE: external ["wp","url"]
var external_wp_url_namespaceObject = window["wp"]["url"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
/**
* WordPress dependencies
*/
const close_close = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
}));
/* harmony default export */ var library_close = (close_close);
;// CONCATENATED MODULE: external ["wp","preferences"]
var external_wp_preferences_namespaceObject = window["wp"]["preferences"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/reusable-block-rename-hint.js
/**
* WordPress dependencies
*/
const PREFERENCE_NAME = 'isResuableBlocksrRenameHintVisible';
function ReusableBlocksRenameHint() {
const isReusableBlocksRenameHint = (0,external_wp_data_namespaceObject.useSelect)(select => {
var _select$get;
return (_select$get = select(external_wp_preferences_namespaceObject.store).get('core', PREFERENCE_NAME)) !== null && _select$get !== void 0 ? _select$get : true;
}, []);
const ref = (0,external_wp_element_namespaceObject.useRef)();
const {
set: setPreference
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
if (!isReusableBlocksRenameHint) {
return null;
}
return (0,external_wp_element_namespaceObject.createElement)("div", {
ref: ref,
className: "reusable-blocks-menu-items__rename-hint"
}, (0,external_wp_element_namespaceObject.createElement)("div", {
className: "reusable-blocks-menu-items__rename-hint-content"
}, (0,external_wp_i18n_namespaceObject.__)('Reusable blocks are now called patterns. A synced pattern will behave in exactly the same way as a reusable block.')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
className: "reusable-blocks-menu-items__rename-hint-dismiss",
icon: library_close,
iconSize: "16",
label: (0,external_wp_i18n_namespaceObject.__)('Dismiss hint'),
onClick: () => {
// Retain focus when dismissing the element.
const previousElement = external_wp_dom_namespaceObject.focus.tabbable.findPrevious(ref.current);
previousElement?.focus();
setPreference('core', PREFERENCE_NAME, false);
},
showTooltip: false
}));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/reusable-blocks-tab.js
@ -28757,6 +28846,7 @@ var external_wp_url_namespaceObject = window["wp"]["url"];
function ReusableBlocksList({
onHover,
onInsert,
@ -28800,7 +28890,9 @@ function ReusableBlocksTab({
onInsert,
onHover
}) {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(ReusableBlocksList, {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
className: "block-editor-inserter__hint"
}, (0,external_wp_element_namespaceObject.createElement)(ReusableBlocksRenameHint, null)), (0,external_wp_element_namespaceObject.createElement)(ReusableBlocksList, {
onHover: onHover,
onInsert: onInsert,
rootClientId: rootClientId
@ -32950,20 +33042,35 @@ function BlockSelectionButton({
/* harmony default export */ var block_selection_button = (BlockSelectionButton);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/level-up.js
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/next.js
/**
* WordPress dependencies
*/
const levelUp = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
const next = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
d: "m13.53 8.47-1.06 1.06-2.72-2.72V12h-1.5V6.81L5.53 9.53 4.47 8.47 9 3.94l4.53 4.53Zm-1.802 7.968c1.307.697 3.235.812 5.772.812v1.5c-2.463 0-4.785-.085-6.478-.988a4.721 4.721 0 0 1-2.07-2.13C8.48 14.67 8.25 13.471 8.25 12h1.5c0 1.328.208 2.28.548 2.969.332.675.81 1.138 1.43 1.47Z"
d: "M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"
}));
/* harmony default export */ var level_up = (levelUp);
/* harmony default export */ var library_next = (next);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/previous.js
/**
* WordPress dependencies
*/
const previous = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
d: "M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"
}));
/* harmony default export */ var library_previous = (previous);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/navigable-toolbar/index.js
@ -33329,6 +33436,7 @@ function useShowMoversGestures({
/**
* Block parent selector component, displaying the hierarchy of the
* current block selection as a single icon to "go up" a level.
@ -33343,15 +33451,16 @@ function BlockParentSelector() {
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
const {
firstParentClientId,
shouldHide,
isVisible,
isDistractionFree
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getBlockName,
getBlockParents,
getSelectedBlockClientId,
getSettings
} = select(store);
getSettings,
getBlockEditingMode
} = unlock(select(store));
const {
hasBlockSupport
} = select(external_wp_blocks_namespaceObject.store);
@ -33365,7 +33474,7 @@ function BlockParentSelector() {
const settings = getSettings();
return {
firstParentClientId: _firstParentClientId,
shouldHide: !hasBlockSupport(_parentBlockType, '__experimentalParentSelector', true),
isVisible: _firstParentClientId && getBlockEditingMode(_firstParentClientId) === 'default' && hasBlockSupport(_parentBlockType, '__experimentalParentSelector', true),
isDistractionFree: settings.isDistractionFree
};
}, []);
@ -33388,7 +33497,7 @@ function BlockParentSelector() {
});
if (shouldHide || firstParentClientId === undefined) {
if (!isVisible) {
return null;
}
@ -36782,7 +36891,6 @@ const BlockToolbar = ({
function BlockContextualToolbar({
focusOnMount,
isFixed,
@ -36817,7 +36925,7 @@ function BlockContextualToolbar({
selectedBlockClientId: _selectedBlockClientId,
blockType: _selectedBlockClientId && getBlockType(getBlockName(_selectedBlockClientId)),
hasParents: parents.length,
showParentSelector: parentBlockType && (0,external_wp_blocks_namespaceObject.hasBlockSupport)(parentBlockType, '__experimentalParentSelector', true) && selectedBlockClientIds.length <= 1 && getBlockEditingMode(_selectedBlockClientId) === 'default'
showParentSelector: parentBlockType && getBlockEditingMode(firstParentClientId) === 'default' && (0,external_wp_blocks_namespaceObject.hasBlockSupport)(parentBlockType, '__experimentalParentSelector', true) && selectedBlockClientIds.length <= 1 && getBlockEditingMode(_selectedBlockClientId) === 'default'
};
}, []);
(0,external_wp_element_namespaceObject.useEffect)(() => {
@ -36841,22 +36949,20 @@ function BlockContextualToolbar({
,
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Block tools'),
...props
}, isFixed && isLargeViewport && blockType && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, {
}, !isCollapsed && (0,external_wp_element_namespaceObject.createElement)(block_toolbar, {
hideDragHandle: isFixed
}), isFixed && isLargeViewport && blockType && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarGroup, {
className: isCollapsed ? 'block-editor-block-toolbar__group-expand-fixed-toolbar' : 'block-editor-block-toolbar__group-collapse-fixed-toolbar'
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
as: external_wp_components_namespaceObject.ToolbarButton,
ref: toolbarButtonRef,
icon: isCollapsed ? (0,external_wp_element_namespaceObject.createElement)(block_icon, {
icon: blockType.icon
}) : level_up,
icon: isCollapsed ? library_next : library_previous,
onClick: () => {
setIsCollapsed(collapsed => !collapsed);
toolbarButtonRef.current.focus();
},
label: isCollapsed ? (0,external_wp_i18n_namespaceObject.__)('Show block tools') : (0,external_wp_i18n_namespaceObject.__)('Show document tools')
})), !isCollapsed && (0,external_wp_element_namespaceObject.createElement)(block_toolbar, {
hideDragHandle: isFixed
}));
label: isCollapsed ? (0,external_wp_i18n_namespaceObject.__)('Show block tools') : (0,external_wp_i18n_namespaceObject.__)('Hide block tools')
})));
}
/* harmony default export */ var block_contextual_toolbar = (BlockContextualToolbar);
@ -49608,12 +49714,12 @@ function useListViewClientIds({
const {
getDraggedBlockClientIds,
getSelectedBlockClientIds,
getListViewClientIdsTree
getEnabledClientIdsTree
} = unlock(select(store));
return {
selectedClientIds: getSelectedBlockClientIds(),
draggedClientIds: getDraggedBlockClientIds(),
clientIdsTree: blocks !== null && blocks !== void 0 ? blocks : getListViewClientIdsTree(rootClientId)
clientIdsTree: blocks !== null && blocks !== void 0 ? blocks : getEnabledClientIdsTree(rootClientId)
};
}, [blocks, rootClientId]);
}
@ -58943,21 +59049,6 @@ class URLInputButton extends external_wp_element_namespaceObject.Component {
/* harmony default export */ var url_input_button = (URLInputButton);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
/**
* WordPress dependencies
*/
const close_close = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
}));
/* harmony default export */ var library_close = (close_close);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/image-url-input-ui.js
@ -59729,8 +59820,6 @@ const PositionControls = () => {
/* harmony default export */ var position_controls_panel = (PositionControls);
;// CONCATENATED MODULE: external ["wp","preferences"]
var external_wp_preferences_namespaceObject = window["wp"]["preferences"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inspector-controls-tabs/settings-tab-hint.js
@ -59744,12 +59833,12 @@ var external_wp_preferences_namespaceObject = window["wp"]["preferences"];
const PREFERENCE_NAME = 'isInspectorControlsTabsHintVisible';
const settings_tab_hint_PREFERENCE_NAME = 'isInspectorControlsTabsHintVisible';
function InspectorControlsTabsHint() {
const isInspectorControlsTabsHintVisible = (0,external_wp_data_namespaceObject.useSelect)(select => {
var _select$get;
return (_select$get = select(external_wp_preferences_namespaceObject.store).get('core', PREFERENCE_NAME)) !== null && _select$get !== void 0 ? _select$get : true;
return (_select$get = select(external_wp_preferences_namespaceObject.store).get('core', settings_tab_hint_PREFERENCE_NAME)) !== null && _select$get !== void 0 ? _select$get : true;
}, []);
const ref = (0,external_wp_element_namespaceObject.useRef)();
const {
@ -59774,7 +59863,7 @@ function InspectorControlsTabsHint() {
// Retain focus when dismissing the element.
const previousElement = external_wp_dom_namespaceObject.focus.tabbable.findPrevious(ref.current);
previousElement?.focus();
setPreference('core', PREFERENCE_NAME, false);
setPreference('core', settings_tab_hint_PREFERENCE_NAME, false);
},
showTooltip: false
}));
@ -61582,6 +61671,11 @@ function PublishDateTimePicker({
/*
* The following rename hint component can be removed in 6.4.
*/
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/elements/index.js
const ELEMENT_CLASS_NAMES = {
@ -63812,7 +63906,7 @@ function prev () {
/**
* @return {number}
*/
function next () {
function Tokenizer_next () {
Tokenizer_character = position < Tokenizer_length ? Utility_charat(characters, position++) : 0
if (column++, Tokenizer_character === 10)
@ -63911,7 +64005,7 @@ function Tokenizer_tokenize (value) {
function whitespace (type) {
while (Tokenizer_character = peek())
if (Tokenizer_character < 33)
next()
Tokenizer_next()
else
break
@ -63923,7 +64017,7 @@ function whitespace (type) {
* @return {string[]}
*/
function tokenizer (children) {
while (next())
while (Tokenizer_next())
switch (token(Tokenizer_character)) {
case 0: append(identifier(position - 1), children)
break
@ -63941,12 +64035,12 @@ function tokenizer (children) {
* @return {string}
*/
function escaping (index, count) {
while (--count && next())
while (--count && Tokenizer_next())
// not 0-9 A-F a-f
if (Tokenizer_character < 48 || Tokenizer_character > 102 || (Tokenizer_character > 57 && Tokenizer_character < 65) || (Tokenizer_character > 70 && Tokenizer_character < 97))
break
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
return slice(index, caret() + (count < 6 && peek() == 32 && Tokenizer_next() == 32))
}
/**
@ -63954,7 +64048,7 @@ function escaping (index, count) {
* @return {number}
*/
function delimiter (type) {
while (next())
while (Tokenizer_next())
switch (Tokenizer_character) {
// ] ) " '
case type:
@ -63971,7 +64065,7 @@ function delimiter (type) {
break
// \
case 92:
next()
Tokenizer_next()
break
}
@ -63984,7 +64078,7 @@ function delimiter (type) {
* @return {number}
*/
function commenter (type, index) {
while (next())
while (Tokenizer_next())
// //
if (type + Tokenizer_character === 47 + 10)
break
@ -63992,7 +64086,7 @@ function commenter (type, index) {
else if (type + Tokenizer_character === 42 + 42 && peek() === 47)
break
return '/*' + slice(index, position - 1) + '*' + Utility_from(type === 47 ? type : next())
return '/*' + slice(index, position - 1) + '*' + Utility_from(type === 47 ? type : Tokenizer_next())
}
/**
@ -64001,7 +64095,7 @@ function commenter (type, index) {
*/
function identifier (index) {
while (!token(peek()))
next()
Tokenizer_next()
return slice(index, position)
}
@ -64220,7 +64314,7 @@ function Parser_parse (value, root, parent, rule, rules, rulesets, pseudo, point
var characters = type
while (scanning)
switch (previous = character, character = next()) {
switch (previous = character, character = Tokenizer_next()) {
// (
case 40:
if (previous != 108 && Utility_charat(characters, length - 1) == 58) {
@ -64244,7 +64338,7 @@ function Parser_parse (value, root, parent, rule, rules, rulesets, pseudo, point
case 47:
switch (peek()) {
case 42: case 47:
Utility_append(comment(commenter(next(), caret()), root, parent), declarations)
Utility_append(comment(commenter(Tokenizer_next(), caret()), root, parent), declarations)
break
default:
characters += '/'
@ -64308,7 +64402,7 @@ function Parser_parse (value, root, parent, rule, rules, rulesets, pseudo, point
case 64:
// -
if (peek() === 45)
characters += delimit(next())
characters += delimit(Tokenizer_next())
atrule = peek(), offset = length = Utility_strlen(type = characters += identifier(caret())), character++
break
@ -64392,7 +64486,7 @@ var identifierWithPointTracking = function identifierWithPointTracking(begin, po
break;
}
next();
Tokenizer_next();
}
return slice(begin, position);
@ -64436,7 +64530,7 @@ var toRules = function toRules(parsed, points) {
default:
parsed[index] += Utility_from(character);
}
} while (character = next());
} while (character = Tokenizer_next());
return parsed;
};

File diff suppressed because one or more lines are too long

View File

@ -1947,7 +1947,11 @@ const metadata = {
html: false,
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
@ -3511,7 +3515,11 @@ const audio_metadata = {
align: true,
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
}
},
editorStyle: "wp-block-audio-editor",
@ -6042,7 +6050,11 @@ const categories_metadata = {
html: false,
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
@ -6741,7 +6753,11 @@ const code_metadata = {
},
spacing: {
margin: ["top", "bottom"],
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
__experimentalBorder: {
radius: true,
@ -14645,7 +14661,11 @@ const details_metadata = {
html: false,
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
@ -20817,7 +20837,9 @@ const gallery_metadata = {
blockGap: ["horizontal", "vertical"],
__experimentalSkipSerialization: ["blockGap"],
__experimentalDefaultControls: {
blockGap: true
blockGap: true,
margin: false,
padding: false
}
},
color: {
@ -22508,7 +22530,11 @@ const {
},
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
@ -22673,7 +22699,11 @@ const heading_metadata = {
},
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
@ -24029,7 +24059,7 @@ function image_Image({
}
}, img);
} else {
const ratio = aspectRatio && evalAspectRatio(aspectRatio) || width && height && width / height || naturalWidth / naturalHeight;
const ratio = aspectRatio && evalAspectRatio(aspectRatio) || width && height && width / height || naturalWidth / naturalHeight || 1;
const currentWidth = !width && height ? height * ratio : width;
const currentHeight = !height && width ? width / ratio : height;
const minWidth = naturalWidth < naturalHeight ? constants_MIN_SIZE : constants_MIN_SIZE * ratio;
@ -26700,7 +26730,11 @@ const list_metadata = {
},
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
__unstablePasteTextInline: true,
__experimentalSelector: "ol,ul",
@ -27461,7 +27495,11 @@ const {
},
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
__unstablePasteTextInline: true,
__experimentalSelector: "ol,ul",
@ -41033,7 +41071,11 @@ const post_time_to_read_metadata = {
html: false,
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
@ -48894,7 +48936,11 @@ const site_logo_metadata = {
},
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
}
},
styles: [{
@ -49108,7 +49154,11 @@ const site_tagline_metadata = {
},
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
@ -49416,7 +49466,11 @@ const site_title_metadata = {
},
spacing: {
padding: true,
margin: true
margin: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
@ -51222,7 +51276,9 @@ const social_links_metadata = {
padding: true,
units: ["px", "em", "rem", "vh", "vw"],
__experimentalDefaultControls: {
blockGap: true
blockGap: true,
margin: true,
padding: false
}
}
},
@ -53849,7 +53905,11 @@ const table_metadata = {
},
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
typography: {
fontSize: true,
@ -56842,7 +56902,11 @@ const verse_metadata = {
},
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
},
__experimentalBorder: {
radius: true,
@ -57013,7 +57077,11 @@ const video_deprecated_metadata = {
align: true,
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
}
},
editorStyle: "wp-block-video-editor",
@ -57946,7 +58014,11 @@ const video_metadata = {
align: true,
spacing: {
margin: true,
padding: true
padding: true,
__experimentalDefaultControls: {
margin: false,
padding: false
}
}
},
editorStyle: "wp-block-video-editor",

File diff suppressed because one or more lines are too long

View File

@ -280,7 +280,7 @@ function _extends() {
}
;// CONCATENATED MODULE: external "React"
var external_React_namespaceObject = window["React"];
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.module.js
;// CONCATENATED MODULE: ./node_modules/@radix-ui/primitive/dist/index.module.js
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
return function handleEvent(event) {
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
@ -293,7 +293,7 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.module.js
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-compose-refs/dist/index.module.js
@ -325,7 +325,7 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.module.js
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-context/dist/index.module.js
@ -454,7 +454,7 @@ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultCon
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js
@ -471,7 +471,7 @@ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultCon
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.module.js
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-id/dist/index.module.js
@ -496,7 +496,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js
@ -520,7 +520,7 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js
@ -1360,7 +1360,7 @@ const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ (0,external_Reac
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.module.js
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-presence/dist/index.module.js
@ -1500,7 +1500,7 @@ $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.module.js
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-focus-guards/dist/index.module.js
@ -3251,7 +3251,7 @@ function commandLoaders(state = {}, action) {
return state;
}
/**
* Reducer returning the command center open state.
* Reducer returning the command palette open state.
*
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
@ -3272,7 +3272,7 @@ function isOpen(state = false, action) {
return state;
}
/**
* Reducer returning the command center's active context.
* Reducer returning the command palette's active context.
*
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
@ -3384,7 +3384,7 @@ function unregisterCommandLoader(name) {
};
}
/**
* Opens the command center.
* Opens the command palette.
*
* @return {Object} action.
*/
@ -3395,7 +3395,7 @@ function actions_open() {
};
}
/**
* Closes the command center.
* Closes the command palette.
*
* @return {Object} action.
*/
@ -3942,7 +3942,7 @@ function CommandMenu() {
registerShortcut({
name: 'core/commands',
category: 'global',
description: (0,external_wp_i18n_namespaceObject.__)('Open the global command menu'),
description: (0,external_wp_i18n_namespaceObject.__)('Open the command palette'),
keyCombination: {
modifier: 'primary',
character: 'k'
@ -3970,7 +3970,7 @@ function CommandMenu() {
};
(0,external_wp_element_namespaceObject.useEffect)(() => {
// Focus the command menu input when mounting the modal.
// Focus the command palette input when mounting the modal.
if (isOpen) {
commandMenuInput.current.focus();
}
@ -3989,7 +3989,7 @@ function CommandMenu() {
}, (0,external_wp_element_namespaceObject.createElement)("div", {
className: "commands-command-menu__container"
}, (0,external_wp_element_namespaceObject.createElement)(Le, {
label: (0,external_wp_i18n_namespaceObject.__)('Global Command Menu')
label: (0,external_wp_i18n_namespaceObject.__)('Command palette')
}, (0,external_wp_element_namespaceObject.createElement)("div", {
className: "commands-command-menu__header"
}, (0,external_wp_element_namespaceObject.createElement)(Le.Input, {
@ -4022,7 +4022,7 @@ function CommandMenu() {
/**
* Sets the active context of the command center
* Sets the active context of the command palette
*
* @param {string} context Context to set.
*/
@ -4069,7 +4069,7 @@ lock(privateApis, {
/**
* Attach a command to the Global command menu.
* Attach a command to the command palette.
*
* @param {import('../store/actions').WPCommandConfig} command command config.
*/
@ -4110,7 +4110,7 @@ function useCommand(command) {
/**
* Attach a command loader to the Global command menu.
* Attach a command loader to the command palette.
*
* @param {import('../store/actions').WPCommandLoaderConfig} loader command loader config.
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2024,7 +2024,6 @@ const editEntityRecord = (kind, name, recordId, edits, options = {}) => ({
}
const {
transientEdits = {},
mergedEdits = {}
} = entityConfig;
const record = select.getRawEntityRecord(kind, name, recordId);
@ -2043,8 +2042,7 @@ const editEntityRecord = (kind, name, recordId, edits, options = {}) => ({
} : edits[key];
acc[key] = es6_default()(recordValue, value) ? undefined : value;
return acc;
}, {}),
transientEdits
}, {})
};
dispatch({
type: 'EDIT_ENTITY_RECORD',
@ -2055,7 +2053,8 @@ const editEntityRecord = (kind, name, recordId, edits, options = {}) => ({
edits: Object.keys(edits).reduce((acc, key) => {
acc[key] = editedRecord[key];
return acc;
}, {})
}, {}),
isCached: options.isCached
}
}
});
@ -3595,7 +3594,7 @@ const entities = (state = {}, action) => {
*
* @property {number} list The undo stack.
* @property {number} offset Where in the undo stack we are.
* @property {Object} cache Cache of unpersisted transient edits.
* @property {Object} cache Cache of unpersisted edits.
*/
/** @typedef {Array<Object> & UndoStateMeta} UndoState */
@ -3700,7 +3699,6 @@ function reducer_undo(state = UNDO_INITIAL_STATE, action) {
return state;
}
const isCachedChange = Object.keys(action.edits).every(key => action.transientEdits[key]);
const edits = Object.keys(action.edits).map(key => {
return {
kind: action.kind,
@ -3712,7 +3710,7 @@ function reducer_undo(state = UNDO_INITIAL_STATE, action) {
};
});
if (isCachedChange) {
if (action.meta.undo.isCached) {
return { ...state,
cache: edits.reduce(appendEditToStack, state.cache)
};
@ -6289,13 +6287,12 @@ function useEntityProp(kind, name, prop, _id) {
function useEntityBlockEditor(kind, name, {
id: _id
} = {}) {
const [meta, updateMeta] = useEntityProp(kind, name, 'meta', _id);
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
const providerId = useEntityId(kind, name);
const id = _id !== null && _id !== void 0 ? _id : providerId;
const {
content,
blocks
blocks,
meta
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getEditedEntityRecord
@ -6303,7 +6300,8 @@ function useEntityBlockEditor(kind, name, {
const editedRecord = getEditedEntityRecord(kind, name, id);
return {
blocks: editedRecord.blocks,
content: editedRecord.content
content: editedRecord.content,
meta: editedRecord.meta
};
}, [kind, name, id]);
const {
@ -6326,7 +6324,7 @@ function useEntityBlockEditor(kind, name, {
const updateFootnotes = (0,external_wp_element_namespaceObject.useCallback)(_blocks => {
if (!meta) return; // If meta.footnotes is empty, it means the meta is not registered.
if (meta.footnotes === undefined) return;
if (meta.footnotes === undefined) return {};
const {
getRichTextValues
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
@ -6362,49 +6360,51 @@ function useEntityBlockEditor(kind, name, {
return acc;
}, {})
};
updateMeta({ ...meta,
footnotes: JSON.stringify(newFootnotes)
});
}, [meta, updateMeta]);
const onChange = (0,external_wp_element_namespaceObject.useCallback)((newBlocks, options) => {
const {
selection
} = options;
const edits = {
blocks: newBlocks,
selection
return {
meta: { ...meta,
footnotes: JSON.stringify(newFootnotes)
}
};
const noChange = blocks === edits.blocks;
}, [meta]);
const onChange = (0,external_wp_element_namespaceObject.useCallback)((newBlocks, options) => {
const noChange = blocks === newBlocks;
if (noChange) {
return __unstableCreateUndoLevel(kind, name, id);
} // We create a new function here on every persistent edit
}
const {
selection
} = options; // We create a new function here on every persistent edit
// to make sure the edit makes the post dirty and creates
// a new undo level.
edits.content = ({
blocks: blocksForSerialization = []
}) => (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(blocksForSerialization);
registry.batch(() => {
updateFootnotes(edits.blocks);
editEntityRecord(kind, name, id, edits);
const edits = {
blocks: newBlocks,
selection,
content: ({
blocks: blocksForSerialization = []
}) => (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(blocksForSerialization),
...updateFootnotes(newBlocks)
};
editEntityRecord(kind, name, id, edits, {
isCached: false
});
}, [kind, name, id, blocks, updateFootnotes]);
}, [kind, name, id, blocks, updateFootnotes, __unstableCreateUndoLevel, editEntityRecord]);
const onInput = (0,external_wp_element_namespaceObject.useCallback)((newBlocks, options) => {
const {
selection
} = options;
const footnotesChanges = updateFootnotes(newBlocks);
const edits = {
blocks: newBlocks,
selection
selection,
...footnotesChanges
};
registry.batch(() => {
updateFootnotes(edits.blocks);
editEntityRecord(kind, name, id, edits);
editEntityRecord(kind, name, id, edits, {
isCached: true
});
}, [kind, name, id, updateFootnotes]);
}, [kind, name, id, updateFootnotes, editEntityRecord]);
return [blocks !== null && blocks !== void 0 ? blocks : EMPTY_ARRAY, onInput, onChange];
}

File diff suppressed because one or more lines are too long

View File

@ -3204,6 +3204,12 @@ function createRegistry(storeConfigs = {}, parent = null) {
}
function batch(callback) {
// If we're already batching, just call the callback.
if (emitter.isPaused) {
callback();
return;
}
emitter.pause();
Object.values(stores).forEach(store => store.emitter.pause());
callback();

File diff suppressed because one or more lines are too long

View File

@ -5436,6 +5436,7 @@ const plus = (0,external_wp_element_namespaceObject.createElement)(external_wp_p
/**
* Internal dependencies
*/
@ -5456,6 +5457,10 @@ function HeaderToolbar() {
setIsInserterOpened,
setIsListViewOpened
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
const {
get: getPreference
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_preferences_namespaceObject.store);
const hasFixedToolbar = getPreference('core/edit-post', 'fixedToolbar');
const {
isInserterEnabled,
isInserterOpened,
@ -5553,7 +5558,7 @@ function HeaderToolbar() {
icon: library_plus,
label: showIconLabels ? shortLabel : longLabel,
showTooltip: !showIconLabels
}), (isWideViewport || !showIconLabels) && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isLargeViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
}), (isWideViewport || !showIconLabels) && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isLargeViewport && !hasFixedToolbar && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
as: external_wp_blockEditor_namespaceObject.ToolSelector,
showTooltip: !showIconLabels,
variant: showIconLabels ? 'tertiary' : undefined,
@ -6795,11 +6800,8 @@ function PostVisibilityToggle({
* WordPress dependencies
*/
function PostTrash() {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.PostTrashCheck, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, {
isBlock: true
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.PostTrash, null)));
return (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.PostTrashCheck, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.PostTrash, null));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/post-schedule/index.js
@ -7438,7 +7440,8 @@ function PostStatus({
style: {
marginTop: '16px'
},
spacing: 4
spacing: 4,
wrap: true
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.PostSwitchToDraftButton, null), (0,external_wp_element_namespaceObject.createElement)(PostTrash, null)))));
}
@ -8918,6 +8921,10 @@ 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'),
@ -8934,6 +8941,9 @@ 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
@ -9046,7 +9056,9 @@ 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)(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)(BlockRemovalWarningModal, {
rules: blockRemovalRules
}), (0,external_wp_element_namespaceObject.createElement)(settings_sidebar, null), (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
isDistractionFree: isDistractionFree && isLargeViewport,
className: className,
labels: { ...interfaceLabels,
@ -9220,6 +9232,21 @@ const cog = (0,external_wp_element_namespaceObject.createElement)(external_wp_pr
}));
/* harmony default export */ var library_cog = (cog);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/desktop.js
/**
* WordPress dependencies
*/
const desktop = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
d: "M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"
}));
/* harmony default export */ var library_desktop = (desktop);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js
@ -9271,18 +9298,27 @@ function useCommonCommands() {
const {
openGeneralSidebar,
closeGeneralSidebar,
switchEditorMode
switchEditorMode,
setIsListViewOpened
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
const {
openModal
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
const {
editorMode,
activeSidebar
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
activeSidebar: select(store).getActiveComplementaryArea(store_store.name),
editorMode: select(store_store).getEditorMode()
}), []);
activeSidebar,
isListViewOpen
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getEditorMode,
isListViewOpened
} = select(store_store);
return {
activeSidebar: select(store).getActiveComplementaryArea(store_store.name),
editorMode: getEditorMode(),
isListViewOpen: isListViewOpened()
};
}, []);
const {
toggle
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
@ -9340,6 +9376,28 @@ function useCommonCommands() {
close();
}
});
(0,external_wp_commands_namespaceObject.useCommand)({
name: 'core/toggle-fullscreen-mode',
label: (0,external_wp_i18n_namespaceObject.__)('Toggle fullscreen mode'),
icon: library_desktop,
callback: ({
close
}) => {
toggle('core/edit-post', 'fullscreenMode');
close();
}
});
(0,external_wp_commands_namespaceObject.useCommand)({
name: 'core/toggle-list-view',
label: (0,external_wp_i18n_namespaceObject.__)('Toggle list view'),
icon: list_view,
callback: ({
close
}) => {
setIsListViewOpened(!isListViewOpen);
close();
}
});
(0,external_wp_commands_namespaceObject.useCommand)({
name: 'core/toggle-top-toolbar',
label: (0,external_wp_i18n_namespaceObject.__)('Toggle top toolbar'),

File diff suppressed because one or more lines are too long

View File

@ -4399,7 +4399,8 @@ const setHasPageContentFocus = hasPageContentFocus => ({
const setCanvasMode = mode => ({
registry,
dispatch
dispatch,
select
}) => {
registry.dispatch(external_wp_blockEditor_namespaceObject.store).__unstableSetEditorMode('edit');
@ -4410,6 +4411,11 @@ const setCanvasMode = mode => ({
if (mode === 'edit' && registry.select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'showListViewByDefault')) {
dispatch.setIsListViewOpened(true);
} // Switch focus away from editing the template when switching to view mode.
if (mode === 'view' && select.isPage()) {
dispatch.setHasPageContentFocus(true);
}
};
/**
@ -6929,12 +6935,22 @@ function SidebarNavigationItemGlobalStyles(props) {
set: setPreference
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
const {
hasGlobalStyleVariations,
isDistractionFree
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
hasGlobalStyleVariations: !!select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,
isDistractionFree: select(external_wp_preferences_namespaceObject.store).get(store_store.name, 'distractionFree')
}), []);
get: getPrefference
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_preferences_namespaceObject.store);
const turnOffDistractionFreeMode = (0,external_wp_element_namespaceObject.useCallback)(() => {
const isDistractionFree = getPrefference(store_store.name, 'distractionFree');
if (!isDistractionFree) {
return;
}
setPreference(store_store.name, 'distractionFree', false);
createNotice('info', (0,external_wp_i18n_namespaceObject.__)('Distraction free mode turned off'), {
isDismissible: true,
type: 'snackbar'
});
}, [createNotice, setPreference, getPrefference]);
const hasGlobalStyleVariations = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_coreData_namespaceObject.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, []);
if (hasGlobalStyleVariations) {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorButton, { ...props,
@ -6945,14 +6961,7 @@ function SidebarNavigationItemGlobalStyles(props) {
return (0,external_wp_element_namespaceObject.createElement)(SidebarNavigationItem, { ...props,
onClick: () => {
// Disable distraction free mode.
if (isDistractionFree) {
setPreference(store_store.name, 'distractionFree', false);
createNotice('info', (0,external_wp_i18n_namespaceObject.__)('Distraction free mode turned off.'), {
type: 'snackbar'
});
} // Switch to edit mode.
turnOffDistractionFreeMode(); // Switch to edit mode.
setCanvasMode('edit'); // Open global styles sidebar.
@ -7049,8 +7058,45 @@ function SidebarNavigationScreenGlobalStyles() {
setCanvasMode,
setEditorCanvasContainerView
} = unlock((0,external_wp_data_namespaceObject.useDispatch)(store_store));
const isStyleBookOpened = (0,external_wp_data_namespaceObject.useSelect)(select => 'style-book' === unlock(select(store_store)).getEditorCanvasContainerView(), []);
const openGlobalStyles = (0,external_wp_element_namespaceObject.useCallback)(async () => Promise.all([setCanvasMode('edit'), openGeneralSidebar('edit-site/global-styles')]), [setCanvasMode, openGeneralSidebar]);
const {
createNotice
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
const {
set: setPreference
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
const {
get: getPrefference
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_preferences_namespaceObject.store);
const {
isViewMode,
isStyleBookOpened
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getCanvasMode,
getEditorCanvasContainerView
} = unlock(select(store_store));
return {
isViewMode: 'view' === getCanvasMode(),
isStyleBookOpened: 'style-book' === getEditorCanvasContainerView()
};
}, []);
const turnOffDistractionFreeMode = (0,external_wp_element_namespaceObject.useCallback)(() => {
const isDistractionFree = getPrefference(store_store.name, 'distractionFree');
if (!isDistractionFree) {
return;
}
setPreference(store_store.name, 'distractionFree', false);
createNotice('info', (0,external_wp_i18n_namespaceObject.__)('Distraction free mode turned off'), {
isDismissible: true,
type: 'snackbar'
});
}, [createNotice, setPreference, getPrefference]);
const openGlobalStyles = (0,external_wp_element_namespaceObject.useCallback)(async () => {
turnOffDistractionFreeMode();
return Promise.all([setCanvasMode('edit'), openGeneralSidebar('edit-site/global-styles')]);
}, [setCanvasMode, openGeneralSidebar, turnOffDistractionFreeMode]);
const openStyleBook = (0,external_wp_element_namespaceObject.useCallback)(async () => {
await openGlobalStyles(); // Open the Style Book once the canvas mode is set to edit,
// and the global styles sidebar is open. This ensures that
@ -7084,7 +7130,7 @@ function SidebarNavigationScreenGlobalStyles() {
label: (0,external_wp_i18n_namespaceObject.__)('Edit styles'),
onClick: async () => await openGlobalStyles()
}))
}), isStyleBookOpened && !isMobileViewport && (0,external_wp_element_namespaceObject.createElement)(style_book, {
}), isStyleBookOpened && !isMobileViewport && isViewMode && (0,external_wp_element_namespaceObject.createElement)(style_book, {
enableResizing: false,
isSelected: () => false,
onClick: openStyleBook,
@ -7094,6 +7140,40 @@ function SidebarNavigationScreenGlobalStyles() {
}));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-main/template-part-hint.js
/**
* WordPress dependencies
*/
const PREFERENCE_NAME = 'isTemplatePartMoveHintVisible';
function TemplatePartHint() {
const showTemplatePartHint = (0,external_wp_data_namespaceObject.useSelect)(select => {
var _select$get;
return (_select$get = select(external_wp_preferences_namespaceObject.store).get('core', PREFERENCE_NAME)) !== null && _select$get !== void 0 ? _select$get : true;
}, []);
const {
set: setPreference
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
if (!showTemplatePartHint) {
return null;
}
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Notice, {
politeness: "polite",
className: "edit-site-sidebar__notice",
onRemove: () => {
setPreference('core', PREFERENCE_NAME, false);
}
}, (0,external_wp_i18n_namespaceObject.__)('Looking for template parts? You can now find them in the new "Patterns" page.'));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-main/index.js
@ -7114,6 +7194,7 @@ function SidebarNavigationScreenGlobalStyles() {
function SidebarNavigationScreenMain() {
const {
location
@ -7131,7 +7212,7 @@ function SidebarNavigationScreenMain() {
isRoot: true,
title: (0,external_wp_i18n_namespaceObject.__)('Design'),
description: (0,external_wp_i18n_namespaceObject.__)('Customize the appearance of your website using the block editor.'),
content: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorButton, {
content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorButton, {
as: SidebarNavigationItem,
path: "/navigation",
withChevron: true,
@ -7154,7 +7235,7 @@ function SidebarNavigationScreenMain() {
path: "/patterns",
withChevron: true,
icon: library_symbol
}, (0,external_wp_i18n_namespaceObject.__)('Patterns')))
}, (0,external_wp_i18n_namespaceObject.__)('Patterns'))), (0,external_wp_element_namespaceObject.createElement)(TemplatePartHint, null))
});
}
@ -9039,6 +9120,7 @@ function RenameMenuItem({
/**
* Internal dependencies
*/
@ -9103,15 +9185,14 @@ function TemplateActions({
}) => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, isRemovable && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(RenameMenuItem, {
template: template,
onClose: onClose
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
isDestructive: true,
isTertiary: true,
onClick: () => {
}), (0,external_wp_element_namespaceObject.createElement)(DeleteMenuItem, {
onRemove: () => {
removeTemplate(template);
onRemove?.();
onClose();
}
}, (0,external_wp_i18n_namespaceObject.__)('Delete'))), isRevertable && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
},
isTemplate: template.type === 'wp_template'
})), isRevertable && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
info: (0,external_wp_i18n_namespaceObject.__)('Use the template as supplied by the theme.'),
onClick: () => {
revertAndSaveTemplate();
@ -9120,6 +9201,23 @@ function TemplateActions({
}, (0,external_wp_i18n_namespaceObject.__)('Clear customizations'))));
}
function DeleteMenuItem({
onRemove,
isTemplate
}) {
const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
isDestructive: true,
isTertiary: true,
onClick: () => setIsModalOpen(true)
}, (0,external_wp_i18n_namespaceObject.__)('Delete')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
isOpen: isModalOpen,
onConfirm: onRemove,
onCancel: () => setIsModalOpen(false),
confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Delete')
}, isTemplate ? (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to delete this template?') : (0,external_wp_i18n_namespaceObject.__)('Are you sure you want to delete this template part?')));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/header.js
@ -9663,7 +9761,7 @@ function CreatePatternModal({
content: '',
status: 'publish',
meta: syncType === SYNC_TYPES.unsynced ? {
sync_status: syncType
wp_pattern_sync_status: syncType
} : undefined
}, {
throwOnError: true
@ -10167,18 +10265,27 @@ function useMyPatterns() {
*/
const getTemplatePartAreas = items => {
const useTemplatePartsGroupedByArea = items => {
const allItems = items || [];
const templatePartAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).__experimentalGetDefaultTemplatePartAreas(), []); // Create map of template areas ensuring that default areas are displayed before
// any custom registered template part areas.
const knownAreas = {
header: {},
footer: {},
sidebar: {},
uncategorized: {}
};
templatePartAreas.forEach(templatePartArea => knownAreas[templatePartArea.area] = { ...templatePartArea,
templateParts: []
});
const groupedByArea = allItems.reduce((accumulator, item) => {
const key = accumulator[item.area] ? item.area : 'uncategorized';
accumulator[key].push(item);
accumulator[key].templateParts.push(item);
return accumulator;
}, {
header: [],
footer: [],
sidebar: [],
uncategorized: []
});
}, knownAreas);
return groupedByArea;
};
@ -10192,7 +10299,7 @@ function useTemplatePartAreas() {
return {
hasTemplateParts: templateParts ? !!templateParts.length : false,
isLoading,
templatePartAreas: getTemplatePartAreas(templateParts)
templatePartAreas: useTemplatePartsGroupedByArea(templateParts)
};
}
@ -10223,12 +10330,66 @@ function useTemplatePartAreas() {
const templatePartAreaLabels = {
header: (0,external_wp_i18n_namespaceObject.__)('Headers'),
footer: (0,external_wp_i18n_namespaceObject.__)('Footers'),
sidebar: (0,external_wp_i18n_namespaceObject.__)('Sidebar'),
uncategorized: (0,external_wp_i18n_namespaceObject.__)('Uncategorized')
};
function TemplatePartGroup({
areas,
currentArea,
currentType
}) {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
className: "edit-site-sidebar-navigation-screen-patterns__group-header"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
level: 2
}, (0,external_wp_i18n_namespaceObject.__)('Template parts')), (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Synced patterns for use in template building.'))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
className: "edit-site-sidebar-navigation-screen-patterns__group"
}, Object.entries(areas).map(([area, {
label,
templateParts
}]) => (0,external_wp_element_namespaceObject.createElement)(CategoryItem, {
key: area,
count: templateParts?.length,
icon: (0,external_wp_editor_namespaceObject.getTemplatePartIcon)(area),
label: label,
id: area,
type: "wp_template_part",
isActive: currentArea === area && currentType === 'wp_template_part'
}))));
}
function ThemePatternsGroup({
categories,
currentCategory,
currentType
}) {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
className: "edit-site-sidebar-navigation-screen-patterns__group-header"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
level: 2
}, (0,external_wp_i18n_namespaceObject.__)('Theme patterns')), (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('For insertion into documents where they can then be customized.'))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
className: "edit-site-sidebar-navigation-screen-patterns__group"
}, categories.map(category => (0,external_wp_element_namespaceObject.createElement)(CategoryItem, {
key: category.name,
count: category.count,
label: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, {
justify: "left",
align: "center",
gap: 0
}, category.label, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, {
position: "top center",
text: (0,external_wp_i18n_namespaceObject.__)('Theme patterns cannot be edited.')
}, (0,external_wp_element_namespaceObject.createElement)("span", {
className: "edit-site-sidebar-navigation-screen-pattern__lock-icon"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
icon: lock_small,
size: 24
})))),
icon: library_file,
id: category.name,
type: "pattern",
isActive: currentCategory === `${category.name}` && currentType === 'pattern'
}))));
}
function SidebarNavigationScreenPatterns() {
const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
const {
@ -10268,7 +10429,7 @@ function SidebarNavigationScreenPatterns() {
return (0,external_wp_element_namespaceObject.createElement)(SidebarNavigationScreen, {
isRoot: isTemplatePartsMode,
title: (0,external_wp_i18n_namespaceObject.__)('Patterns'),
description: (0,external_wp_i18n_namespaceObject.__)('Manage what patterns are available when editing your site.'),
description: (0,external_wp_i18n_namespaceObject.__)('Manage what patterns are available when editing the site.'),
actions: (0,external_wp_element_namespaceObject.createElement)(AddNewPattern, null),
footer: footer,
content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isLoading && (0,external_wp_i18n_namespaceObject.__)('Loading patterns'), !isLoading && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !hasTemplateParts && !hasPatterns && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
@ -10283,42 +10444,15 @@ function SidebarNavigationScreenPatterns() {
id: myPatterns.name,
type: "wp_block",
isActive: currentCategory === `${myPatterns.name}` && currentType === 'wp_block'
})), hasTemplateParts && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
className: "edit-site-sidebar-navigation-screen-patterns__group"
}, Object.entries(templatePartAreas).map(([area, parts]) => (0,external_wp_element_namespaceObject.createElement)(CategoryItem, {
key: area,
count: parts.length,
icon: (0,external_wp_editor_namespaceObject.getTemplatePartIcon)(area),
label: templatePartAreaLabels[area],
id: area,
type: "wp_template_part",
isActive: currentCategory === area && currentType === 'wp_template_part'
}))), hasPatterns && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
className: "edit-site-sidebar-navigation-screen-patterns__group"
}, patternCategories.map(category => (0,external_wp_element_namespaceObject.createElement)(CategoryItem, {
key: category.name,
count: category.count,
label: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Flex, {
justify: "left",
align: "center",
gap: 0
}, category.label, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Tooltip, {
position: "top center",
text: (0,external_wp_i18n_namespaceObject.__)('Theme patterns cannot be edited.')
}, (0,external_wp_element_namespaceObject.createElement)("span", {
className: "edit-site-sidebar-navigation-screen-pattern__lock-icon"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Icon, {
style: {
fill: 'currentcolor'
},
icon: lock_small,
size: 24
})))),
icon: library_file,
id: category.name,
type: "pattern",
isActive: currentCategory === `${category.name}` && currentType === 'pattern'
})))))
})), hasTemplateParts && (0,external_wp_element_namespaceObject.createElement)(TemplatePartGroup, {
areas: templatePartAreas,
currentArea: currentCategory,
currentType: currentType
}), hasPatterns && (0,external_wp_element_namespaceObject.createElement)(ThemePatternsGroup, {
categories: patternCategories,
currentCategory: currentCategory,
currentType: currentType
})))
});
}
@ -10924,12 +11058,12 @@ function usePatternDetails(postType, postId) {
if (!descriptionText && addedBy.text) {
descriptionText = (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: pattern title e.g: "Header".
(0,external_wp_i18n_namespaceObject.__)('This is your %s pattern.'), getTitle());
(0,external_wp_i18n_namespaceObject.__)('This is the %s pattern.'), getTitle());
}
if (!descriptionText && postType === 'wp_block' && record?.title) {
descriptionText = (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: user created pattern title e.g. "Footer".
(0,external_wp_i18n_namespaceObject.__)('This is your %s pattern.'), record.title);
(0,external_wp_i18n_namespaceObject.__)('This is the %s pattern.'), record.title);
}
const description = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, descriptionText, addedBy.text && !isAddedByActiveTheme && (0,external_wp_element_namespaceObject.createElement)("span", {
@ -10956,7 +11090,7 @@ function usePatternDetails(postType, postId) {
if (postType === 'wp_block') {
details.push({
label: (0,external_wp_i18n_namespaceObject.__)('Syncing'),
value: record.meta?.sync_status === 'unsynced' ? (0,external_wp_i18n_namespaceObject.__)('Not synced') : (0,external_wp_i18n_namespaceObject.__)('Fully synced')
value: record.wp_pattern_sync_status === 'unsynced' ? (0,external_wp_i18n_namespaceObject.__)('Not synced') : (0,external_wp_i18n_namespaceObject.__)('Fully synced')
});
}
@ -11316,6 +11450,34 @@ function ScreenNavigationMoreMenu(props) {
}));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function EditButton({
postId
}) {
const linkInfo = useLink({
postId,
postType: 'wp_navigation',
canvas: 'edit'
});
return (0,external_wp_element_namespaceObject.createElement)(SidebarButton, { ...linkInfo,
label: (0,external_wp_i18n_namespaceObject.__)('Edit'),
icon: library_pencil
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js
@ -11331,6 +11493,7 @@ function ScreenNavigationMoreMenu(props) {
function SingleNavigationMenu({
navigationMenu,
handleDelete,
@ -11339,12 +11502,14 @@ function SingleNavigationMenu({
}) {
const menuTitle = navigationMenu?.title?.rendered;
return (0,external_wp_element_namespaceObject.createElement)(SidebarNavigationScreenWrapper, {
actions: (0,external_wp_element_namespaceObject.createElement)(ScreenNavigationMoreMenu, {
actions: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(EditButton, {
postId: navigationMenu?.id
}), (0,external_wp_element_namespaceObject.createElement)(ScreenNavigationMoreMenu, {
menuTitle: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(menuTitle),
onDelete: handleDelete,
onSave: handleSave,
onDuplicate: handleDuplicate
}),
})),
title: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(menuTitle),
description: (0,external_wp_i18n_namespaceObject.__)('Navigation menus are a curated collection of blocks that allow visitors to get around your site.')
}, (0,external_wp_element_namespaceObject.createElement)(NavigationMenuEditor, {
@ -12319,7 +12484,7 @@ function StatusLabel({
short
}) {
const relateToNow = (0,external_wp_date_namespaceObject.humanTimeDiff)(date);
let statusLabel = '';
let statusLabel = status;
let statusIcon = pendingIcon;
switch (status) {
@ -14027,7 +14192,7 @@ function Palette({
key: `${color}-${index}`
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ColorIndicator, {
colorValue: color
})))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, paletteButtonText)))), themeColors?.length > 0 && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
})))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, null, paletteButtonText)))), window.__experimentalEnableColorRandomizer && themeColors?.length > 0 && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
variant: "secondary",
icon: library_shuffle,
onClick: randomizeThemeColors
@ -15399,9 +15564,6 @@ function SidebarCard({
}, description), children));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-content-focus-manager/constants.js
const PAGE_CONTENT_BLOCK_TYPES = ['core/post-title', 'core/post-featured-image', 'core/post-content'];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/sidebar-edit-mode/page-panels/page-content.js
@ -15410,17 +15572,20 @@ const PAGE_CONTENT_BLOCK_TYPES = ['core/post-title', 'core/post-featured-image',
*/
/**
* Internal dependencies
*/
const {
BlockQuickNavigation
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
function PageContent() {
const clientIds = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_blockEditor_namespaceObject.store).__experimentalGetGlobalBlocksByName(PAGE_CONTENT_BLOCK_TYPES), []);
const clientIdsTree = (0,external_wp_data_namespaceObject.useSelect)(select => unlock(select(external_wp_blockEditor_namespaceObject.store)).getEnabledClientIdsTree(), []);
const clientIds = (0,external_wp_element_namespaceObject.useMemo)(() => clientIdsTree.map(({
clientId
}) => clientId), [clientIdsTree]);
return (0,external_wp_element_namespaceObject.createElement)(BlockQuickNavigation, {
clientIds: clientIds
});
@ -16803,13 +16968,16 @@ function useSiteEditorSettings(templateType) {
var _storedSettings$__exp, _storedSettings$__exp2;
const {
storedSettings
storedSettings,
canvasMode
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getSettings
getSettings,
getCanvasMode
} = unlock(select(store_store));
return {
storedSettings: getSettings()
storedSettings: getSettings(),
canvasMode: getCanvasMode()
};
}, []);
const settingsBlockPatterns = (_storedSettings$__exp = storedSettings.__experimentalAdditionalBlockPatterns) !== null && _storedSettings$__exp !== void 0 ? _storedSettings$__exp : // WP 6.0
@ -16835,6 +17003,7 @@ function useSiteEditorSettings(templateType) {
const {
__experimentalAdditionalBlockPatterns,
__experimentalAdditionalBlockPatternCategories,
focusMode,
...restStoredSettings
} = storedSettings;
return { ...restStoredSettings,
@ -16848,9 +17017,10 @@ function useSiteEditorSettings(templateType) {
// explicitly "unset" to avoid the template locking UI remaining
// active for all entities.
templateLock: false,
template: false
template: false,
focusMode: canvasMode === 'view' && focusMode ? false : focusMode
};
}, [storedSettings, blockPatterns, blockPatternCategories]);
}, [storedSettings, blockPatterns, blockPatternCategories, canvasMode]);
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/block-editor/constants.js
@ -16871,10 +17041,10 @@ const FOCUSABLE_ENTITIES = ['wp_template_part', 'wp_navigation'];
*/
const {
useBlockEditingMode: disable_non_page_content_blocks_useBlockEditingMode
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const PAGE_CONTENT_BLOCK_TYPES = ['core/post-title', 'core/post-featured-image', 'core/post-content'];
/**
* Component that when rendered, makes it so that the site editor allows only
* page content to be edited.
@ -16882,6 +17052,7 @@ const {
function DisableNonPageContentBlocks() {
useDisableNonPageContentBlocks();
return null;
}
/**
* Disables non-content blocks using the `useBlockEditingMode` hook.
@ -16895,8 +17066,9 @@ function useDisableNonPageContentBlocks() {
}, []);
}
const withDisableNonPageContentBlocks = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
const isContent = PAGE_CONTENT_BLOCK_TYPES.includes(props.name);
const mode = isContent ? 'contentOnly' : undefined;
const isDescendentOfQueryLoop = !!props.context.queryId;
const isPageContent = PAGE_CONTENT_BLOCK_TYPES.includes(props.name) && !isDescendentOfQueryLoop;
const mode = isPageContent ? 'contentOnly' : undefined;
disable_non_page_content_blocks_useBlockEditingMode(mode);
return (0,external_wp_element_namespaceObject.createElement)(BlockEdit, { ...props
});
@ -18082,7 +18254,7 @@ function WelcomeGuidePage() {
return null;
}
const heading = (0,external_wp_i18n_namespaceObject.__)('Editing your page');
const heading = (0,external_wp_i18n_namespaceObject.__)('Editing a page');
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Guide, {
className: "edit-site-welcome-guide guide-page",
@ -18105,7 +18277,7 @@ function WelcomeGuidePage() {
className: "edit-site-welcome-guide__heading"
}, heading), (0,external_wp_element_namespaceObject.createElement)("p", {
className: "edit-site-welcome-guide__text"
}, (0,external_wp_i18n_namespaceObject.__)('Weve recently introduced the ability to edit pages within the site editor. You can switch to editing your template using the settings sidebar.')))
}, (0,external_wp_i18n_namespaceObject.__)('Its now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.')))
}]
});
}
@ -18143,7 +18315,7 @@ function WelcomeGuideTemplate() {
return null;
}
const heading = (0,external_wp_i18n_namespaceObject.__)('Editing your template');
const heading = (0,external_wp_i18n_namespaceObject.__)('Editing a template');
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Guide, {
className: "edit-site-welcome-guide guide-template",
@ -18166,7 +18338,7 @@ function WelcomeGuideTemplate() {
className: "edit-site-welcome-guide__heading"
}, heading), (0,external_wp_element_namespaceObject.createElement)("p", {
className: "edit-site-welcome-guide__text"
}, (0,external_wp_i18n_namespaceObject.__)('Youre now editing your pages template. To switch back to editing your page you can click the back button in the toolbar.')))
}, (0,external_wp_i18n_namespaceObject.__)('Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the Back button in the toolbar.')))
}]
});
}
@ -19960,6 +20132,10 @@ function HeaderEditMode() {
isDistractionFree: select(external_wp_preferences_namespaceObject.store).get('core/edit-site', 'distractionFree')
};
}, []);
const {
get: getPreference
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_preferences_namespaceObject.store);
const hasFixedToolbar = getPreference(store_store.name, 'fixedToolbar');
const {
__experimentalSetPreviewDeviceType: setPreviewDeviceType,
setIsInserterOpened,
@ -20043,7 +20219,7 @@ function HeaderEditMode() {
icon: library_plus,
label: showIconLabels ? shortLabel : longLabel,
showTooltip: !showIconLabels
}), isLargeViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
}), isLargeViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !hasFixedToolbar && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
as: external_wp_blockEditor_namespaceObject.ToolSelector,
showTooltip: !showIconLabels,
variant: showIconLabels ? 'tertiary' : undefined,
@ -20069,7 +20245,7 @@ function HeaderEditMode() {
shortcut: listViewShortcut,
showTooltip: !showIconLabels,
variant: showIconLabels ? 'tertiary' : undefined
}), isZoomedOutViewExperimentEnabled && !isDistractionFree && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
}), isZoomedOutViewExperimentEnabled && !isDistractionFree && !hasFixedToolbar && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
as: external_wp_components_namespaceObject.Button,
className: "edit-site-header-edit-mode__zoom-out-view-toggle",
icon: chevron_up_down,
@ -20331,7 +20507,7 @@ const SiteHub = (0,external_wp_element_namespaceObject.forwardRef)((props, ref)
className: "edit-site-site-hub_toggle-command-center",
icon: library_search,
onClick: () => openCommandCenter(),
label: (0,external_wp_i18n_namespaceObject.__)('Open command center')
label: (0,external_wp_i18n_namespaceObject.__)('Open command palette')
})));
});
/* harmony default export */ var site_hub = (SiteHub);
@ -21561,8 +21737,7 @@ function useEditModeCommands() {
});
(0,external_wp_commands_namespaceObject.useCommandLoader)({
name: 'core/edit-site/manipulate-document',
hook: useManipulateDocumentCommands,
context: 'site-editor-edit'
hook: useManipulateDocumentCommands
});
(0,external_wp_commands_namespaceObject.useCommandLoader)({
name: 'core/edit-site/edit-ui',
@ -21593,7 +21768,7 @@ function Header({
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexBlock, {
className: "edit-site-page-header__page-title"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
as: "h1",
as: "h2",
level: 4,
className: "edit-site-page-header__title"
}, title), subTitle && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
@ -21773,7 +21948,7 @@ function GridItem({
onClick: item.type !== PATTERNS ? onClick : undefined,
onKeyDown: isUserPattern ? onKeyDown : undefined,
"aria-label": item.title,
"aria-describedby": ariaDescriptions.length ? ariaDescriptions.join(' ') : undefined
"aria-describedby": ariaDescriptions.length ? ariaDescriptions.map((_, index) => `${descriptionId}-${index}`).join(' ') : undefined
}, isEmpty && (0,external_wp_i18n_namespaceObject.__)('Empty pattern'), !isEmpty && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockPreview, {
blocks: item.blocks
})), ariaDescriptions.map((ariaDescription, index) => (0,external_wp_element_namespaceObject.createElement)("div", {
@ -22159,15 +22334,7 @@ const templatePartToPattern = templatePart => ({
templatePart
});
const templatePartCategories = ['header', 'footer', 'sidebar'];
const templatePartHasCategory = (item, category) => {
if (category === 'uncategorized') {
return !templatePartCategories.includes(item.templatePart.area);
}
return item.templatePart.area === category;
};
const templatePartHasCategory = (item, category) => item.templatePart.area === category;
const useTemplatePartsAsPatterns = (categoryId, postType = TEMPLATE_PARTS, filterValue = '') => {
const {
@ -22245,7 +22412,7 @@ const reusableBlockToPattern = reusableBlock => ({
categories: reusableBlock.wp_pattern,
id: reusableBlock.id,
name: reusableBlock.slug,
syncStatus: reusableBlock.meta?.sync_status || SYNC_TYPES.full,
syncStatus: reusableBlock.wp_pattern_sync_status || SYNC_TYPES.full,
title: reusableBlock.title.raw,
type: reusableBlock.type,
reusableBlock
@ -22384,10 +22551,10 @@ function PatternsList({
}, (0,external_wp_i18n_namespaceObject.__)('Synced')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
variant: "muted",
as: "p"
}, (0,external_wp_i18n_namespaceObject.__)('Patterns that are kept in sync across your site'))), (0,external_wp_element_namespaceObject.createElement)(Grid, {
}, (0,external_wp_i18n_namespaceObject.__)('Patterns that are kept in sync across the site'))), (0,external_wp_element_namespaceObject.createElement)(Grid, {
icon: library_symbol,
categoryId: categoryId,
label: (0,external_wp_i18n_namespaceObject.__)('Synced patterns'),
label: (0,external_wp_i18n_namespaceObject.__)('Synced'),
items: syncedPatterns
})), !isResolving && !!unsyncedPatterns.length && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
className: "edit-site-patterns__section-header"
@ -22396,7 +22563,7 @@ function PatternsList({
}, (0,external_wp_i18n_namespaceObject.__)('Standard')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
variant: "muted",
as: "p"
}, (0,external_wp_i18n_namespaceObject.__)('Patterns that can be changed freely without affecting your site'))), (0,external_wp_element_namespaceObject.createElement)(Grid, {
}, (0,external_wp_i18n_namespaceObject.__)('Patterns that can be changed freely without affecting the site'))), (0,external_wp_element_namespaceObject.createElement)(Grid, {
categoryId: categoryId,
label: (0,external_wp_i18n_namespaceObject.__)('Standard patterns'),
items: unsyncedPatterns
@ -22552,6 +22719,7 @@ function PageTemplateParts() {
const columns = [{
header: (0,external_wp_i18n_namespaceObject.__)('Template Part'),
cell: templatePart => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
as: "h3",
level: 5
}, (0,external_wp_element_namespaceObject.createElement)(Link, {
params: {
@ -22634,6 +22802,7 @@ function PageTemplates() {
const columns = [{
header: (0,external_wp_i18n_namespaceObject.__)('Template'),
cell: template => (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHeading, {
as: "h3",
level: 5
}, (0,external_wp_element_namespaceObject.createElement)(Link, {
params: {
@ -22897,7 +23066,7 @@ function Layout() {
headerAnimationState = 'isDistractionFree';
} else {
headerAnimationState = canvasMode; // edit, view, init
} // Sets the right context for the command center
} // Sets the right context for the command palette
const commandContext = canvasMode === 'edit' && isEditorPage ? 'site-editor-edit' : 'site-editor';

File diff suppressed because one or more lines are too long

View File

@ -11550,9 +11550,7 @@ function PostSwitchToDraftButton({
onClick();
};
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.FlexItem, {
isBlock: true
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
className: "editor-post-switch-to-draft",
onClick: () => {
setShowConfirmDialog(true);
@ -11560,8 +11558,8 @@ function PostSwitchToDraftButton({
disabled: isSaving,
variant: "secondary",
style: {
width: '100%',
display: 'block'
flexGrow: '1',
justifyContent: 'center'
}
}, (0,external_wp_i18n_namespaceObject.__)('Switch to draft')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
isOpen: showConfirmDialog,
@ -11612,14 +11610,14 @@ function PostSwitchToDraftButton({
function PostSyncStatus() {
const {
meta,
syncStatus,
postType
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getEditedPostAttribute
} = select(store_store);
return {
meta: getEditedPostAttribute('meta'),
syncStatus: getEditedPostAttribute('wp_pattern_sync_status'),
postType: getEditedPostAttribute('type')
};
}, []);
@ -11628,7 +11626,6 @@ function PostSyncStatus() {
return null;
}
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"

File diff suppressed because one or more lines are too long

View File

@ -599,10 +599,12 @@ async function exportReusableBlock(id) {
});
const title = post.title.raw;
const content = post.content.raw;
const syncStatus = post.wp_pattern_sync_status;
const fileContent = JSON.stringify({
__file: 'wp_block',
title,
content
content,
syncStatus
}, null, 2);
const fileName = paramCase(title) + '.json';
download(fileName, fileContent, 'application/json');
@ -641,8 +643,8 @@ async function importReusableBlock(file) {
throw new Error('Invalid JSON file');
}
if (parsedContent.__file !== 'wp_block' || !parsedContent.title || !parsedContent.content || typeof parsedContent.title !== 'string' || typeof parsedContent.content !== 'string') {
throw new Error('Invalid Reusable block JSON file');
if (parsedContent.__file !== 'wp_block' || !parsedContent.title || !parsedContent.content || typeof parsedContent.title !== 'string' || typeof parsedContent.content !== 'string' || parsedContent.syncStatus && typeof parsedContent.syncStatus !== 'string') {
throw new Error('Invalid Pattern JSON file');
}
const postType = await external_wp_apiFetch_default()({
@ -653,7 +655,10 @@ async function importReusableBlock(file) {
data: {
title: parsedContent.title,
content: parsedContent.content,
status: 'publish'
status: 'publish',
meta: parsedContent.syncStatus === 'unsynced' ? {
wp_pattern_sync_status: parsedContent.syncStatus
} : undefined
},
method: 'POST'
});
@ -722,8 +727,8 @@ function ImportForm({
uiMessage = (0,external_wp_i18n_namespaceObject.__)('Invalid JSON file');
break;
case 'Invalid Reusable block JSON file':
uiMessage = (0,external_wp_i18n_namespaceObject.__)('Invalid Reusable block JSON file');
case 'Invalid Pattern JSON file':
uiMessage = (0,external_wp_i18n_namespaceObject.__)('Invalid Pattern JSON file');
break;
default:
@ -839,7 +844,7 @@ document.addEventListener('DOMContentLoaded', () => {
const showNotice = () => {
const notice = document.createElement('div');
notice.className = 'notice notice-success is-dismissible';
notice.innerHTML = `<p>${(0,external_wp_i18n_namespaceObject.__)('Reusable block imported successfully!')}</p>`;
notice.innerHTML = `<p>${(0,external_wp_i18n_namespaceObject.__)('Pattern imported successfully!')}</p>`;
const headerEnd = document.querySelector('.wp-header-end');
if (!headerEnd) {

File diff suppressed because one or more lines are too long

View File

@ -102,7 +102,7 @@ const __experimentalConvertBlocksToReusable = (clientIds, title, syncType) => as
dispatch
}) => {
const meta = syncType === 'unsynced' ? {
sync_status: syncType
wp_pattern_sync_status: syncType
} : undefined;
const reusableBlock = {
title: title || (0,external_wp_i18n_namespaceObject.__)('Untitled Pattern block'),
@ -317,12 +317,16 @@ function ReusableBlockConvertButton({
const onConvert = (0,external_wp_element_namespaceObject.useCallback)(async function (reusableBlockTitle) {
try {
await convertBlocksToReusable(clientIds, reusableBlockTitle, syncType);
createSuccessNotice(syncType === 'fully' ? (0,external_wp_i18n_namespaceObject.__)('Synced Pattern created.') : (0,external_wp_i18n_namespaceObject.__)('Unsynced Pattern created.'), {
type: 'snackbar'
createSuccessNotice(syncType === 'fully' ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: the name the user has given to the pattern.
(0,external_wp_i18n_namespaceObject.__)('Synced Pattern created: %s'), reusableBlockTitle) : (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: the name the user has given to the pattern.
(0,external_wp_i18n_namespaceObject.__)('Unsynced Pattern created: %s'), reusableBlockTitle), {
type: 'snackbar',
id: 'convert-to-reusable-block-success'
});
} catch (error) {
createErrorNotice(error.message, {
type: 'snackbar'
type: 'snackbar',
id: 'convert-to-reusable-block-error'
});
}
}, [convertBlocksToReusable, clientIds, syncType, createSuccessNotice, createErrorNotice]);
@ -336,7 +340,7 @@ function ReusableBlockConvertButton({
}) => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
icon: library_symbol,
onClick: () => setIsModalOpen(true)
}, (0,external_wp_i18n_namespaceObject.__)('Create pattern')), isModalOpen && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
}, (0,external_wp_i18n_namespaceObject.__)('Create pattern/reusable block')), isModalOpen && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
title: (0,external_wp_i18n_namespaceObject.__)('Create pattern'),
onRequestClose: () => {
setIsModalOpen(false);
@ -353,15 +357,15 @@ function ReusableBlockConvertButton({
}
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
spacing: "5"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ReusableBlocksRenameHint, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Name'),
value: title,
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.'),
label: (0,external_wp_i18n_namespaceObject.__)('Synced'),
help: (0,external_wp_i18n_namespaceObject.__)('Editing the pattern will update it anywhere it is used.'),
checked: syncType === 'fully',
onChange: () => {
setSyncType(syncType === 'fully' ? 'unsynced' : 'fully');

File diff suppressed because one or more lines are too long

View File

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