Editor: update npm packages for 6.5.3.

Package Update includes fixes for:

– Layout: Skip outputting base layout rules that reference content or wide sizes if no layout sizes exist
– Fix inserter pattern pagination focus loss
– Fix static posts page setting resolved template
– Font Library: Fix modal scrollbar
– Interactivity API: Allow multiple event handlers for the same type with data-wp-on.
– Layout: Always add semantic classes
– List View: Fix stuck dragging mode in UI in Firefox when dealing with deeply nested lists
– Don't output base flow and constrained layout rules on themes without theme.json
- PHP unit test workflow: Try removing 7.0 and 7.1 to get CI tests passing

Props grantmkin, talldanwp, ntsekouras, mikachan, darerodz, andrewserong, mamaduka, isabel_brison, jorbin, annezazu, anlino, ramonopoly, davecpage, ellatrix, colorful-tones, mamaduka, flixos90, luisherranz, wildworks, jordesign, mmaattiiaass, jorgefilipecosta, kevin940726, afercia, poena, macmanx, luminuu, anlino.
Fixes #61129.


Built from https://develop.svn.wordpress.org/branches/6.5@58086


git-svn-id: http://core.svn.wordpress.org/branches/6.5@57551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin 2024-05-02 20:31:23 +00:00
parent c0adfeff65
commit 7ad40b6538
15 changed files with 107 additions and 54 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

@ -4053,6 +4053,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
border-bottom:none;
}
.font-library-modal .components-modal__content{
margin-bottom:70px;
padding-top:0;
}
.font-library-modal .font-library-modal__subtitle{
@ -4071,6 +4072,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
background-color:#fff;
border-top:1px solid #ddd;
bottom:32px;
height:70px;
margin:0 -32px -32px;
padding:16px 32px;
position:absolute;

File diff suppressed because one or more lines are too long

View File

@ -4053,6 +4053,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
border-bottom:none;
}
.font-library-modal .components-modal__content{
margin-bottom:70px;
padding-top:0;
}
.font-library-modal .font-library-modal__subtitle{
@ -4071,6 +4072,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing){
background-color:#fff;
border-top:1px solid #ddd;
bottom:32px;
height:70px;
margin:0 -32px -32px;
padding:16px 32px;
position:absolute;

File diff suppressed because one or more lines are too long

View File

@ -32883,7 +32883,8 @@ function layout_addAttribute(settings) {
}
function BlockWithLayoutStyles({
block: BlockListBlock,
props
props,
layoutClasses
}) {
const {
name,
@ -32900,7 +32901,6 @@ function BlockWithLayoutStyles({
...layout,
type: 'constrained'
} : layout || defaultBlockLayout || {};
const layoutClasses = useLayoutClasses(attributes, name);
const {
kebabCase
} = unlock(external_wp_components_namespaceObject.privateApis);
@ -32942,7 +32942,12 @@ function BlockWithLayoutStyles({
* @return {Function} Wrapped component.
*/
const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockListBlock => props => {
const {
name,
attributes
} = props;
const blockSupportsLayout = hasLayoutBlockSupport(props.name);
const layoutClasses = useLayoutClasses(attributes, name);
const shouldRenderLayoutStyles = (0,external_wp_data_namespaceObject.useSelect)(select => {
// The callback returns early to avoid block editor subscription.
if (!blockSupportsLayout) {
@ -32952,12 +32957,14 @@ const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrde
}, [blockSupportsLayout]);
if (!shouldRenderLayoutStyles) {
return (0,external_React_.createElement)(BlockListBlock, {
...props
...props,
__unstableLayoutClassNames: blockSupportsLayout ? layoutClasses : undefined
});
}
return (0,external_React_.createElement)(BlockWithLayoutStyles, {
block: BlockListBlock,
props: props
props: props,
layoutClasses: layoutClasses
});
}, 'withLayoutStyles');
(0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/layout/addAttribute', layout_addAttribute);
@ -41962,12 +41969,14 @@ function Pagination({
variant: "tertiary",
onClick: () => changePage(1),
disabled: currentPage === 1,
"aria-label": (0,external_wp_i18n_namespaceObject.__)('First page')
"aria-label": (0,external_wp_i18n_namespaceObject.__)('First page'),
__experimentalIsFocusable: true
}, (0,external_React_.createElement)("span", null, "\xAB")), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
variant: "tertiary",
onClick: () => changePage(currentPage - 1),
disabled: currentPage === 1,
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Previous page')
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Previous page'),
__experimentalIsFocusable: true
}, (0,external_React_.createElement)("span", null, "\u2039"))), (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalText, {
variant: "muted"
}, (0,external_wp_i18n_namespaceObject.sprintf)(
@ -41980,13 +41989,15 @@ function Pagination({
variant: "tertiary",
onClick: () => changePage(currentPage + 1),
disabled: currentPage === numPages,
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Next page')
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Next page'),
__experimentalIsFocusable: true
}, (0,external_React_.createElement)("span", null, "\u203A")), (0,external_React_.createElement)(external_wp_components_namespaceObject.Button, {
variant: "tertiary",
onClick: () => changePage(numPages),
disabled: currentPage === numPages,
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Last page'),
size: "default"
size: "default",
__experimentalIsFocusable: true
}, (0,external_React_.createElement)("span", null, "\xBB")))));
}
@ -54048,9 +54059,14 @@ function useListViewDropZone({
const ref = (0,external_wp_compose_namespaceObject.__experimentalUseDropZone)({
dropZoneElement,
onDrop(event) {
throttled.cancel();
if (target) {
onBlockDrop(event);
}
// Use `undefined` value to indicate that the drag has concluded.
// This allows styling rules that are active only when a user is
// dragging to be removed.
setTarget(undefined);
},
onDragLeave() {
throttled.cancel();

File diff suppressed because one or more lines are too long

View File

@ -3490,26 +3490,44 @@ function areMetaBoxesInitialized(state) {
* @return {Object?} Post Template.
*/
const getEditedPostTemplate = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
const {
id: postId,
type: postType,
slug
} = select(external_wp_editor_namespaceObject.store).getCurrentPost();
const {
getSite,
getEditedEntityRecord,
getEntityRecords
} = select(external_wp_coreData_namespaceObject.store);
const siteSettings = getSite();
// First check if the current page is set as the posts page.
const isPostsPage = +postId === siteSettings?.page_for_posts;
if (isPostsPage) {
const defaultTemplateId = select(external_wp_coreData_namespaceObject.store).getDefaultTemplateId({
slug: 'home'
});
return getEditedEntityRecord('postType', 'wp_template', defaultTemplateId);
}
const currentTemplate = select(external_wp_editor_namespaceObject.store).getEditedPostAttribute('template');
if (currentTemplate) {
const templateWithSameSlug = select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', 'wp_template', {
const templateWithSameSlug = getEntityRecords('postType', 'wp_template', {
per_page: -1
})?.find(template => template.slug === currentTemplate);
if (!templateWithSameSlug) {
return templateWithSameSlug;
}
return select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('postType', 'wp_template', templateWithSameSlug.id);
return getEditedEntityRecord('postType', 'wp_template', templateWithSameSlug.id);
}
const post = select(external_wp_editor_namespaceObject.store).getCurrentPost();
let slugToCheck;
// In `draft` status we might not have a slug available, so we use the `single`
// post type templates slug(ex page, single-post, single-product etc..).
// Pages do not need the `single` prefix in the slug to be prioritized
// through template hierarchy.
if (post.slug) {
slugToCheck = post.type === 'page' ? `${post.type}-${post.slug}` : `single-${post.type}-${post.slug}`;
if (slug) {
slugToCheck = postType === 'page' ? `${postType}-${slug}` : `single-${postType}-${slug}`;
} else {
slugToCheck = post.type === 'page' ? 'page' : `single-${post.type}`;
slugToCheck = postType === 'page' ? 'page' : `single-${postType}`;
}
const defaultTemplateId = select(external_wp_coreData_namespaceObject.store).getDefaultTemplateId({
slug: slugToCheck

File diff suppressed because one or more lines are too long

View File

@ -17919,6 +17919,7 @@ function useResolveEditedEntityAndContext({
const {
hasLoadedAllDependencies,
homepageId,
postsPageId,
url,
frontPageTemplateId
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
@ -17932,16 +17933,20 @@ function useResolveEditedEntityAndContext({
const templates = getEntityRecords('postType', constants_TEMPLATE_POST_TYPE, {
per_page: -1
});
let _frontPateTemplateId;
const _homepageId = siteData?.show_on_front === 'page' && ['number', 'string'].includes(typeof siteData.page_on_front) && !!+siteData.page_on_front // We also need to check if it's not zero(`0`).
? siteData.page_on_front.toString() : null;
const _postsPageId = siteData?.show_on_front === 'page' && ['number', 'string'].includes(typeof siteData.page_for_posts) ? siteData.page_for_posts.toString() : null;
let _frontPageTemplateId;
if (templates) {
const frontPageTemplate = templates.find(t => t.slug === 'front-page');
_frontPateTemplateId = frontPageTemplate ? frontPageTemplate.id : false;
_frontPageTemplateId = frontPageTemplate ? frontPageTemplate.id : false;
}
return {
hasLoadedAllDependencies: !!base && !!siteData,
homepageId: siteData?.show_on_front === 'page' && ['number', 'string'].includes(typeof siteData.page_on_front) ? siteData.page_on_front.toString() : null,
homepageId: _homepageId,
postsPageId: _postsPageId,
url: base?.home,
frontPageTemplateId: _frontPateTemplateId
frontPageTemplateId: _frontPageTemplateId
};
}, []);
@ -17979,6 +17984,10 @@ function useResolveEditedEntityAndContext({
if (!editedEntity) {
return undefined;
}
// Check if the current page is the posts page.
if (postTypeToResolve === 'page' && postsPageId === postIdToResolve) {
return __experimentalGetTemplateForLink(editedEntity.link)?.id;
}
// First see if the post/page has an assigned template and fetch it.
const currentTemplateSlug = editedEntity.template;
if (currentTemplateSlug) {
@ -18030,7 +18039,7 @@ function useResolveEditedEntityAndContext({
const template = __experimentalGetTemplateForLink(url);
return template?.id;
}
}, [homepageId, hasLoadedAllDependencies, url, postId, postType, path, frontPageTemplateId]);
}, [homepageId, postsPageId, hasLoadedAllDependencies, url, postId, postType, path, frontPageTemplateId]);
const context = (0,external_wp_element_namespaceObject.useMemo)(() => {
if (postTypesWithoutParentTemplate.includes(postType)) {
return {};
@ -27730,9 +27739,7 @@ function InstalledFonts() {
onClick: () => {
handleSetLibraryFontSelected(font);
}
}))), (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalSpacer, {
margin: 16
})), (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, {
})))), (0,external_React_.createElement)(external_wp_components_namespaceObject.__experimentalNavigatorScreen, {
path: "/fontFamily"
}, (0,external_React_.createElement)(ConfirmDeleteDialog, {
font: libraryFontSelected,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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