Editor: Update packages for 6.6.2 RC1.

Updates the versions from the [a74a70ed20 released packages] for the following bugfixes:

- [https://github.com/WordPress/gutenberg/pull/63980 Global Styles: Fix block custom CSS pseudo element selectors]
- [https://github.com/WordPress/gutenberg/pull/64463 Featured Image Block: Reduce CSS specificity]
- [https://github.com/WordPress/gutenberg/pull/64076 Fix bumped specificity for layout styles in non-iframed editor]
- [https://github.com/WordPress/gutenberg/pull/64379 Don't allow duplicating template parts in non-block-based themes]
- [https://github.com/WordPress/gutenberg/pull/64250 Data Views: Don't render action modal when there are no eligible items]
- [https://github.com/WordPress/gutenberg/pull/63724 Fix canvas issues by removing VisualEditor’s height]
- [https://github.com/WordPress/gutenberg/pull/64992 Post Editor: fix click space after post content to append]
- [https://github.com/WordPress/gutenberg/pull/63939 Post Editor: Prevent popover from being hidden by metabox]
- [https://github.com/WordPress/gutenberg/pull/64639 Post editor: apply space below content using a pseudo-element instead of padding-bottom]
- [https://github.com/WordPress/gutenberg/pull/64015 Avoid errors for post types without a 'menu_icon']
- [https://github.com/WordPress/gutenberg/pull/64458 Update postcss-prefixwrap dependency to 1.51.0 to fix prefixing in :where selectors]

Reviewed by jorbin, hellofromTonya.
Merges [58988] to the 6.6 branch.

Props vcanales.
Fixes #61982.
See #61704, #61769, #61829.

Built from https://develop.svn.wordpress.org/branches/6.6@58989


git-svn-id: http://core.svn.wordpress.org/branches/6.6@58385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin 2024-09-04 16:49:19 +00:00
parent 63a2a7d749
commit c4f71d7126
27 changed files with 137 additions and 101 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

@ -6,7 +6,7 @@
display:block; display:block;
height:100%; height:100%;
} }
.wp-block-post-featured-image img{ .wp-block-post-featured-image :where(img){
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;

View File

@ -1 +1 @@
.wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%} .wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image :where(img){box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%}

View File

@ -6,7 +6,7 @@
display:block; display:block;
height:100%; height:100%;
} }
.wp-block-post-featured-image img{ .wp-block-post-featured-image :where(img){
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;

View File

@ -1 +1 @@
.wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%} .wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image :where(img){box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%}

View File

@ -2270,7 +2270,7 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[
display:block; display:block;
height:100%; height:100%;
} }
.wp-block-post-featured-image img{ .wp-block-post-featured-image :where(img){
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;

File diff suppressed because one or more lines are too long

View File

@ -2270,7 +2270,7 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[
display:block; display:block;
height:100%; height:100%;
} }
.wp-block-post-featured-image img{ .wp-block-post-featured-image :where(img){
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;

File diff suppressed because one or more lines are too long

View File

@ -85,11 +85,6 @@
content:none; content:none;
} }
.edit-post-visual-editor:not(.is-iframed){
flex:1 0 auto;
height:auto;
}
.edit-post-layout__metaboxes{ .edit-post-layout__metaboxes{
clear:both; clear:both;
flex-shrink:0; flex-shrink:0;

File diff suppressed because one or more lines are too long

View File

@ -85,11 +85,6 @@
content:none; content:none;
} }
.edit-post-visual-editor:not(.is-iframed){
flex:1 0 auto;
height:auto;
}
.edit-post-layout__metaboxes{ .edit-post-layout__metaboxes{
clear:both; clear:both;
flex-shrink:0; flex-shrink:0;

File diff suppressed because one or more lines are too long

View File

@ -854,6 +854,14 @@ body.is-fullscreen-mode .interface-interface-skeleton{
height:61px; height:61px;
} }
.editor-editor-interface .interface-interface-skeleton__content{
isolation:isolate;
}
.editor-visual-editor{
flex:1 0 auto;
}
.components-editor-notices__dismissible,.components-editor-notices__pinned{ .components-editor-notices__dismissible,.components-editor-notices__pinned{
color:#1e1e1e; color:#1e1e1e;
left:0; left:0;
@ -2458,8 +2466,6 @@ h3.components-heading.editor-template-areas__title{
align-items:center; align-items:center;
background-color:#ddd; background-color:#ddd;
display:block; display:block;
height:100%;
isolation:isolate;
position:relative; position:relative;
} }
.editor-visual-editor.is-resizable{ .editor-visual-editor.is-resizable{

File diff suppressed because one or more lines are too long

View File

@ -854,6 +854,14 @@ body.is-fullscreen-mode .interface-interface-skeleton{
height:61px; height:61px;
} }
.editor-editor-interface .interface-interface-skeleton__content{
isolation:isolate;
}
.editor-visual-editor{
flex:1 0 auto;
}
.components-editor-notices__dismissible,.components-editor-notices__pinned{ .components-editor-notices__dismissible,.components-editor-notices__pinned{
color:#1e1e1e; color:#1e1e1e;
left:0; left:0;
@ -2458,8 +2466,6 @@ h3.components-heading.editor-template-areas__title{
align-items:center; align-items:center;
background-color:#ddd; background-color:#ddd;
display:block; display:block;
height:100%;
isolation:isolate;
position:relative; position:relative;
} }
.editor-visual-editor.is-resizable{ .editor-visual-editor.is-resizable{

File diff suppressed because one or more lines are too long

View File

@ -1574,9 +1574,7 @@ const CSSSelector_1 = __webpack_require__(3467);
const prefixWrapCSSRule = (cssRule, nested, ignoredSelectors, prefixSelector, prefixRootTags) => { const prefixWrapCSSRule = (cssRule, nested, ignoredSelectors, prefixSelector, prefixRootTags) => {
// Check each rule to see if it exactly matches our prefix selector, when // Check each rule to see if it exactly matches our prefix selector, when
// this happens, don't try to prefix that selector. // this happens, don't try to prefix that selector.
const rules = cssRule.selector const rules = cssRule.selectors.filter((selector) => !(0, CSSSelector_1.cssRuleMatchesPrefixSelector)({ selector: selector }, prefixSelector));
.split(",")
.filter((selector) => !(0, CSSSelector_1.cssRuleMatchesPrefixSelector)({ selector: selector }, prefixSelector));
if (rules.length === 0) { if (rules.length === 0) {
return; return;
} }
@ -10465,6 +10463,11 @@ const {
const STORE_NAME = 'core/block-editor'; const STORE_NAME = 'core/block-editor';
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/utils.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/utils.js
/**
* WordPress dependencies
*/
/** /**
* Internal dependencies * Internal dependencies
*/ */
@ -10472,6 +10475,36 @@ const STORE_NAME = 'core/block-editor';
const withRootClientIdOptionKey = Symbol('withRootClientId'); const withRootClientIdOptionKey = Symbol('withRootClientId');
const parsedPatternCache = new WeakMap();
function parsePattern(pattern) {
const blocks = (0,external_wp_blocks_namespaceObject.parse)(pattern.content, {
__unstableSkipMigrationLogs: true
});
if (blocks.length === 1) {
blocks[0].attributes = {
...blocks[0].attributes,
metadata: {
...(blocks[0].attributes.metadata || {}),
categories: pattern.categories,
patternName: pattern.name,
name: blocks[0].attributes.metadata?.name || pattern.title
}
};
}
return {
...pattern,
blocks
};
}
function getParsedPattern(pattern) {
let parsedPattern = parsedPatternCache.get(pattern);
if (parsedPattern) {
return parsedPattern;
}
parsedPattern = parsePattern(pattern);
parsedPatternCache.set(pattern, parsedPattern);
return parsedPattern;
}
const checkAllowList = (list, item, defaultResult = null) => { const checkAllowList = (list, item, defaultResult = null) => {
if (typeof list === 'boolean') { if (typeof list === 'boolean') {
return list; return list;
@ -11056,23 +11089,22 @@ const getInserterMediaCategories = (0,external_wp_data_namespaceObject.createSel
*/ */
const hasAllowedPatterns = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)((state, rootClientId = null) => { const hasAllowedPatterns = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)((state, rootClientId = null) => {
const { const {
getAllPatterns, getAllPatterns
__experimentalGetParsedPattern
} = unlock(select(STORE_NAME)); } = unlock(select(STORE_NAME));
const patterns = getAllPatterns(); const patterns = getAllPatterns();
const { const {
allowedBlockTypes allowedBlockTypes
} = getSettings(state); } = getSettings(state);
return patterns.some(({ return patterns.some(pattern => {
name, const {
inserter = true inserter = true
}) => { } = pattern;
if (!inserter) { if (!inserter) {
return false; return false;
} }
const { const {
blocks blocks
} = __experimentalGetParsedPattern(name); } = getParsedPattern(pattern);
return checkAllowListRecursive(blocks, allowedBlockTypes) && blocks.every(({ return checkAllowListRecursive(blocks, allowedBlockTypes) && blocks.every(({
name: blockName name: blockName
}) => canInsertBlockType(state, blockName, rootClientId)); }) => canInsertBlockType(state, blockName, rootClientId));
@ -13179,30 +13211,10 @@ function __experimentalGetDirectInsertBlock(state, rootClientId = null) {
}); });
return getDirectInsertBlock(state, rootClientId); return getDirectInsertBlock(state, rootClientId);
} }
const __experimentalGetParsedPattern = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)((state, patternName) => { const __experimentalGetParsedPattern = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, patternName) => {
const pattern = unlock(select(STORE_NAME)).getPatternBySlug(patternName); const pattern = unlock(select(STORE_NAME)).getPatternBySlug(patternName);
if (!pattern) { return pattern ? getParsedPattern(pattern) : null;
return null;
}
const blocks = (0,external_wp_blocks_namespaceObject.parse)(pattern.content, {
__unstableSkipMigrationLogs: true
}); });
if (blocks.length === 1) {
blocks[0].attributes = {
...blocks[0].attributes,
metadata: {
...(blocks[0].attributes.metadata || {}),
categories: pattern.categories,
patternName: pattern.name,
name: blocks[0].attributes.metadata?.name || pattern.title
}
};
}
return {
...pattern,
blocks
};
}, (state, patternName) => [unlock(select(STORE_NAME)).getPatternBySlug(patternName)]));
const getAllowedPatternsDependants = select => (state, rootClientId) => [...getAllPatternsDependants(select)(state), ...getInsertBlockTypeDependants(state, rootClientId)]; const getAllowedPatternsDependants = select => (state, rootClientId) => [...getAllPatternsDependants(select)(state), ...getInsertBlockTypeDependants(state, rootClientId)];
/** /**
@ -13216,8 +13228,7 @@ const getAllowedPatternsDependants = select => (state, rootClientId) => [...getA
const __experimentalGetAllowedPatterns = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => { const __experimentalGetAllowedPatterns = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => {
return (0,external_wp_data_namespaceObject.createSelector)((state, rootClientId = null) => { return (0,external_wp_data_namespaceObject.createSelector)((state, rootClientId = null) => {
const { const {
getAllPatterns, getAllPatterns
__experimentalGetParsedPattern: getParsedPattern
} = unlock(select(STORE_NAME)); } = unlock(select(STORE_NAME));
const patterns = getAllPatterns(); const patterns = getAllPatterns();
const { const {
@ -13225,9 +13236,7 @@ const __experimentalGetAllowedPatterns = (0,external_wp_data_namespaceObject.cre
} = getSettings(state); } = getSettings(state);
const parsedPatterns = patterns.filter(({ const parsedPatterns = patterns.filter(({
inserter = true inserter = true
}) => !!inserter).map(({ }) => !!inserter).map(getParsedPattern);
name
}) => getParsedPattern(name));
const availableParsedPatterns = parsedPatterns.filter(({ const availableParsedPatterns = parsedPatterns.filter(({
blocks blocks
}) => checkAllowListRecursive(blocks, allowedBlockTypes)); }) => checkAllowListRecursive(blocks, allowedBlockTypes));
@ -34098,7 +34107,7 @@ function getLayoutStyles({
// For fallback gap styles, use lower specificity, to ensure styles do not unintentionally override theme styles. // For fallback gap styles, use lower specificity, to ensure styles do not unintentionally override theme styles.
combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:where(.${className}${spacingStyle?.selector || ''})` : `:where(${selector}.${className}${spacingStyle?.selector || ''})`; combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:where(.${className}${spacingStyle?.selector || ''})` : `:where(${selector}.${className}${spacingStyle?.selector || ''})`;
} else { } else {
combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `.${className}${spacingStyle?.selector || ''}` : `${selector}-${className}${spacingStyle?.selector || ''}`; combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:root :where(.${className})${spacingStyle?.selector || ''}` : `:root :where(${selector}-${className})${spacingStyle?.selector || ''}`;
} }
ruleset += `${combinedSelector} { ${declarations.join('; ')}; }`; ruleset += `${combinedSelector} { ${declarations.join('; ')}; }`;
} }
@ -34163,7 +34172,10 @@ const getNodesWithStyles = (tree, blockSelectors) => {
if (styles) { if (styles) {
nodes.push({ nodes.push({
styles, styles,
selector: ROOT_BLOCK_SELECTOR selector: ROOT_BLOCK_SELECTOR,
// Root selector (body) styles should not be wrapped in `:root where()` to keep
// specificity at (0,0,1) and maintain backwards compatibility.
skipSelectorWrapper: true
}); });
} }
Object.entries(external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS).forEach(([name, selector]) => { Object.entries(external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS).forEach(([name, selector]) => {
@ -34614,10 +34626,16 @@ function updateConfigWithSeparator(config) {
} }
function processCSSNesting(css, blockSelector) { function processCSSNesting(css, blockSelector) {
let processedCSS = ''; let processedCSS = '';
if (!css || css.trim() === '') {
return processedCSS;
}
// Split CSS nested rules. // Split CSS nested rules.
const parts = css.split('&'); const parts = css.split('&');
parts.forEach(part => { parts.forEach(part => {
if (!part || part.trim() === '') {
return;
}
const isRootCss = !part.includes('{'); const isRootCss = !part.includes('{');
if (isRootCss) { if (isRootCss) {
// If the part doesn't contain braces, it applies to the root level. // If the part doesn't contain braces, it applies to the root level.
@ -34629,8 +34647,27 @@ function processCSSNesting(css, blockSelector) {
return; return;
} }
const [nestedSelector, cssValue] = splittedPart; const [nestedSelector, cssValue] = splittedPart;
const combinedSelector = nestedSelector.startsWith(' ') ? scopeSelector(blockSelector, nestedSelector) : appendToSelector(blockSelector, nestedSelector);
processedCSS += `:root :where(${combinedSelector}){${cssValue.trim()}}`; // Handle pseudo elements such as ::before, ::after, etc. Regex will also
// capture any leading combinator such as >, +, or ~, as well as spaces.
// This allows pseudo elements as descendants e.g. `.parent ::before`.
const matches = nestedSelector.match(/([>+~\s]*::[a-zA-Z-]+)/);
const pseudoPart = matches ? matches[1] : '';
const withoutPseudoElement = matches ? nestedSelector.replace(pseudoPart, '').trim() : nestedSelector.trim();
let combinedSelector;
if (withoutPseudoElement === '') {
// Only contained a pseudo element to use the block selector to form
// the final `:root :where()` selector.
combinedSelector = blockSelector;
} else {
// If the nested selector is a descendant of the block scope it with the
// block selector. Otherwise append it to the block selector.
combinedSelector = nestedSelector.startsWith(' ') ? scopeSelector(blockSelector, withoutPseudoElement) : appendToSelector(blockSelector, withoutPseudoElement);
}
// Build final rule, re-adding any pseudo element outside the `:where()`
// to maintain valid CSS selector.
processedCSS += `:root :where(${combinedSelector})${pseudoPart}{${cssValue.trim()}}`;
} }
}); });
return processedCSS; return processedCSS;
@ -38494,7 +38531,7 @@ function createBlockCompleter() {
prioritizedBlocks: getBlockListSettings(_rootClientId)?.prioritizedInserterBlocks prioritizedBlocks: getBlockListSettings(_rootClientId)?.prioritizedInserterBlocks
}; };
}, []); }, []);
const [items, categories, collections] = use_block_types_state(rootClientId, block_noop); const [items, categories, collections] = use_block_types_state(rootClientId, block_noop, true);
const filteredItems = (0,external_wp_element_namespaceObject.useMemo)(() => { const filteredItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
const initialFilteredItems = !!filterValue.trim() ? searchBlockItems(items, categories, collections, filterValue) : orderInserterBlockItems(orderBy(items, 'frecency', 'desc'), prioritizedBlocks); const initialFilteredItems = !!filterValue.trim() ? searchBlockItems(items, categories, collections, filterValue) : orderInserterBlockItems(orderBy(items, 'frecency', 'desc'), prioritizedBlocks);
return initialFilteredItems.filter(item => item.name !== selectedBlockName).slice(0, SHOWN_BLOCK_TYPES); return initialFilteredItems.filter(item => item.name !== selectedBlockName).slice(0, SHOWN_BLOCK_TYPES);

File diff suppressed because one or more lines are too long

View File

@ -2557,8 +2557,8 @@ function usePaddingAppender() {
const { const {
defaultView defaultView
} = ownerDocument; } = ownerDocument;
const paddingBottom = defaultView.parseInt(defaultView.getComputedStyle(node).paddingBottom, 10); const pseudoHeight = defaultView.parseInt(defaultView.getComputedStyle(node, ':after').height, 10);
if (!paddingBottom) { if (!pseudoHeight) {
return; return;
} }
@ -2571,20 +2571,15 @@ function usePaddingAppender() {
if (event.clientY < lastChildRect.bottom) { if (event.clientY < lastChildRect.bottom) {
return; return;
} }
event.preventDefault(); event.stopPropagation();
const blockOrder = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockOrder(''); const blockOrder = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockOrder('');
const lastBlockClientId = blockOrder[blockOrder.length - 1]; const lastBlockClientId = blockOrder[blockOrder.length - 1];
// Do nothing when only default block appender is present.
if (!lastBlockClientId) {
return;
}
const lastBlock = registry.select(external_wp_blockEditor_namespaceObject.store).getBlock(lastBlockClientId); const lastBlock = registry.select(external_wp_blockEditor_namespaceObject.store).getBlock(lastBlockClientId);
const { const {
selectBlock, selectBlock,
insertDefaultBlock insertDefaultBlock
} = registry.dispatch(external_wp_blockEditor_namespaceObject.store); } = registry.dispatch(external_wp_blockEditor_namespaceObject.store);
if ((0,external_wp_blocks_namespaceObject.isUnmodifiedDefaultBlock)(lastBlock)) { if (lastBlock && (0,external_wp_blocks_namespaceObject.isUnmodifiedDefaultBlock)(lastBlock)) {
selectBlock(lastBlockClientId); selectBlock(lastBlockClientId);
} else { } else {
insertDefaultBlock(); insertDefaultBlock();
@ -2701,7 +2696,6 @@ function useEditorStyles() {
hasThemeStyleSupport, hasThemeStyleSupport,
editorSettings, editorSettings,
isZoomedOutView, isZoomedOutView,
hasMetaBoxes,
renderingMode, renderingMode,
postType postType
} = (0,external_wp_data_namespaceObject.useSelect)(select => { } = (0,external_wp_data_namespaceObject.useSelect)(select => {
@ -2717,7 +2711,6 @@ function useEditorStyles() {
hasThemeStyleSupport: select(store).isFeatureActive('themeStyles'), hasThemeStyleSupport: select(store).isFeatureActive('themeStyles'),
editorSettings: select(external_wp_editor_namespaceObject.store).getEditorSettings(), editorSettings: select(external_wp_editor_namespaceObject.store).getEditorSettings(),
isZoomedOutView: __unstableGetEditorMode() === 'zoom-out', isZoomedOutView: __unstableGetEditorMode() === 'zoom-out',
hasMetaBoxes: select(store).hasMetaBoxes(),
renderingMode: getRenderingMode(), renderingMode: getRenderingMode(),
postType: _postType postType: _postType
}; };
@ -2747,13 +2740,11 @@ function useEditorStyles() {
} }
const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles; const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles;
// Add a constant padding for the typewriter effect. When typing at the // Add a space for the typewriter effect. When typing in the last block,
// bottom, there needs to be room to scroll up. // there needs to be room to scroll up.
if (!isZoomedOutView && !hasMetaBoxes && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) { if (!isZoomedOutView && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) {
return [...baseStyles, { return [...baseStyles, {
// Should override global styles padding, so ensure 0-1-0 css: ':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}'
// specificity.
css: ':root :where(body){padding-bottom: 40vh}'
}]; }];
} }
return baseStyles; return baseStyles;

File diff suppressed because one or more lines are too long

View File

@ -25133,6 +25133,9 @@ function bulk_actions_ActionWithModal({
const onCloseModal = (0,external_wp_element_namespaceObject.useCallback)(() => { const onCloseModal = (0,external_wp_element_namespaceObject.useCallback)(() => {
setActionWithModal(undefined); setActionWithModal(undefined);
}, [setActionWithModal]); }, [setActionWithModal]);
if (!eligibleItems.length) {
return null;
}
const label = typeof action.label === 'string' ? action.label : action.label(selectedItems); const label = typeof action.label === 'string' ? action.label : action.label(selectedItems);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
title: !hideModalHeader ? label : undefined, title: !hideModalHeader ? label : undefined,
@ -35575,7 +35578,7 @@ function usePostTypeArchiveMenuItems() {
// `icon` is the `menu_icon` property of a post type. We // `icon` is the `menu_icon` property of a post type. We
// only handle `dashicons` for now, even if the `menu_icon` // only handle `dashicons` for now, even if the `menu_icon`
// also supports urls and svg as values. // also supports urls and svg as values.
icon: postType.icon?.startsWith('dashicons-') ? postType.icon.slice(10) : library_archive, icon: typeof postType.icon === 'string' && postType.icon.startsWith('dashicons-') ? postType.icon.slice(10) : library_archive,
templatePrefix: 'archive' templatePrefix: 'archive'
}; };
}) || [], [postTypesWithArchives, existingTemplates, needsUniqueIdentifier]); }) || [], [postTypesWithArchives, existingTemplates, needsUniqueIdentifier]);
@ -35653,7 +35656,7 @@ const usePostTypeMenuItems = onClickMenuItem => {
// `icon` is the `menu_icon` property of a post type. We // `icon` is the `menu_icon` property of a post type. We
// only handle `dashicons` for now, even if the `menu_icon` // only handle `dashicons` for now, even if the `menu_icon`
// also supports urls and svg as values. // also supports urls and svg as values.
icon: icon?.startsWith('dashicons-') ? icon.slice(10) : library_post, icon: typeof icon === 'string' && icon.startsWith('dashicons-') ? icon.slice(10) : library_post,
templatePrefix: templatePrefixes[slug] templatePrefix: templatePrefixes[slug]
}; };
const hasEntities = postTypesInfo?.[slug]?.hasEntities; const hasEntities = postTypesInfo?.[slug]?.hasEntities;

File diff suppressed because one or more lines are too long

View File

@ -5946,7 +5946,7 @@ const getPostIcon = (0,external_wp_data_namespaceObject.createRegistrySelector)(
// `icon` is the `menu_icon` property of a post type. We // `icon` is the `menu_icon` property of a post type. We
// only handle `dashicons` for now, even if the `menu_icon` // only handle `dashicons` for now, even if the `menu_icon`
// also supports urls and svg as values. // also supports urls and svg as values.
if (postTypeEntity?.icon?.startsWith('dashicons-')) { if (typeof postTypeEntity?.icon === 'string' && postTypeEntity.icon.startsWith('dashicons-')) {
return postTypeEntity.icon.slice(10); return postTypeEntity.icon.slice(10);
} }
return library_page; return library_page;
@ -26000,12 +26000,14 @@ function usePostActions({
postTypeObject, postTypeObject,
resource, resource,
cachedCanUserResolvers, cachedCanUserResolvers,
userCanCreatePostType userCanCreatePostType,
isBlockBasedTheme
} = (0,external_wp_data_namespaceObject.useSelect)(select => { } = (0,external_wp_data_namespaceObject.useSelect)(select => {
const { const {
getPostType, getPostType,
getCachedResolvers, getCachedResolvers,
canUser canUser,
getCurrentTheme
} = select(external_wp_coreData_namespaceObject.store); } = select(external_wp_coreData_namespaceObject.store);
const _postTypeObject = getPostType(postType); const _postTypeObject = getPostType(postType);
const _resource = _postTypeObject?.rest_base || ''; const _resource = _postTypeObject?.rest_base || '';
@ -26013,7 +26015,8 @@ function usePostActions({
postTypeObject: _postTypeObject, postTypeObject: _postTypeObject,
resource: _resource, resource: _resource,
cachedCanUserResolvers: getCachedResolvers()?.canUser, cachedCanUserResolvers: getCachedResolvers()?.canUser,
userCanCreatePostType: canUser('create', _resource) userCanCreatePostType: canUser('create', _resource),
isBlockBasedTheme: getCurrentTheme()?.is_block_theme
}; };
}, [postType]); }, [postType]);
const trashPostActionForPostType = useTrashPostAction(resource); const trashPostActionForPostType = useTrashPostAction(resource);
@ -26029,7 +26032,7 @@ function usePostActions({
if (!isLoaded) { if (!isLoaded) {
return []; return [];
} }
let actions = [postTypeObject?.viewable && viewPostAction, supportsRevisions && postRevisionsAction, false ? 0 : false, isTemplateOrTemplatePart && userCanCreatePostType && duplicateTemplatePartAction, isPattern && userCanCreatePostType && duplicatePatternAction, supportsTitle && renamePostActionForPostType, isPattern && exportPatternAsJSONAction, isTemplateOrTemplatePart ? resetTemplateAction : restorePostActionForPostType, isTemplateOrTemplatePart || isPattern ? deletePostAction : trashPostActionForPostType, !isTemplateOrTemplatePart && permanentlyDeletePostActionForPostType].filter(Boolean); let actions = [postTypeObject?.viewable && viewPostAction, supportsRevisions && postRevisionsAction, false ? 0 : false, isTemplateOrTemplatePart && userCanCreatePostType && isBlockBasedTheme && duplicateTemplatePartAction, isPattern && userCanCreatePostType && duplicatePatternAction, supportsTitle && renamePostActionForPostType, isPattern && exportPatternAsJSONAction, isTemplateOrTemplatePart ? resetTemplateAction : restorePostActionForPostType, isTemplateOrTemplatePart || isPattern ? deletePostAction : trashPostActionForPostType, !isTemplateOrTemplatePart && permanentlyDeletePostActionForPostType].filter(Boolean);
// Filter actions based on provided context. If not provided // Filter actions based on provided context. If not provided
// all actions are returned. We'll have a single entry for getting the actions // all actions are returned. We'll have a single entry for getting the actions
// and the consumer should provide the context to filter the actions, if needed. // and the consumer should provide the context to filter the actions, if needed.

File diff suppressed because one or more lines are too long

View File

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