Editor: update npm packages in trunk for 6.4.3.

Package Update includes fixes for:
- Image Block: Enable image block to be selected correctly when clicked.
- Reduce specificity of default Cover text color styles.
- Image Block: Fix deprecation when width/height attribute is number.
- Text selection: show CSS hack to Safari only.
- SlotFill: Allow contextual SlotFillProviders.

See: https://github.com/WordPress/wordpress-develop/pull/5696
See: bd6767b8a4
See: https://github.com/WordPress/gutenberg/pull/56043
See: https://github.com/WordPress/gutenberg/pull/56411
See: https://github.com/WordPress/gutenberg/pull/57063
See: https://github.com/WordPress/gutenberg/pull/57300
See: https://github.com/WordPress/gutenberg/pull/56779

Props mikachan, wildworks, alexstine, poena, isabel_brison, andrewserong, czapla, andraganescu, joen, ellatrix, youknowriad, ntsekouras.
Fixes #59943, #59943.


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


git-svn-id: http://core.svn.wordpress.org/trunk@56764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin 2024-01-09 20:17:30 +00:00
parent 178deab664
commit c4c8ae426d
21 changed files with 77 additions and 45 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -115,7 +115,7 @@
width:100%;
z-index:1;
}
.wp-block-cover h1:not(.has-text-color),.wp-block-cover h2:not(.has-text-color),.wp-block-cover h3:not(.has-text-color),.wp-block-cover h4:not(.has-text-color),.wp-block-cover h5:not(.has-text-color),.wp-block-cover h6:not(.has-text-color),.wp-block-cover p:not(.has-text-color),.wp-block-cover-image h1:not(.has-text-color),.wp-block-cover-image h2:not(.has-text-color),.wp-block-cover-image h3:not(.has-text-color),.wp-block-cover-image h4:not(.has-text-color),.wp-block-cover-image h5:not(.has-text-color),.wp-block-cover-image h6:not(.has-text-color),.wp-block-cover-image p:not(.has-text-color){
.wp-block-cover h1:where(:not(.has-text-color)),.wp-block-cover h2:where(:not(.has-text-color)),.wp-block-cover h3:where(:not(.has-text-color)),.wp-block-cover h4:where(:not(.has-text-color)),.wp-block-cover h5:where(:not(.has-text-color)),.wp-block-cover h6:where(:not(.has-text-color)),.wp-block-cover p:where(:not(.has-text-color)),.wp-block-cover-image h1:where(:not(.has-text-color)),.wp-block-cover-image h2:where(:not(.has-text-color)),.wp-block-cover-image h3:where(:not(.has-text-color)),.wp-block-cover-image h4:where(:not(.has-text-color)),.wp-block-cover-image h5:where(:not(.has-text-color)),.wp-block-cover-image h6:where(:not(.has-text-color)),.wp-block-cover-image p:where(:not(.has-text-color)){
color:inherit;
}
.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{

File diff suppressed because one or more lines are too long

View File

@ -115,7 +115,7 @@
width:100%;
z-index:1;
}
.wp-block-cover h1:not(.has-text-color),.wp-block-cover h2:not(.has-text-color),.wp-block-cover h3:not(.has-text-color),.wp-block-cover h4:not(.has-text-color),.wp-block-cover h5:not(.has-text-color),.wp-block-cover h6:not(.has-text-color),.wp-block-cover p:not(.has-text-color),.wp-block-cover-image h1:not(.has-text-color),.wp-block-cover-image h2:not(.has-text-color),.wp-block-cover-image h3:not(.has-text-color),.wp-block-cover-image h4:not(.has-text-color),.wp-block-cover-image h5:not(.has-text-color),.wp-block-cover-image h6:not(.has-text-color),.wp-block-cover-image p:not(.has-text-color){
.wp-block-cover h1:where(:not(.has-text-color)),.wp-block-cover h2:where(:not(.has-text-color)),.wp-block-cover h3:where(:not(.has-text-color)),.wp-block-cover h4:where(:not(.has-text-color)),.wp-block-cover h5:where(:not(.has-text-color)),.wp-block-cover h6:where(:not(.has-text-color)),.wp-block-cover p:where(:not(.has-text-color)),.wp-block-cover-image h1:where(:not(.has-text-color)),.wp-block-cover-image h2:where(:not(.has-text-color)),.wp-block-cover-image h3:where(:not(.has-text-color)),.wp-block-cover-image h4:where(:not(.has-text-color)),.wp-block-cover-image h5:where(:not(.has-text-color)),.wp-block-cover-image h6:where(:not(.has-text-color)),.wp-block-cover-image p:where(:not(.has-text-color)){
color:inherit;
}
.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{

File diff suppressed because one or more lines are too long

View File

@ -48,15 +48,12 @@
opacity:.4;
}
}
:root .block-editor-block-list__layout::selection,:root .has-multi-selection .block-editor-block-list__layout::selection,_::-webkit-full-page-media,_:future{
background-color:transparent;
}
.block-editor-block-list__layout{
position:relative;
}
.block-editor-block-list__layout::selection{
background:transparent;
}
.has-multi-selection .block-editor-block-list__layout::selection{
background:transparent;
}
.block-editor-block-list__layout:where(.block-editor-block-list__block.is-multi-selected:not(.is-partially-selected)){
border-radius:2px;
}

File diff suppressed because one or more lines are too long

View File

@ -48,15 +48,12 @@
opacity:.4;
}
}
:root .block-editor-block-list__layout::selection,:root .has-multi-selection .block-editor-block-list__layout::selection,_::-webkit-full-page-media,_:future{
background-color:transparent;
}
.block-editor-block-list__layout{
position:relative;
}
.block-editor-block-list__layout::selection{
background:transparent;
}
.has-multi-selection .block-editor-block-list__layout::selection{
background:transparent;
}
.block-editor-block-list__layout:where(.block-editor-block-list__block.is-multi-selected:not(.is-partially-selected)){
border-radius:2px;
}

File diff suppressed because one or more lines are too long

View File

@ -592,7 +592,7 @@
width:100%;
z-index:1;
}
.wp-block-cover h1:not(.has-text-color),.wp-block-cover h2:not(.has-text-color),.wp-block-cover h3:not(.has-text-color),.wp-block-cover h4:not(.has-text-color),.wp-block-cover h5:not(.has-text-color),.wp-block-cover h6:not(.has-text-color),.wp-block-cover p:not(.has-text-color),.wp-block-cover-image h1:not(.has-text-color),.wp-block-cover-image h2:not(.has-text-color),.wp-block-cover-image h3:not(.has-text-color),.wp-block-cover-image h4:not(.has-text-color),.wp-block-cover-image h5:not(.has-text-color),.wp-block-cover-image h6:not(.has-text-color),.wp-block-cover-image p:not(.has-text-color){
.wp-block-cover h1:where(:not(.has-text-color)),.wp-block-cover h2:where(:not(.has-text-color)),.wp-block-cover h3:where(:not(.has-text-color)),.wp-block-cover h4:where(:not(.has-text-color)),.wp-block-cover h5:where(:not(.has-text-color)),.wp-block-cover h6:where(:not(.has-text-color)),.wp-block-cover p:where(:not(.has-text-color)),.wp-block-cover-image h1:where(:not(.has-text-color)),.wp-block-cover-image h2:where(:not(.has-text-color)),.wp-block-cover-image h3:where(:not(.has-text-color)),.wp-block-cover-image h4:where(:not(.has-text-color)),.wp-block-cover-image h5:where(:not(.has-text-color)),.wp-block-cover-image h6:where(:not(.has-text-color)),.wp-block-cover-image p:where(:not(.has-text-color)){
color:inherit;
}
.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{

File diff suppressed because one or more lines are too long

View File

@ -592,7 +592,7 @@
width:100%;
z-index:1;
}
.wp-block-cover h1:not(.has-text-color),.wp-block-cover h2:not(.has-text-color),.wp-block-cover h3:not(.has-text-color),.wp-block-cover h4:not(.has-text-color),.wp-block-cover h5:not(.has-text-color),.wp-block-cover h6:not(.has-text-color),.wp-block-cover p:not(.has-text-color),.wp-block-cover-image h1:not(.has-text-color),.wp-block-cover-image h2:not(.has-text-color),.wp-block-cover-image h3:not(.has-text-color),.wp-block-cover-image h4:not(.has-text-color),.wp-block-cover-image h5:not(.has-text-color),.wp-block-cover-image h6:not(.has-text-color),.wp-block-cover-image p:not(.has-text-color){
.wp-block-cover h1:where(:not(.has-text-color)),.wp-block-cover h2:where(:not(.has-text-color)),.wp-block-cover h3:where(:not(.has-text-color)),.wp-block-cover h4:where(:not(.has-text-color)),.wp-block-cover h5:where(:not(.has-text-color)),.wp-block-cover h6:where(:not(.has-text-color)),.wp-block-cover p:where(:not(.has-text-color)),.wp-block-cover-image h1:where(:not(.has-text-color)),.wp-block-cover-image h2:where(:not(.has-text-color)),.wp-block-cover-image h3:where(:not(.has-text-color)),.wp-block-cover-image h4:where(:not(.has-text-color)),.wp-block-cover-image h5:where(:not(.has-text-color)),.wp-block-cover-image h6:where(:not(.has-text-color)),.wp-block-cover-image p:where(:not(.has-text-color)){
color:inherit;
}
.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{

File diff suppressed because one or more lines are too long

View File

@ -8186,6 +8186,7 @@ function getUserPatterns(state) {
return {
name: `core/block/${userPattern.id}`,
id: userPattern.id,
type: 'user',
title: userPattern.title.raw,
categories: userPattern.wp_pattern_category.map(catId => categories && categories.get(catId) ? categories.get(catId).slug : catId),
content: userPattern.content.raw,
@ -23553,7 +23554,9 @@ const ExperimentalBlockEditorProvider = with_registry_provider(props => {
// Syncs the entity provider with changes in the block-editor store.
useBlockSync(props);
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SlotFillProvider, null, (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(BlockRefsProvider, null, children));
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SlotFillProvider, {
passthrough: true
}, (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(BlockRefsProvider, null, children));
});
const BlockEditorProvider = props => {
return (0,external_wp_element_namespaceObject.createElement)(ExperimentalBlockEditorProvider, {
@ -27690,14 +27693,14 @@ function BlockPattern({
}
}
}, (0,external_wp_element_namespaceObject.createElement)(WithToolTip, {
showTooltip: showTooltip && !pattern.id,
showTooltip: showTooltip && !pattern.type === 'user',
title: pattern.title
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableCompositeItem, {
role: "option",
as: "div",
...composite,
className: classnames_default()('block-editor-block-patterns-list__item', {
'block-editor-block-patterns-list__list-item-synced': pattern.id && !pattern.syncStatus
'block-editor-block-patterns-list__list-item-synced': pattern.type === 'user' && !pattern.syncStatus
}),
onClick: () => {
onClick(pattern, blocks);
@ -27717,12 +27720,12 @@ function BlockPattern({
viewportWidth: viewportWidth
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
className: "block-editor-patterns__pattern-details"
}, pattern.id && !pattern.syncStatus && (0,external_wp_element_namespaceObject.createElement)("div", {
}, pattern.type === 'user' && !pattern.syncStatus && (0,external_wp_element_namespaceObject.createElement)("div", {
className: "block-editor-patterns__pattern-icon-wrapper"
}, (0,external_wp_element_namespaceObject.createElement)(build_module_icon, {
className: "block-editor-patterns__pattern-icon",
icon: library_symbol
})), (!showTooltip || pattern.id) && (0,external_wp_element_namespaceObject.createElement)("div", {
})), (!showTooltip || pattern.type === 'user') && (0,external_wp_element_namespaceObject.createElement)("div", {
className: "block-editor-block-patterns-list__item-title"
}, pattern.title)), !!pattern.description && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
id: descriptionId

File diff suppressed because one or more lines are too long

View File

@ -23315,6 +23315,17 @@ const image_deprecated_v6 = {
}
}
},
migrate(attributes) {
const {
height,
width
} = attributes;
return {
...attributes,
width: typeof width === 'number' ? `${width}px` : width,
height: typeof height === 'number' ? `${height}px` : height
};
},
save({
attributes
}) {
@ -23869,9 +23880,29 @@ const scaleOptions = [{
label: (0,external_wp_i18n_namespaceObject._x)('Contain', 'Scale option for dimensions control'),
help: (0,external_wp_i18n_namespaceObject.__)('Image is contained without distortion.')
}];
const disabledClickProps = {
onClick: event => event.preventDefault(),
'aria-disabled': true
// If the image has a href, wrap in an <a /> tag to trigger any inherited link element styles.
const ImageWrapper = ({
href,
children
}) => {
if (!href) {
return children;
}
return (0,external_wp_element_namespaceObject.createElement)("a", {
href: href,
onClick: event => event.preventDefault(),
"aria-disabled": true,
style: {
// When the Image block is linked,
// it's wrapped with a disabled <a /> tag.
// Restore cursor style so it doesn't appear 'clickable'
// and remove pointer events. Safari needs the display property.
pointerEvents: 'none',
cursor: 'default',
display: 'inline'
}
}, children);
};
function image_Image({
temporaryURL,
@ -24323,7 +24354,9 @@ function image_Image({
// So we try using the imageRef width first and fallback to clientWidth.
const fallbackClientWidth = imageRef.current?.width || clientWidth;
if (canEditImage && isEditingImage) {
img = (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, {
img = (0,external_wp_element_namespaceObject.createElement)(ImageWrapper, {
href: href
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalImageEditor, {
id: id,
url: url,
width: numericWidth,
@ -24336,7 +24369,7 @@ function image_Image({
setIsEditingImage(false);
},
borderProps: isRounded ? undefined : borderProps
});
}));
} else if (!isResizable) {
img = (0,external_wp_element_namespaceObject.createElement)("div", {
style: {
@ -24344,7 +24377,9 @@ function image_Image({
height,
aspectRatio
}
}, img);
}, (0,external_wp_element_namespaceObject.createElement)(ImageWrapper, {
href: href
}, img));
} else {
const numericRatio = aspectRatio && evalAspectRatio(aspectRatio);
const customRatio = numericWidth / numericHeight;
@ -24429,15 +24464,14 @@ function image_Image({
});
},
resizeRatio: align === 'center' ? 2 : 1
}, img);
}, (0,external_wp_element_namespaceObject.createElement)(ImageWrapper, {
href: href
}, img));
}
if (!url && !temporaryURL) {
return sizeControls;
}
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !temporaryURL && controls, !!href ? (0,external_wp_element_namespaceObject.createElement)("a", {
href: href,
...disabledClickProps
}, img) : img, showCaption && (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || isSelected) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, !temporaryURL && controls, img, showCaption && (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || isSelected) && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichText, {
identifier: "caption",
className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)('caption'),
ref: captionRef,

File diff suppressed because one or more lines are too long

View File

@ -36658,10 +36658,11 @@ const slot_fill_Slot = (0,external_wp_element_namespaceObject.forwardRef)(({
});
function Provider({
children,
passthrough = false,
...props
}) {
const parent = (0,external_wp_element_namespaceObject.useContext)(slot_fill_context);
if (!parent.isDefault) {
if (!parent.isDefault && passthrough) {
return children;
}
return (0,external_wp_element_namespaceObject.createElement)(provider_SlotFillProvider, {

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57257';
$wp_version = '6.5-alpha-57258';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.