Editor: update packages with bug fixes for 6.3.2
Updates editor npm packages to latest patch versions for the 6.3.x branch. Props ramonopoly. See #59293. Built from https://develop.svn.wordpress.org/trunk@56520 git-svn-id: http://core.svn.wordpress.org/trunk@56032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f69316e8a5
commit
aac1b7c487
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2221,10 +2221,10 @@
|
|||
'__experimentalRole' => 'content'
|
||||
),
|
||||
'width' => array(
|
||||
'type' => 'number'
|
||||
'type' => 'string'
|
||||
),
|
||||
'height' => array(
|
||||
'type' => 'number'
|
||||
'type' => 'string'
|
||||
),
|
||||
'aspectRatio' => array(
|
||||
'type' => 'string'
|
||||
|
|
|
@ -64,10 +64,10 @@
|
|||
"__experimentalRole": "content"
|
||||
},
|
||||
"width": {
|
||||
"type": "number"
|
||||
"type": "string"
|
||||
},
|
||||
"height": {
|
||||
"type": "number"
|
||||
"type": "string"
|
||||
},
|
||||
"aspectRatio": {
|
||||
"type": "string"
|
||||
|
|
|
@ -88,10 +88,10 @@
|
|||
.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:not(.is-partially-selected).is-highlighted:after{
|
||||
box-shadow:none;
|
||||
}
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted,.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected,.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus,.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected{
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted,.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected,.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected{
|
||||
outline:none;
|
||||
}
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected:after,.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after,.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected:after,.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{
|
||||
border-radius:1px;
|
||||
bottom:1px;
|
||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
||||
|
@ -104,16 +104,14 @@
|
|||
top:1px;
|
||||
z-index:1;
|
||||
}
|
||||
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after,.is-dark-theme .block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{
|
||||
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{
|
||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff;
|
||||
}
|
||||
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected{
|
||||
box-shadow:none;
|
||||
outline:none;
|
||||
}
|
||||
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected:after{
|
||||
border-radius:2px;
|
||||
border-top:4px solid #ccc;
|
||||
bottom:auto;
|
||||
box-shadow:none;
|
||||
content:"";
|
||||
left:0;
|
||||
pointer-events:none;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -88,10 +88,10 @@
|
|||
.block-editor-block-list__layout .block-editor-block-list__block.is-multi-selected:not(.is-partially-selected).is-highlighted:after{
|
||||
box-shadow:none;
|
||||
}
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted,.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected,.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus,.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected{
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted,.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected,.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected{
|
||||
outline:none;
|
||||
}
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected:after,.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after,.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected:after,.block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after,.block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{
|
||||
border-radius:1px;
|
||||
bottom:1px;
|
||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
||||
|
@ -104,16 +104,14 @@
|
|||
top:1px;
|
||||
z-index:1;
|
||||
}
|
||||
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after,.is-dark-theme .block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.has-child-selected:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{
|
||||
.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted~.is-multi-selected:after,.is-dark-theme .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus:after,.is-dark-theme .block-editor-block-list__layout.is-navigate-mode .block-editor-block-list__block.is-selected:after{
|
||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff;
|
||||
}
|
||||
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected{
|
||||
box-shadow:none;
|
||||
outline:none;
|
||||
}
|
||||
.block-editor-block-list__layout .is-block-moving-mode.block-editor-block-list__block.is-selected:after{
|
||||
border-radius:2px;
|
||||
border-top:4px solid #ccc;
|
||||
bottom:auto;
|
||||
box-shadow:none;
|
||||
content:"";
|
||||
left:0;
|
||||
pointer-events:none;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -210,17 +210,19 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
|||
border-bottom:1px solid #e0e0e0;
|
||||
border-radius:0;
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
position:sticky;
|
||||
top:0;
|
||||
width:100%;
|
||||
z-index:31;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar{
|
||||
overflow:auto;
|
||||
overflow-y:hidden;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar,.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar-group{
|
||||
border-left-color:#e0e0e0;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar:has(.block-editor-block-toolbar:empty){
|
||||
display:none;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-collapsed:after{
|
||||
background:linear-gradient(270deg, #fff, #0000);
|
||||
content:"";
|
||||
|
@ -231,21 +233,23 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
|||
}
|
||||
@media (min-width:782px){
|
||||
.block-editor-block-contextual-toolbar.is-fixed{
|
||||
align-items:center;
|
||||
border-bottom:none;
|
||||
display:flex;
|
||||
height:60px;
|
||||
margin-right:180px;
|
||||
min-height:auto;
|
||||
position:fixed;
|
||||
top:39px;
|
||||
top:32px;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
|
||||
.block-editor-block-contextual-toolbar.is-fixed.is-collapsed,.block-editor-block-contextual-toolbar.is-fixed:empty{
|
||||
width:auto;
|
||||
}
|
||||
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
||||
margin-right:240px;
|
||||
top:7px;
|
||||
top:0;
|
||||
}
|
||||
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
|
||||
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed.is-collapsed,.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed:empty{
|
||||
width:auto;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar.is-showing-movers{
|
||||
|
@ -363,11 +367,14 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
|||
top:auto;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed{
|
||||
width:100%;
|
||||
width:calc(100% - 180px);
|
||||
}
|
||||
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed{
|
||||
width:calc(100% - 140px);
|
||||
}
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.block-editor-block-contextual-toolbar.is-fixed{
|
||||
.block-editor-block-contextual-toolbar.is-fixed,.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed{
|
||||
width:auto;
|
||||
}
|
||||
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
||||
|
@ -3162,6 +3169,11 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
|||
.show-icon-labels .components-toolbar,.show-icon-labels .components-toolbar-group{
|
||||
flex-shrink:1;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed .components-toolbar,.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed .components-toolbar-group{
|
||||
flex-shrink:0;
|
||||
}
|
||||
}
|
||||
.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button+.components-button{
|
||||
margin-right:6px;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -210,17 +210,19 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
|||
border-bottom:1px solid #e0e0e0;
|
||||
border-radius:0;
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
position:sticky;
|
||||
top:0;
|
||||
width:100%;
|
||||
z-index:31;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar{
|
||||
overflow:auto;
|
||||
overflow-y:hidden;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar,.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar-group{
|
||||
border-right-color:#e0e0e0;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar:has(.block-editor-block-toolbar:empty){
|
||||
display:none;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-collapsed:after{
|
||||
background:linear-gradient(90deg, #fff, #0000);
|
||||
content:"";
|
||||
|
@ -231,21 +233,23 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
|||
}
|
||||
@media (min-width:782px){
|
||||
.block-editor-block-contextual-toolbar.is-fixed{
|
||||
align-items:center;
|
||||
border-bottom:none;
|
||||
display:flex;
|
||||
height:60px;
|
||||
margin-left:180px;
|
||||
min-height:auto;
|
||||
position:fixed;
|
||||
top:39px;
|
||||
top:32px;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
|
||||
.block-editor-block-contextual-toolbar.is-fixed.is-collapsed,.block-editor-block-contextual-toolbar.is-fixed:empty{
|
||||
width:auto;
|
||||
}
|
||||
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
||||
margin-left:240px;
|
||||
top:7px;
|
||||
top:0;
|
||||
}
|
||||
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed.is-collapsed{
|
||||
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed.is-collapsed,.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed:empty{
|
||||
width:auto;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed>.block-editor-block-toolbar.is-showing-movers{
|
||||
|
@ -363,11 +367,14 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
|||
top:auto;
|
||||
}
|
||||
.block-editor-block-contextual-toolbar.is-fixed{
|
||||
width:100%;
|
||||
width:calc(100% - 180px);
|
||||
}
|
||||
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed{
|
||||
width:calc(100% - 140px);
|
||||
}
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.block-editor-block-contextual-toolbar.is-fixed{
|
||||
.block-editor-block-contextual-toolbar.is-fixed,.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed{
|
||||
width:auto;
|
||||
}
|
||||
.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
||||
|
@ -3162,6 +3169,11 @@ body.is-fullscreen-mode .block-editor-block-contextual-toolbar.is-fixed{
|
|||
.show-icon-labels .components-toolbar,.show-icon-labels .components-toolbar-group{
|
||||
flex-shrink:1;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed .components-toolbar,.show-icon-labels .block-editor-block-contextual-toolbar.is-fixed .components-toolbar-group{
|
||||
flex-shrink:0;
|
||||
}
|
||||
}
|
||||
.show-icon-labels .block-editor-rich-text__inline-format-toolbar-group .components-button+.components-button{
|
||||
margin-left:6px;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -217,6 +217,11 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
|||
overflow:auto;
|
||||
z-index:20;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.interface-interface-skeleton__content{
|
||||
z-index:auto;
|
||||
}
|
||||
}
|
||||
|
||||
.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{
|
||||
background:#fff;
|
||||
|
@ -1585,9 +1590,11 @@ h2.edit-post-template-summary__title{
|
|||
display:flex;
|
||||
flex:1 0 auto;
|
||||
flex-flow:column;
|
||||
overflow:hidden;
|
||||
position:relative;
|
||||
}
|
||||
.edit-post-visual-editor:not(.has-inline-canvas){
|
||||
overflow:hidden;
|
||||
}
|
||||
.edit-post-visual-editor .components-button{
|
||||
font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
|
||||
font-size:13px;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -217,6 +217,11 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
|||
overflow:auto;
|
||||
z-index:20;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.interface-interface-skeleton__content{
|
||||
z-index:auto;
|
||||
}
|
||||
}
|
||||
|
||||
.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{
|
||||
background:#fff;
|
||||
|
@ -1585,9 +1590,11 @@ h2.edit-post-template-summary__title{
|
|||
display:flex;
|
||||
flex:1 0 auto;
|
||||
flex-flow:column;
|
||||
overflow:hidden;
|
||||
position:relative;
|
||||
}
|
||||
.edit-post-visual-editor:not(.has-inline-canvas){
|
||||
overflow:hidden;
|
||||
}
|
||||
.edit-post-visual-editor .components-button{
|
||||
font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
|
||||
font-size:13px;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -217,6 +217,11 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
|||
overflow:auto;
|
||||
z-index:20;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.interface-interface-skeleton__content{
|
||||
z-index:auto;
|
||||
}
|
||||
}
|
||||
|
||||
.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{
|
||||
background:#fff;
|
||||
|
@ -1294,7 +1299,6 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
background:#f0f0f0;
|
||||
border-radius:4px;
|
||||
display:flex;
|
||||
gap:8px;
|
||||
height:36px;
|
||||
justify-content:space-between;
|
||||
min-width:0;
|
||||
|
@ -1303,15 +1307,16 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
.has-fixed-toolbar .edit-site-document-actions{
|
||||
width:min(100%, 380px);
|
||||
}
|
||||
.edit-site-document-actions:hover{
|
||||
background-color:#e0e0e0;
|
||||
}
|
||||
.edit-site-document-actions .components-button{
|
||||
border-radius:4px;
|
||||
}
|
||||
.edit-site-document-actions .components-button:hover{
|
||||
background:#e0e0e0;
|
||||
color:var(--wp-block-synced-color);
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.edit-site-document-actions{
|
||||
width:50%;
|
||||
}
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.edit-site-document-actions{
|
||||
width:min(100%, 450px);
|
||||
|
@ -1323,6 +1328,10 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
flex-grow:1;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.edit-site-document-actions__title{
|
||||
padding-right:32px;
|
||||
}
|
||||
.edit-site-document-actions__title:hover{
|
||||
color:var(--wp-block-synced-color);
|
||||
}
|
||||
|
@ -1332,6 +1341,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
}
|
||||
.edit-site-document-actions__title h1{
|
||||
color:var(--wp-block-synced-color);
|
||||
max-width:50%;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
|
@ -1360,6 +1370,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
|
||||
.edit-site-document-actions__shortcut{
|
||||
color:#2f2f2f;
|
||||
min-width:32px;
|
||||
}
|
||||
|
||||
.edit-site-document-actions__back.components-button.has-icon.has-text{
|
||||
|
@ -1367,9 +1378,11 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
flex-shrink:0;
|
||||
gap:0;
|
||||
min-width:36px;
|
||||
position:absolute;
|
||||
z-index:1;
|
||||
}
|
||||
.edit-site-document-actions__back.components-button.has-icon.has-text:hover{
|
||||
background-color:initial;
|
||||
color:currentColor;
|
||||
}
|
||||
.edit-site-document-actions.is-animated .edit-site-document-actions__back.components-button.has-icon.has-text{
|
||||
|
@ -1579,7 +1592,7 @@ body.is-fullscreen-mode .edit-site-list-header{
|
|||
color:#2f2f2f;
|
||||
flex-grow:1;
|
||||
margin:60px 0 0;
|
||||
overflow:auto;
|
||||
overflow:hidden;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.edit-site-page{
|
||||
|
@ -1591,7 +1604,7 @@ body.is-fullscreen-mode .edit-site-list-header{
|
|||
.edit-site-page-header{
|
||||
background:#fff;
|
||||
border-bottom:1px solid #f0f0f0;
|
||||
height:60px;
|
||||
min-height:60px;
|
||||
padding:0 32px;
|
||||
position:sticky;
|
||||
top:0;
|
||||
|
@ -1609,8 +1622,12 @@ body.is-fullscreen-mode .edit-site-list-header{
|
|||
}
|
||||
|
||||
.edit-site-page-content{
|
||||
overflow-x:auto;
|
||||
padding:32px;
|
||||
display:flex;
|
||||
flex-flow:column;
|
||||
height:100%;
|
||||
overflow:auto;
|
||||
position:relative;
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
.edit-site-patterns{
|
||||
|
@ -1785,6 +1802,7 @@ body.is-fullscreen-mode .edit-site-list-header{
|
|||
}
|
||||
|
||||
.edit-site-table-wrapper{
|
||||
padding:32px;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -217,6 +217,11 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
|||
overflow:auto;
|
||||
z-index:20;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.interface-interface-skeleton__content{
|
||||
z-index:auto;
|
||||
}
|
||||
}
|
||||
|
||||
.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{
|
||||
background:#fff;
|
||||
|
@ -1294,7 +1299,6 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
background:#f0f0f0;
|
||||
border-radius:4px;
|
||||
display:flex;
|
||||
gap:8px;
|
||||
height:36px;
|
||||
justify-content:space-between;
|
||||
min-width:0;
|
||||
|
@ -1303,15 +1307,16 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
.has-fixed-toolbar .edit-site-document-actions{
|
||||
width:min(100%, 380px);
|
||||
}
|
||||
.edit-site-document-actions:hover{
|
||||
background-color:#e0e0e0;
|
||||
}
|
||||
.edit-site-document-actions .components-button{
|
||||
border-radius:4px;
|
||||
}
|
||||
.edit-site-document-actions .components-button:hover{
|
||||
background:#e0e0e0;
|
||||
color:var(--wp-block-synced-color);
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.edit-site-document-actions{
|
||||
width:50%;
|
||||
}
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.edit-site-document-actions{
|
||||
width:min(100%, 450px);
|
||||
|
@ -1323,6 +1328,10 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
flex-grow:1;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.edit-site-document-actions__title{
|
||||
padding-left:32px;
|
||||
}
|
||||
.edit-site-document-actions__title:hover{
|
||||
color:var(--wp-block-synced-color);
|
||||
}
|
||||
|
@ -1332,6 +1341,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
}
|
||||
.edit-site-document-actions__title h1{
|
||||
color:var(--wp-block-synced-color);
|
||||
max-width:50%;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
|
@ -1360,6 +1370,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
|
||||
.edit-site-document-actions__shortcut{
|
||||
color:#2f2f2f;
|
||||
min-width:32px;
|
||||
}
|
||||
|
||||
.edit-site-document-actions__back.components-button.has-icon.has-text{
|
||||
|
@ -1367,9 +1378,11 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|||
flex-shrink:0;
|
||||
gap:0;
|
||||
min-width:36px;
|
||||
position:absolute;
|
||||
z-index:1;
|
||||
}
|
||||
.edit-site-document-actions__back.components-button.has-icon.has-text:hover{
|
||||
background-color:initial;
|
||||
color:currentColor;
|
||||
}
|
||||
.edit-site-document-actions.is-animated .edit-site-document-actions__back.components-button.has-icon.has-text{
|
||||
|
@ -1579,7 +1592,7 @@ body.is-fullscreen-mode .edit-site-list-header{
|
|||
color:#2f2f2f;
|
||||
flex-grow:1;
|
||||
margin:60px 0 0;
|
||||
overflow:auto;
|
||||
overflow:hidden;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.edit-site-page{
|
||||
|
@ -1591,7 +1604,7 @@ body.is-fullscreen-mode .edit-site-list-header{
|
|||
.edit-site-page-header{
|
||||
background:#fff;
|
||||
border-bottom:1px solid #f0f0f0;
|
||||
height:60px;
|
||||
min-height:60px;
|
||||
padding:0 32px;
|
||||
position:sticky;
|
||||
top:0;
|
||||
|
@ -1609,8 +1622,12 @@ body.is-fullscreen-mode .edit-site-list-header{
|
|||
}
|
||||
|
||||
.edit-site-page-content{
|
||||
overflow-x:auto;
|
||||
padding:32px;
|
||||
display:flex;
|
||||
flex-flow:column;
|
||||
height:100%;
|
||||
overflow:auto;
|
||||
position:relative;
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
.edit-site-patterns{
|
||||
|
@ -1785,6 +1802,7 @@ body.is-fullscreen-mode .edit-site-list-header{
|
|||
}
|
||||
|
||||
.edit-site-table-wrapper{
|
||||
padding:32px;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -217,6 +217,11 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
|||
overflow:auto;
|
||||
z-index:20;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.interface-interface-skeleton__content{
|
||||
z-index:auto;
|
||||
}
|
||||
}
|
||||
|
||||
.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{
|
||||
background:#fff;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -217,6 +217,11 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
|||
overflow:auto;
|
||||
z-index:20;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.interface-interface-skeleton__content{
|
||||
z-index:auto;
|
||||
}
|
||||
}
|
||||
|
||||
.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{
|
||||
background:#fff;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -529,6 +529,7 @@
|
|||
}
|
||||
|
||||
.edit-post-sync-status{
|
||||
align-items:flex-start;
|
||||
justify-content:flex-start;
|
||||
position:relative;
|
||||
width:100%;
|
||||
|
@ -536,10 +537,12 @@
|
|||
.edit-post-sync-status>span{
|
||||
display:block;
|
||||
flex-shrink:0;
|
||||
padding:6px 0;
|
||||
width:45%;
|
||||
word-break:break-word;
|
||||
}
|
||||
.edit-post-sync-status>div{
|
||||
padding-right:12px;
|
||||
padding:6px 12px 6px 0;
|
||||
}
|
||||
|
||||
.editor-post-taxonomies__hierarchical-terms-list{
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -529,6 +529,7 @@
|
|||
}
|
||||
|
||||
.edit-post-sync-status{
|
||||
align-items:flex-start;
|
||||
justify-content:flex-start;
|
||||
position:relative;
|
||||
width:100%;
|
||||
|
@ -536,10 +537,12 @@
|
|||
.edit-post-sync-status>span{
|
||||
display:block;
|
||||
flex-shrink:0;
|
||||
padding:6px 0;
|
||||
width:45%;
|
||||
word-break:break-word;
|
||||
}
|
||||
.edit-post-sync-status>div{
|
||||
padding-left:12px;
|
||||
padding:6px 0 6px 12px;
|
||||
}
|
||||
|
||||
.editor-post-taxonomies__hierarchical-terms-list{
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12824,9 +12824,10 @@ function isFluidTypographyEnabled(typographySettings) {
|
|||
function getFluidTypographyOptionsFromSettings(settings) {
|
||||
const typographySettings = settings?.typography;
|
||||
const layoutSettings = settings?.layout;
|
||||
return isFluidTypographyEnabled(typographySettings) && layoutSettings?.wideSize ? {
|
||||
const defaultMaxViewportWidth = getTypographyValueAndUnit(layoutSettings?.wideSize) ? layoutSettings?.wideSize : null;
|
||||
return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? {
|
||||
fluid: {
|
||||
maxViewPortWidth: layoutSettings.wideSize,
|
||||
maxViewPortWidth: defaultMaxViewportWidth,
|
||||
...typographySettings.fluid
|
||||
}
|
||||
} : {
|
||||
|
@ -52727,6 +52728,8 @@ function useInternalValue(value) {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
@ -52816,6 +52819,9 @@ function useInternalValue(value) {
|
|||
*/
|
||||
|
||||
const link_control_noop = () => {};
|
||||
|
||||
const PREFERENCE_SCOPE = 'core/block-editor';
|
||||
const PREFERENCE_KEY = 'linkControlSettingsDrawer';
|
||||
/**
|
||||
* Renders a link control. A link control is a controlled input which maintains
|
||||
* a value associated with a link (HTML anchor element) and relevant settings
|
||||
|
@ -52824,7 +52830,6 @@ const link_control_noop = () => {};
|
|||
* @param {WPLinkControlProps} props Component props.
|
||||
*/
|
||||
|
||||
|
||||
function LinkControl({
|
||||
searchInputPlaceholder,
|
||||
value,
|
||||
|
@ -52850,6 +52855,43 @@ function LinkControl({
|
|||
withCreateSuggestion = true;
|
||||
}
|
||||
|
||||
const [settingsOpen, setSettingsOpen] = (0,external_wp_element_namespaceObject.useState)(false);
|
||||
const {
|
||||
advancedSettingsPreference
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
var _prefsStore$get;
|
||||
|
||||
const prefsStore = select(external_wp_preferences_namespaceObject.store);
|
||||
return {
|
||||
advancedSettingsPreference: (_prefsStore$get = prefsStore.get(PREFERENCE_SCOPE, PREFERENCE_KEY)) !== null && _prefsStore$get !== void 0 ? _prefsStore$get : false
|
||||
};
|
||||
}, []);
|
||||
const {
|
||||
set: setPreference
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
|
||||
/**
|
||||
* Sets the open/closed state of the Advanced Settings Drawer,
|
||||
* optionlly persisting the state to the user's preferences.
|
||||
*
|
||||
* Note that Block Editor components can be consumed by non-WordPress
|
||||
* environments which may not have preferences setup.
|
||||
* Therefore a local state is also used as a fallback.
|
||||
*
|
||||
* @param {boolean} prefVal the open/closed state of the Advanced Settings Drawer.
|
||||
*/
|
||||
|
||||
const setSettingsOpenWithPreference = prefVal => {
|
||||
if (setPreference) {
|
||||
setPreference(PREFERENCE_SCOPE, PREFERENCE_KEY, prefVal);
|
||||
}
|
||||
|
||||
setSettingsOpen(prefVal);
|
||||
}; // Block Editor components can be consumed by non-WordPress environments
|
||||
// which may not have these preferences setup.
|
||||
// Therefore a local state is used as a fallback.
|
||||
|
||||
|
||||
const isSettingsOpen = advancedSettingsPreference || settingsOpen;
|
||||
const isMounting = (0,external_wp_element_namespaceObject.useRef)(true);
|
||||
const wrapperNode = (0,external_wp_element_namespaceObject.useRef)();
|
||||
const textInputRef = (0,external_wp_element_namespaceObject.useRef)();
|
||||
|
@ -52857,7 +52899,6 @@ function LinkControl({
|
|||
const settingsKeys = settings.map(({
|
||||
id
|
||||
}) => id);
|
||||
const [settingsOpen, setSettingsOpen] = (0,external_wp_element_namespaceObject.useState)(false);
|
||||
const [internalControlValue, setInternalControlValue, setInternalURLInputValue, setInternalTextInputValue, createSetInternalSettingValueHandler] = useInternalValue(value);
|
||||
const valueHasChanges = value && !(0,external_wp_isShallowEqual_namespaceObject.isShallowEqualObjects)(internalControlValue, value);
|
||||
const [isEditingLink, setIsEditingLink] = (0,external_wp_element_namespaceObject.useState)(forceIsEditingLink !== undefined ? forceIsEditingLink : !value || !value.url);
|
||||
|
@ -52899,7 +52940,6 @@ function LinkControl({
|
|||
|
||||
const stopEditing = () => {
|
||||
isEndingEditWithFocus.current = !!wrapperNode.current?.contains(wrapperNode.current.ownerDocument.activeElement);
|
||||
setSettingsOpen(false);
|
||||
setIsEditingLink(false);
|
||||
};
|
||||
|
||||
|
@ -52973,7 +53013,6 @@ function LinkControl({
|
|||
const currentUrlInputValue = propInputValue || internalControlValue?.url || '';
|
||||
const currentInputIsEmpty = !currentUrlInputValue?.trim()?.length;
|
||||
const shownUnlinkControl = onRemove && value && !isEditingLink && !isCreatingPage;
|
||||
const showSettings = !!settings?.length && isEditingLink && hasLinkValue;
|
||||
const showActions = isEditingLink && hasLinkValue; // Only show text control once a URL value has been committed
|
||||
// and it isn't just empty whitespace.
|
||||
// See https://github.com/WordPress/gutenberg/pull/33849/#issuecomment-932194927.
|
||||
|
@ -52981,6 +53020,7 @@ function LinkControl({
|
|||
const showTextControl = hasLinkValue && hasTextControl;
|
||||
const isEditing = (isEditingLink || !value) && !isCreatingPage;
|
||||
const isDisabled = !valueHasChanges || currentInputIsEmpty;
|
||||
const showSettings = !!settings?.length && isEditingLink && hasLinkValue;
|
||||
return (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
tabIndex: -1,
|
||||
ref: wrapperNode,
|
||||
|
@ -53032,8 +53072,8 @@ function LinkControl({
|
|||
}), showSettings && (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
className: "block-editor-link-control__tools"
|
||||
}, !currentInputIsEmpty && (0,external_wp_element_namespaceObject.createElement)(settings_drawer, {
|
||||
settingsOpen: settingsOpen,
|
||||
setSettingsOpen: setSettingsOpen
|
||||
settingsOpen: isSettingsOpen,
|
||||
setSettingsOpen: setSettingsOpenWithPreference
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(link_control_settings, {
|
||||
value: internalControlValue,
|
||||
settings: settings,
|
||||
|
@ -55390,19 +55430,20 @@ function useFormatTypes({
|
|||
const formatTypes = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
return allFormatTypes.filter(({
|
||||
name,
|
||||
interactive,
|
||||
tagName
|
||||
}) => {
|
||||
if (allowedFormats && !allowedFormats.includes(name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (withoutInteractiveFormatting && interactiveContentTags.has(tagName)) {
|
||||
if (withoutInteractiveFormatting && (interactive || interactiveContentTags.has(tagName))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}, [allFormatTypes, allowedFormats, interactiveContentTags]);
|
||||
}, [allFormatTypes, allowedFormats, withoutInteractiveFormatting]);
|
||||
const keyedSelected = (0,external_wp_data_namespaceObject.useSelect)(select => formatTypes.reduce((accumulator, type) => {
|
||||
if (!type.__experimentalGetPropsForEditableTreePreparation) {
|
||||
return accumulator;
|
||||
|
@ -59856,6 +59897,45 @@ const previous = (0,external_wp_element_namespaceObject.createElement)(external_
|
|||
}));
|
||||
/* harmony default export */ const library_previous = (previous);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-controls/use-has-block-controls.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
function useHasAnyBlockControls() {
|
||||
let hasAnyBlockControls = false;
|
||||
|
||||
for (const group in block_controls_groups) {
|
||||
// It is safe to violate the rules of hooks here as the `groups` object
|
||||
// is static and will not change length between renders. Do not return
|
||||
// early as that will cause the hook to be called a different number of
|
||||
// times between renders.
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
if (useHasBlockControls(group)) {
|
||||
hasAnyBlockControls = true;
|
||||
}
|
||||
}
|
||||
|
||||
return hasAnyBlockControls;
|
||||
}
|
||||
function useHasBlockControls(group = 'default') {
|
||||
const Slot = block_controls_groups[group]?.Slot;
|
||||
const fills = (0,external_wp_components_namespaceObject.__experimentalUseSlotFills)(Slot?.__unstableName);
|
||||
|
||||
if (!Slot) {
|
||||
typeof process !== "undefined" && process.env && "production" !== "production" ? 0 : void 0;
|
||||
return null;
|
||||
}
|
||||
|
||||
return !!fills?.length;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/block-contextual-toolbar.js
|
||||
|
||||
|
||||
|
@ -59883,6 +59963,7 @@ const previous = (0,external_wp_element_namespaceObject.createElement)(external_
|
|||
|
||||
|
||||
|
||||
|
||||
function BlockContextualToolbar({
|
||||
focusOnMount,
|
||||
isFixed,
|
||||
|
@ -59894,10 +59975,10 @@ function BlockContextualToolbar({
|
|||
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
|
||||
const {
|
||||
blockType,
|
||||
blockEditingMode,
|
||||
hasParents,
|
||||
showParentSelector,
|
||||
selectedBlockClientId,
|
||||
isContentOnly
|
||||
selectedBlockClientId
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getBlockName,
|
||||
|
@ -59917,16 +59998,59 @@ function BlockContextualToolbar({
|
|||
return {
|
||||
selectedBlockClientId: _selectedBlockClientId,
|
||||
blockType: _selectedBlockClientId && getBlockType(getBlockName(_selectedBlockClientId)),
|
||||
blockEditingMode: getBlockEditingMode(_selectedBlockClientId),
|
||||
hasParents: parents.length,
|
||||
isContentOnly: getBlockEditingMode(_selectedBlockClientId) === 'contentOnly',
|
||||
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)(() => {
|
||||
setIsCollapsed(false);
|
||||
}, [selectedBlockClientId]);
|
||||
const isLargerThanTabletViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('large', '>=');
|
||||
const isFullscreen = document.body.classList.contains('is-fullscreen-mode');
|
||||
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
|
||||
// don't do anything if not fixed toolbar
|
||||
if (!isFixed || !blockType) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isContentOnly || blockType && !(0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, '__experimentalToolbar', true)) {
|
||||
const blockToolbar = document.querySelector('.block-editor-block-contextual-toolbar');
|
||||
|
||||
if (!blockToolbar) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isLargerThanTabletViewport) {
|
||||
// set the width of the toolbar to auto
|
||||
blockToolbar.style = {};
|
||||
return;
|
||||
}
|
||||
|
||||
if (isCollapsed) {
|
||||
// set the width of the toolbar to auto
|
||||
blockToolbar.style.width = 'auto';
|
||||
return;
|
||||
} // get the width of the pinned items in the post editor
|
||||
|
||||
|
||||
const pinnedItems = document.querySelector('.edit-post-header__settings'); // get the width of the left header in the site editor
|
||||
|
||||
const leftHeader = document.querySelector('.edit-site-header-edit-mode__end');
|
||||
const computedToolbarStyle = window.getComputedStyle(blockToolbar);
|
||||
const computedPinnedItemsStyle = pinnedItems ? window.getComputedStyle(pinnedItems) : false;
|
||||
const computedLeftHeaderStyle = leftHeader ? window.getComputedStyle(leftHeader) : false;
|
||||
const marginLeft = parseFloat(computedToolbarStyle.marginLeft);
|
||||
const pinnedItemsWidth = computedPinnedItemsStyle ? parseFloat(computedPinnedItemsStyle.width) + 10 // 10 is the pinned items padding
|
||||
: 0;
|
||||
const leftHeaderWidth = computedLeftHeaderStyle ? parseFloat(computedLeftHeaderStyle.width) : 0; // set the new witdth of the toolbar
|
||||
|
||||
blockToolbar.style.width = `calc(100% - ${leftHeaderWidth + pinnedItemsWidth + marginLeft + (isFullscreen ? 0 : 160) // the width of the admin sidebar expanded
|
||||
}px)`;
|
||||
}, [isFixed, isLargerThanTabletViewport, isCollapsed, isFullscreen, blockType]);
|
||||
const isToolbarEnabled = !blockType || (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, '__experimentalToolbar', true);
|
||||
const hasAnyBlockControls = useHasAnyBlockControls();
|
||||
|
||||
if (!isToolbarEnabled || blockEditingMode !== 'default' && !hasAnyBlockControls) {
|
||||
return null;
|
||||
} // Shifts the toolbar to make room for the parent block selector.
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -23883,7 +23883,194 @@ const image_deprecated_v6 = {
|
|||
}
|
||||
|
||||
};
|
||||
/* harmony default export */ const image_deprecated = ([image_deprecated_v6, image_deprecated_v5, image_deprecated_v4, image_deprecated_v3, image_deprecated_v2, image_deprecated_v1]);
|
||||
/**
|
||||
* Deprecation for converting to string width and height block attributes and
|
||||
* removing the width and height img element attributes which are not needed
|
||||
* as they get added by the TODO hook.
|
||||
*
|
||||
* @see https://github.com/WordPress/gutenberg/pull/53274
|
||||
*/
|
||||
|
||||
const image_deprecated_v7 = {
|
||||
attributes: {
|
||||
align: {
|
||||
type: 'string'
|
||||
},
|
||||
url: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'img',
|
||||
attribute: 'src',
|
||||
__experimentalRole: 'content'
|
||||
},
|
||||
alt: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'img',
|
||||
attribute: 'alt',
|
||||
default: '',
|
||||
__experimentalRole: 'content'
|
||||
},
|
||||
caption: {
|
||||
type: 'string',
|
||||
source: 'html',
|
||||
selector: 'figcaption',
|
||||
__experimentalRole: 'content'
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'img',
|
||||
attribute: 'title',
|
||||
__experimentalRole: 'content'
|
||||
},
|
||||
href: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'figure > a',
|
||||
attribute: 'href',
|
||||
__experimentalRole: 'content'
|
||||
},
|
||||
rel: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'figure > a',
|
||||
attribute: 'rel'
|
||||
},
|
||||
linkClass: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'figure > a',
|
||||
attribute: 'class'
|
||||
},
|
||||
id: {
|
||||
type: 'number',
|
||||
__experimentalRole: 'content'
|
||||
},
|
||||
width: {
|
||||
type: 'number'
|
||||
},
|
||||
height: {
|
||||
type: 'number'
|
||||
},
|
||||
aspectRatio: {
|
||||
type: 'string'
|
||||
},
|
||||
scale: {
|
||||
type: 'string'
|
||||
},
|
||||
sizeSlug: {
|
||||
type: 'string'
|
||||
},
|
||||
linkDestination: {
|
||||
type: 'string'
|
||||
},
|
||||
linkTarget: {
|
||||
type: 'string',
|
||||
source: 'attribute',
|
||||
selector: 'figure > a',
|
||||
attribute: 'target'
|
||||
}
|
||||
},
|
||||
supports: {
|
||||
anchor: true,
|
||||
behaviors: {
|
||||
lightbox: true
|
||||
},
|
||||
color: {
|
||||
text: false,
|
||||
background: false
|
||||
},
|
||||
filter: {
|
||||
duotone: true
|
||||
},
|
||||
__experimentalBorder: {
|
||||
color: true,
|
||||
radius: true,
|
||||
width: true,
|
||||
__experimentalSkipSerialization: true,
|
||||
__experimentalDefaultControls: {
|
||||
color: true,
|
||||
radius: true,
|
||||
width: true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
migrate({
|
||||
width,
|
||||
height,
|
||||
...attributes
|
||||
}) {
|
||||
return { ...attributes,
|
||||
width: `${width}px`,
|
||||
height: `${height}px`
|
||||
};
|
||||
},
|
||||
|
||||
save({
|
||||
attributes
|
||||
}) {
|
||||
const {
|
||||
url,
|
||||
alt,
|
||||
caption,
|
||||
align,
|
||||
href,
|
||||
rel,
|
||||
linkClass,
|
||||
width,
|
||||
height,
|
||||
aspectRatio,
|
||||
scale,
|
||||
id,
|
||||
linkTarget,
|
||||
sizeSlug,
|
||||
title
|
||||
} = attributes;
|
||||
const newRel = !rel ? undefined : rel;
|
||||
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
|
||||
const classes = classnames_default()({
|
||||
[`align${align}`]: align,
|
||||
[`size-${sizeSlug}`]: sizeSlug,
|
||||
'is-resized': width || height,
|
||||
'has-custom-border': !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
|
||||
});
|
||||
const imageClasses = classnames_default()(borderProps.className, {
|
||||
[`wp-image-${id}`]: !!id
|
||||
});
|
||||
const image = (0,external_wp_element_namespaceObject.createElement)("img", {
|
||||
src: url,
|
||||
alt: alt,
|
||||
className: imageClasses || undefined,
|
||||
style: { ...borderProps.style,
|
||||
aspectRatio,
|
||||
objectFit: scale,
|
||||
width,
|
||||
height
|
||||
},
|
||||
width: width,
|
||||
height: height,
|
||||
title: title
|
||||
});
|
||||
const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
|
||||
className: linkClass,
|
||||
href: href,
|
||||
target: linkTarget,
|
||||
rel: newRel
|
||||
}, image) : image, !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText.Content, {
|
||||
className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
|
||||
tagName: "figcaption",
|
||||
value: caption
|
||||
}));
|
||||
return (0,external_wp_element_namespaceObject.createElement)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
|
||||
className: classes
|
||||
})
|
||||
}, figure);
|
||||
}
|
||||
|
||||
};
|
||||
/* harmony default export */ const image_deprecated = ([image_deprecated_v7, image_deprecated_v6, image_deprecated_v5, image_deprecated_v4, image_deprecated_v3, image_deprecated_v2, image_deprecated_v1]);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js
|
||||
|
||||
|
@ -24032,7 +24219,10 @@ function image_Image({
|
|||
scale,
|
||||
linkTarget,
|
||||
sizeSlug
|
||||
} = attributes;
|
||||
} = attributes; // The only supported unit is px, so we can parseInt to strip the px here.
|
||||
|
||||
const numericWidth = width ? parseInt(width, 10) : undefined;
|
||||
const numericHeight = height ? parseInt(height, 10) : undefined;
|
||||
const imageRef = (0,external_wp_element_namespaceObject.useRef)();
|
||||
const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption);
|
||||
const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!!caption);
|
||||
|
@ -24237,7 +24427,9 @@ function image_Image({
|
|||
function updateAlignment(nextAlign) {
|
||||
const extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? {
|
||||
width: undefined,
|
||||
height: undefined
|
||||
height: undefined,
|
||||
aspectRatio: undefined,
|
||||
scale: undefined
|
||||
} : {};
|
||||
setAttributes({ ...extraUpdatedAttributes,
|
||||
align: nextAlign
|
||||
|
@ -24338,10 +24530,10 @@ function image_Image({
|
|||
href: "https://www.w3.org/WAI/tutorials/images/decision-tree"
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Describe the purpose of the image.')), (0,external_wp_element_namespaceObject.createElement)("br", null), (0,external_wp_i18n_namespaceObject.__)('Leave empty if decorative.')),
|
||||
__nextHasNoMarginBottom: true
|
||||
})), (0,external_wp_element_namespaceObject.createElement)(DimensionsTool, {
|
||||
})), isResizable && (0,external_wp_element_namespaceObject.createElement)(DimensionsTool, {
|
||||
value: {
|
||||
width: width && `${width}px`,
|
||||
height: height && `${height}px`,
|
||||
width,
|
||||
height,
|
||||
scale,
|
||||
aspectRatio
|
||||
},
|
||||
|
@ -24350,8 +24542,8 @@ function image_Image({
|
|||
// for values that are removed since setAttributes
|
||||
// doesn't do anything with keys that aren't set.
|
||||
setAttributes({
|
||||
width: newValue.width && parseInt(newValue.width, 10),
|
||||
height: newValue.height && parseInt(newValue.height, 10),
|
||||
width: newValue.width,
|
||||
height: newValue.height,
|
||||
scale: newValue.scale,
|
||||
aspectRatio: newValue.aspectRatio
|
||||
});
|
||||
|
@ -24423,8 +24615,8 @@ function image_Image({
|
|||
img = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, {
|
||||
id: id,
|
||||
url: url,
|
||||
width: width,
|
||||
height: height,
|
||||
width: numericWidth,
|
||||
height: numericHeight,
|
||||
clientWidth: fallbackClientWidth,
|
||||
naturalHeight: naturalHeight,
|
||||
naturalWidth: naturalWidth,
|
||||
|
@ -24443,9 +24635,11 @@ function image_Image({
|
|||
}
|
||||
}, img);
|
||||
} else {
|
||||
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 numericRatio = aspectRatio && evalAspectRatio(aspectRatio);
|
||||
const customRatio = numericWidth / numericHeight;
|
||||
const ratio = numericRatio || customRatio || naturalWidth / naturalHeight || 1;
|
||||
const currentWidth = !numericWidth && numericHeight ? numericHeight * ratio : numericWidth;
|
||||
const currentHeight = !numericHeight && numericWidth ? numericWidth / ratio : numericHeight;
|
||||
const minWidth = naturalWidth < naturalHeight ? constants_MIN_SIZE : constants_MIN_SIZE * ratio;
|
||||
const minHeight = naturalHeight < naturalWidth ? constants_MIN_SIZE : constants_MIN_SIZE / ratio; // With the current implementation of ResizableBox, an image needs an
|
||||
// explicit pixel value for the max-width. In absence of being able to
|
||||
|
@ -24512,11 +24706,15 @@ function image_Image({
|
|||
},
|
||||
onResizeStart: onResizeStart,
|
||||
onResizeStop: (event, direction, elt) => {
|
||||
onResizeStop();
|
||||
onResizeStop(); // Since the aspect ratio is locked when resizing, we can
|
||||
// use the width of the resized element to calculate the
|
||||
// height in CSS to prevent stretching when the max-width
|
||||
// is reached.
|
||||
|
||||
setAttributes({
|
||||
width: elt.offsetWidth,
|
||||
height: elt.offsetHeight,
|
||||
aspectRatio: undefined
|
||||
width: `${elt.offsetWidth}px`,
|
||||
height: 'auto',
|
||||
aspectRatio: `${ratio}`
|
||||
});
|
||||
},
|
||||
resizeRatio: align === 'center' ? 2 : 1
|
||||
|
@ -24948,8 +25146,6 @@ function image_save_save({
|
|||
width,
|
||||
height
|
||||
},
|
||||
width: width,
|
||||
height: height,
|
||||
title: title
|
||||
});
|
||||
const figure = (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, href ? (0,external_wp_element_namespaceObject.createElement)("a", {
|
||||
|
@ -25243,10 +25439,10 @@ const image_metadata = {
|
|||
__experimentalRole: "content"
|
||||
},
|
||||
width: {
|
||||
type: "number"
|
||||
type: "string"
|
||||
},
|
||||
height: {
|
||||
type: "number"
|
||||
type: "string"
|
||||
},
|
||||
aspectRatio: {
|
||||
type: "string"
|
||||
|
@ -58513,8 +58709,19 @@ function FootnotesEdit({
|
|||
}, footnotes.map(({
|
||||
id,
|
||||
content
|
||||
}) => (0,external_wp_element_namespaceObject.createElement)("li", {
|
||||
key: id
|
||||
}) =>
|
||||
/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
|
||||
(0,external_wp_element_namespaceObject.createElement)("li", {
|
||||
key: id,
|
||||
onMouseDown: event => {
|
||||
// When clicking on the list item (not on descendants),
|
||||
// focus the rich text element since it's only 1px wide when
|
||||
// empty.
|
||||
if (event.target === event.currentTarget) {
|
||||
event.target.firstElementChild.focus();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
|
||||
id: id,
|
||||
tagName: "span",
|
||||
|
@ -58682,6 +58889,7 @@ const format = {
|
|||
attributes: {
|
||||
'data-fn': 'data-fn'
|
||||
},
|
||||
interactive: true,
|
||||
contentEditable: false,
|
||||
[usesContextKey]: ['postType'],
|
||||
edit: function Edit({
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6356,11 +6356,6 @@ function useEntityBlockEditor(kind, name, {
|
|||
});
|
||||
|
||||
function updateAttributes(attributes) {
|
||||
// Only attempt to update attributes, if attributes is an object.
|
||||
if (!attributes || Array.isArray(attributes) || typeof attributes !== 'object') {
|
||||
return attributes;
|
||||
}
|
||||
|
||||
attributes = { ...attributes
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4229,10 +4229,12 @@ function VisualEditor({
|
|||
.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}
|
||||
.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}
|
||||
.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`;
|
||||
const isToBeIframed = (hasV3BlocksOnly || isGutenbergPlugin && isBlockBasedTheme) && !hasMetaBoxes || isTemplateMode || deviceType === 'Tablet' || deviceType === 'Mobile';
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockTools, {
|
||||
__unstableContentRef: ref,
|
||||
className: classnames_default()('edit-post-visual-editor', {
|
||||
'is-template-mode': isTemplateMode
|
||||
'is-template-mode': isTemplateMode,
|
||||
'has-inline-canvas': !isToBeIframed
|
||||
})
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.VisualEditorGlobalKeyboardShortcuts, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
|
||||
className: "edit-post-visual-editor__content-area",
|
||||
|
@ -4245,7 +4247,7 @@ function VisualEditor({
|
|||
initial: desktopCanvasStyles,
|
||||
className: previewMode
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(MaybeIframe, {
|
||||
shouldIframe: (hasV3BlocksOnly || isGutenbergPlugin && isBlockBasedTheme) && !hasMetaBoxes || isTemplateMode || deviceType === 'Tablet' || deviceType === 'Mobile',
|
||||
shouldIframe: isToBeIframed,
|
||||
contentRef: contentRef,
|
||||
styles: styles
|
||||
}, themeSupportsLayout && !themeHasDisabledLayoutStyles && !isTemplateMode && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(LayoutStyle, {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3212,13 +3212,23 @@ function useSupportedStyles(name, element) {
|
|||
|
||||
|
||||
const {
|
||||
cleanEmptyObject,
|
||||
GlobalStylesContext,
|
||||
useBlockEditingMode
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis); // TODO: Temporary duplication of constant in @wordpress/block-editor. Can be
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis); // Block Gap is a special case and isn't defined within the blocks
|
||||
// style properties config. We'll add it here to allow it to be pushed
|
||||
// to global styles as well.
|
||||
|
||||
const STYLE_PROPERTY = { ...external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY,
|
||||
blockGap: {
|
||||
value: ['spacing', 'blockGap']
|
||||
}
|
||||
}; // TODO: Temporary duplication of constant in @wordpress/block-editor. Can be
|
||||
// removed by moving PushChangesToGlobalStylesControl to
|
||||
// @wordpress/block-editor.
|
||||
|
||||
const STYLE_PATH_TO_CSS_VAR_INFIX = {
|
||||
'border.color': 'color',
|
||||
'color.background': 'color',
|
||||
'color.text': 'color',
|
||||
'elements.link.color.text': 'color',
|
||||
|
@ -3260,6 +3270,7 @@ const STYLE_PATH_TO_CSS_VAR_INFIX = {
|
|||
'elements.h6.typography.fontFamily': 'font-family',
|
||||
'elements.h6.color.gradient': 'gradient',
|
||||
'color.gradient': 'gradient',
|
||||
blockGap: 'spacing',
|
||||
'typography.fontSize': 'font-size',
|
||||
'typography.fontFamily': 'font-family'
|
||||
}; // TODO: Temporary duplication of constant in @wordpress/block-editor. Can be
|
||||
|
@ -3267,6 +3278,7 @@ const STYLE_PATH_TO_CSS_VAR_INFIX = {
|
|||
// @wordpress/block-editor.
|
||||
|
||||
const STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {
|
||||
'border.color': 'borderColor',
|
||||
'color.background': 'backgroundColor',
|
||||
'color.text': 'textColor',
|
||||
'color.gradient': 'gradient',
|
||||
|
@ -3274,25 +3286,128 @@ const STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {
|
|||
'typography.fontFamily': 'fontFamily'
|
||||
};
|
||||
const SUPPORTED_STYLES = ['border', 'color', 'spacing', 'typography'];
|
||||
const flatBorderProperties = ['borderColor', 'borderWidth', 'borderStyle'];
|
||||
const sides = ['top', 'right', 'bottom', 'left'];
|
||||
|
||||
function useChangesToPush(name, attributes) {
|
||||
function getBorderStyleChanges(border, presetColor, userStyle) {
|
||||
if (!border && !presetColor) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const changes = [...getFallbackBorderStyleChange('top', border, userStyle), ...getFallbackBorderStyleChange('right', border, userStyle), ...getFallbackBorderStyleChange('bottom', border, userStyle), ...getFallbackBorderStyleChange('left', border, userStyle)]; // Handle a flat border i.e. all sides the same, CSS shorthand.
|
||||
|
||||
const {
|
||||
color: customColor,
|
||||
style,
|
||||
width
|
||||
} = border || {};
|
||||
const hasColorOrWidth = presetColor || customColor || width;
|
||||
|
||||
if (hasColorOrWidth && !style) {
|
||||
// Global Styles need individual side configurations to overcome
|
||||
// theme.json configurations which are per side as well.
|
||||
sides.forEach(side => {
|
||||
// Only add fallback border-style if global styles don't already
|
||||
// have something set.
|
||||
if (!userStyle?.[side]?.style) {
|
||||
changes.push({
|
||||
path: ['border', side, 'style'],
|
||||
value: 'solid'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return changes;
|
||||
}
|
||||
|
||||
function getFallbackBorderStyleChange(side, border, globalBorderStyle) {
|
||||
if (!border?.[side] || globalBorderStyle?.[side]?.style) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const {
|
||||
color,
|
||||
style,
|
||||
width
|
||||
} = border[side];
|
||||
const hasColorOrWidth = color || width;
|
||||
|
||||
if (!hasColorOrWidth || style) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [{
|
||||
path: ['border', side, 'style'],
|
||||
value: 'solid'
|
||||
}];
|
||||
}
|
||||
|
||||
function useChangesToPush(name, attributes, userConfig) {
|
||||
const supports = useSupportedStyles(name);
|
||||
return (0,external_wp_element_namespaceObject.useMemo)(() => supports.flatMap(key => {
|
||||
if (!external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY[key]) {
|
||||
return [];
|
||||
}
|
||||
const blockUserConfig = userConfig?.styles?.blocks?.[name];
|
||||
return (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
const changes = supports.flatMap(key => {
|
||||
if (!STYLE_PROPERTY[key]) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const {
|
||||
value: path
|
||||
} = external_wp_blocks_namespaceObject.__EXPERIMENTAL_STYLE_PROPERTY[key];
|
||||
const presetAttributeKey = path.join('.');
|
||||
const presetAttributeValue = attributes[STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[presetAttributeKey]];
|
||||
const value = presetAttributeValue ? `var:preset|${STYLE_PATH_TO_CSS_VAR_INFIX[presetAttributeKey]}|${presetAttributeValue}` : (0,external_lodash_namespaceObject.get)(attributes.style, path);
|
||||
return value ? [{
|
||||
path,
|
||||
value
|
||||
}] : [];
|
||||
}), [supports, name, attributes]);
|
||||
const {
|
||||
value: path
|
||||
} = STYLE_PROPERTY[key];
|
||||
const presetAttributeKey = path.join('.');
|
||||
const presetAttributeValue = attributes[STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[presetAttributeKey]];
|
||||
const value = presetAttributeValue ? `var:preset|${STYLE_PATH_TO_CSS_VAR_INFIX[presetAttributeKey]}|${presetAttributeValue}` : (0,external_lodash_namespaceObject.get)(attributes.style, path); // Links only have a single support entry but have two element
|
||||
// style properties, color and hover color. The following check
|
||||
// will add the hover color to the changes if required.
|
||||
|
||||
if (key === 'linkColor') {
|
||||
const linkChanges = value ? [{
|
||||
path,
|
||||
value
|
||||
}] : [];
|
||||
const hoverPath = ['elements', 'link', ':hover', 'color', 'text'];
|
||||
const hoverValue = (0,external_lodash_namespaceObject.get)(attributes.style, hoverPath);
|
||||
|
||||
if (hoverValue) {
|
||||
linkChanges.push({
|
||||
path: hoverPath,
|
||||
value: hoverValue
|
||||
});
|
||||
}
|
||||
|
||||
return linkChanges;
|
||||
} // The shorthand border styles can't be mapped directly as global
|
||||
// styles requires longhand config.
|
||||
|
||||
|
||||
if (flatBorderProperties.includes(key) && value) {
|
||||
// The shorthand config path is included to clear the block attribute.
|
||||
const borderChanges = [{
|
||||
path,
|
||||
value
|
||||
}];
|
||||
sides.forEach(side => {
|
||||
const currentPath = [...path];
|
||||
currentPath.splice(-1, 0, side);
|
||||
borderChanges.push({
|
||||
path: currentPath,
|
||||
value
|
||||
});
|
||||
});
|
||||
return borderChanges;
|
||||
}
|
||||
|
||||
return value ? [{
|
||||
path,
|
||||
value
|
||||
}] : [];
|
||||
}); // To ensure display of a visible border, global styles require a
|
||||
// default border style if a border color or width is present.
|
||||
|
||||
getBorderStyleChanges(attributes.style?.border, attributes.borderColor, blockUserConfig?.border).forEach(change => changes.push(change));
|
||||
return changes;
|
||||
}, [supports, attributes, blockUserConfig]);
|
||||
}
|
||||
|
||||
function cloneDeep(object) {
|
||||
|
@ -3304,11 +3419,11 @@ function PushChangesToGlobalStylesControl({
|
|||
attributes,
|
||||
setAttributes
|
||||
}) {
|
||||
const changes = useChangesToPush(name, attributes);
|
||||
const {
|
||||
user: userConfig,
|
||||
setUserConfig
|
||||
} = (0,external_wp_element_namespaceObject.useContext)(GlobalStylesContext);
|
||||
const changes = useChangesToPush(name, attributes, userConfig);
|
||||
const {
|
||||
__unstableMarkNextChangeAsNotPersistent
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
|
||||
|
@ -3332,17 +3447,24 @@ function PushChangesToGlobalStylesControl({
|
|||
} of changes) {
|
||||
(0,external_lodash_namespaceObject.set)(newBlockStyles, path, undefined);
|
||||
(0,external_lodash_namespaceObject.set)(newUserConfig, ['styles', 'blocks', name, ...path], value);
|
||||
} // @wordpress/core-data doesn't support editing multiple entity types in
|
||||
}
|
||||
|
||||
const newBlockAttributes = {
|
||||
borderColor: undefined,
|
||||
backgroundColor: undefined,
|
||||
textColor: undefined,
|
||||
gradient: undefined,
|
||||
fontSize: undefined,
|
||||
fontFamily: undefined,
|
||||
style: cleanEmptyObject(newBlockStyles)
|
||||
}; // @wordpress/core-data doesn't support editing multiple entity types in
|
||||
// a single undo level. So for now, we disable @wordpress/core-data undo
|
||||
// tracking and implement our own Undo button in the snackbar
|
||||
// notification.
|
||||
|
||||
|
||||
__unstableMarkNextChangeAsNotPersistent();
|
||||
|
||||
setAttributes({
|
||||
style: newBlockStyles
|
||||
});
|
||||
setAttributes(newBlockAttributes);
|
||||
setUserConfig(() => newUserConfig, {
|
||||
undoIgnore: true
|
||||
});
|
||||
|
@ -3355,9 +3477,7 @@ function PushChangesToGlobalStylesControl({
|
|||
onClick() {
|
||||
__unstableMarkNextChangeAsNotPersistent();
|
||||
|
||||
setAttributes({
|
||||
style: blockStyles
|
||||
});
|
||||
setAttributes(attributes);
|
||||
setUserConfig(() => userConfig, {
|
||||
undoIgnore: true
|
||||
});
|
||||
|
@ -3365,7 +3485,7 @@ function PushChangesToGlobalStylesControl({
|
|||
|
||||
}]
|
||||
});
|
||||
}, [changes, attributes, userConfig, name]);
|
||||
}, [__unstableMarkNextChangeAsNotPersistent, attributes, changes, createSuccessNotice, name, setAttributes, setUserConfig, userConfig]);
|
||||
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl, {
|
||||
className: "edit-site-push-changes-to-global-styles-control",
|
||||
help: (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Title of the block e.g. 'Heading'.
|
||||
|
@ -5745,7 +5865,7 @@ function isPlainObject(o) {
|
|||
|
||||
const {
|
||||
GlobalStylesContext: global_styles_provider_GlobalStylesContext,
|
||||
cleanEmptyObject
|
||||
cleanEmptyObject: global_styles_provider_cleanEmptyObject
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
function mergeBaseAndUserConfigs(base, user) {
|
||||
return cjs_default()(base, user, {
|
||||
|
@ -5806,8 +5926,8 @@ function useGlobalStylesUserConfig() {
|
|||
};
|
||||
const updatedConfig = callback(currentConfig);
|
||||
editEntityRecord('root', 'globalStyles', globalStylesId, {
|
||||
styles: cleanEmptyObject(updatedConfig.styles) || {},
|
||||
settings: cleanEmptyObject(updatedConfig.settings) || {}
|
||||
styles: global_styles_provider_cleanEmptyObject(updatedConfig.styles) || {},
|
||||
settings: global_styles_provider_cleanEmptyObject(updatedConfig.settings) || {}
|
||||
}, options);
|
||||
}, [globalStylesId]);
|
||||
return [isReady, config, setConfig];
|
||||
|
@ -9518,8 +9638,8 @@ function HomeTemplateDetails() {
|
|||
spacing: 3
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(SidebarNavigationScreenDetailsPanelRow, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CheckboxControl, {
|
||||
className: "edit-site-sidebar-navigation-screen__input-control",
|
||||
label: "Allow comments on new posts",
|
||||
help: "Changes will apply to new posts only. Individual posts may override these settings.",
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Allow comments on new posts'),
|
||||
help: (0,external_wp_i18n_namespaceObject.__)('Changes will apply to new posts only. Individual posts may override these settings.'),
|
||||
checked: commentsOnNewPostsValue,
|
||||
onChange: setAllowCommentsOnNewPosts
|
||||
}))), (0,external_wp_element_namespaceObject.createElement)(SidebarNavigationScreenDetailsPanel, {
|
||||
|
@ -10825,7 +10945,7 @@ function LeafMoreMenu(props) {
|
|||
moveBlocksDown([clientId], rootClientId);
|
||||
onClose();
|
||||
}
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Move down')), block.attributes?.id && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Move down')), block.attributes?.type === 'page' && block.attributes?.id && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
||||
onClick: () => {
|
||||
onGoToPage(block);
|
||||
onClose();
|
||||
|
@ -19888,8 +20008,14 @@ function RedoButton(props, ref) {
|
|||
|
||||
|
||||
|
||||
const document_actions_typeLabels = {
|
||||
wp_block: (0,external_wp_i18n_namespaceObject.__)('Editing pattern:'),
|
||||
wp_navigation: (0,external_wp_i18n_namespaceObject.__)('Editing navigation menu:'),
|
||||
wp_template: (0,external_wp_i18n_namespaceObject.__)('Editing template:'),
|
||||
wp_template_part: (0,external_wp_i18n_namespaceObject.__)('Editing template part:')
|
||||
};
|
||||
function DocumentActions() {
|
||||
const isPage = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).isPage());
|
||||
const isPage = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).isPage(), []);
|
||||
return isPage ? (0,external_wp_element_namespaceObject.createElement)(PageDocumentActions, null) : (0,external_wp_element_namespaceObject.createElement)(TemplateDocumentActions, null);
|
||||
}
|
||||
|
||||
|
@ -19956,6 +20082,8 @@ function TemplateDocumentActions({
|
|||
className,
|
||||
onBack
|
||||
}) {
|
||||
var _typeLabels$record$ty;
|
||||
|
||||
const {
|
||||
isLoaded,
|
||||
record,
|
||||
|
@ -19973,7 +20101,6 @@ function TemplateDocumentActions({
|
|||
}, (0,external_wp_i18n_namespaceObject.__)('Document not found'));
|
||||
}
|
||||
|
||||
const entityLabel = getEntityLabel(record.type);
|
||||
let typeIcon = icon;
|
||||
|
||||
if (record.type === 'wp_navigation') {
|
||||
|
@ -19988,9 +20115,7 @@ function TemplateDocumentActions({
|
|||
onBack: onBack
|
||||
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
|
||||
as: "span"
|
||||
}, (0,external_wp_i18n_namespaceObject.sprintf)(
|
||||
/* translators: %s: the entity being edited, like "template"*/
|
||||
(0,external_wp_i18n_namespaceObject.__)('Editing %s: '), entityLabel)), getTitle());
|
||||
}, (_typeLabels$record$ty = document_actions_typeLabels[record.type]) !== null && _typeLabels$record$ty !== void 0 ? _typeLabels$record$ty : document_actions_typeLabels.wp_template), getTitle());
|
||||
}
|
||||
|
||||
function BaseDocumentActions({
|
||||
|
@ -20028,26 +20153,6 @@ function BaseDocumentActions({
|
|||
}, external_wp_keycodes_namespaceObject.displayShortcut.primary('k'))));
|
||||
}
|
||||
|
||||
function getEntityLabel(entityType) {
|
||||
let label = '';
|
||||
|
||||
switch (entityType) {
|
||||
case 'wp_navigation':
|
||||
label = 'navigation menu';
|
||||
break;
|
||||
|
||||
case 'wp_template_part':
|
||||
label = 'template part';
|
||||
break;
|
||||
|
||||
default:
|
||||
label = 'template';
|
||||
break;
|
||||
}
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/header-edit-mode/index.js
|
||||
|
||||
|
||||
|
@ -21940,13 +22045,13 @@ function Page({
|
|||
return (0,external_wp_element_namespaceObject.createElement)(NavigableRegion, {
|
||||
className: classes,
|
||||
ariaLabel: title
|
||||
}, (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
className: "edit-site-page-content"
|
||||
}, !hideTitleFromUI && title && (0,external_wp_element_namespaceObject.createElement)(Header, {
|
||||
title: title,
|
||||
subTitle: subTitle,
|
||||
actions: actions
|
||||
}), (0,external_wp_element_namespaceObject.createElement)("div", {
|
||||
className: "edit-site-page-content"
|
||||
}, children, (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.EditorSnackbars, null)));
|
||||
}), children), (0,external_wp_element_namespaceObject.createElement)(external_wp_editor_namespaceObject.EditorSnackbars, null));
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-site/build-module/components/page-patterns/header.js
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1739,6 +1739,7 @@ function join(values, separator = '') {
|
|||
* unique across all registered formats.
|
||||
* @property {string} tagName The HTML tag this format will wrap the
|
||||
* selection with.
|
||||
* @property {boolean} interactive Whether format makes content interactive or not.
|
||||
* @property {string} [className] A class to match the format.
|
||||
* @property {string} title Name of the format.
|
||||
* @property {Function} edit Should return a component for the user to
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.4-alpha-56519';
|
||||
$wp_version = '6.4-alpha-56520';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue