mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
Editor: Update Packages with the latest bug fixes for 6.5 beta 3
It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59394/ Props get_dave, youknowriad. See #60315. Built from https://develop.svn.wordpress.org/trunk@57721 git-svn-id: http://core.svn.wordpress.org/trunk@57222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e88758878e
commit
d3204b3e7e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -5,7 +5,8 @@
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
min-height:430px;
|
||||
overflow-x:clip;
|
||||
overflow:hidden;
|
||||
overflow:clip;
|
||||
padding:1em;
|
||||
position:relative;
|
||||
}
|
||||
|
2
wp-includes/blocks/cover/style-rtl.min.css
vendored
2
wp-includes/blocks/cover/style-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@ -5,7 +5,8 @@
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
min-height:430px;
|
||||
overflow-x:clip;
|
||||
overflow:hidden;
|
||||
overflow:clip;
|
||||
padding:1em;
|
||||
position:relative;
|
||||
}
|
||||
|
2
wp-includes/blocks/cover/style.min.css
vendored
2
wp-includes/blocks/cover/style.min.css
vendored
File diff suppressed because one or more lines are too long
@ -105,7 +105,7 @@ function register_block_core_footnotes_post_meta() {
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
/*
|
||||
* Most post types are registered at priority 10, so use priority 20 here in
|
||||
* order to catch them.
|
||||
*/
|
||||
|
@ -554,14 +554,18 @@ class WP_Navigation_Block_Renderer {
|
||||
// When adding to this array be mindful of security concerns.
|
||||
$nav_element_context = data_wp_context(
|
||||
array(
|
||||
'overlayOpenedBy' => array(),
|
||||
'overlayOpenedBy' => array(
|
||||
'click' => false,
|
||||
'hover' => false,
|
||||
'focus' => false,
|
||||
),
|
||||
'type' => 'overlay',
|
||||
'roleAttribute' => '',
|
||||
'ariaLabel' => __( 'Menu' ),
|
||||
)
|
||||
);
|
||||
$nav_element_directives = '
|
||||
data-wp-interactive="core/navigation"'
|
||||
data-wp-interactive="core/navigation" '
|
||||
. $nav_element_context;
|
||||
|
||||
return $nav_element_directives;
|
||||
@ -764,7 +768,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
|
||||
) ) {
|
||||
// Add directives to the parent `<li>`.
|
||||
$tags->set_attribute( 'data-wp-interactive', 'core/navigation' );
|
||||
$tags->set_attribute( 'data-wp-context', '{ "submenuOpenedBy": {}, "type": "submenu" }' );
|
||||
$tags->set_attribute( 'data-wp-context', '{ "submenuOpenedBy": { "click": false, "hover": false, "focus": false }, "type": "submenu" }' );
|
||||
$tags->set_attribute( 'data-wp-watch', 'callbacks.initMenu' );
|
||||
$tags->set_attribute( 'data-wp-on--focusout', 'actions.handleMenuFocusout' );
|
||||
$tags->set_attribute( 'data-wp-on--keydown', 'actions.handleMenuKeydown' );
|
||||
|
@ -6,8 +6,10 @@
|
||||
line-height:0;
|
||||
}
|
||||
.wp-block-search__button svg{
|
||||
height:1.25em;
|
||||
min-height:24px;
|
||||
min-width:24px;
|
||||
width:1.25em;
|
||||
fill:currentColor;
|
||||
vertical-align:text-bottom;
|
||||
}
|
||||
|
2
wp-includes/blocks/search/style-rtl.min.css
vendored
2
wp-includes/blocks/search/style-rtl.min.css
vendored
@ -1 +1 @@
|
||||
.wp-block-search__button{margin-right:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{min-height:24px;min-width:24px;fill:currentColor;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-right:0;max-width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true]{max-width:calc(100% - 100px)}.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search.wp-block-search__button-only .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{float:left}
|
||||
.wp-block-search__button{margin-right:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{height:1.25em;min-height:24px;min-width:24px;width:1.25em;fill:currentColor;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-right:0;max-width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true]{max-width:calc(100% - 100px)}.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search.wp-block-search__button-only .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{float:left}
|
@ -6,8 +6,10 @@
|
||||
line-height:0;
|
||||
}
|
||||
.wp-block-search__button svg{
|
||||
height:1.25em;
|
||||
min-height:24px;
|
||||
min-width:24px;
|
||||
width:1.25em;
|
||||
fill:currentColor;
|
||||
vertical-align:text-bottom;
|
||||
}
|
||||
|
2
wp-includes/blocks/search/style.min.css
vendored
2
wp-includes/blocks/search/style.min.css
vendored
@ -1 +1 @@
|
||||
.wp-block-search__button{margin-left:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{min-height:24px;min-width:24px;fill:currentColor;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-left:0;max-width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true]{max-width:calc(100% - 100px)}.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search.wp-block-search__button-only .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{float:right}
|
||||
.wp-block-search__button{margin-left:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{height:1.25em;min-height:24px;min-width:24px;width:1.25em;fill:currentColor;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-left:0;max-width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true]{max-width:calc(100% - 100px)}.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search.wp-block-search__button-only .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{float:right}
|
61
wp-includes/css/dist/block-editor/style-rtl.css
vendored
61
wp-includes/css/dist/block-editor/style-rtl.css
vendored
@ -1393,6 +1393,17 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
width:230px;
|
||||
}
|
||||
|
||||
.block-editor-global-styles__shadow__list{
|
||||
display:flex;
|
||||
flex-wrap:wrap;
|
||||
gap:12px;
|
||||
padding-bottom:8px;
|
||||
}
|
||||
|
||||
.block-editor-global-styles__clear-shadow{
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.block-editor-global-styles-filters-panel__dropdown,.block-editor-global-styles__shadow-dropdown{
|
||||
display:block;
|
||||
padding:0;
|
||||
@ -1405,21 +1416,27 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
background-color:#f0f0f0;
|
||||
}
|
||||
|
||||
.block-editor-global-styles__shadow-indicator-wrapper{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
padding:6px;
|
||||
}
|
||||
|
||||
.block-editor-global-styles__shadow-indicator{
|
||||
border:1px solid #e0e0e0;
|
||||
border-radius:2px;
|
||||
box-sizing:border-box;
|
||||
color:#2f2f2f;
|
||||
cursor:pointer;
|
||||
height:24px;
|
||||
height:26px;
|
||||
padding:0;
|
||||
width:24px;
|
||||
transform:scale(1);
|
||||
transition:transform .1s ease;
|
||||
width:26px;
|
||||
will-change:transform;
|
||||
}
|
||||
.block-editor-global-styles__shadow-indicator:focus{
|
||||
border:2px solid #757575;
|
||||
}
|
||||
.block-editor-global-styles__shadow-indicator:hover{
|
||||
transform:scale(1.2);
|
||||
}
|
||||
.block-editor-global-styles__shadow-indicator.unset{
|
||||
background:linear-gradient(45deg, #0000 48%, #ddd 0, #ddd 52%, #0000 0);
|
||||
}
|
||||
|
||||
.block-editor-global-styles-advanced-panel__custom-css-input textarea{
|
||||
@ -1633,6 +1650,13 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
.show-icon-labels .block-editor-link-control .components-button.has-icon:before{
|
||||
content:attr(aria-label);
|
||||
}
|
||||
.show-icon-labels .block-editor-link-control .block-editor-link-control__search-item-top{
|
||||
gap:8px;
|
||||
}
|
||||
.show-icon-labels .block-editor-link-control .block-editor-link-control__search-item-top .components-button.has-icon{
|
||||
min-width:inherit;
|
||||
width:min-content;
|
||||
}
|
||||
|
||||
.block-editor-link-control__search-input-wrapper{
|
||||
margin-bottom:8px;
|
||||
@ -2890,6 +2914,7 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
flex-shrink:1;
|
||||
margin-left:8px;
|
||||
max-width:350px;
|
||||
min-width:150px;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
@ -2926,6 +2951,11 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
.block-editor-hooks__block-hooks .components-toggle-control .components-h-stack .components-h-stack{
|
||||
flex-direction:row;
|
||||
}
|
||||
.block-editor-hooks__block-hooks .block-editor-hooks__block-hooks-helptext{
|
||||
color:#757575;
|
||||
font-size:12px;
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
.block-editor-hooks__background__inspector-media-replace-container{
|
||||
position:relative;
|
||||
@ -3243,14 +3273,12 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
width:0;
|
||||
}
|
||||
.show-icon-labels .block-editor-block-mover .block-editor-block-mover__move-button-container{
|
||||
position:relative;
|
||||
width:auto;
|
||||
}
|
||||
@media (min-width:600px){
|
||||
.show-icon-labels .block-editor-block-mover .block-editor-block-mover__move-button-container{
|
||||
position:relative;
|
||||
}
|
||||
.show-icon-labels .block-editor-block-mover .block-editor-block-mover__move-button-container:before{
|
||||
background:#1e1e1e;
|
||||
.show-icon-labels .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container:before{
|
||||
background:#e0e0e0;
|
||||
content:"";
|
||||
height:1px;
|
||||
margin-top:-.5px;
|
||||
@ -3261,6 +3289,11 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
width:100%;
|
||||
}
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.show-icon-labels .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container:before{
|
||||
background:#1e1e1e;
|
||||
}
|
||||
}
|
||||
.show-icon-labels .block-editor-block-mover.is-horizontal .block-editor-block-mover-button,.show-icon-labels .block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container{
|
||||
padding-left:6px;
|
||||
padding-right:6px;
|
||||
|
File diff suppressed because one or more lines are too long
61
wp-includes/css/dist/block-editor/style.css
vendored
61
wp-includes/css/dist/block-editor/style.css
vendored
@ -1393,6 +1393,17 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
width:230px;
|
||||
}
|
||||
|
||||
.block-editor-global-styles__shadow__list{
|
||||
display:flex;
|
||||
flex-wrap:wrap;
|
||||
gap:12px;
|
||||
padding-bottom:8px;
|
||||
}
|
||||
|
||||
.block-editor-global-styles__clear-shadow{
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
.block-editor-global-styles-filters-panel__dropdown,.block-editor-global-styles__shadow-dropdown{
|
||||
display:block;
|
||||
padding:0;
|
||||
@ -1405,21 +1416,27 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
background-color:#f0f0f0;
|
||||
}
|
||||
|
||||
.block-editor-global-styles__shadow-indicator-wrapper{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
padding:6px;
|
||||
}
|
||||
|
||||
.block-editor-global-styles__shadow-indicator{
|
||||
border:1px solid #e0e0e0;
|
||||
border-radius:2px;
|
||||
box-sizing:border-box;
|
||||
color:#2f2f2f;
|
||||
cursor:pointer;
|
||||
height:24px;
|
||||
height:26px;
|
||||
padding:0;
|
||||
width:24px;
|
||||
transform:scale(1);
|
||||
transition:transform .1s ease;
|
||||
width:26px;
|
||||
will-change:transform;
|
||||
}
|
||||
.block-editor-global-styles__shadow-indicator:focus{
|
||||
border:2px solid #757575;
|
||||
}
|
||||
.block-editor-global-styles__shadow-indicator:hover{
|
||||
transform:scale(1.2);
|
||||
}
|
||||
.block-editor-global-styles__shadow-indicator.unset{
|
||||
background:linear-gradient(-45deg, #0000 48%, #ddd 0, #ddd 52%, #0000 0);
|
||||
}
|
||||
|
||||
.block-editor-global-styles-advanced-panel__custom-css-input textarea{
|
||||
@ -1633,6 +1650,13 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
.show-icon-labels .block-editor-link-control .components-button.has-icon:before{
|
||||
content:attr(aria-label);
|
||||
}
|
||||
.show-icon-labels .block-editor-link-control .block-editor-link-control__search-item-top{
|
||||
gap:8px;
|
||||
}
|
||||
.show-icon-labels .block-editor-link-control .block-editor-link-control__search-item-top .components-button.has-icon{
|
||||
min-width:inherit;
|
||||
width:min-content;
|
||||
}
|
||||
|
||||
.block-editor-link-control__search-input-wrapper{
|
||||
margin-bottom:8px;
|
||||
@ -2890,6 +2914,7 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
flex-shrink:1;
|
||||
margin-right:8px;
|
||||
max-width:350px;
|
||||
min-width:150px;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
@ -2926,6 +2951,11 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
.block-editor-hooks__block-hooks .components-toggle-control .components-h-stack .components-h-stack{
|
||||
flex-direction:row;
|
||||
}
|
||||
.block-editor-hooks__block-hooks .block-editor-hooks__block-hooks-helptext{
|
||||
color:#757575;
|
||||
font-size:12px;
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
.block-editor-hooks__background__inspector-media-replace-container{
|
||||
position:relative;
|
||||
@ -3243,14 +3273,12 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
width:0;
|
||||
}
|
||||
.show-icon-labels .block-editor-block-mover .block-editor-block-mover__move-button-container{
|
||||
position:relative;
|
||||
width:auto;
|
||||
}
|
||||
@media (min-width:600px){
|
||||
.show-icon-labels .block-editor-block-mover .block-editor-block-mover__move-button-container{
|
||||
position:relative;
|
||||
}
|
||||
.show-icon-labels .block-editor-block-mover .block-editor-block-mover__move-button-container:before{
|
||||
background:#1e1e1e;
|
||||
.show-icon-labels .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container:before{
|
||||
background:#e0e0e0;
|
||||
content:"";
|
||||
height:1px;
|
||||
left:50%;
|
||||
@ -3261,6 +3289,11 @@ iframe[name=editor-canvas].has-editor-padding{
|
||||
width:100%;
|
||||
}
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.show-icon-labels .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container:before{
|
||||
background:#1e1e1e;
|
||||
}
|
||||
}
|
||||
.show-icon-labels .block-editor-block-mover.is-horizontal .block-editor-block-mover-button,.show-icon-labels .block-editor-block-mover.is-horizontal .block-editor-block-mover__move-button-container{
|
||||
padding-left:6px;
|
||||
padding-right:6px;
|
||||
|
File diff suppressed because one or more lines are too long
@ -482,7 +482,8 @@
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
min-height:430px;
|
||||
overflow-x:clip;
|
||||
overflow:hidden;
|
||||
overflow:clip;
|
||||
padding:1em;
|
||||
position:relative;
|
||||
}
|
||||
@ -2684,8 +2685,10 @@ ul.wp-block-rss.is-grid li{
|
||||
line-height:0;
|
||||
}
|
||||
.wp-block-search__button svg{
|
||||
height:1.25em;
|
||||
min-height:24px;
|
||||
min-width:24px;
|
||||
width:1.25em;
|
||||
fill:currentColor;
|
||||
vertical-align:text-bottom;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
5
wp-includes/css/dist/block-library/style.css
vendored
5
wp-includes/css/dist/block-library/style.css
vendored
@ -482,7 +482,8 @@
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
min-height:430px;
|
||||
overflow-x:clip;
|
||||
overflow:hidden;
|
||||
overflow:clip;
|
||||
padding:1em;
|
||||
position:relative;
|
||||
}
|
||||
@ -2684,8 +2685,10 @@ ul.wp-block-rss.is-grid li{
|
||||
line-height:0;
|
||||
}
|
||||
.wp-block-search__button svg{
|
||||
height:1.25em;
|
||||
min-height:24px;
|
||||
min-width:24px;
|
||||
width:1.25em;
|
||||
fill:currentColor;
|
||||
vertical-align:text-bottom;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -458,6 +458,12 @@ p+.components-button.is-tertiary{
|
||||
font-size:21px;
|
||||
}
|
||||
}
|
||||
.components-checkbox-control__input[type=checkbox]:disabled,.components-checkbox-control__input[type=checkbox][aria-disabled=true]{
|
||||
background:#f0f0f0;
|
||||
border-color:#ddd;
|
||||
cursor:default;
|
||||
opacity:1;
|
||||
}
|
||||
@media (min-width:600px){
|
||||
.components-checkbox-control__input[type=checkbox]{
|
||||
height:20px;
|
||||
|
File diff suppressed because one or more lines are too long
6
wp-includes/css/dist/components/style.css
vendored
6
wp-includes/css/dist/components/style.css
vendored
@ -458,6 +458,12 @@ p+.components-button.is-tertiary{
|
||||
font-size:21px;
|
||||
}
|
||||
}
|
||||
.components-checkbox-control__input[type=checkbox]:disabled,.components-checkbox-control__input[type=checkbox][aria-disabled=true]{
|
||||
background:#f0f0f0;
|
||||
border-color:#ddd;
|
||||
cursor:default;
|
||||
opacity:1;
|
||||
}
|
||||
@media (min-width:600px){
|
||||
.components-checkbox-control__input[type=checkbox]{
|
||||
height:20px;
|
||||
|
File diff suppressed because one or more lines are too long
49
wp-includes/css/dist/edit-site/style-rtl.css
vendored
49
wp-includes/css/dist/edit-site/style-rtl.css
vendored
@ -392,19 +392,12 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
.dataviews-filters__view-actions{
|
||||
padding:12px 32px 0;
|
||||
}
|
||||
.dataviews-filters__view-actions .components-search-control{
|
||||
flex-grow:1;
|
||||
}
|
||||
.dataviews-filters__view-actions .components-search-control .components-base-control__field{
|
||||
max-width:240px;
|
||||
}
|
||||
|
||||
.dataviews-filters__container{
|
||||
padding:0 32px;
|
||||
}
|
||||
|
||||
.dataviews-filters__view-actions.components-h-stack{
|
||||
align-items:center;
|
||||
padding-left:32px;
|
||||
}
|
||||
|
||||
.dataviews-filters-button{
|
||||
@ -423,6 +416,13 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
position:sticky;
|
||||
}
|
||||
|
||||
.dataviews-pagination__page-selection{
|
||||
color:#1e1e1e;
|
||||
font-size:11px;
|
||||
font-weight:500;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
|
||||
.dataviews-filters-options{
|
||||
margin:32px 0 16px;
|
||||
}
|
||||
@ -484,10 +484,10 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
.dataviews-view-table tr:hover{
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
.dataviews-view-table tr .components-checkbox-control__input{
|
||||
.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input{
|
||||
opacity:0;
|
||||
}
|
||||
.dataviews-view-table tr .components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input:indeterminate,.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:hover .components-checkbox-control__input{
|
||||
.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate,.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:hover .components-checkbox-control__input{
|
||||
opacity:1;
|
||||
}
|
||||
.dataviews-view-table tr.is-selected{
|
||||
@ -545,6 +545,9 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
.dataviews-view-table .dataviews-view-table__actions-column{
|
||||
width:1%;
|
||||
}
|
||||
.dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input{
|
||||
opacity:1;
|
||||
}
|
||||
|
||||
.dataviews-view-grid__primary-field,.dataviews-view-list__primary-field,.dataviews-view-table__primary-field{
|
||||
color:#1e1e1e;
|
||||
@ -937,7 +940,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-reset{
|
||||
padding-inline-end:28px;
|
||||
}
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible,.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover{
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible,.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover,.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip[aria-expanded=true]{
|
||||
background:#e0e0e0;
|
||||
color:#1e1e1e;
|
||||
}
|
||||
@ -945,8 +948,8 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
background:rgba(var(--wp-admin-theme-color--rgb), .04);
|
||||
color:var(--wp-admin-theme-color);
|
||||
}
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover{
|
||||
background:rgba(var(--wp-admin-theme-color--rgb), .08);
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover,.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values[aria-expanded=true]{
|
||||
background:rgba(var(--wp-admin-theme-color--rgb), .12);
|
||||
}
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible{
|
||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
||||
@ -4050,7 +4053,13 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
|
||||
font-weight:500;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.font-library-modal .components-navigator-screen{
|
||||
padding:3px;
|
||||
}
|
||||
|
||||
.font-library-modal__tabpanel-layout{
|
||||
margin-top:32px;
|
||||
}
|
||||
.font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__footer{
|
||||
background-color:#fff;
|
||||
border-top:1px solid #ddd;
|
||||
@ -4072,6 +4081,9 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
|
||||
padding:16px;
|
||||
width:100%;
|
||||
}
|
||||
.font-library-modal__font-card:hover{
|
||||
background-color:#f0f0f0;
|
||||
}
|
||||
.font-library-modal__font-card .font-library-modal__font-card__name{
|
||||
font-weight:700;
|
||||
}
|
||||
@ -4079,12 +4091,6 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
|
||||
color:#757575;
|
||||
}
|
||||
|
||||
.font-library-modal__library-font-variant{
|
||||
border:1px solid #e0e0e0;
|
||||
margin-top:-1px;
|
||||
padding:16px;
|
||||
}
|
||||
|
||||
.font-library-modal__font-variant_demo-image{
|
||||
display:block;
|
||||
height:24px;
|
||||
@ -4142,13 +4148,14 @@ button.font-library-modal__upload-area{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
margin-top:64px;
|
||||
}
|
||||
.font-library__google-fonts-confirm h3{
|
||||
font-size:1.4rem;
|
||||
}
|
||||
.font-library__google-fonts-confirm .components-card{
|
||||
max-width:350px;
|
||||
min-width:250px;
|
||||
max-width:400px;
|
||||
min-width:350px;
|
||||
width:50%;
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
49
wp-includes/css/dist/edit-site/style.css
vendored
49
wp-includes/css/dist/edit-site/style.css
vendored
@ -392,19 +392,12 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
.dataviews-filters__view-actions{
|
||||
padding:12px 32px 0;
|
||||
}
|
||||
.dataviews-filters__view-actions .components-search-control{
|
||||
flex-grow:1;
|
||||
}
|
||||
.dataviews-filters__view-actions .components-search-control .components-base-control__field{
|
||||
max-width:240px;
|
||||
}
|
||||
|
||||
.dataviews-filters__container{
|
||||
padding:0 32px;
|
||||
}
|
||||
|
||||
.dataviews-filters__view-actions.components-h-stack{
|
||||
align-items:center;
|
||||
padding-right:32px;
|
||||
}
|
||||
|
||||
.dataviews-filters-button{
|
||||
@ -423,6 +416,13 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
position:sticky;
|
||||
}
|
||||
|
||||
.dataviews-pagination__page-selection{
|
||||
color:#1e1e1e;
|
||||
font-size:11px;
|
||||
font-weight:500;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
|
||||
.dataviews-filters-options{
|
||||
margin:32px 0 16px;
|
||||
}
|
||||
@ -484,10 +484,10 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
.dataviews-view-table tr:hover{
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
.dataviews-view-table tr .components-checkbox-control__input{
|
||||
.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input{
|
||||
opacity:0;
|
||||
}
|
||||
.dataviews-view-table tr .components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input:indeterminate,.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:hover .components-checkbox-control__input{
|
||||
.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus,.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate,.dataviews-view-table tr:focus-within .components-checkbox-control__input,.dataviews-view-table tr:hover .components-checkbox-control__input{
|
||||
opacity:1;
|
||||
}
|
||||
.dataviews-view-table tr.is-selected{
|
||||
@ -545,6 +545,9 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
.dataviews-view-table .dataviews-view-table__actions-column{
|
||||
width:1%;
|
||||
}
|
||||
.dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input{
|
||||
opacity:1;
|
||||
}
|
||||
|
||||
.dataviews-view-grid__primary-field,.dataviews-view-list__primary-field,.dataviews-view-table__primary-field{
|
||||
color:#1e1e1e;
|
||||
@ -937,7 +940,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-reset{
|
||||
padding-inline-end:28px;
|
||||
}
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible,.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover{
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible,.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover,.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip[aria-expanded=true]{
|
||||
background:#e0e0e0;
|
||||
color:#1e1e1e;
|
||||
}
|
||||
@ -945,8 +948,8 @@ body.is-fullscreen-mode .interface-interface-skeleton{
|
||||
background:rgba(var(--wp-admin-theme-color--rgb), .04);
|
||||
color:var(--wp-admin-theme-color);
|
||||
}
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover{
|
||||
background:rgba(var(--wp-admin-theme-color--rgb), .08);
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover,.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values[aria-expanded=true]{
|
||||
background:rgba(var(--wp-admin-theme-color--rgb), .12);
|
||||
}
|
||||
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible{
|
||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
||||
@ -4050,7 +4053,13 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
|
||||
font-weight:500;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.font-library-modal .components-navigator-screen{
|
||||
padding:3px;
|
||||
}
|
||||
|
||||
.font-library-modal__tabpanel-layout{
|
||||
margin-top:32px;
|
||||
}
|
||||
.font-library-modal__tabpanel-layout .font-library-modal__tabpanel-layout__footer{
|
||||
background-color:#fff;
|
||||
border-top:1px solid #ddd;
|
||||
@ -4072,6 +4081,9 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
|
||||
padding:16px;
|
||||
width:100%;
|
||||
}
|
||||
.font-library-modal__font-card:hover{
|
||||
background-color:#f0f0f0;
|
||||
}
|
||||
.font-library-modal__font-card .font-library-modal__font-card__name{
|
||||
font-weight:700;
|
||||
}
|
||||
@ -4079,12 +4091,6 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
|
||||
color:#757575;
|
||||
}
|
||||
|
||||
.font-library-modal__library-font-variant{
|
||||
border:1px solid #e0e0e0;
|
||||
margin-top:-1px;
|
||||
padding:16px;
|
||||
}
|
||||
|
||||
.font-library-modal__font-variant_demo-image{
|
||||
display:block;
|
||||
height:24px;
|
||||
@ -4142,13 +4148,14 @@ button.font-library-modal__upload-area{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
margin-top:64px;
|
||||
}
|
||||
.font-library__google-fonts-confirm h3{
|
||||
font-size:1.4rem;
|
||||
}
|
||||
.font-library__google-fonts-confirm .components-card{
|
||||
max-width:350px;
|
||||
min-width:250px;
|
||||
max-width:400px;
|
||||
min-width:350px;
|
||||
width:50%;
|
||||
}
|
||||
|
||||
|
2
wp-includes/css/dist/edit-site/style.min.css
vendored
2
wp-includes/css/dist/edit-site/style.min.css
vendored
File diff suppressed because one or more lines are too long
290
wp-includes/js/dist/block-editor.js
vendored
290
wp-includes/js/dist/block-editor.js
vendored
@ -8681,7 +8681,6 @@ __webpack_require__.d(private_actions_namespaceObject, {
|
||||
ensureDefaultBlock: () => (ensureDefaultBlock),
|
||||
hideBlockInterface: () => (hideBlockInterface),
|
||||
privateRemoveBlocks: () => (privateRemoveBlocks),
|
||||
registerBlockBindingsSource: () => (registerBlockBindingsSource),
|
||||
setBlockRemovalRules: () => (setBlockRemovalRules),
|
||||
setLastFocus: () => (setLastFocus),
|
||||
setOpenedBlockSettingsMenu: () => (setOpenedBlockSettingsMenu),
|
||||
@ -8697,9 +8696,7 @@ __webpack_require__.d(private_actions_namespaceObject, {
|
||||
var private_selectors_namespaceObject = {};
|
||||
__webpack_require__.r(private_selectors_namespaceObject);
|
||||
__webpack_require__.d(private_selectors_namespaceObject, {
|
||||
getAllBlockBindingsSources: () => (getAllBlockBindingsSources),
|
||||
getAllPatterns: () => (getAllPatterns),
|
||||
getBlockBindingsSource: () => (getBlockBindingsSource),
|
||||
getBlockRemovalRules: () => (getBlockRemovalRules),
|
||||
getBlockSettings: () => (getBlockSettings),
|
||||
getBlockWithoutAttributes: () => (getBlockWithoutAttributes),
|
||||
@ -8808,6 +8805,7 @@ __webpack_require__.d(global_styles_namespaceObject, {
|
||||
useGlobalStylesOutputWithConfig: () => (useGlobalStylesOutputWithConfig),
|
||||
useGlobalStylesReset: () => (useGlobalStylesReset),
|
||||
useHasBorderPanel: () => (useHasBorderPanel),
|
||||
useHasBorderPanelControls: () => (useHasBorderPanelControls),
|
||||
useHasColorPanel: () => (useHasColorPanel),
|
||||
useHasDimensionsPanel: () => (useHasDimensionsPanel),
|
||||
useHasFiltersPanel: () => (useHasFiltersPanel),
|
||||
@ -8837,6 +8835,7 @@ const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
|
||||
const mayDisplayControlsKey = Symbol('mayDisplayControls');
|
||||
const mayDisplayParentControlsKey = Symbol('mayDisplayParentControls');
|
||||
const blockEditingModeKey = Symbol('blockEditingMode');
|
||||
const blockBindingsKey = Symbol('blockBindings');
|
||||
const DEFAULT_BLOCK_EDIT_CONTEXT = {
|
||||
name: '',
|
||||
isSelected: false
|
||||
@ -10952,20 +10951,6 @@ function lastFocus(state = false, action) {
|
||||
}
|
||||
return state;
|
||||
}
|
||||
function blockBindingsSources(state = {}, action) {
|
||||
if (action.type === 'REGISTER_BLOCK_BINDINGS_SOURCE') {
|
||||
var _action$lockAttribute;
|
||||
return {
|
||||
...state,
|
||||
[action.sourceName]: {
|
||||
label: action.sourceLabel,
|
||||
useSource: action.useSource,
|
||||
lockAttributesEditing: (_action$lockAttribute = action.lockAttributesEditing) !== null && _action$lockAttribute !== void 0 ? _action$lockAttribute : true
|
||||
}
|
||||
};
|
||||
}
|
||||
return state;
|
||||
}
|
||||
const combinedReducers = (0,external_wp_data_namespaceObject.combineReducers)({
|
||||
blocks,
|
||||
isDragging,
|
||||
@ -10996,8 +10981,7 @@ const combinedReducers = (0,external_wp_data_namespaceObject.combineReducers)({
|
||||
removalPromptData,
|
||||
blockRemovalRules,
|
||||
openedBlockSettingsMenu,
|
||||
registeredInserterMediaCategories,
|
||||
blockBindingsSources
|
||||
registeredInserterMediaCategories
|
||||
});
|
||||
function withAutomaticChangeReset(reducer) {
|
||||
return (state, action) => {
|
||||
@ -14331,15 +14315,6 @@ function stopEditingAsBlocks(clientId) {
|
||||
dispatch.__unstableSetTemporarilyEditingAsBlocks();
|
||||
};
|
||||
}
|
||||
function registerBlockBindingsSource(source) {
|
||||
return {
|
||||
type: 'REGISTER_BLOCK_BINDINGS_SOURCE',
|
||||
sourceName: source.name,
|
||||
sourceLabel: source.label,
|
||||
useSource: source.useSource,
|
||||
lockAttributesEditing: source.lockAttributesEditing
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an action object used in signalling that the user has begun to drag.
|
||||
@ -14926,12 +14901,6 @@ const getAllPatterns = (0,external_wp_data_namespaceObject.createRegistrySelecto
|
||||
function getLastFocus(state) {
|
||||
return state.lastFocus;
|
||||
}
|
||||
function getAllBlockBindingsSources(state) {
|
||||
return state.blockBindingsSources;
|
||||
}
|
||||
function getBlockBindingsSource(state, sourceName) {
|
||||
return state.blockBindingsSources[sourceName];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the user is dragging anything, or false otherwise. It is possible for a
|
||||
@ -23227,6 +23196,7 @@ function useRemoteUrlData(url) {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@ -23239,6 +23209,8 @@ function LinkPreview({
|
||||
hasUnlinkControl = false,
|
||||
onRemove
|
||||
}) {
|
||||
const showIconLabels = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_preferences_namespaceObject.store).get('core', 'showIconLabels'), []);
|
||||
|
||||
// Avoid fetching if rich previews are not desired.
|
||||
const showRichPreviews = hasRichPreviews ? value?.url : null;
|
||||
const {
|
||||
@ -23325,7 +23297,7 @@ function LinkPreview({
|
||||
// Translators: %s is a placeholder for the link URL and an optional colon, (if a Link URL is present).
|
||||
(0,external_wp_i18n_namespaceObject.__)('Copy link%s'),
|
||||
// Ends up looking like "Copy link: https://example.com".
|
||||
isEmptyURL ? '' : ': ' + value.url),
|
||||
isEmptyURL || showIconLabels ? '' : ': ' + value.url),
|
||||
ref: ref,
|
||||
disabled: isEmptyURL,
|
||||
size: "compact"
|
||||
@ -25143,19 +25115,31 @@ const shadow = (0,external_React_.createElement)(external_wp_primitives_namespac
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Shared reference to an empty array for cases where it is important to avoid
|
||||
* returning a new array reference on every invocation.
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
const shadow_panel_components_EMPTY_ARRAY = [];
|
||||
function ShadowPopoverContainer({
|
||||
shadow,
|
||||
onShadowChange,
|
||||
settings
|
||||
}) {
|
||||
const defaultShadows = settings?.shadow?.presets?.default || [];
|
||||
const themeShadows = settings?.shadow?.presets?.theme || [];
|
||||
const defaultPresetsEnabled = settings?.shadow?.defaultPresets;
|
||||
const shadows = [...(defaultPresetsEnabled ? defaultShadows : []), ...themeShadows];
|
||||
const shadows = useShadowPresets(settings);
|
||||
return (0,external_React_.createElement)("div", {
|
||||
className: "block-editor-global-styles__shadow-popover-container"
|
||||
}, (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalVStack, {
|
||||
@ -25166,18 +25150,28 @@ function ShadowPopoverContainer({
|
||||
presets: shadows,
|
||||
activeShadow: shadow,
|
||||
onSelect: onShadowChange
|
||||
})));
|
||||
}), (0,external_React_.createElement)("div", {
|
||||
className: "block-editor-global-styles__clear-shadow"
|
||||
}, (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
|
||||
variant: "tertiary",
|
||||
onClick: () => onShadowChange(undefined)
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Clear')))));
|
||||
}
|
||||
function ShadowPresets({
|
||||
presets,
|
||||
activeShadow,
|
||||
onSelect
|
||||
}) {
|
||||
return !presets ? null : (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalGrid, {
|
||||
columns: 6,
|
||||
gap: 0,
|
||||
align: "center",
|
||||
justify: "center"
|
||||
const {
|
||||
CompositeV2: Composite,
|
||||
useCompositeStoreV2: useCompositeStore
|
||||
} = unlock(external_wp_components_namespaceObject.privateApis);
|
||||
const compositeStore = useCompositeStore();
|
||||
return !presets ? null : (0,external_React_.createElement)(Composite, {
|
||||
store: compositeStore,
|
||||
role: "listbox",
|
||||
className: "block-editor-global-styles__shadow__list",
|
||||
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Drop shadows')
|
||||
}, presets.map(({
|
||||
name,
|
||||
slug,
|
||||
@ -25186,20 +25180,32 @@ function ShadowPresets({
|
||||
key: slug,
|
||||
label: name,
|
||||
isActive: shadow === activeShadow,
|
||||
type: slug === 'unset' ? 'unset' : 'preset',
|
||||
onSelect: () => onSelect(shadow === activeShadow ? undefined : shadow),
|
||||
shadow: shadow
|
||||
})));
|
||||
}
|
||||
function ShadowIndicator({
|
||||
type,
|
||||
label,
|
||||
isActive,
|
||||
onSelect,
|
||||
shadow
|
||||
}) {
|
||||
return (0,external_React_.createElement)("div", {
|
||||
className: "block-editor-global-styles__shadow-indicator-wrapper"
|
||||
}, (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
|
||||
className: "block-editor-global-styles__shadow-indicator",
|
||||
const {
|
||||
CompositeItemV2: CompositeItem
|
||||
} = unlock(external_wp_components_namespaceObject.privateApis);
|
||||
return (0,external_React_.createElement)(CompositeItem, {
|
||||
role: "option",
|
||||
"aria-label": label,
|
||||
"aria-selected": isActive,
|
||||
className: classnames_default()('block-editor-global-styles__shadow__item', {
|
||||
'is-active': isActive
|
||||
}),
|
||||
render: (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
|
||||
className: classnames_default()('block-editor-global-styles__shadow-indicator', {
|
||||
unset: type === 'unset'
|
||||
}),
|
||||
onClick: onSelect,
|
||||
label: label,
|
||||
style: {
|
||||
@ -25208,7 +25214,8 @@ function ShadowIndicator({
|
||||
showTooltip: true
|
||||
}, isActive && (0,external_React_.createElement)(build_module_icon, {
|
||||
icon: library_check
|
||||
})));
|
||||
}))
|
||||
});
|
||||
}
|
||||
function ShadowPopover({
|
||||
shadow,
|
||||
@ -25256,6 +25263,29 @@ function renderShadowToggle() {
|
||||
}), (0,external_React_.createElement)(external_wp_components_namespaceObject.FlexItem, null, (0,external_wp_i18n_namespaceObject.__)('Drop shadow'))));
|
||||
};
|
||||
}
|
||||
function useShadowPresets(settings) {
|
||||
return (0,external_wp_element_namespaceObject.useMemo)(() => {
|
||||
var _settings$shadow$pres;
|
||||
if (!settings?.shadow) {
|
||||
return shadow_panel_components_EMPTY_ARRAY;
|
||||
}
|
||||
const defaultPresetsEnabled = settings?.shadow?.defaultPresets;
|
||||
const {
|
||||
default: defaultShadows,
|
||||
theme: themeShadows
|
||||
} = (_settings$shadow$pres = settings?.shadow?.presets) !== null && _settings$shadow$pres !== void 0 ? _settings$shadow$pres : {};
|
||||
const unsetShadow = {
|
||||
name: (0,external_wp_i18n_namespaceObject.__)('Unset'),
|
||||
slug: 'unset',
|
||||
shadow: 'none'
|
||||
};
|
||||
const shadowPresets = [...(defaultPresetsEnabled && defaultShadows || shadow_panel_components_EMPTY_ARRAY), ...(themeShadows || shadow_panel_components_EMPTY_ARRAY)];
|
||||
if (shadowPresets.length) {
|
||||
shadowPresets.unshift(unsetShadow);
|
||||
}
|
||||
return shadowPresets;
|
||||
}, [settings]);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/global-styles/border-panel.js
|
||||
|
||||
@ -25276,13 +25306,20 @@ function renderShadowToggle() {
|
||||
|
||||
|
||||
|
||||
function useHasShadowControl(settings) {
|
||||
return !!settings?.shadow;
|
||||
}
|
||||
function useHasBorderPanel(settings) {
|
||||
const controls = [useHasBorderColorControl(settings), useHasBorderRadiusControl(settings), useHasBorderStyleControl(settings), useHasBorderWidthControl(settings), useHasShadowControl(settings)];
|
||||
const controls = Object.values(useHasBorderPanelControls(settings));
|
||||
return controls.some(Boolean);
|
||||
}
|
||||
function useHasBorderPanelControls(settings) {
|
||||
const controls = {
|
||||
hasBorderColor: useHasBorderColorControl(settings),
|
||||
hasBorderRadius: useHasBorderRadiusControl(settings),
|
||||
hasBorderStyle: useHasBorderStyleControl(settings),
|
||||
hasBorderWidth: useHasBorderWidthControl(settings),
|
||||
hasShadow: useHasShadowControl(settings)
|
||||
};
|
||||
return controls;
|
||||
}
|
||||
function useHasBorderColorControl(settings) {
|
||||
return settings?.border?.color;
|
||||
}
|
||||
@ -25295,6 +25332,10 @@ function useHasBorderStyleControl(settings) {
|
||||
function useHasBorderWidthControl(settings) {
|
||||
return settings?.border?.width;
|
||||
}
|
||||
function useHasShadowControl(settings) {
|
||||
const shadows = useShadowPresets(settings);
|
||||
return !!settings?.shadow && shadows.length > 0;
|
||||
}
|
||||
function BorderToolsPanel({
|
||||
resetAllFilter,
|
||||
onChange,
|
||||
@ -25441,10 +25482,11 @@ function BorderPanel({
|
||||
};
|
||||
}, []);
|
||||
const showBorderByDefault = defaultControls?.color || defaultControls?.width;
|
||||
const label = getBorderPanelLabel({
|
||||
const hasBorderControl = showBorderColor || showBorderStyle || showBorderWidth || showBorderRadius;
|
||||
const label = useBorderPanelLabel({
|
||||
blockName: name,
|
||||
hasShadowControl,
|
||||
hasBorderControl: showBorderColor || showBorderStyle || showBorderWidth || showBorderRadius
|
||||
hasBorderControl
|
||||
});
|
||||
return (0,external_React_.createElement)(Wrapper, {
|
||||
resetAllFilter: resetAllFilter,
|
||||
@ -25487,9 +25529,9 @@ function BorderPanel({
|
||||
onDeselect: resetShadow,
|
||||
isShownByDefault: defaultControls.shadow,
|
||||
panelId: panelId
|
||||
}, (0,external_React_.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
|
||||
}, hasBorderControl ? (0,external_React_.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
|
||||
as: "legend"
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Shadow')), (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Shadow')) : null, (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalItemGroup, {
|
||||
isBordered: true,
|
||||
isSeparated: true
|
||||
}, (0,external_React_.createElement)(ShadowPopover, {
|
||||
@ -25700,16 +25742,18 @@ function hasBorderSupport(blockName, feature = 'any') {
|
||||
* @return {boolean} Whether there is support.
|
||||
*/
|
||||
function hasShadowSupport(blockName) {
|
||||
return (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockName, SHADOW_SUPPORT_KEY);
|
||||
return hasBlockSupport(blockName, SHADOW_SUPPORT_KEY);
|
||||
}
|
||||
function getBorderPanelLabel({
|
||||
function useBorderPanelLabel({
|
||||
blockName,
|
||||
hasBorderControl,
|
||||
hasShadowControl
|
||||
} = {}) {
|
||||
const settings = useBlockSettings(blockName);
|
||||
const controls = useHasBorderPanelControls(settings);
|
||||
if (!hasBorderControl && !hasShadowControl && blockName) {
|
||||
hasBorderControl = hasBorderSupport(blockName);
|
||||
hasShadowControl = hasShadowSupport(blockName);
|
||||
hasBorderControl = controls?.hasBorderColor || controls?.hasBorderStyle || controls?.hasBorderWidth || controls?.hasBorderRadius;
|
||||
hasShadowControl = controls?.hasShadow;
|
||||
}
|
||||
if (hasBorderControl && hasShadowControl) {
|
||||
return (0,external_wp_i18n_namespaceObject.__)('Border & Shadow');
|
||||
@ -33912,19 +33956,19 @@ function BlockHooksControlPure({
|
||||
innerBlocksLength
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getBlock,
|
||||
getBlocks,
|
||||
getBlockIndex,
|
||||
getBlockRootClientId
|
||||
} = select(store);
|
||||
return {
|
||||
blockIndex: getBlockIndex(clientId),
|
||||
innerBlocksLength: getBlock(clientId)?.innerBlocks?.length,
|
||||
innerBlocksLength: getBlocks(clientId)?.length,
|
||||
rootClientId: getBlockRootClientId(clientId)
|
||||
};
|
||||
}, [clientId]);
|
||||
const hookedBlockClientIds = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getBlock,
|
||||
getBlocks,
|
||||
getGlobalBlockCount
|
||||
} = select(store);
|
||||
const _hookedBlockClientIds = hookedBlocksForCurrentBlock.reduce((clientIds, block) => {
|
||||
@ -33941,14 +33985,14 @@ function BlockHooksControlPure({
|
||||
// Any of the current block's siblings (with the right block type) qualifies
|
||||
// as a hooked block (inserted `before` or `after` the current one), as the block
|
||||
// might've been automatically inserted and then moved around a bit by the user.
|
||||
candidates = getBlock(rootClientId)?.innerBlocks;
|
||||
candidates = getBlocks(rootClientId);
|
||||
break;
|
||||
case 'first_child':
|
||||
case 'last_child':
|
||||
// Any of the current block's child blocks (with the right block type) qualifies
|
||||
// as a hooked first or last child block, as the block might've been automatically
|
||||
// inserted and then moved around a bit by the user.
|
||||
candidates = getBlock(clientId).innerBlocks;
|
||||
candidates = getBlocks(clientId);
|
||||
break;
|
||||
}
|
||||
const hookedBlock = candidates?.find(candidate => candidate.name === block.name);
|
||||
@ -34010,7 +34054,9 @@ function BlockHooksControlPure({
|
||||
className: "block-editor-hooks__block-hooks",
|
||||
title: (0,external_wp_i18n_namespaceObject.__)('Plugins'),
|
||||
initialOpen: true
|
||||
}, Object.keys(groupedHookedBlocks).map(vendor => {
|
||||
}, (0,external_React_.createElement)("p", {
|
||||
className: "block-editor-hooks__block-hooks-helptext"
|
||||
}, (0,external_wp_i18n_namespaceObject.__)('Manage the inclusion of blocks added automatically by plugins.')), Object.keys(groupedHookedBlocks).map(vendor => {
|
||||
return (0,external_React_.createElement)(external_wp_element_namespaceObject.Fragment, {
|
||||
key: vendor
|
||||
}, (0,external_React_.createElement)("h3", null, vendor), groupedHookedBlocks[vendor].map(block => {
|
||||
@ -34159,16 +34205,14 @@ const createEditFunctionWithBindingsAttribute = () => (0,external_wp_compose_nam
|
||||
clientId,
|
||||
name: blockName
|
||||
} = useBlockEditContext();
|
||||
const {
|
||||
getBlockBindingsSource
|
||||
} = unlock((0,external_wp_data_namespaceObject.useSelect)(store));
|
||||
const blockBindingsSources = unlock((0,external_wp_data_namespaceObject.useSelect)(external_wp_blocks_namespaceObject.store)).getAllBlockBindingsSources();
|
||||
const {
|
||||
getBlockAttributes
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(store);
|
||||
const updatedAttributes = getBlockAttributes(clientId);
|
||||
if (updatedAttributes?.metadata?.bindings) {
|
||||
Object.entries(updatedAttributes.metadata.bindings).forEach(([attributeName, settings]) => {
|
||||
const source = getBlockBindingsSource(settings.source);
|
||||
const source = blockBindingsSources[settings.source];
|
||||
if (source && source.useSource) {
|
||||
// Second argument (`updateMetaValue`) will be used to update the value in the future.
|
||||
const {
|
||||
@ -36096,8 +36140,12 @@ function BlockEdit({
|
||||
__unstableLayoutClassNames
|
||||
} = props;
|
||||
const {
|
||||
layout = null
|
||||
layout = null,
|
||||
metadata = {}
|
||||
} = attributes;
|
||||
const {
|
||||
bindings
|
||||
} = metadata;
|
||||
const layoutSupport = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(name, 'layout', false) || (0,external_wp_blocks_namespaceObject.hasBlockSupport)(name, '__experimentalLayout', false);
|
||||
return (0,external_React_.createElement)(Provider
|
||||
// It is important to return the same object if props haven't
|
||||
@ -36114,8 +36162,9 @@ function BlockEdit({
|
||||
// usage outside of the package (this context is exposed).
|
||||
[mayDisplayControlsKey]: mayDisplayControls,
|
||||
[mayDisplayParentControlsKey]: mayDisplayParentControls,
|
||||
[blockEditingModeKey]: blockEditingMode
|
||||
}), [name, isSelected, clientId, layoutSupport, layout, __unstableLayoutClassNames, mayDisplayControls, mayDisplayParentControls, blockEditingMode])
|
||||
[blockEditingModeKey]: blockEditingMode,
|
||||
[blockBindingsKey]: bindings
|
||||
}), [name, isSelected, clientId, layoutSupport, layout, __unstableLayoutClassNames, mayDisplayControls, mayDisplayParentControls, blockEditingMode, bindings])
|
||||
}, (0,external_React_.createElement)(block_edit_edit, {
|
||||
...props
|
||||
}));
|
||||
@ -40893,6 +40942,8 @@ function BlockPreview({
|
||||
const originalSettings = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getSettings(), []);
|
||||
const settings = (0,external_wp_element_namespaceObject.useMemo)(() => ({
|
||||
...originalSettings,
|
||||
focusMode: false,
|
||||
// Disable "Spotlight mode".
|
||||
__unstableIsPreviewMode: true
|
||||
}), [originalSettings]);
|
||||
const renderedBlocks = (0,external_wp_element_namespaceObject.useMemo)(() => Array.isArray(blocks) ? blocks : [blocks], [blocks]);
|
||||
@ -40947,6 +40998,8 @@ function useBlockPreview({
|
||||
...originalSettings,
|
||||
styles: undefined,
|
||||
// Clear styles included by the parent settings, as they are already output by the parent's EditorStyles.
|
||||
focusMode: false,
|
||||
// Disable "Spotlight mode".
|
||||
__unstableIsPreviewMode: true
|
||||
}), [originalSettings]);
|
||||
const disabledRef = (0,external_wp_compose_namespaceObject.useDisabled)();
|
||||
@ -58881,6 +58934,9 @@ function useEnter(props) {
|
||||
propsRef.current = props;
|
||||
return (0,external_wp_compose_namespaceObject.useRefEffect)(element => {
|
||||
function onKeyDown(event) {
|
||||
if (event.target.contentEditable !== 'true') {
|
||||
return;
|
||||
}
|
||||
if (event.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
@ -59499,6 +59555,7 @@ function withDeprecations(Component) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const keyboardShortcutContext = (0,external_wp_element_namespaceObject.createContext)();
|
||||
@ -59560,15 +59617,18 @@ function RichTextWrapper({
|
||||
__unstableDisableFormats: disableFormats,
|
||||
disableLineBreaks,
|
||||
__unstableAllowPrefixTransformations,
|
||||
disableEditing,
|
||||
...props
|
||||
}, forwardedRef) {
|
||||
props = removeNativeProps(props);
|
||||
const anchorRef = (0,external_wp_element_namespaceObject.useRef)();
|
||||
const context = useBlockEditContext();
|
||||
const {
|
||||
clientId,
|
||||
isSelected: isBlockSelected,
|
||||
name: blockName
|
||||
} = useBlockEditContext();
|
||||
} = context;
|
||||
const blockBindings = context[blockBindingsKey];
|
||||
const selector = select => {
|
||||
// Avoid subscribing to the block editor store if the block is not
|
||||
// selected.
|
||||
@ -59579,26 +59639,35 @@ function RichTextWrapper({
|
||||
}
|
||||
const {
|
||||
getSelectionStart,
|
||||
getSelectionEnd,
|
||||
getBlockAttributes
|
||||
getSelectionEnd
|
||||
} = select(store);
|
||||
const selectionStart = getSelectionStart();
|
||||
const selectionEnd = getSelectionEnd();
|
||||
const blockBindings = getBlockAttributes(clientId)?.metadata?.bindings;
|
||||
let isSelected;
|
||||
if (originalIsSelected === undefined) {
|
||||
isSelected = selectionStart.clientId === clientId && selectionEnd.clientId === clientId && selectionStart.attributeKey === identifier;
|
||||
} else if (originalIsSelected) {
|
||||
isSelected = selectionStart.clientId === clientId;
|
||||
}
|
||||
|
||||
return {
|
||||
selectionStart: isSelected ? selectionStart.offset : undefined,
|
||||
selectionEnd: isSelected ? selectionEnd.offset : undefined,
|
||||
isSelected
|
||||
};
|
||||
};
|
||||
const {
|
||||
selectionStart,
|
||||
selectionEnd,
|
||||
isSelected
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(selector, [clientId, identifier, originalIsSelected, isBlockSelected]);
|
||||
const disableBoundBlocks = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
// Disable Rich Text editing if block bindings specify that.
|
||||
let shouldDisableEditing = false;
|
||||
let _disableBoundBlocks = false;
|
||||
if (blockBindings && blockName in BLOCK_BINDINGS_ALLOWED_BLOCKS) {
|
||||
const blockTypeAttributes = (0,external_wp_blocks_namespaceObject.getBlockType)(blockName).attributes;
|
||||
const {
|
||||
getBlockBindingsSource
|
||||
} = unlock(select(store));
|
||||
} = unlock(select(external_wp_blocks_namespaceObject.store));
|
||||
for (const [attribute, args] of Object.entries(blockBindings)) {
|
||||
if (blockTypeAttributes?.[attribute]?.source !== 'rich-text') {
|
||||
break;
|
||||
@ -59607,24 +59676,14 @@ function RichTextWrapper({
|
||||
// If the source is not defined, or if its value of `lockAttributesEditing` is `true`, disable it.
|
||||
const blockBindingsSource = getBlockBindingsSource(args.source);
|
||||
if (!blockBindingsSource || blockBindingsSource.lockAttributesEditing) {
|
||||
shouldDisableEditing = true;
|
||||
_disableBoundBlocks = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
selectionStart: isSelected ? selectionStart.offset : undefined,
|
||||
selectionEnd: isSelected ? selectionEnd.offset : undefined,
|
||||
isSelected,
|
||||
shouldDisableEditing
|
||||
};
|
||||
};
|
||||
const {
|
||||
selectionStart,
|
||||
selectionEnd,
|
||||
isSelected,
|
||||
shouldDisableEditing
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(selector, [clientId, identifier, originalIsSelected, isBlockSelected]);
|
||||
return _disableBoundBlocks;
|
||||
}, [blockBindings, blockName]);
|
||||
const shouldDisableEditing = disableEditing || disableBoundBlocks;
|
||||
const {
|
||||
getSelectionStart,
|
||||
getSelectionEnd,
|
||||
@ -59820,16 +59879,32 @@ function RichTextWrapper({
|
||||
"data-wp-block-attribute-key": identifier
|
||||
}));
|
||||
}
|
||||
const ForwardedRichTextContainer = withDeprecations((0,external_wp_element_namespaceObject.forwardRef)(RichTextWrapper));
|
||||
ForwardedRichTextContainer.Content = Content;
|
||||
ForwardedRichTextContainer.isEmpty = value => {
|
||||
|
||||
// This is the private API for the RichText component.
|
||||
// It allows access to all props, not just the public ones.
|
||||
const PrivateRichText = withDeprecations((0,external_wp_element_namespaceObject.forwardRef)(RichTextWrapper));
|
||||
PrivateRichText.Content = Content;
|
||||
PrivateRichText.isEmpty = value => {
|
||||
return !value || value.length === 0;
|
||||
};
|
||||
|
||||
// This is the public API for the RichText component.
|
||||
// We wrap the PrivateRichText component to hide some props from the public API.
|
||||
/**
|
||||
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md
|
||||
*/
|
||||
/* harmony default export */ const rich_text = (ForwardedRichTextContainer);
|
||||
const PublicForwardedRichTextContainer = (0,external_wp_element_namespaceObject.forwardRef)((props, ref) => {
|
||||
return (0,external_React_.createElement)(PrivateRichText, {
|
||||
ref: ref,
|
||||
...props,
|
||||
disableEditing: false
|
||||
});
|
||||
});
|
||||
PublicForwardedRichTextContainer.Content = Content;
|
||||
PublicForwardedRichTextContainer.isEmpty = value => {
|
||||
return !value || value.length === 0;
|
||||
};
|
||||
/* harmony default export */ const rich_text = (PublicForwardedRichTextContainer);
|
||||
|
||||
|
||||
|
||||
@ -61047,7 +61122,7 @@ const StylesTab = ({
|
||||
clientId,
|
||||
hasBlockStyles
|
||||
}) => {
|
||||
const borderPanelLabel = getBorderPanelLabel({
|
||||
const borderPanelLabel = useBorderPanelLabel({
|
||||
blockName
|
||||
});
|
||||
return (0,external_React_.createElement)(external_React_.Fragment, null, hasBlockStyles && (0,external_React_.createElement)("div", null, (0,external_React_.createElement)(external_wp_components_namespaceObject.PanelBody, {
|
||||
@ -61460,6 +61535,9 @@ const BlockInspector = ({
|
||||
// and its parent, and only enable it if the parent is controlling
|
||||
// its children blocks.
|
||||
const blockInspectorAnimationSettings = useBlockInspectorAnimationSettings(blockType, selectedBlockClientId);
|
||||
const borderPanelLabel = useBorderPanelLabel({
|
||||
blockName: selectedBlockName
|
||||
});
|
||||
if (count > 1) {
|
||||
return (0,external_React_.createElement)("div", {
|
||||
className: "block-editor-block-inspector"
|
||||
@ -61477,9 +61555,7 @@ const BlockInspector = ({
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Dimensions')
|
||||
}), (0,external_React_.createElement)(inspector_controls.Slot, {
|
||||
group: "border",
|
||||
label: getBorderPanelLabel({
|
||||
blockName: selectedBlockName
|
||||
})
|
||||
label: borderPanelLabel
|
||||
}), (0,external_React_.createElement)(inspector_controls.Slot, {
|
||||
group: "styles"
|
||||
})));
|
||||
@ -61557,7 +61633,7 @@ const BlockInspectorSingleBlock = ({
|
||||
return blockStyles && blockStyles.length > 0;
|
||||
}, [blockName]);
|
||||
const blockInformation = useBlockDisplayInformation(clientId);
|
||||
const borderPanelLabel = getBorderPanelLabel({
|
||||
const borderPanelLabel = useBorderPanelLabel({
|
||||
blockName
|
||||
});
|
||||
return (0,external_React_.createElement)("div", {
|
||||
@ -67119,6 +67195,7 @@ function ResolutionTool({
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@ -67150,7 +67227,8 @@ lock(privateApis, {
|
||||
useReusableBlocksRenameHint: useReusableBlocksRenameHint,
|
||||
usesContextKey: usesContextKey,
|
||||
useFlashEditableBlocks: useFlashEditableBlocks,
|
||||
selectBlockPatternsKey: selectBlockPatternsKey
|
||||
selectBlockPatternsKey: selectBlockPatternsKey,
|
||||
PrivateRichText: PrivateRichText
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/index.js
|
||||
|
4
wp-includes/js/dist/block-editor.min.js
vendored
4
wp-includes/js/dist/block-editor.min.js
vendored
File diff suppressed because one or more lines are too long
195
wp-includes/js/dist/block-library.js
vendored
195
wp-includes/js/dist/block-library.js
vendored
@ -3200,6 +3200,14 @@ const caption = (0,external_React_namespaceObject.createElement)(external_wp_pri
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
const {
|
||||
PrivateRichText: RichText
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
function Caption({
|
||||
key = 'caption',
|
||||
attributes,
|
||||
@ -3209,12 +3217,13 @@ function Caption({
|
||||
placeholder = (0,external_wp_i18n_namespaceObject.__)('Add caption'),
|
||||
label = (0,external_wp_i18n_namespaceObject.__)('Caption text'),
|
||||
showToolbarButton = true,
|
||||
className
|
||||
className,
|
||||
disableEditing
|
||||
}) {
|
||||
const caption = attributes[key];
|
||||
const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption);
|
||||
const isCaptionEmpty = external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
|
||||
const isPrevCaptionEmpty = external_wp_blockEditor_namespaceObject.RichText.isEmpty(prevCaption);
|
||||
const isCaptionEmpty = RichText.isEmpty(caption);
|
||||
const isPrevCaptionEmpty = RichText.isEmpty(prevCaption);
|
||||
const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!isCaptionEmpty);
|
||||
|
||||
// We need to show the caption when changes come from
|
||||
@ -3250,7 +3259,7 @@ function Caption({
|
||||
icon: library_caption,
|
||||
isPressed: showCaption,
|
||||
label: showCaption ? (0,external_wp_i18n_namespaceObject.__)('Remove caption') : (0,external_wp_i18n_namespaceObject.__)('Add caption')
|
||||
})), showCaption && (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || isSelected) && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
|
||||
})), showCaption && (!RichText.isEmpty(caption) || isSelected) && (0,external_React_namespaceObject.createElement)(RichText, {
|
||||
identifier: key,
|
||||
tagName: "figcaption",
|
||||
className: classnames_default()(className, (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption')),
|
||||
@ -3262,7 +3271,8 @@ function Caption({
|
||||
caption: value
|
||||
}),
|
||||
inlineToolbar: true,
|
||||
__unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
|
||||
__unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
|
||||
disableEditing: disableEditing
|
||||
}));
|
||||
}
|
||||
|
||||
@ -5077,7 +5087,7 @@ function ButtonEdit(props) {
|
||||
if (!isSelected) {
|
||||
return {};
|
||||
}
|
||||
const blockBindingsSource = unlock(select(external_wp_blockEditor_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source);
|
||||
const blockBindingsSource = unlock(select(external_wp_blocks_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source);
|
||||
return {
|
||||
lockUrlControls: !!metadata?.bindings?.url && (!blockBindingsSource || blockBindingsSource?.lockAttributesEditing)
|
||||
};
|
||||
@ -5563,12 +5573,69 @@ const buttons_deprecated_deprecated = [{
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","richText"]
|
||||
const external_wp_richText_namespaceObject = window["wp"]["richText"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/get-transformed-metadata.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Transform the metadata attribute with only the values and bindings specified by each transform.
|
||||
* Returns `undefined` if the input metadata is falsy.
|
||||
*
|
||||
* @param {Object} metadata Original metadata attribute from the block that is being transformed.
|
||||
* @param {Object} newBlockName Name of the final block after the transformation.
|
||||
* @param {Function} bindingsCallback Optional callback to transform the `bindings` property object.
|
||||
* @return {Object|undefined} New metadata object only with the relevant properties.
|
||||
*/
|
||||
function getTransformedMetadata(metadata, newBlockName, bindingsCallback) {
|
||||
if (!metadata) {
|
||||
return;
|
||||
}
|
||||
const {
|
||||
supports
|
||||
} = (0,external_wp_blocks_namespaceObject.getBlockType)(newBlockName);
|
||||
// Fixed until an opt-in mechanism is implemented.
|
||||
const BLOCK_BINDINGS_SUPPORTED_BLOCKS = ['core/paragraph', 'core/heading', 'core/image', 'core/button'];
|
||||
// The metadata properties that should be preserved after the transform.
|
||||
const transformSupportedProps = [];
|
||||
// If it support bindings, and there is a transform bindings callback, add the `id` and `bindings` properties.
|
||||
if (BLOCK_BINDINGS_SUPPORTED_BLOCKS.includes(newBlockName) && bindingsCallback) {
|
||||
transformSupportedProps.push('id', 'bindings');
|
||||
}
|
||||
// If it support block naming (true by default), add the `name` property.
|
||||
if (supports.renaming !== false) {
|
||||
transformSupportedProps.push('name');
|
||||
}
|
||||
|
||||
// Return early if no supported properties.
|
||||
if (!transformSupportedProps.length) {
|
||||
return;
|
||||
}
|
||||
const newMetadata = Object.entries(metadata).reduce((obj, [prop, value]) => {
|
||||
// If prop is not supported, don't add it to the new metadata object.
|
||||
if (!transformSupportedProps.includes(prop)) {
|
||||
return obj;
|
||||
}
|
||||
obj[prop] = prop === 'bindings' ? bindingsCallback(value) : value;
|
||||
return obj;
|
||||
}, {});
|
||||
|
||||
// Return undefined if object is empty.
|
||||
return Object.keys(newMetadata).length ? newMetadata : undefined;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/transforms.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
const transforms_transforms = {
|
||||
from: [{
|
||||
type: 'block',
|
||||
@ -5590,7 +5657,11 @@ const transforms_transforms = {
|
||||
(0,external_wp_blocks_namespaceObject.createBlock)('core/buttons', {},
|
||||
// Loop the selected buttons.
|
||||
buttons.map(attributes => {
|
||||
const element = (0,external_wp_richText_namespaceObject.__unstableCreateElement)(document, attributes.content);
|
||||
const {
|
||||
content,
|
||||
metadata
|
||||
} = attributes;
|
||||
const element = (0,external_wp_richText_namespaceObject.__unstableCreateElement)(document, content);
|
||||
// Remove any HTML tags.
|
||||
const text = element.innerText || '';
|
||||
// Get first url.
|
||||
@ -5599,7 +5670,12 @@ const transforms_transforms = {
|
||||
// Create singular button in the buttons block.
|
||||
return (0,external_wp_blocks_namespaceObject.createBlock)('core/button', {
|
||||
text,
|
||||
url
|
||||
url,
|
||||
metadata: getTransformedMetadata(metadata, 'core/button', ({
|
||||
content: contentBinding
|
||||
}) => ({
|
||||
text: contentBinding
|
||||
}))
|
||||
});
|
||||
})),
|
||||
isMatch: paragraphs => {
|
||||
@ -6860,6 +6936,11 @@ function code_save_save({
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
const code_transforms_transforms = {
|
||||
from: [{
|
||||
type: 'enter',
|
||||
@ -6869,15 +6950,18 @@ const code_transforms_transforms = {
|
||||
type: 'block',
|
||||
blocks: ['core/paragraph'],
|
||||
transform: ({
|
||||
content
|
||||
content,
|
||||
metadata
|
||||
}) => (0,external_wp_blocks_namespaceObject.createBlock)('core/code', {
|
||||
content
|
||||
content,
|
||||
metadata: getTransformedMetadata(metadata, 'core/code')
|
||||
})
|
||||
}, {
|
||||
type: 'block',
|
||||
blocks: ['core/html'],
|
||||
transform: ({
|
||||
content: text
|
||||
content: text,
|
||||
metadata
|
||||
}) => {
|
||||
return (0,external_wp_blocks_namespaceObject.createBlock)('core/code', {
|
||||
// The HTML is plain text (with plain line breaks), so
|
||||
@ -6886,7 +6970,8 @@ const code_transforms_transforms = {
|
||||
value: (0,external_wp_richText_namespaceObject.create)({
|
||||
text
|
||||
})
|
||||
})
|
||||
}),
|
||||
metadata: getTransformedMetadata(metadata, 'core/code')
|
||||
});
|
||||
}
|
||||
}, {
|
||||
@ -6908,9 +6993,11 @@ const code_transforms_transforms = {
|
||||
type: 'block',
|
||||
blocks: ['core/paragraph'],
|
||||
transform: ({
|
||||
content
|
||||
content,
|
||||
metadata
|
||||
}) => (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {
|
||||
content
|
||||
content,
|
||||
metadata: getTransformedMetadata(metadata, 'core/paragraph')
|
||||
})
|
||||
}]
|
||||
};
|
||||
@ -13151,7 +13238,7 @@ function CoverInspectorControls({
|
||||
isShownByDefault: true,
|
||||
panelId: clientId
|
||||
}, (0,external_React_namespaceObject.createElement)(CoverHeightInput, {
|
||||
value: minHeight,
|
||||
value: attributes?.style?.dimensions?.aspectRatio ? '' : minHeight,
|
||||
unit: minHeightUnit,
|
||||
onChange: newMinHeight => setAttributes({
|
||||
minHeight: newMinHeight,
|
||||
@ -13215,6 +13302,10 @@ function CoverInspectorControls({
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
const {
|
||||
cleanEmptyObject: block_controls_cleanEmptyObject
|
||||
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
|
||||
function CoverBlockControls({
|
||||
attributes,
|
||||
setAttributes,
|
||||
@ -13235,7 +13326,7 @@ function CoverBlockControls({
|
||||
} = currentSettings;
|
||||
const [prevMinHeightValue, setPrevMinHeightValue] = (0,external_wp_element_namespaceObject.useState)(minHeight);
|
||||
const [prevMinHeightUnit, setPrevMinHeightUnit] = (0,external_wp_element_namespaceObject.useState)(minHeightUnit);
|
||||
const isMinFullHeight = minHeightUnit === 'vh' && minHeight === 100;
|
||||
const isMinFullHeight = minHeightUnit === 'vh' && minHeight === 100 && !attributes?.style?.dimensions?.aspectRatio;
|
||||
const toggleMinFullHeight = () => {
|
||||
if (isMinFullHeight) {
|
||||
// If there aren't previous values, take the default ones.
|
||||
@ -13255,10 +13346,17 @@ function CoverBlockControls({
|
||||
setPrevMinHeightValue(minHeight);
|
||||
setPrevMinHeightUnit(minHeightUnit);
|
||||
|
||||
// Set full height.
|
||||
// Set full height, and clear any aspect ratio value.
|
||||
return setAttributes({
|
||||
minHeight: 100,
|
||||
minHeightUnit: 'vh'
|
||||
minHeightUnit: 'vh',
|
||||
style: block_controls_cleanEmptyObject({
|
||||
...attributes?.style,
|
||||
dimensions: {
|
||||
...attributes?.style?.dimensions,
|
||||
aspectRatio: undefined // Reset aspect ratio when minHeight is set.
|
||||
}
|
||||
})
|
||||
});
|
||||
};
|
||||
return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
|
||||
@ -23827,6 +23925,7 @@ function getLevelFromHeadingNodeName(nodeName) {
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
const heading_transforms_transforms = {
|
||||
from: [{
|
||||
type: 'block',
|
||||
@ -23835,11 +23934,17 @@ const heading_transforms_transforms = {
|
||||
transform: attributes => attributes.map(({
|
||||
content,
|
||||
anchor,
|
||||
align: textAlign
|
||||
align: textAlign,
|
||||
metadata
|
||||
}) => (0,external_wp_blocks_namespaceObject.createBlock)('core/heading', {
|
||||
content,
|
||||
anchor,
|
||||
textAlign
|
||||
textAlign,
|
||||
metadata: getTransformedMetadata(metadata, 'core/heading', ({
|
||||
content: contentBinding
|
||||
}) => ({
|
||||
content: contentBinding
|
||||
}))
|
||||
}))
|
||||
}, {
|
||||
type: 'raw',
|
||||
@ -23894,10 +23999,16 @@ const heading_transforms_transforms = {
|
||||
blocks: ['core/paragraph'],
|
||||
transform: attributes => attributes.map(({
|
||||
content,
|
||||
textAlign: align
|
||||
textAlign: align,
|
||||
metadata
|
||||
}) => (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {
|
||||
content,
|
||||
align
|
||||
align,
|
||||
metadata: getTransformedMetadata(metadata, 'core/paragraph', ({
|
||||
content: contentBinding
|
||||
}) => ({
|
||||
content: contentBinding
|
||||
}))
|
||||
}))
|
||||
}]
|
||||
};
|
||||
@ -25970,13 +26081,16 @@ function image_Image({
|
||||
lockUrlControls = false,
|
||||
lockHrefControls = false,
|
||||
lockAltControls = false,
|
||||
lockTitleControls = false
|
||||
lockTitleControls = false,
|
||||
lockCaption = false
|
||||
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
if (!isSingleSelected) {
|
||||
return {};
|
||||
}
|
||||
const {
|
||||
getBlockBindingsSource,
|
||||
getBlockBindingsSource
|
||||
} = unlock(select(external_wp_blocks_namespaceObject.store));
|
||||
const {
|
||||
getBlockParentsByBlockName
|
||||
} = unlock(select(external_wp_blockEditor_namespaceObject.store));
|
||||
const {
|
||||
@ -25994,6 +26108,10 @@ function image_Image({
|
||||
// Disable editing the link of the URL if the image is inside a pattern instance.
|
||||
// This is a temporary solution until we support overriding the link on the frontend.
|
||||
hasParentPattern,
|
||||
lockCaption:
|
||||
// Disable editing the caption if the image is inside a pattern instance.
|
||||
// This is a temporary solution until we support overriding the caption on the frontend.
|
||||
hasParentPattern,
|
||||
lockAltControls: !!altBinding && (!altBindingSource || altBindingSource?.lockAttributesEditing),
|
||||
lockTitleControls: !!titleBinding && (!titleBindingSource || titleBindingSource?.lockAttributesEditing)
|
||||
};
|
||||
@ -26301,7 +26419,8 @@ function image_Image({
|
||||
isSelected: isSingleSelected,
|
||||
insertBlocksAfter: insertBlocksAfter,
|
||||
label: (0,external_wp_i18n_namespaceObject.__)('Image caption text'),
|
||||
showToolbarButton: isSingleSelected && hasNonContentControls
|
||||
showToolbarButton: isSingleSelected && hasNonContentControls,
|
||||
disableEditing: lockCaption
|
||||
}));
|
||||
}
|
||||
|
||||
@ -26324,6 +26443,7 @@ function image_Image({
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@ -26609,7 +26729,7 @@ function ImageEdit({
|
||||
if (!isSingleSelected) {
|
||||
return {};
|
||||
}
|
||||
const blockBindingsSource = unlock(select(external_wp_blockEditor_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source);
|
||||
const blockBindingsSource = unlock(select(external_wp_blocks_namespaceObject.store)).getBlockBindingsSource(metadata?.bindings?.url?.source);
|
||||
return {
|
||||
lockUrlControls: !!metadata?.bindings?.url && (!blockBindingsSource || blockBindingsSource?.lockAttributesEditing)
|
||||
};
|
||||
@ -41735,6 +41855,7 @@ function PostFeaturedImageEdit({
|
||||
}
|
||||
});
|
||||
const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
|
||||
const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
|
||||
const placeholder = content => {
|
||||
return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Placeholder, {
|
||||
className: classnames_default()('block-editor-media-placeholder', borderProps.className),
|
||||
@ -41759,7 +41880,11 @@ function PostFeaturedImageEdit({
|
||||
type: 'snackbar'
|
||||
});
|
||||
};
|
||||
const controls = (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(dimension_controls, {
|
||||
const controls = blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(overlay, {
|
||||
attributes: attributes,
|
||||
setAttributes: setAttributes,
|
||||
clientId: clientId
|
||||
}), (0,external_React_namespaceObject.createElement)(dimension_controls, {
|
||||
clientId: clientId,
|
||||
attributes: attributes,
|
||||
setAttributes: setAttributes,
|
||||
@ -41808,11 +41933,7 @@ function PostFeaturedImageEdit({
|
||||
href: postPermalink,
|
||||
target: linkTarget,
|
||||
...disabledClickProps
|
||||
}, placeholder()) : placeholder(), (0,external_React_namespaceObject.createElement)(overlay, {
|
||||
attributes: attributes,
|
||||
setAttributes: setAttributes,
|
||||
clientId: clientId
|
||||
})));
|
||||
}, placeholder()) : placeholder()));
|
||||
}
|
||||
const label = (0,external_wp_i18n_namespaceObject.__)('Add a featured image');
|
||||
const imageStyles = {
|
||||
@ -41886,11 +42007,7 @@ function PostFeaturedImageEdit({
|
||||
href: postPermalink,
|
||||
target: linkTarget,
|
||||
...disabledClickProps
|
||||
}, image) : image, (0,external_React_namespaceObject.createElement)(overlay, {
|
||||
attributes: attributes,
|
||||
setAttributes: setAttributes,
|
||||
clientId: clientId
|
||||
})));
|
||||
}, image) : image));
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js
|
||||
@ -43226,7 +43343,7 @@ function PostTitleEdit({
|
||||
}
|
||||
}));
|
||||
}
|
||||
return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
|
||||
return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, blockEditingMode === 'default' && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
|
||||
group: "block"
|
||||
}, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, {
|
||||
value: level,
|
||||
@ -43263,7 +43380,7 @@ function PostTitleEdit({
|
||||
onChange: newRel => setAttributes({
|
||||
rel: newRel
|
||||
})
|
||||
})))), titleElement);
|
||||
}))))), titleElement);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/post-title/deprecated.js
|
||||
|
4
wp-includes/js/dist/block-library.min.js
vendored
4
wp-includes/js/dist/block-library.min.js
vendored
File diff suppressed because one or more lines are too long
60
wp-includes/js/dist/blocks.js
vendored
60
wp-includes/js/dist/blocks.js
vendored
@ -5931,6 +5931,8 @@ __webpack_require__.d(selectors_namespaceObject, {
|
||||
var private_selectors_namespaceObject = {};
|
||||
__webpack_require__.r(private_selectors_namespaceObject);
|
||||
__webpack_require__.d(private_selectors_namespaceObject, {
|
||||
getAllBlockBindingsSources: () => (getAllBlockBindingsSources),
|
||||
getBlockBindingsSource: () => (getBlockBindingsSource),
|
||||
getBootstrappedBlockType: () => (getBootstrappedBlockType),
|
||||
getSupportedStyles: () => (getSupportedStyles),
|
||||
getUnprocessedBlockTypes: () => (getUnprocessedBlockTypes)
|
||||
@ -5963,7 +5965,8 @@ var private_actions_namespaceObject = {};
|
||||
__webpack_require__.r(private_actions_namespaceObject);
|
||||
__webpack_require__.d(private_actions_namespaceObject, {
|
||||
addBootstrappedBlockType: () => (addBootstrappedBlockType),
|
||||
addUnprocessedBlockType: () => (addUnprocessedBlockType)
|
||||
addUnprocessedBlockType: () => (addUnprocessedBlockType),
|
||||
registerBlockBindingsSource: () => (registerBlockBindingsSource)
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","data"]
|
||||
@ -8084,6 +8087,20 @@ function collections(state = {}, action) {
|
||||
}
|
||||
return state;
|
||||
}
|
||||
function blockBindingsSources(state = {}, action) {
|
||||
if (action.type === 'REGISTER_BLOCK_BINDINGS_SOURCE') {
|
||||
var _action$lockAttribute;
|
||||
return {
|
||||
...state,
|
||||
[action.sourceName]: {
|
||||
label: action.sourceLabel,
|
||||
useSource: action.useSource,
|
||||
lockAttributesEditing: (_action$lockAttribute = action.lockAttributesEditing) !== null && _action$lockAttribute !== void 0 ? _action$lockAttribute : true
|
||||
}
|
||||
};
|
||||
}
|
||||
return state;
|
||||
}
|
||||
/* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
|
||||
bootstrappedBlockTypes,
|
||||
unprocessedBlockTypes,
|
||||
@ -8095,7 +8112,8 @@ function collections(state = {}, action) {
|
||||
unregisteredFallbackBlockName,
|
||||
groupingBlockName,
|
||||
categories,
|
||||
collections
|
||||
collections,
|
||||
blockBindingsSources
|
||||
}));
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/rememo/rememo.js
|
||||
@ -9303,6 +9321,29 @@ function getUnprocessedBlockTypes(state) {
|
||||
return state.unprocessedBlockTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the block bindings sources registered.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
*
|
||||
* @return {Object} All the registered sources and their properties.
|
||||
*/
|
||||
function getAllBlockBindingsSources(state) {
|
||||
return state.blockBindingsSources;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a specific block bindings source.
|
||||
*
|
||||
* @param {Object} state Data state.
|
||||
* @param {string} sourceName Name of the source to get.
|
||||
*
|
||||
* @return {Object} The specific block binding source and its properties.
|
||||
*/
|
||||
function getBlockBindingsSource(state, sourceName) {
|
||||
return state.blockBindingsSources[sourceName];
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","deprecated"]
|
||||
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
|
||||
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
|
||||
@ -9831,6 +9872,21 @@ function addUnprocessedBlockType(name, blockType) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Register new block bindings source.
|
||||
*
|
||||
* @param {string} source Name of the source to register.
|
||||
*/
|
||||
function registerBlockBindingsSource(source) {
|
||||
return {
|
||||
type: 'REGISTER_BLOCK_BINDINGS_SOURCE',
|
||||
sourceName: source.name,
|
||||
sourceLabel: source.label,
|
||||
useSource: source.useSource,
|
||||
lockAttributesEditing: source.lockAttributesEditing
|
||||
};
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/constants.js
|
||||
const STORE_NAME = 'core/blocks';
|
||||
|
||||
|
4
wp-includes/js/dist/blocks.min.js
vendored
4
wp-includes/js/dist/blocks.min.js
vendored
File diff suppressed because one or more lines are too long
19
wp-includes/js/dist/core-data.js
vendored
19
wp-includes/js/dist/core-data.js
vendored
@ -6519,12 +6519,27 @@ const resolvers_getUserPatternCategories = () => async ({
|
||||
});
|
||||
};
|
||||
const resolvers_getNavigationFallbackId = () => async ({
|
||||
dispatch
|
||||
dispatch,
|
||||
select
|
||||
}) => {
|
||||
const fallback = await external_wp_apiFetch_default()({
|
||||
path: (0,external_wp_url_namespaceObject.addQueryArgs)('/wp-block-editor/v1/navigation-fallback')
|
||||
path: (0,external_wp_url_namespaceObject.addQueryArgs)('/wp-block-editor/v1/navigation-fallback', {
|
||||
_embed: true
|
||||
})
|
||||
});
|
||||
const record = fallback?._embedded?.self;
|
||||
dispatch.receiveNavigationFallbackId(fallback?.id);
|
||||
if (record) {
|
||||
// If the fallback is already in the store, don't invalidate navigation queries.
|
||||
// Otherwise, invalidate the cache for the scenario where there were no Navigation
|
||||
// posts in the state and the fallback created one.
|
||||
const existingFallbackEntityRecord = select.getEntityRecord('postType', 'wp_navigation', fallback.id);
|
||||
const invalidateNavigationQueries = !existingFallbackEntityRecord;
|
||||
dispatch.receiveEntityRecords('postType', 'wp_navigation', record, undefined, invalidateNavigationQueries);
|
||||
|
||||
// Resolve to avoid further network requests.
|
||||
dispatch.finishResolution('getEntityRecord', ['postType', 'wp_navigation', fallback.id]);
|
||||
}
|
||||
};
|
||||
const resolvers_getDefaultTemplateId = query => async ({
|
||||
dispatch
|
||||
|
2
wp-includes/js/dist/core-data.min.js
vendored
2
wp-includes/js/dist/core-data.min.js
vendored
File diff suppressed because one or more lines are too long
13
wp-includes/js/dist/edit-post.js
vendored
13
wp-includes/js/dist/edit-post.js
vendored
@ -3470,7 +3470,7 @@ const isEditingTemplate = (0,external_wp_data_namespaceObject.createRegistrySele
|
||||
since: '6.5',
|
||||
alternative: `select( 'core/editor' ).getRenderingMode`
|
||||
});
|
||||
return select(external_wp_editor_namespaceObject.store).getCurrentPostType() !== 'post-only';
|
||||
return select(external_wp_editor_namespaceObject.store).getCurrentPostType() === 'wp_template';
|
||||
});
|
||||
|
||||
/**
|
||||
@ -4845,7 +4845,7 @@ function Header({
|
||||
const blockToolbarRef = (0,external_wp_element_namespaceObject.useRef)();
|
||||
const {
|
||||
isTextEditor,
|
||||
hasBlockSelection,
|
||||
blockSelectionStart,
|
||||
hasActiveMetaboxes,
|
||||
hasFixedToolbar,
|
||||
isPublishSidebarOpened,
|
||||
@ -4860,7 +4860,7 @@ function Header({
|
||||
} = select(store_store);
|
||||
return {
|
||||
isTextEditor: getEditorMode() === 'text',
|
||||
hasBlockSelection: !!select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart(),
|
||||
blockSelectionStart: select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart(),
|
||||
hasActiveMetaboxes: select(store_store).hasMetaBoxes(),
|
||||
hasHistory: !!select(external_wp_editor_namespaceObject.store).getEditorSettings().onNavigateToPreviousEntityRecord,
|
||||
isPublishSidebarOpened: select(store_store).isPublishSidebarOpened(),
|
||||
@ -4869,12 +4869,13 @@ function Header({
|
||||
};
|
||||
}, []);
|
||||
const [isBlockToolsCollapsed, setIsBlockToolsCollapsed] = (0,external_wp_element_namespaceObject.useState)(true);
|
||||
const hasBlockSelection = !!blockSelectionStart;
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
// If we have a new block selection, show the block tools
|
||||
if (hasBlockSelection) {
|
||||
if (blockSelectionStart) {
|
||||
setIsBlockToolsCollapsed(false);
|
||||
}
|
||||
}, [hasBlockSelection]);
|
||||
}, [blockSelectionStart]);
|
||||
return (0,external_React_namespaceObject.createElement)("div", {
|
||||
className: "edit-post-header"
|
||||
}, (0,external_React_namespaceObject.createElement)(main_dashboard_button.Slot, null, (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableMotion.div, {
|
||||
@ -4897,7 +4898,7 @@ function Header({
|
||||
disableBlockTools: isTextEditor
|
||||
}), hasFixedToolbar && isLargeViewport && (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("div", {
|
||||
className: classnames_default()('selected-block-tools-wrapper', {
|
||||
'is-collapsed': isBlockToolsCollapsed
|
||||
'is-collapsed': isBlockToolsCollapsed || !hasBlockSelection
|
||||
})
|
||||
}, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockToolbar, {
|
||||
hideDragHandle: true
|
||||
|
2
wp-includes/js/dist/edit-post.min.js
vendored
2
wp-includes/js/dist/edit-post.min.js
vendored
File diff suppressed because one or more lines are too long
1446
wp-includes/js/dist/edit-site.js
vendored
1446
wp-includes/js/dist/edit-site.js
vendored
File diff suppressed because it is too large
Load Diff
6
wp-includes/js/dist/edit-site.min.js
vendored
6
wp-includes/js/dist/edit-site.min.js
vendored
File diff suppressed because one or more lines are too long
66
wp-includes/js/dist/editor.js
vendored
66
wp-includes/js/dist/editor.js
vendored
@ -1688,8 +1688,8 @@ __webpack_require__.d(private_selectors_namespaceObject, {
|
||||
getListViewToggleRef: () => (getListViewToggleRef)
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","blockEditor"]
|
||||
const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
|
||||
;// CONCATENATED MODULE: external ["wp","blocks"]
|
||||
const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
|
||||
;// CONCATENATED MODULE: external ["wp","data"]
|
||||
const external_wp_data_namespaceObject = window["wp"]["data"];
|
||||
;// CONCATENATED MODULE: external ["wp","privateApis"]
|
||||
@ -1720,6 +1720,8 @@ const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","coreData"]
|
||||
const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
|
||||
;// CONCATENATED MODULE: external ["wp","blockEditor"]
|
||||
const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/defaults.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
@ -2425,8 +2427,6 @@ function isShallowEqual(a, b, fromIndex) {
|
||||
return /** @type {S & EnhancedSelector} */ (callSelector);
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","blocks"]
|
||||
const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
|
||||
;// CONCATENATED MODULE: external ["wp","date"]
|
||||
const external_wp_date_namespaceObject = window["wp"]["date"];
|
||||
;// CONCATENATED MODULE: external ["wp","url"]
|
||||
@ -5326,7 +5326,7 @@ unlock(store_store).registerPrivateSelectors(private_selectors_namespaceObject);
|
||||
|
||||
const {
|
||||
registerBlockBindingsSource
|
||||
} = unlock((0,external_wp_data_namespaceObject.dispatch)(external_wp_blockEditor_namespaceObject.store));
|
||||
} = unlock((0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store));
|
||||
registerBlockBindingsSource(pattern_overrides);
|
||||
registerBlockBindingsSource(post_meta);
|
||||
|
||||
@ -14853,44 +14853,43 @@ function useBlockEditorSettings(settings, postType, postId) {
|
||||
}
|
||||
/* harmony default export */ const use_block_editor_settings = (useBlockEditorSettings);
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/constants.js
|
||||
const PAGE_CONTENT_BLOCK_TYPES = ['core/post-title', 'core/post-featured-image', 'core/post-content'];
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/disable-non-page-content-blocks.js
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
function DisableBlock({
|
||||
clientId
|
||||
}) {
|
||||
const isDescendentOfQueryLoop = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const PAGE_CONTENT_BLOCKS = ['core/post-title', 'core/post-featured-image', 'core/post-content'];
|
||||
function useDisableNonPageContentBlocks() {
|
||||
const contentIds = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
const {
|
||||
getBlockParentsByBlockName
|
||||
getBlocksByName,
|
||||
getBlockParents,
|
||||
getBlockName
|
||||
} = select(external_wp_blockEditor_namespaceObject.store);
|
||||
return getBlockParentsByBlockName(clientId, 'core/query').length !== 0;
|
||||
}, [clientId]);
|
||||
const mode = isDescendentOfQueryLoop ? undefined : 'contentOnly';
|
||||
return getBlocksByName(PAGE_CONTENT_BLOCKS).filter(clientId => getBlockParents(clientId).every(parentClientId => {
|
||||
const parentBlockName = getBlockName(parentClientId);
|
||||
return parentBlockName !== 'core/query' && !PAGE_CONTENT_BLOCKS.includes(parentBlockName);
|
||||
}));
|
||||
}, []);
|
||||
const {
|
||||
setBlockEditingMode,
|
||||
unsetBlockEditingMode
|
||||
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
|
||||
(0,external_wp_element_namespaceObject.useEffect)(() => {
|
||||
if (mode) {
|
||||
setBlockEditingMode(clientId, mode);
|
||||
return () => {
|
||||
unsetBlockEditingMode(clientId);
|
||||
};
|
||||
setBlockEditingMode('', 'disabled'); // Disable editing at the root level.
|
||||
|
||||
for (const contentId of contentIds) {
|
||||
setBlockEditingMode(contentId, 'contentOnly'); // Re-enable each content block.
|
||||
}
|
||||
}, [clientId, mode, setBlockEditingMode, unsetBlockEditingMode]);
|
||||
return () => {
|
||||
unsetBlockEditingMode('');
|
||||
for (const contentId of contentIds) {
|
||||
unsetBlockEditingMode(contentId);
|
||||
}
|
||||
};
|
||||
}, [contentIds, setBlockEditingMode, unsetBlockEditingMode]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -14898,16 +14897,7 @@ function DisableBlock({
|
||||
* page content to be edited.
|
||||
*/
|
||||
function DisableNonPageContentBlocks() {
|
||||
(0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)('disabled');
|
||||
const clientIds = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
||||
return select(external_wp_blockEditor_namespaceObject.store).getBlocksByName(PAGE_CONTENT_BLOCK_TYPES);
|
||||
}, []);
|
||||
return clientIds.map(clientId => {
|
||||
return (0,external_React_.createElement)(DisableBlock, {
|
||||
key: clientId,
|
||||
clientId: clientId
|
||||
});
|
||||
});
|
||||
useDisableNonPageContentBlocks();
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/provider/navigation-block-editing-mode.js
|
||||
|
2
wp-includes/js/dist/editor.min.js
vendored
2
wp-includes/js/dist/editor.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '7488eb9111dc68de3781');
|
||||
<?php return array('dependencies' => array(), 'version' => '6a8e0c21145dcb04c36d');
|
||||
|
14
wp-includes/js/dist/interactivity-router.js
vendored
14
wp-includes/js/dist/interactivity-router.js
vendored
@ -45,7 +45,10 @@ const {
|
||||
getRegionRootFragment,
|
||||
initialVdom,
|
||||
toVdom,
|
||||
render
|
||||
render,
|
||||
parseInitialData,
|
||||
populateInitialData,
|
||||
batch
|
||||
} = (0,interactivity_namespaceObject.privateApis)('I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.');
|
||||
|
||||
// The cache of visited and prefetched pages.
|
||||
@ -87,14 +90,18 @@ const regionsToVdom = (dom, {
|
||||
regions[id] = vdom?.has(region) ? vdom.get(region) : toVdom(region);
|
||||
});
|
||||
const title = dom.querySelector('title')?.innerText;
|
||||
const initialData = parseInitialData(dom);
|
||||
return {
|
||||
regions,
|
||||
title
|
||||
title,
|
||||
initialData
|
||||
};
|
||||
};
|
||||
|
||||
// Render all interactive regions contained in the given page.
|
||||
const renderRegions = page => {
|
||||
batch(() => {
|
||||
populateInitialData(page.initialData);
|
||||
const attrName = `data-${directivePrefix}-router-region`;
|
||||
document.querySelectorAll(`[${attrName}]`).forEach(region => {
|
||||
const id = region.getAttribute(attrName);
|
||||
@ -104,6 +111,7 @@ const renderRegions = page => {
|
||||
if (page.title) {
|
||||
document.title = page.title;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
@ -216,7 +224,7 @@ const {
|
||||
// (e.g., by clicking another link in the meantime). If so, bail
|
||||
// out, and let the newer execution to update the HTML.
|
||||
if (navigatingTo !== href) return;
|
||||
if (page) {
|
||||
if (page && !page.initialData?.config?.['core/router']?.clientNavigationDisabled) {
|
||||
renderRegions(page);
|
||||
window.history[options.replace ? 'replaceState' : 'pushState']({}, '', href);
|
||||
|
||||
|
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '8e877bd0bd46f3d68841');
|
||||
<?php return array('dependencies' => array(), 'version' => '05a45a314b4247af8c60');
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! This file is auto-generated */
|
||||
import*as e from"@wordpress/interactivity";var t={d:(e,o)=>{for(var i in o)t.o(o,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},o={};t.d(o,{o:()=>p,w:()=>h});const i=(e=>{var o={};return t.d(o,e),o})({getConfig:()=>e.getConfig,privateApis:()=>e.privateApis,store:()=>e.store}),{directivePrefix:n,getRegionRootFragment:r,initialVdom:a,toVdom:s,render:c}=(0,i.privateApis)("I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."),d=new Map,l=e=>{const t=new URL(e,window.location);return t.pathname+t.search},g=(e,{vdom:t}={})=>{const o={},i=`data-${n}-router-region`;e.querySelectorAll(`[${i}]`).forEach((e=>{const n=e.getAttribute(i);o[n]=t?.has(e)?t.get(e):s(e)}));const r=e.querySelector("title")?.innerText;return{regions:o,title:r}},w=e=>{const t=`data-${n}-router-region`;document.querySelectorAll(`[${t}]`).forEach((o=>{const i=o.getAttribute(t),n=r(o);c(e.regions[i],n)})),e.title&&(document.title=e.title)},m=e=>(window.location.assign(e),new Promise((()=>{})));window.addEventListener("popstate",(async()=>{const e=l(window.location),t=d.has(e)&&await d.get(e);t?(w(t),h.url=window.location.href):window.location.reload()})),d.set(l(window.location),Promise.resolve(g(document,{vdom:a})));let u="";const{state:h,actions:p}=(0,i.store)("core/router",{state:{url:window.location.href,navigation:{hasStarted:!1,hasFinished:!1,texts:{}}},actions:{*navigate(e,t={}){const{clientNavigationDisabled:o}=(0,i.getConfig)();o&&(yield m(e));const n=l(e),{navigation:r}=h,{loadingAnimation:a=!0,screenReaderAnnouncement:s=!0,timeout:c=1e4}=t;u=e,p.prefetch(n,t);const g=new Promise((e=>setTimeout(e,c))),v=setTimeout((()=>{u===e&&(a&&(r.hasStarted=!0,r.hasFinished=!1),s&&(r.message=r.texts.loading))}),400),f=yield Promise.race([d.get(n),g]);clearTimeout(v),u===e&&(f?(w(f),window.history[t.replace?"replaceState":"pushState"]({},"",e),h.url=e,a&&(r.hasStarted=!1,r.hasFinished=!0),s&&(r.message=r.texts.loaded+(r.message===r.texts.loaded?" ":""))):yield m(e))},prefetch(e,t={}){const{clientNavigationDisabled:o}=(0,i.getConfig)();if(o)return;const n=l(e);!t.force&&d.has(n)||d.set(n,(async(e,{html:t})=>{try{if(!t){const o=await window.fetch(e);if(200!==o.status)return!1;t=await o.text()}const o=(new window.DOMParser).parseFromString(t,"text/html");return g(o)}catch(e){return!1}})(n,t))}}});var v=o.o,f=o.w;export{v as actions,f as state};
|
||||
import*as t from"@wordpress/interactivity";var e={d:(t,i)=>{for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},i={};e.d(i,{o:()=>y,w:()=>f});const o=(t=>{var i={};return e.d(i,t),i})({getConfig:()=>t.getConfig,privateApis:()=>t.privateApis,store:()=>t.store}),{directivePrefix:a,getRegionRootFragment:n,initialVdom:r,toVdom:s,render:c,parseInitialData:l,populateInitialData:d,batch:g}=(0,o.privateApis)("I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."),w=new Map,u=t=>{const e=new URL(t,window.location);return e.pathname+e.search},h=(t,{vdom:e}={})=>{const i={},o=`data-${a}-router-region`;t.querySelectorAll(`[${o}]`).forEach((t=>{const a=t.getAttribute(o);i[a]=e?.has(t)?e.get(t):s(t)}));const n=t.querySelector("title")?.innerText,r=l(t);return{regions:i,title:n,initialData:r}},m=t=>{g((()=>{d(t.initialData);const e=`data-${a}-router-region`;document.querySelectorAll(`[${e}]`).forEach((i=>{const o=i.getAttribute(e),a=n(i);c(t.regions[o],a)})),t.title&&(document.title=t.title)}))},p=t=>(window.location.assign(t),new Promise((()=>{})));window.addEventListener("popstate",(async()=>{const t=u(window.location),e=w.has(t)&&await w.get(t);e?(m(e),f.url=window.location.href):window.location.reload()})),w.set(u(window.location),Promise.resolve(h(document,{vdom:r})));let v="";const{state:f,actions:y}=(0,o.store)("core/router",{state:{url:window.location.href,navigation:{hasStarted:!1,hasFinished:!1,texts:{}}},actions:{*navigate(t,e={}){const{clientNavigationDisabled:i}=(0,o.getConfig)();i&&(yield p(t));const a=u(t),{navigation:n}=f,{loadingAnimation:r=!0,screenReaderAnnouncement:s=!0,timeout:c=1e4}=e;v=t,y.prefetch(a,e);const l=new Promise((t=>setTimeout(t,c))),d=setTimeout((()=>{v===t&&(r&&(n.hasStarted=!0,n.hasFinished=!1),s&&(n.message=n.texts.loading))}),400),g=yield Promise.race([w.get(a),l]);clearTimeout(d),v===t&&(g&&!g.initialData?.config?.["core/router"]?.clientNavigationDisabled?(m(g),window.history[e.replace?"replaceState":"pushState"]({},"",t),f.url=t,r&&(n.hasStarted=!1,n.hasFinished=!0),s&&(n.message=n.texts.loaded+(n.message===n.texts.loaded?" ":""))):yield p(t))},prefetch(t,e={}){const{clientNavigationDisabled:i}=(0,o.getConfig)();if(i)return;const a=u(t);!e.force&&w.has(a)||w.set(a,(async(t,{html:e})=>{try{if(!e){const i=await window.fetch(t);if(200!==i.status)return!1;e=await i.text()}const i=(new window.DOMParser).parseFromString(e,"text/html");return h(i)}catch(t){return!1}})(a,e))}}});var b=i.o,x=i.w;export{b as actions,x as state};
|
198
wp-includes/js/dist/interactivity.js
vendored
198
wp-includes/js/dist/interactivity.js
vendored
File diff suppressed because one or more lines are too long
2
wp-includes/js/dist/interactivity.min.js
vendored
2
wp-includes/js/dist/interactivity.min.js
vendored
File diff suppressed because one or more lines are too long
43
wp-includes/js/dist/patterns.js
vendored
43
wp-includes/js/dist/patterns.js
vendored
@ -86,13 +86,7 @@ const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
|
||||
const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
|
||||
;// CONCATENATED MODULE: external ["wp","blockEditor"]
|
||||
const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
|
||||
;// CONCATENATED MODULE: external ["wp","i18n"]
|
||||
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/constants.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
const PATTERN_TYPES = {
|
||||
theme: 'pattern',
|
||||
user: 'wp_block'
|
||||
@ -107,24 +101,10 @@ const PATTERN_SYNC_TYPES = {
|
||||
|
||||
// TODO: This should not be hardcoded. Maybe there should be a config and/or an UI.
|
||||
const PARTIAL_SYNCING_SUPPORTED_BLOCKS = {
|
||||
'core/paragraph': {
|
||||
content: (0,external_wp_i18n_namespaceObject.__)('Content')
|
||||
},
|
||||
'core/heading': {
|
||||
content: (0,external_wp_i18n_namespaceObject.__)('Content')
|
||||
},
|
||||
'core/button': {
|
||||
text: (0,external_wp_i18n_namespaceObject.__)('Text'),
|
||||
url: (0,external_wp_i18n_namespaceObject.__)('URL'),
|
||||
linkTarget: (0,external_wp_i18n_namespaceObject.__)('Link Target'),
|
||||
rel: (0,external_wp_i18n_namespaceObject.__)('Link Relationship')
|
||||
},
|
||||
'core/image': {
|
||||
id: (0,external_wp_i18n_namespaceObject.__)('Image ID'),
|
||||
url: (0,external_wp_i18n_namespaceObject.__)('URL'),
|
||||
title: (0,external_wp_i18n_namespaceObject.__)('Title'),
|
||||
alt: (0,external_wp_i18n_namespaceObject.__)('Alt Text')
|
||||
}
|
||||
'core/paragraph': ['content'],
|
||||
'core/heading': ['content'],
|
||||
'core/button': ['text', 'url', 'linkTarget', 'rel'],
|
||||
'core/image': ['id', 'url', 'title', 'alt']
|
||||
};
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/patterns/build-module/store/actions.js
|
||||
@ -305,6 +285,8 @@ unlock(store).registerPrivateSelectors(selectors_namespaceObject);
|
||||
const external_React_namespaceObject = window["React"];
|
||||
;// CONCATENATED MODULE: external ["wp","components"]
|
||||
const external_wp_components_namespaceObject = window["wp"]["components"];
|
||||
;// CONCATENATED MODULE: external ["wp","i18n"]
|
||||
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
|
||||
;// CONCATENATED MODULE: external ["wp","element"]
|
||||
const external_wp_element_namespaceObject = window["wp"]["element"];
|
||||
;// CONCATENATED MODULE: external ["wp","notices"]
|
||||
@ -1203,7 +1185,7 @@ function PartialSyncingControls({
|
||||
setAttributes
|
||||
}) {
|
||||
const syncedAttributes = PARTIAL_SYNCING_SUPPORTED_BLOCKS[name];
|
||||
const attributeSources = Object.keys(syncedAttributes).map(attributeName => attributes.metadata?.bindings?.[attributeName]?.source);
|
||||
const attributeSources = syncedAttributes.map(attributeName => attributes.metadata?.bindings?.[attributeName]?.source);
|
||||
const isConnectedToOtherSources = attributeSources.every(source => source && source !== 'core/pattern-overrides');
|
||||
|
||||
// Render nothing if all supported attributes are connected to other sources.
|
||||
@ -1215,7 +1197,7 @@ function PartialSyncingControls({
|
||||
...attributes?.metadata?.bindings
|
||||
};
|
||||
if (!isChecked) {
|
||||
for (const attributeName of Object.keys(syncedAttributes)) {
|
||||
for (const attributeName of syncedAttributes) {
|
||||
if (updatedBindings[attributeName]?.source === 'core/pattern-overrides') {
|
||||
delete updatedBindings[attributeName];
|
||||
}
|
||||
@ -1231,7 +1213,7 @@ function PartialSyncingControls({
|
||||
});
|
||||
return;
|
||||
}
|
||||
for (const attributeName of Object.keys(syncedAttributes)) {
|
||||
for (const attributeName of syncedAttributes) {
|
||||
if (!updatedBindings[attributeName]) {
|
||||
updatedBindings[attributeName] = {
|
||||
source: 'core/pattern-overrides'
|
||||
@ -1315,7 +1297,12 @@ function ResetOverridesControl(props) {
|
||||
const editedRecord = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('postType', 'wp_block', patternWithOverrides.attributes.ref);
|
||||
const blocks = (_editedRecord$blocks = editedRecord.blocks) !== null && _editedRecord$blocks !== void 0 ? _editedRecord$blocks : (0,external_wp_blocks_namespaceObject.parse)(editedRecord.content);
|
||||
const block = recursivelyFindBlockWithId(blocks, id);
|
||||
props.setAttributes(block.attributes);
|
||||
const newAttributes = Object.assign(
|
||||
// Reset every existing attribute to undefined.
|
||||
Object.fromEntries(Object.keys(props.attributes).map(key => [key, undefined])),
|
||||
// Then assign the original attributes.
|
||||
block.attributes);
|
||||
props.setAttributes(newAttributes);
|
||||
};
|
||||
return (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, {
|
||||
group: "other"
|
||||
|
2
wp-includes/js/dist/patterns.min.js
vendored
2
wp-includes/js/dist/patterns.min.js
vendored
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-beta2-57720';
|
||||
$wp_version = '6.5-beta2-57721';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user