From 3a310c4dc4ad1c08c38a5cd72972f3db11ae60a8 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:39:46 +0900 Subject: [PATCH 01/52] Site Logo Block: Fix non-admin users seeing zero character (#65010) Co-authored-by: t-hamano Co-authored-by: akasunil Co-authored-by: Mamaduka Co-authored-by: ramonjd --- packages/block-library/src/site-logo/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/site-logo/edit.js b/packages/block-library/src/site-logo/edit.js index edf8bbccfeb65..1d541ba35d631 100644 --- a/packages/block-library/src/site-logo/edit.js +++ b/packages/block-library/src/site-logo/edit.js @@ -423,7 +423,7 @@ export default function LogoEdit( { context: 'view', } ); const _isRequestingMediaItem = - _siteLogoId && + !! _siteLogoId && ! select( coreStore ).hasFinishedResolution( 'getMedia', [ _siteLogoId, { context: 'view' }, From d179303b68f47c9ed68fb5c5af5a63df743ebb79 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 4 Sep 2024 11:30:42 +0400 Subject: [PATCH 02/52] Pattern: Don't render block controls when an entity is missing (#65028) * Pattern: Don't render block controls when an entity is missing * Reference correct 'ButtonBlockAppender' Co-authored-by: Mamaduka --- packages/block-library/src/block/edit.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index 53422e1c4cb8c..3dd5faf67b31f 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -29,6 +29,7 @@ import { privateApis as blockEditorPrivateApis, store as blockEditorStore, BlockControls, + InnerBlocks, } from '@wordpress/block-editor'; import { privateApis as patternsPrivateApis } from '@wordpress/patterns'; import { store as blocksStore } from '@wordpress/blocks'; @@ -254,7 +255,9 @@ function ReusableBlockEdit( { value: innerBlocks.length > 0 ? innerBlocks : blocks, onInput: NOOP, onChange: NOOP, - renderAppender: blocks?.length ? undefined : blocks.ButtonBlockAppender, + renderAppender: blocks?.length + ? undefined + : InnerBlocks.ButtonBlockAppender, } ); const handleEditOriginal = () => { @@ -292,7 +295,7 @@ function ReusableBlockEdit( { return ( <> - { hasResolved && ( + { hasResolved && ! isMissing && ( Date: Wed, 4 Sep 2024 10:51:41 +0200 Subject: [PATCH 03/52] Range control: Restore bottom margin rule. (#65035) Co-authored-by: jasmussen Co-authored-by: tyxla --- .../block-editor/src/components/spacing-sizes-control/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-editor/src/components/spacing-sizes-control/style.scss b/packages/block-editor/src/components/spacing-sizes-control/style.scss index cbcc8e30c5825..a387e5369d01e 100644 --- a/packages/block-editor/src/components/spacing-sizes-control/style.scss +++ b/packages/block-editor/src/components/spacing-sizes-control/style.scss @@ -19,6 +19,7 @@ .spacing-sizes-control__range-control, .spacing-sizes-control__custom-value-range { flex: 1; + margin-bottom: 0; // Needed for some instances of the range control, such as the Spacer block. } .components-range-control__mark { From 9cf31628d2844caa7ddedee87a7a00676aa01192 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 4 Sep 2024 10:11:23 +0100 Subject: [PATCH 04/52] Add selector for getting section root clientId (#65001) * Normalize usage to private selector * Remove the lock * Avoid double call * Avoid setting default in selector Co-authored-by: getdave Co-authored-by: jeryj Co-authored-by: talldan Co-authored-by: scruffian --- .../block-tools/zoom-out-mode-inserters.js | 9 ++++++--- .../src/components/inner-blocks/index.js | 6 ++---- .../src/components/use-block-drop-zone/index.js | 10 ++++------ packages/block-editor/src/store/actions.js | 10 +++------- .../block-editor/src/store/private-selectors.js | 5 +++++ packages/block-editor/src/store/selectors.js | 13 ++++--------- .../editor/src/components/inserter-sidebar/index.js | 12 +++++------- 7 files changed, 29 insertions(+), 36 deletions(-) diff --git a/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js b/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js index d15ee34714f5d..30d51654b77cf 100644 --- a/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js +++ b/packages/block-editor/src/components/block-tools/zoom-out-mode-inserters.js @@ -10,7 +10,7 @@ import { useEffect, useState } from '@wordpress/element'; import BlockPopoverInbetween from '../block-popover/inbetween'; import ZoomOutModeInserterButton from './zoom-out-mode-inserter-button'; import { store as blockEditorStore } from '../../store'; -import { sectionRootClientIdKey } from '../../store/private-keys'; +import { unlock } from '../../lock-unlock'; function ZoomOutModeInserters() { const [ isReady, setIsReady ] = useState( false ); @@ -32,8 +32,11 @@ function ZoomOutModeInserters() { getSelectedBlockClientId, getHoveredBlockClientId, isBlockInsertionPointVisible, - } = select( blockEditorStore ); - const { [ sectionRootClientIdKey ]: root } = getSettings(); + getSectionRootClientId, + } = unlock( select( blockEditorStore ) ); + + const root = getSectionRootClientId(); + return { hasSelection: !! getSelectionStart().clientId, blockInsertionPoint: getBlockInsertionPoint(), diff --git a/packages/block-editor/src/components/inner-blocks/index.js b/packages/block-editor/src/components/inner-blocks/index.js index 9702044aeca6b..0d35b459190fe 100644 --- a/packages/block-editor/src/components/inner-blocks/index.js +++ b/packages/block-editor/src/components/inner-blocks/index.js @@ -30,7 +30,6 @@ import useBlockSync from '../provider/use-block-sync'; import { store as blockEditorStore } from '../../store'; import useBlockDropZone from '../use-block-drop-zone'; import { unlock } from '../../lock-unlock'; -import { sectionRootClientIdKey } from '../../store/private-keys'; const EMPTY_OBJECT = {}; @@ -204,7 +203,7 @@ export function useInnerBlocksProps( props = {}, options = {} ) { getBlockEditingMode, getBlockSettings, isDragging, - getSettings, + getSectionRootClientId, } = unlock( select( blockEditorStore ) ); let _isDropZoneDisabled; @@ -226,8 +225,7 @@ export function useInnerBlocksProps( props = {}, options = {} ) { // In zoom out mode, we want to disable the drop zone for the sections. // The inner blocks belonging to the section drop zone is // already disabled by the blocks themselves being disabled. - const { [ sectionRootClientIdKey ]: sectionRootClientId } = - getSettings(); + const sectionRootClientId = getSectionRootClientId(); _isDropZoneDisabled = clientId !== sectionRootClientId; } diff --git a/packages/block-editor/src/components/use-block-drop-zone/index.js b/packages/block-editor/src/components/use-block-drop-zone/index.js index fb25368239a01..5af8291523370 100644 --- a/packages/block-editor/src/components/use-block-drop-zone/index.js +++ b/packages/block-editor/src/components/use-block-drop-zone/index.js @@ -24,7 +24,6 @@ import { } from '../../utils/math'; import { store as blockEditorStore } from '../../store'; import { unlock } from '../../lock-unlock'; -import { sectionRootClientIdKey } from '../../store/private-keys'; const THRESHOLD_DISTANCE = 30; const MINIMUM_HEIGHT_FOR_THRESHOLD = 120; @@ -314,8 +313,8 @@ export default function useBlockDropZone( { getAllowedBlocks, isDragging, isGroupable, - getSettings, isZoomOutMode, + getSectionRootClientId, } = unlock( useSelect( blockEditorStore ) ); const { showInsertionPoint, @@ -361,8 +360,7 @@ export default function useBlockDropZone( { return; } - const { [ sectionRootClientIdKey ]: sectionRootClientId } = - getSettings(); + const sectionRootClientId = getSectionRootClientId(); // In Zoom Out mode, if the target is not the section root provided by settings then // do not allow dropping as the drop target is not within the root (that which is @@ -494,6 +492,8 @@ export default function useBlockDropZone( { getBlockNamesByClientId, getDraggedBlockClientIds, getBlockType, + getSectionRootClientId, + isZoomOutMode, getBlocks, getBlockListSettings, dropZoneElement, @@ -506,8 +506,6 @@ export default function useBlockDropZone( { isGroupable, getBlockVariations, getGroupingBlockName, - getSettings, - isZoomOutMode, ] ), 200 diff --git a/packages/block-editor/src/store/actions.js b/packages/block-editor/src/store/actions.js index ebd310b3de9d3..e91f997ca6783 100644 --- a/packages/block-editor/src/store/actions.js +++ b/packages/block-editor/src/store/actions.js @@ -34,9 +34,6 @@ import { __experimentalUpdateSettings, privateRemoveBlocks, } from './private-actions'; -import { STORE_NAME } from './constants'; - -import { sectionRootClientIdKey } from './private-keys'; /** @typedef {import('../components/use-on-block-drop/types').WPDropOperation} WPDropOperation */ @@ -1671,13 +1668,12 @@ export const setNavigationMode = */ export const __unstableSetEditorMode = ( mode ) => - ( { dispatch, select, registry } ) => { + ( { dispatch, select } ) => { // When switching to zoom-out mode, we need to select the parent section if ( mode === 'zoom-out' ) { const firstSelectedClientId = select.getBlockSelectionStart(); - const { [ sectionRootClientIdKey ]: sectionRootClientId } = registry - .select( STORE_NAME ) - .getSettings(); + + const sectionRootClientId = select.getSectionRootClientId(); if ( firstSelectedClientId ) { let sectionClientId; diff --git a/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js index 9cc793362296c..7e323cee6581a 100644 --- a/packages/block-editor/src/store/private-selectors.js +++ b/packages/block-editor/src/store/private-selectors.js @@ -28,6 +28,7 @@ import { unlock } from '../lock-unlock'; import { selectBlockPatternsKey, reusableBlocksSelectKey, + sectionRootClientIdKey, } from './private-keys'; export { getBlockSettings } from './get-block-settings'; @@ -543,3 +544,7 @@ export const getBlockStyles = createSelector( export function isZoomOutMode( state ) { return state.editorMode === 'zoom-out'; } + +export function getSectionRootClientId( state ) { + return state.settings?.[ sectionRootClientIdKey ]; +} diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 2a840392fbffe..30fdb76bdbe78 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -37,10 +37,9 @@ import { getContentLockingParent, getTemporarilyEditingAsBlocks, getTemporarilyEditingFocusModeToRevert, + getSectionRootClientId, } from './private-selectors'; -import { sectionRootClientIdKey } from './private-keys'; - /** * A block selection object. * @@ -2061,9 +2060,7 @@ export const getInserterItems = createRegistrySelector( ( select ) => let sectionRootClientId; try { sectionRootClientId = - getSettings( state )[ - sectionRootClientIdKey - ]; + getSectionRootClientId( state ); } catch ( e ) {} if ( sectionRootClientId && @@ -2841,8 +2838,7 @@ export function __unstableHasActiveBlockOverlayActive( state, clientId ) { // In zoom-out mode, the block overlay is always active for section level blocks. if ( editorMode === 'zoom-out' ) { - const { [ sectionRootClientIdKey ]: sectionRootClientId } = - getSettings( state ); + const sectionRootClientId = getSectionRootClientId( state ); if ( sectionRootClientId ) { const sectionClientIds = getBlockOrder( state, @@ -2935,8 +2931,7 @@ export const getBlockEditingMode = createRegistrySelector( // sections. const editorMode = __unstableGetEditorMode( state ); if ( editorMode === 'zoom-out' ) { - const { [ sectionRootClientIdKey ]: sectionRootClientId } = - getSettings( state ); + const sectionRootClientId = getSectionRootClientId( state ); if ( clientId === '' /* ROOT_CONTAINER_CLIENT_ID */ ) { return sectionRootClientId ? 'disabled' : 'contentOnly'; diff --git a/packages/editor/src/components/inserter-sidebar/index.js b/packages/editor/src/components/inserter-sidebar/index.js index 3e54fec6cc06b..fef5e54e52f68 100644 --- a/packages/editor/src/components/inserter-sidebar/index.js +++ b/packages/editor/src/components/inserter-sidebar/index.js @@ -18,9 +18,7 @@ import { store as interfaceStore } from '@wordpress/interface'; import { unlock } from '../../lock-unlock'; import { store as editorStore } from '../../store'; -const { PrivateInserterLibrary, sectionRootClientIdKey } = unlock( - blockEditorPrivateApis -); +const { PrivateInserterLibrary } = unlock( blockEditorPrivateApis ); export default function InserterSidebar() { const { @@ -40,14 +38,14 @@ export default function InserterSidebar() { getBlockInsertionPoint, getBlockRootClientId, __unstableGetEditorMode, - getSettings, - } = select( blockEditorStore ); + getSectionRootClientId, + } = unlock( select( blockEditorStore ) ); const { get } = select( preferencesStore ); const { getActiveComplementaryArea } = select( interfaceStore ); const getBlockSectionRootClientId = () => { if ( __unstableGetEditorMode() === 'zoom-out' ) { - const { [ sectionRootClientIdKey ]: sectionRootClientId } = - getSettings(); + const sectionRootClientId = getSectionRootClientId(); + if ( sectionRootClientId ) { return sectionRootClientId; } From 2807adb9a174ea45427bb9683b57d6332c751fce Mon Sep 17 00:00:00 2001 From: Carlos Bravo <37012961+cbravobernal@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:23:42 +0200 Subject: [PATCH 05/52] Block bindings: Lock editing in fields in editor if meta fields panel is opened. (#64738) * Lock editing bindings if meta fields interface is opened * Update snapshots * Refactor the EnableCustomFieldsOption component to improve code readability and maintainability. * Update snapshots * Remove extra text Co-authored-by: cbravobernal Co-authored-by: SantosGuillamot Co-authored-by: artemiomorales Co-authored-by: gziolo --- packages/editor/src/bindings/post-meta.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/editor/src/bindings/post-meta.js b/packages/editor/src/bindings/post-meta.js index 1ecd6ea50ba27..4de8396d4c13b 100644 --- a/packages/editor/src/bindings/post-meta.js +++ b/packages/editor/src/bindings/post-meta.js @@ -62,6 +62,12 @@ export default { if ( fieldValue === undefined ) { return false; } + // Check that custom fields metabox is not enabled. + const areCustomFieldsEnabled = + select( editorStore ).getEditorSettings().enableCustomFields; + if ( areCustomFieldsEnabled ) { + return false; + } // Check that the user has the capability to edit post meta. const canUserEdit = select( coreDataStore ).canUser( 'update', { From c5b5135bfb9dd0460b7f64b82fecb18cb0e0afe5 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:01:25 +0900 Subject: [PATCH 06/52] DatePicker: restore round radius for event dot (#65031) * DatePicker: restore round radius for event dot * Add CHANGELOG Co-authored-by: t-hamano Co-authored-by: tyxla --- packages/components/CHANGELOG.md | 1 + packages/components/src/date-time/date/styles.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 81ad1717801a9..33677f10b58fc 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -64,6 +64,7 @@ - `TimePicker`: use ToggleGroupControl for AM/PM toggle ([#64800](https://github.com/WordPress/gutenberg/pull/64800)). - `ColorPalette` utils: do not normalize undefined color values ([#64969](https://github.com/WordPress/gutenberg/pull/64969)). +- `DatePicker` restore round radius for event dot ([#65031](https://github.com/WordPress/gutenberg/pull/65031)). ### Internal diff --git a/packages/components/src/date-time/date/styles.ts b/packages/components/src/date-time/date/styles.ts index 8f208b53fac22..bffc8ae35d2a6 100644 --- a/packages/components/src/date-time/date/styles.ts +++ b/packages/components/src/date-time/date/styles.ts @@ -107,6 +107,7 @@ export const DayButton = styled( Button, { ` ::before { background: ${ props.isSelected ? COLORS.white : COLORS.theme.accent }; + border-radius: ${ CONFIG.radiusRound }; bottom: 2px; content: " "; height: 4px; From 6730169bf55353f504c17447f40b3ae1cfa37567 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 4 Sep 2024 14:27:44 +0400 Subject: [PATCH 07/52] Patterns: Pass 'blocks' as inner blocks value (#65029) * Patterns (Try): Pass 'blocks' as inner blocks value * Remove comment Unlinked contributors: rdoughbs. Co-authored-by: Mamaduka Co-authored-by: talldan Co-authored-by: SantosGuillamot Co-authored-by: annezazu Co-authored-by: arthur791004 Co-authored-by: ellatrix Co-authored-by: skorasaurus Co-authored-by: noisysocks Co-authored-by: htmgarcia Co-authored-by: rfischmann --- packages/block-library/src/block/edit.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index 3dd5faf67b31f..af9c99876e9d2 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -248,11 +248,10 @@ function ReusableBlockEdit( { ), } ); - // Use `blocks` variable until `innerBlocks` is populated, which has the proper clientIds. const innerBlocksProps = useInnerBlocksProps( blockProps, { templateLock: 'all', layout, - value: innerBlocks.length > 0 ? innerBlocks : blocks, + value: blocks, onInput: NOOP, onChange: NOOP, renderAppender: blocks?.length From bca5c2554f79431a804bd5ae41816cb59da86e61 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 4 Sep 2024 12:52:18 +0200 Subject: [PATCH 08/52] Add context to `View` string in post actions (#65046) Co-authored-by: swissspidy Co-authored-by: youknowriad --- packages/editor/src/dataviews/actions/view-post.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/dataviews/actions/view-post.tsx b/packages/editor/src/dataviews/actions/view-post.tsx index 47eb1a66d019a..187faffafb5d3 100644 --- a/packages/editor/src/dataviews/actions/view-post.tsx +++ b/packages/editor/src/dataviews/actions/view-post.tsx @@ -2,7 +2,7 @@ * WordPress dependencies */ import { external } from '@wordpress/icons'; -import { __ } from '@wordpress/i18n'; +import { _x } from '@wordpress/i18n'; import type { Action } from '@wordpress/dataviews'; /** @@ -12,7 +12,7 @@ import type { BasePost } from '../types'; const viewPost: Action< BasePost > = { id: 'view-post', - label: __( 'View' ), + label: _x( 'View', 'verb' ), isPrimary: true, icon: external, isEligible( post ) { From 6accdd3a2d1c02ea9eea9093c9c751d09e487cbb Mon Sep 17 00:00:00 2001 From: Jacob Cassidy Date: Wed, 4 Sep 2024 18:27:13 +0700 Subject: [PATCH 09/52] Scripts: Update `puppeteer-core` dependency (#64597) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix the issue with `@wordpress/scripts` having 5 high severity vulnerabilities by upgrading the `puppeteer-core` package to the latest version (23.1.0) * Update scripts package version to 28.6.0 * Remove manual CHANGELOG version change * Remove manual version update from `package.json` * Update CHANGELOG.md * Add `"puppeteer-core": "23.1.0"` as a `devDependencies` * Update package-lock.json with `"puppeteer-core": "23.1.0"` as a `devDependencies` in package.json --------- Co-authored-by: Greg Ziółkowski Co-authored-by: jacobcassidy Co-authored-by: gziolo Co-authored-by: Mamaduka --- package-lock.json | 675 +++++++++++++++++++++++++++------- package.json | 1 + packages/scripts/CHANGELOG.md | 4 + packages/scripts/package.json | 2 +- 4 files changed, 539 insertions(+), 143 deletions(-) diff --git a/package-lock.json b/package-lock.json index a5841a06e163e..e9ae02a0c4768 100644 --- a/package-lock.json +++ b/package-lock.json @@ -221,6 +221,7 @@ "postcss-local-keyframes": "^0.0.2", "prettier": "npm:wp-prettier@3.0.3", "progress": "2.0.3", + "puppeteer-core": "23.1.0", "react": "18.3.1", "react-dom": "18.3.1", "react-native": "0.73.3", @@ -22569,15 +22570,6 @@ "node": ">=4.0" } }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dev": true, - "dependencies": { - "node-fetch": "2.6.7" - } - }, "node_modules/cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -24111,10 +24103,11 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.981744", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", - "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", - "dev": true + "version": "0.0.1312386", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz", + "integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==", + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/diff": { "version": "4.0.2", @@ -42325,33 +42318,120 @@ } }, "node_modules/puppeteer-core": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.7.0.tgz", - "integrity": "sha512-rXja4vcnAzFAP1OVLq/5dWNfwBGuzcOARJ6qGV7oAZhnLmVRU8G5MsdeQEAOy332ZhkIOnn9jp15R89LKHyp2Q==", + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.1.0.tgz", + "integrity": "sha512-SvAsu+xnLN2FMXE/59bp3s3WXp8ewqUGzVV4AQtml/2xmsciZnU/bXcCW+eETHPWQ6Agg2vTI7QzWXPpEARK2g==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "cross-fetch": "3.1.5", - "debug": "4.3.4", - "devtools-protocol": "0.0.981744", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.1", - "pkg-dir": "4.2.0", - "progress": "2.0.3", - "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", - "tar-fs": "2.1.1", - "unbzip2-stream": "1.4.3", - "ws": "8.5.0" + "@puppeteer/browsers": "2.3.1", + "chromium-bidi": "0.6.4", + "debug": "^4.3.6", + "devtools-protocol": "0.0.1312386", + "typed-query-selector": "^2.12.0", + "ws": "^8.18.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/puppeteer-core/node_modules/@puppeteer/browsers": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.3.1.tgz", + "integrity": "sha512-uK7o3hHkK+naEobMSJ+2ySYyXtQkBxIH8Gn4MK9ciePjNV+Pf+PgY/W7iPzn2MTjl3stcYB5AlcTmPYw7AXDwA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.3.6", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" }, "engines": { - "node": ">=10.18.1" + "node": ">=18" } }, + "node_modules/puppeteer-core/node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/puppeteer-core/node_modules/chromium-bidi": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.4.tgz", + "integrity": "sha512-8zoq6ogmhQQkAKZVKO2ObFTl4uOkqoX1PlKQX3hZQ5E9cbUotcAb7h4pTNVAGGv8Z36PF3CtdOriEp/Rz82JqQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mitt": "3.0.1", + "urlpattern-polyfill": "10.0.0", + "zod": "3.23.8" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, + "node_modules/puppeteer-core/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/puppeteer-core/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/puppeteer-core/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, "node_modules/puppeteer-core/node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -42367,99 +42447,199 @@ "@types/yauzl": "^2.9.1" } }, - "node_modules/puppeteer-core/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/puppeteer-core/node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, + "license": "MIT", "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">=8" + "node": ">= 14" } }, - "node_modules/puppeteer-core/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/puppeteer-core/node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, + "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "agent-base": "^7.0.2", + "debug": "4" }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/puppeteer-core/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/puppeteer-core/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/puppeteer-core/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/puppeteer-core/node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true, + "license": "MIT" + }, + "node_modules/puppeteer-core/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/puppeteer-core/node_modules/proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", "dev": true, + "license": "MIT", "dependencies": { - "p-try": "^2.0.0" + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 14" } }, - "node_modules/puppeteer-core/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/puppeteer-core/node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, + "license": "MIT", "dependencies": { - "p-limit": "^2.2.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/puppeteer-core/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/puppeteer-core/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/puppeteer-core/node_modules/socks-proxy-agent": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, "engines": { - "node": ">=6" + "node": ">= 14" } }, - "node_modules/puppeteer-core/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/puppeteer-core/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, "engines": { "node": ">=8" } }, - "node_modules/puppeteer-core/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/puppeteer-core/node_modules/tar-fs": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", "dev": true, + "license": "MIT", "dependencies": { - "find-up": "^4.0.0" + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0" + } + }, + "node_modules/puppeteer-core/node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/puppeteer-core/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/puppeteer-core/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -42470,6 +42650,45 @@ } } }, + "node_modules/puppeteer-core/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/puppeteer-core/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/puppeteer-core/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/pure-rand": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", @@ -48633,6 +48852,12 @@ "node": ">= 10" } }, + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "dev": true + }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -49318,6 +49543,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "dev": true + }, "node_modules/use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -54591,7 +54822,7 @@ "postcss-import": "^16.1.0", "postcss-loader": "^6.2.1", "prettier": "npm:wp-prettier@3.0.3", - "puppeteer-core": "^13.2.0", + "puppeteer-core": "^23.1.0", "react-refresh": "^0.14.0", "read-pkg-up": "^7.0.1", "resolve-bin": "^0.4.0", @@ -68770,7 +69001,7 @@ "postcss-import": "^16.1.0", "postcss-loader": "^6.2.1", "prettier": "npm:wp-prettier@3.0.3", - "puppeteer-core": "^13.2.0", + "puppeteer-core": "^23.1.0", "react-refresh": "^0.14.0", "read-pkg-up": "^7.0.1", "resolve-bin": "^0.4.0", @@ -73319,15 +73550,6 @@ "is-windows": "^1.0.0" } }, - "cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dev": true, - "requires": { - "node-fetch": "2.6.7" - } - }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -74451,9 +74673,9 @@ } }, "devtools-protocol": { - "version": "0.0.981744", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", - "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", + "version": "0.0.1312386", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz", + "integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==", "dev": true }, "diff": { @@ -88284,25 +88506,81 @@ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" }, "puppeteer-core": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.7.0.tgz", - "integrity": "sha512-rXja4vcnAzFAP1OVLq/5dWNfwBGuzcOARJ6qGV7oAZhnLmVRU8G5MsdeQEAOy332ZhkIOnn9jp15R89LKHyp2Q==", + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.1.0.tgz", + "integrity": "sha512-SvAsu+xnLN2FMXE/59bp3s3WXp8ewqUGzVV4AQtml/2xmsciZnU/bXcCW+eETHPWQ6Agg2vTI7QzWXPpEARK2g==", "dev": true, "requires": { - "cross-fetch": "3.1.5", - "debug": "4.3.4", - "devtools-protocol": "0.0.981744", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.1", - "pkg-dir": "4.2.0", - "progress": "2.0.3", - "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", - "tar-fs": "2.1.1", - "unbzip2-stream": "1.4.3", - "ws": "8.5.0" + "@puppeteer/browsers": "2.3.1", + "chromium-bidi": "0.6.4", + "debug": "^4.3.6", + "devtools-protocol": "0.0.1312386", + "typed-query-selector": "^2.12.0", + "ws": "^8.18.0" }, "dependencies": { + "@puppeteer/browsers": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.3.1.tgz", + "integrity": "sha512-uK7o3hHkK+naEobMSJ+2ySYyXtQkBxIH8Gn4MK9ciePjNV+Pf+PgY/W7iPzn2MTjl3stcYB5AlcTmPYw7AXDwA==", + "dev": true, + "requires": { + "debug": "^4.3.6", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" + } + }, + "agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "requires": { + "debug": "^4.3.4" + } + }, + "chromium-bidi": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.4.tgz", + "integrity": "sha512-8zoq6ogmhQQkAKZVKO2ObFTl4uOkqoX1PlKQX3hZQ5E9cbUotcAb7h4pTNVAGGv8Z36PF3CtdOriEp/Rz82JqQ==", + "dev": true, + "requires": { + "mitt": "3.0.1", + "urlpattern-polyfill": "10.0.0", + "zod": "3.23.8" + } + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", @@ -88315,68 +88593,169 @@ "yauzl": "^2.10.0" } }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "agent-base": "^7.1.0", + "debug": "^4.3.4" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, "requires": { - "p-locate": "^4.1.0" + "agent-base": "^7.0.2", + "debug": "4" } }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true + }, + "mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" } }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { - "p-limit": "^2.2.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "socks-proxy-agent": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "dev": true, + "requires": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.8.3" + } }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "find-up": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "tar-fs": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", + "dev": true, + "requires": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dev": true, + "requires": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, "ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "dev": true + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true } } @@ -93104,6 +93483,12 @@ "integrity": "sha512-bctQIOqx2iVbWGDGPWwIm18QScpu2XRmkC19D8rQGFsjKSgteq/o1hTZvIG/wuDq8fanpBDrLkLq+aEN/6y5XQ==", "dev": true }, + "typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "dev": true + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -93631,6 +94016,12 @@ "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==", "dev": true }, + "urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "dev": true + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", diff --git a/package.json b/package.json index c0a7853a41817..32f114cb9afa4 100644 --- a/package.json +++ b/package.json @@ -233,6 +233,7 @@ "postcss-local-keyframes": "^0.0.2", "prettier": "npm:wp-prettier@3.0.3", "progress": "2.0.3", + "puppeteer-core": "23.1.0", "react": "18.3.1", "react-dom": "18.3.1", "react-native": "0.73.3", diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index cd796ba46dbfa..9d666313f76ab 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Fixed the issue with having 5 high severity vulnerabilities by upgrading the `puppeteer-core` package to the latest major version `^23.1.0` ([#64597](https://github.com/WordPress/gutenberg/pull/64597)). + ### Enhancements - Inlines CSS files imported from other CSS files before optimization in the `build` command ([#61121](https://github.com/WordPress/gutenberg/pull/61121)). diff --git a/packages/scripts/package.json b/packages/scripts/package.json index c4582ba65d15e..291b8a58bca40 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -76,7 +76,7 @@ "postcss-import": "^16.1.0", "postcss-loader": "^6.2.1", "prettier": "npm:wp-prettier@3.0.3", - "puppeteer-core": "^13.2.0", + "puppeteer-core": "^23.1.0", "react-refresh": "^0.14.0", "read-pkg-up": "^7.0.1", "resolve-bin": "^0.4.0", From 04cf5797631e746cfd4bcaae11aa687ad6cb33be Mon Sep 17 00:00:00 2001 From: Bernie Reiter <96308+ockham@users.noreply.github.com> Date: Wed, 4 Sep 2024 13:54:12 +0200 Subject: [PATCH 10/52] Categories Block: Add iAPI directive for client-side routing (#64907) Enable client-side navigation for the Categories block, when used within the Query Loop block. Co-authored-by: ockham Co-authored-by: gziolo Co-authored-by: michalczaplinski Co-authored-by: luisherranz Co-authored-by: dmsnell --- packages/block-library/src/categories/block.json | 1 + packages/block-library/src/categories/index.php | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/categories/block.json b/packages/block-library/src/categories/block.json index f192087dfb461..460fbef92fdab 100644 --- a/packages/block-library/src/categories/block.json +++ b/packages/block-library/src/categories/block.json @@ -36,6 +36,7 @@ "default": true } }, + "usesContext": [ "enhancedPagination" ], "supports": { "align": true, "html": false, diff --git a/packages/block-library/src/categories/index.php b/packages/block-library/src/categories/index.php index 062130e85010a..5c0cc63415cb7 100644 --- a/packages/block-library/src/categories/index.php +++ b/packages/block-library/src/categories/index.php @@ -9,12 +9,15 @@ * Renders the `core/categories` block on server. * * @since 5.0.0 + * @since 6.7.0 Enable client-side rendering if enhancedPagination context is true. * - * @param array $attributes The block attributes. + * @param array $attributes The block attributes. + * @param string $content Block default content. + * @param WP_Block $block Block instance. * * @return string Returns the categories list/dropdown markup. */ -function render_block_core_categories( $attributes ) { +function render_block_core_categories( $attributes, $content, $block ) { static $block_id = 0; ++$block_id; @@ -54,6 +57,14 @@ function render_block_core_categories( $attributes ) { $wrapper_markup = '
    %2$s
'; $items_markup = wp_list_categories( $args ); $type = 'list'; + + if ( ! empty( $block->context['enhancedPagination'] ) ) { + $p = new WP_HTML_Tag_Processor( $items_markup ); + while ( $p->next_tag( 'a' ) ) { + $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' ); + } + $items_markup = $p->get_updated_html(); + } } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => "wp-block-categories-{$type}" ) ); From c2b0226456bc968be3faba7c4e874a3712902cb7 Mon Sep 17 00:00:00 2001 From: Mitchell Austin Date: Wed, 4 Sep 2024 05:09:11 -0700 Subject: [PATCH 11/52] Post Editor: fix click space after post content to append (#64992) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix minimally * Revise comment * Stop propagation and don’t prevent default * Insert default block if no blocks are present --- packages/edit-post/src/components/layout/index.js | 4 ++-- .../src/components/layout/use-padding-appender.js | 15 +++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index 519b32691c6a4..185f97ba45a56 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -126,8 +126,8 @@ function useEditorStyles() { ? editorSettings.styles ?? [] : defaultEditorStyles; - // Add a constant padding for the typewriter effect. When typing at the - // bottom, there needs to be room to scroll up. + // Add a space for the typewriter effect. When typing in the last block, + // there needs to be room to scroll up. if ( ! isZoomedOutView && renderingMode === 'post-only' && diff --git a/packages/edit-post/src/components/layout/use-padding-appender.js b/packages/edit-post/src/components/layout/use-padding-appender.js index ff342ded90817..efd46a485058c 100644 --- a/packages/edit-post/src/components/layout/use-padding-appender.js +++ b/packages/edit-post/src/components/layout/use-padding-appender.js @@ -18,12 +18,12 @@ export function usePaddingAppender() { const { ownerDocument } = node; const { defaultView } = ownerDocument; - const paddingBottom = defaultView.parseInt( - defaultView.getComputedStyle( node ).paddingBottom, + const pseudoHeight = defaultView.parseInt( + defaultView.getComputedStyle( node, ':after' ).height, 10 ); - if ( ! paddingBottom ) { + if ( ! pseudoHeight ) { return; } @@ -38,25 +38,20 @@ export function usePaddingAppender() { return; } - event.preventDefault(); + event.stopPropagation(); const blockOrder = registry .select( blockEditorStore ) .getBlockOrder( '' ); const lastBlockClientId = blockOrder[ blockOrder.length - 1 ]; - // Do nothing when only default block appender is present. - if ( ! lastBlockClientId ) { - return; - } - const lastBlock = registry .select( blockEditorStore ) .getBlock( lastBlockClientId ); const { selectBlock, insertDefaultBlock } = registry.dispatch( blockEditorStore ); - if ( isUnmodifiedDefaultBlock( lastBlock ) ) { + if ( lastBlock && isUnmodifiedDefaultBlock( lastBlock ) ) { selectBlock( lastBlockClientId ); } else { insertDefaultBlock(); From 6fecca7efe7a6158b45a547d41b9b7a2e0ce31e7 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Wed, 4 Sep 2024 13:16:19 +0100 Subject: [PATCH 12/52] Zoom Out: Remove the experiment that connects zoom out to the pattern inserter (#65045) Co-authored-by: scruffian Co-authored-by: Mamaduka Co-authored-by: getdave --- lib/experimental/editor-settings.php | 3 --- lib/experiments-page.php | 12 ------------ .../block-editor/src/components/inserter/menu.js | 6 ------ 3 files changed, 21 deletions(-) diff --git a/lib/experimental/editor-settings.php b/lib/experimental/editor-settings.php index c6bd99a18bf4c..d27de1a304273 100644 --- a/lib/experimental/editor-settings.php +++ b/lib/experimental/editor-settings.php @@ -28,9 +28,6 @@ function gutenberg_enable_experiments() { if ( gutenberg_is_experiment_enabled( 'gutenberg-full-page-client-side-navigation' ) ) { wp_add_inline_script( 'wp-block-library', 'window.__experimentalFullPageClientSideNavigation = true', 'before' ); } - if ( $gutenberg_experiments && array_key_exists( 'gutenberg-zoomed-out-patterns-tab', $gutenberg_experiments ) ) { - wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableZoomedOutPatternsTab = true', 'before' ); - } if ( $gutenberg_experiments && array_key_exists( 'gutenberg-quick-edit-dataviews', $gutenberg_experiments ) ) { wp_add_inline_script( 'wp-block-editor', 'window.__experimentalQuickEditDataViews = true', 'before' ); } diff --git a/lib/experiments-page.php b/lib/experiments-page.php index f76dcdca7d18c..634d7e33c4381 100644 --- a/lib/experiments-page.php +++ b/lib/experiments-page.php @@ -139,18 +139,6 @@ function gutenberg_initialize_experiments_settings() { ) ); - add_settings_field( - 'gutenberg-zoomed-out-patterns-tab', - __( 'Enable zoomed out view when patterns are browsed in the inserter', 'gutenberg' ), - 'gutenberg_display_experiment_field', - 'gutenberg-experiments', - 'gutenberg_experiments_section', - array( - 'label' => __( 'Enable zoomed out view when selecting a pattern category in the main inserter.', 'gutenberg' ), - 'id' => 'gutenberg-zoomed-out-patterns-tab', - ) - ); - add_settings_field( 'gutenberg-new-posts-dashboard', __( 'Redesigned posts dashboard', 'gutenberg' ), diff --git a/packages/block-editor/src/components/inserter/menu.js b/packages/block-editor/src/components/inserter/menu.js index bac53b680c71f..b884ea9758845 100644 --- a/packages/block-editor/src/components/inserter/menu.js +++ b/packages/block-editor/src/components/inserter/menu.js @@ -32,7 +32,6 @@ import InserterSearchResults from './search-results'; import useInsertionPoint from './hooks/use-insertion-point'; import { store as blockEditorStore } from '../../store'; import TabbedSidebar from '../tabbed-sidebar'; -import { useZoomOut } from '../../hooks/use-zoom-out'; const NOOP = () => {}; function InserterMenu( @@ -147,11 +146,6 @@ function InserterMenu( const showMediaPanel = selectedTab === 'media' && !! selectedMediaCategory; - const showZoomOut = - showPatternPanel && !! window.__experimentalEnableZoomedOutPatternsTab; - - useZoomOut( showZoomOut ); - const inserterSearch = useMemo( () => { if ( selectedTab === 'media' ) { return null; From f0608fc8d84c3ecaf41686abc5209321fb561430 Mon Sep 17 00:00:00 2001 From: Tom Cafferkey Date: Wed, 4 Sep 2024 13:36:18 +0100 Subject: [PATCH 13/52] Pagination Block: Fix inconsistent margins between editor and frontend (#64874) * Remove hardcoded margins for query pagination block --- .../src/query-pagination/editor.scss | 20 ------------------- .../src/query-pagination/style.scss | 15 -------------- 2 files changed, 35 deletions(-) diff --git a/packages/block-library/src/query-pagination/editor.scss b/packages/block-library/src/query-pagination/editor.scss index 0b755d155091f..ed8a2cc47a30f 100644 --- a/packages/block-library/src/query-pagination/editor.scss +++ b/packages/block-library/src/query-pagination/editor.scss @@ -1,5 +1,3 @@ -$pagination-margin: 0.5em; - // Center flex items. This has an equivalent in style.scss. .wp-block[data-align="center"] > .wp-block-query-pagination { justify-content: center; @@ -14,21 +12,3 @@ $pagination-margin: 0.5em; } } -.wp-block-query-pagination { - > .wp-block-query-pagination-next, - > .wp-block-query-pagination-previous, - > .wp-block-query-pagination-numbers { - // Override editor auto block margins. - margin-left: 0; - margin-top: $pagination-margin; - - /*rtl:ignore*/ - margin-right: $pagination-margin; - margin-bottom: $pagination-margin; - - &:last-child { - /*rtl:ignore*/ - margin-right: 0; - } - } -} diff --git a/packages/block-library/src/query-pagination/style.scss b/packages/block-library/src/query-pagination/style.scss index a7f2832af48c7..e949c766e5651 100644 --- a/packages/block-library/src/query-pagination/style.scss +++ b/packages/block-library/src/query-pagination/style.scss @@ -1,19 +1,4 @@ -$pagination-margin: 0.5em; .wp-block-query-pagination { - // Increased specificity to override blocks default margin. - > .wp-block-query-pagination-next, - > .wp-block-query-pagination-previous, - > .wp-block-query-pagination-numbers { - /*rtl:ignore*/ - margin-right: $pagination-margin; - margin-bottom: $pagination-margin; - - &:last-child { - /*rtl:ignore*/ - margin-right: 0; - } - } - // This moves the next link to the right side of the container, // which is important when it's the only block displayed // and the block has a "space-between" justification. From 9691105c3f06e3364ddba23f5927f4ec7d32d6a0 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Wed, 4 Sep 2024 13:44:10 +0100 Subject: [PATCH 14/52] Add new zoom out experiment (#65048) * Zoom Out: Add a new experiment for zoom out * Update lib/experiments-page.php Co-authored-by: Dave Smith --------- Co-authored-by: Dave Smith Co-authored-by: scruffian Co-authored-by: getdave --- lib/experimental/editor-settings.php | 3 ++ lib/experiments-page.php | 11 ++++++++ .../src/components/preview-dropdown/index.js | 28 ++++++++++--------- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/lib/experimental/editor-settings.php b/lib/experimental/editor-settings.php index d27de1a304273..f7cedd98239a3 100644 --- a/lib/experimental/editor-settings.php +++ b/lib/experimental/editor-settings.php @@ -37,6 +37,9 @@ function gutenberg_enable_experiments() { if ( $gutenberg_experiments && array_key_exists( 'gutenberg-media-processing', $gutenberg_experiments ) ) { wp_add_inline_script( 'wp-block-editor', 'window.__experimentalMediaProcessing = true', 'before' ); } + if ( $gutenberg_experiments && array_key_exists( 'gutenberg-zoom-out-experiment', $gutenberg_experiments ) ) { + wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableZoomOutExperiment = true', 'before' ); + } } add_action( 'admin_init', 'gutenberg_enable_experiments' ); diff --git a/lib/experiments-page.php b/lib/experiments-page.php index 634d7e33c4381..1b7df237176a2 100644 --- a/lib/experiments-page.php +++ b/lib/experiments-page.php @@ -187,6 +187,17 @@ function gutenberg_initialize_experiments_settings() { ) ); + add_settings_field( + 'gutenberg-zoom-out-experiment', + __( 'Zoom out experiments', 'gutenberg' ), + 'gutenberg_display_experiment_field', + 'gutenberg-experiments', + 'gutenberg_experiments_section', + array( + 'label' => __( 'Enable zoom out experiments; shows zoom out in the device preview and other zoom out experiments.', 'gutenberg' ), + 'id' => 'gutenberg-zoom-out-experiment', + ) + ); register_setting( 'gutenberg-experiments', 'gutenberg-experiments' diff --git a/packages/editor/src/components/preview-dropdown/index.js b/packages/editor/src/components/preview-dropdown/index.js index 8b51bb79bc887..5acaa351c9bb7 100644 --- a/packages/editor/src/components/preview-dropdown/index.js +++ b/packages/editor/src/components/preview-dropdown/index.js @@ -112,22 +112,24 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) { label: __( 'Desktop' ), icon: desktop, }, - { + ]; + if ( window.__experimentalEnableZoomOutExperiment ) { + choices.push( { value: 'ZoomOut', label: __( 'Desktop (50%)' ), icon: desktop, - }, - { - value: 'Tablet', - label: __( 'Tablet' ), - icon: tablet, - }, - { - value: 'Mobile', - label: __( 'Mobile' ), - icon: mobile, - }, - ]; + } ); + } + choices.push( { + value: 'Tablet', + label: __( 'Tablet' ), + icon: tablet, + } ); + choices.push( { + value: 'Mobile', + label: __( 'Mobile' ), + icon: mobile, + } ); const previewValue = editorMode === 'zoom-out' ? 'ZoomOut' : deviceType; From cd77dd950b7762ebfa99987ffb0b3ed8f9888d94 Mon Sep 17 00:00:00 2001 From: James Koster Date: Wed, 4 Sep 2024 13:45:47 +0100 Subject: [PATCH 15/52] Apply radius scale in the editor (#64930) Co-authored-by: jameskoster Co-authored-by: tyxla Co-authored-by: jasmussen --- packages/base-styles/_mixins.scss | 8 ++--- .../components/block-breadcrumb/style.scss | 2 +- .../components/block-draggable/content.scss | 2 +- .../src/components/block-draggable/style.scss | 2 +- .../src/components/block-list/content.scss | 3 +- .../src/components/block-lock/style.scss | 2 +- .../src/components/block-mover/style.scss | 2 +- .../components/block-pattern-setup/style.scss | 4 +-- .../components/block-patterns-list/style.scss | 4 +-- .../src/components/block-switcher/style.scss | 4 +-- .../src/components/block-tools/style.scss | 5 ++-- .../block-variation-transforms/style.scss | 2 +- .../button-block-appender/content.scss | 1 - .../components/colors-gradients/style.scss | 8 ++--- .../default-block-appender/content.scss | 1 - .../src/components/global-styles/style.scss | 4 +-- .../src/components/grid/style.scss | 2 +- .../components/inserter-list-item/style.scss | 4 +-- .../src/components/inserter/style.scss | 10 +++---- .../src/components/link-control/style.scss | 4 +-- .../src/components/list-view/style.scss | 29 +++++++++---------- .../src/components/rich-text/style.scss | 2 +- .../src/components/warning/content.scss | 2 +- .../block-library/src/freeform/editor.scss | 2 +- .../block-library/src/gallery/editor.scss | 2 +- packages/block-library/src/group/editor.scss | 1 - packages/block-library/src/image/editor.scss | 3 -- .../block-library/src/navigation/editor.scss | 3 +- packages/commands/src/components/style.scss | 4 +-- .../components/dataviews-filters/style.scss | 2 +- .../src/dataviews-layouts/grid/style.scss | 2 +- .../src/dataviews-layouts/list/style.scss | 4 +-- .../src/components/back-button/style.scss | 4 +-- .../components/add-new-template/style.scss | 3 +- .../editor-canvas-container/style.scss | 2 +- .../global-styles/screen-revisions/style.scss | 2 +- .../src/components/global-styles/style.scss | 10 +++---- .../global-styles/variations/style.scss | 3 +- .../src/components/layout/style.scss | 4 +-- .../src/components/page-patterns/style.scss | 4 +-- .../src/components/page-templates/style.scss | 3 +- .../src/components/post-list/style.scss | 2 +- .../components/sidebar-dataviews/style.scss | 2 +- .../sidebar-navigation-item/style.scss | 1 - .../sidebar-navigation-screen/style.scss | 1 - .../src/components/style-book/style.scss | 4 +-- .../components/document-outline/style.scss | 2 +- .../src/components/post-card-panel/style.scss | 2 +- .../components/post-featured-image/style.scss | 3 +- .../components/post-locked-modal/style.scss | 2 +- .../components/post-publish-panel/style.scss | 2 +- .../components/resizable-editor/style.scss | 4 +-- packages/patterns/src/components/style.scss | 4 +-- .../src/blocks/legacy-widget/editor.scss | 4 +-- .../src/blocks/widget-group/editor.scss | 2 +- 55 files changed, 89 insertions(+), 111 deletions(-) diff --git a/packages/base-styles/_mixins.scss b/packages/base-styles/_mixins.scss index 69735d75aac71..ebccbe0e5e8ae 100644 --- a/packages/base-styles/_mixins.scss +++ b/packages/base-styles/_mixins.scss @@ -74,7 +74,7 @@ @mixin input-style__neutral() { box-shadow: 0 0 0 transparent; transition: box-shadow 0.1s linear; - border-radius: $radius-block-ui; + border-radius: $radius-small; border: $border-width solid $gray-600; @include reduce-motion("transition"); } @@ -227,7 +227,7 @@ border: $border-width solid $gray-900; margin-right: $grid-unit-15; transition: none; - border-radius: $radius-block-ui; + border-radius: $radius-small; &:focus { box-shadow: 0 0 0 ($border-width * 2) $white, 0 0 0 ($border-width * 2 + $border-width-focus-fallback) var(--wp-admin-theme-color); @@ -363,7 +363,7 @@ &:focus { color: var(--wp-admin-theme-color--rgb); box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba); - border-radius: $radius-block-ui; + border-radius: $radius-small; } } @@ -375,7 +375,7 @@ padding: $grid-unit-15 !important; border: $border-width solid $gray-900 !important; box-shadow: none !important; - border-radius: $radius-block-ui !important; + border-radius: $radius-small !important; // Fonts smaller than 16px causes mobile safari to zoom. font-size: $mobile-text-min-font-size !important; diff --git a/packages/block-editor/src/components/block-breadcrumb/style.scss b/packages/block-editor/src/components/block-breadcrumb/style.scss index 5d2e3154dc2d9..78d422d7b0997 100644 --- a/packages/block-editor/src/components/block-breadcrumb/style.scss +++ b/packages/block-editor/src/components/block-breadcrumb/style.scss @@ -41,7 +41,7 @@ content: ""; display: block; position: absolute; - border-radius: $radius-block-ui; + border-radius: $radius-small; top: $border-width; right: $border-width; bottom: $border-width; diff --git a/packages/block-editor/src/components/block-draggable/content.scss b/packages/block-editor/src/components/block-draggable/content.scss index f1318daebd5a0..102230168e213 100644 --- a/packages/block-editor/src/components/block-draggable/content.scss +++ b/packages/block-editor/src/components/block-draggable/content.scss @@ -3,7 +3,7 @@ .block-editor-block-list__layout .is-dragging { background-color: currentColor !important; opacity: 0.05 !important; - border-radius: $radius-block-ui !important; + border-radius: $radius-small !important; // Disabling pointer events during the drag event is necessary, // lest the block might affect your drag operation. diff --git a/packages/block-editor/src/components/block-draggable/style.scss b/packages/block-editor/src/components/block-draggable/style.scss index afbf77319f720..349afa2c3563c 100644 --- a/packages/block-editor/src/components/block-draggable/style.scss +++ b/packages/block-editor/src/components/block-draggable/style.scss @@ -7,7 +7,7 @@ .block-editor-block-draggable-chip { background-color: $gray-900; - border-radius: $radius-block-ui; + border-radius: $radius-small; box-shadow: 0 6px 8px rgba($black, 0.3); color: $white; cursor: grabbing; diff --git a/packages/block-editor/src/components/block-list/content.scss b/packages/block-editor/src/components/block-list/content.scss index 15f0239d0f076..95bb610da9967 100644 --- a/packages/block-editor/src/components/block-list/content.scss +++ b/packages/block-editor/src/components/block-list/content.scss @@ -107,7 +107,7 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b right: 0; left: 0; top: -$default-block-margin * 0.5; - border-radius: $radius-block-ui; + border-radius: $radius-small; border-top: 4px solid $gray-400; bottom: auto; box-shadow: none; @@ -215,7 +215,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b right: 0; bottom: 0; left: 0; - border-radius: $radius-block-ui; background-color: rgba($white, 0.4); } diff --git a/packages/block-editor/src/components/block-lock/style.scss b/packages/block-editor/src/components/block-lock/style.scss index 8dc6bfb2021f0..ad59030a8f440 100644 --- a/packages/block-editor/src/components/block-lock/style.scss +++ b/packages/block-editor/src/components/block-lock/style.scss @@ -41,7 +41,7 @@ &:hover { background-color: $gray-100; - border-radius: $radius-block-ui; + border-radius: $radius-small; } } diff --git a/packages/block-editor/src/components/block-mover/style.scss b/packages/block-editor/src/components/block-mover/style.scss index 11bc362663a4d..c58ac9f19673f 100644 --- a/packages/block-editor/src/components/block-mover/style.scss +++ b/packages/block-editor/src/components/block-mover/style.scss @@ -76,7 +76,7 @@ content: ""; position: absolute; display: block; - border-radius: $radius-block-ui; + border-radius: $radius-small; height: $grid-unit-40; // Position the focus rectangle. diff --git a/packages/block-editor/src/components/block-pattern-setup/style.scss b/packages/block-editor/src/components/block-pattern-setup/style.scss index 3474eed5be517..10582a7a2ce49 100644 --- a/packages/block-editor/src/components/block-pattern-setup/style.scss +++ b/packages/block-editor/src/components/block-pattern-setup/style.scss @@ -4,7 +4,7 @@ justify-content: center; align-items: flex-start; width: 100%; - border-radius: $radius-block-ui; + border-radius: $radius-small; &.view-mode-grid { padding-top: $grid-unit-05; @@ -60,7 +60,7 @@ .block-editor-block-preview__container { min-height: 100px; - border-radius: $radius-block-ui; + border-radius: $radius-medium; border: $border-width solid $gray-300; } diff --git a/packages/block-editor/src/components/block-patterns-list/style.scss b/packages/block-editor/src/components/block-patterns-list/style.scss index 6b23c1e844dad..84e95563737c3 100644 --- a/packages/block-editor/src/components/block-patterns-list/style.scss +++ b/packages/block-editor/src/components/block-patterns-list/style.scss @@ -36,12 +36,12 @@ display: flex; align-items: center; overflow: hidden; - border-radius: $radius-block-ui; + border-radius: $radius-medium; &::after { outline: $border-width solid rgba($black, 0.1); outline-offset: -$border-width; - border-radius: $radius-block-ui; + border-radius: $radius-medium; } } diff --git a/packages/block-editor/src/components/block-switcher/style.scss b/packages/block-editor/src/components/block-switcher/style.scss index 287afaed4055c..823a656668a62 100644 --- a/packages/block-editor/src/components/block-switcher/style.scss +++ b/packages/block-editor/src/components/block-switcher/style.scss @@ -99,7 +99,7 @@ width: 300px; border: $border-width solid $gray-900; background: $white; - border-radius: $radius-block-ui; + border-radius: $radius-medium; outline: none; box-shadow: none; overflow: auto; @@ -161,7 +161,7 @@ .block-editor-block-switcher__preview-patterns-container-list__item { height: 100%; - border-radius: $radius-block-ui; + border-radius: $radius-small; transition: all 0.05s ease-in-out; position: relative; border: $border-width solid transparent; diff --git a/packages/block-editor/src/components/block-tools/style.scss b/packages/block-editor/src/components/block-tools/style.scss index a37271e609b17..9f1325d7f95a1 100644 --- a/packages/block-editor/src/components/block-tools/style.scss +++ b/packages/block-editor/src/components/block-tools/style.scss @@ -63,7 +63,6 @@ .block-editor-inserter__toggle.components-button.has-icon { // Basic look background: $gray-900; - border-radius: $radius-block-ui; color: $white; padding: 0; @@ -95,7 +94,7 @@ z-index: z-index(".block-editor-block-list__block-selection-button"); // Dark block UI appearance. - border-radius: $radius-block-ui; + border-radius: $radius-small; background-color: $gray-900; font-size: $default-font-size; @@ -188,7 +187,7 @@ .block-editor-block-contextual-toolbar { border: $border-width solid $gray-900; - border-radius: $radius-block-ui; + border-radius: $radius-small; overflow: visible; // allow the parent selector to be visible position: static; width: auto; diff --git a/packages/block-editor/src/components/block-variation-transforms/style.scss b/packages/block-editor/src/components/block-variation-transforms/style.scss index cfb0ff04a5bc8..b8d2a1d4649fa 100644 --- a/packages/block-editor/src/components/block-variation-transforms/style.scss +++ b/packages/block-editor/src/components/block-variation-transforms/style.scss @@ -4,7 +4,7 @@ .components-dropdown-menu__toggle { border: $border-width solid $gray-700; - border-radius: $radius-block-ui; + border-radius: $radius-small; min-height: 30px; width: 100%; position: relative; diff --git a/packages/block-editor/src/components/button-block-appender/content.scss b/packages/block-editor/src/components/button-block-appender/content.scss index 4e3f32b3f4ffc..e462278c07c10 100644 --- a/packages/block-editor/src/components/button-block-appender/content.scss +++ b/packages/block-editor/src/components/button-block-appender/content.scss @@ -52,7 +52,6 @@ left: 0; pointer-events: none; border: $border-width dashed currentColor; - border-radius: $radius-block-ui; } .block-editor-inserter { diff --git a/packages/block-editor/src/components/colors-gradients/style.scss b/packages/block-editor/src/components/colors-gradients/style.scss index b3539637a9904..fc1b1a4d46903 100644 --- a/packages/block-editor/src/components/colors-gradients/style.scss +++ b/packages/block-editor/src/components/colors-gradients/style.scss @@ -73,15 +73,15 @@ $swatch-gap: 12px; // Identify the first visible instance as placeholder items will not have this class. &:nth-child(1 of &) { margin-top: $grid-unit-30; - border-top-left-radius: $radius-block-ui; - border-top-right-radius: $radius-block-ui; + border-top-left-radius: $radius-small; + border-top-right-radius: $radius-small; border-top: 1px solid $gray-300; } // Identify the last visible instance as placeholder items will not have this class. &:nth-last-child(1 of &) { - border-bottom-left-radius: $radius-block-ui; - border-bottom-right-radius: $radius-block-ui; + border-bottom-left-radius: $radius-small; + border-bottom-right-radius: $radius-small; } > div, diff --git a/packages/block-editor/src/components/default-block-appender/content.scss b/packages/block-editor/src/components/default-block-appender/content.scss index 77725d2508ec5..51e0b4381a15d 100644 --- a/packages/block-editor/src/components/default-block-appender/content.scss +++ b/packages/block-editor/src/components/default-block-appender/content.scss @@ -48,7 +48,6 @@ .block-editor-inserter__toggle.components-button.has-icon { // Basic look background: $gray-900; - border-radius: $radius-block-ui; color: $white; padding: 0; diff --git a/packages/block-editor/src/components/global-styles/style.scss b/packages/block-editor/src/components/global-styles/style.scss index 6fb07eb090a55..1cebbfe7a85d4 100644 --- a/packages/block-editor/src/components/global-styles/style.scss +++ b/packages/block-editor/src/components/global-styles/style.scss @@ -39,7 +39,7 @@ .block-editor-global-styles__shadow-indicator { color: $gray-800; border: $gray-200 $border-width solid; - border-radius: $radius-block-ui; + border-radius: $radius-small; cursor: pointer; padding: 0; @@ -207,7 +207,7 @@ .components-focal-point-picker-wrapper { background-color: $gray-100; width: 100%; - border-radius: $radius-block-ui; + border-radius: $radius-small; border: $border-width solid $gray-300; } diff --git a/packages/block-editor/src/components/grid/style.scss b/packages/block-editor/src/components/grid/style.scss index 6790d683ca7d0..3a04eb006e791 100644 --- a/packages/block-editor/src/components/grid/style.scss +++ b/packages/block-editor/src/components/grid/style.scss @@ -117,7 +117,7 @@ content: ""; position: absolute; display: block; - border-radius: $radius-block-ui; + border-radius: $radius-small; height: $grid-unit-40; // Position the focus rectangle. diff --git a/packages/block-editor/src/components/inserter-list-item/style.scss b/packages/block-editor/src/components/inserter-list-item/style.scss index f91e4365db30c..435f60ed9e2f1 100644 --- a/packages/block-editor/src/components/inserter-list-item/style.scss +++ b/packages/block-editor/src/components/inserter-list-item/style.scss @@ -43,7 +43,6 @@ cursor: pointer; background: transparent; word-break: break-word; - border-radius: $radius-block-ui; transition: all 0.05s ease-in-out; @include reduce-motion("transition"); position: relative; @@ -72,7 +71,7 @@ bottom: 0; left: 0; right: 0; - border-radius: $radius-block-ui; + border-radius: $radius-small; opacity: 0.04; background: var(--wp-admin-theme-color); // This fixes drag-and-drop in Firefox. @@ -97,7 +96,6 @@ .block-editor-block-types-list__item-icon { padding: 12px 20px; - border-radius: $radius-block-ui; color: $gray-900; transition: all 0.05s ease-in-out; @include reduce-motion("transition"); diff --git a/packages/block-editor/src/components/inserter/style.scss b/packages/block-editor/src/components/inserter/style.scss index 21f8abfa59c9e..bd3ac3f961b88 100644 --- a/packages/block-editor/src/components/inserter/style.scss +++ b/packages/block-editor/src/components/inserter/style.scss @@ -44,12 +44,12 @@ $block-inserter-tabs-height: 44px; &:first-child { border-top: $border-width solid $gray-400; - border-radius: $radius-block-ui $radius-block-ui 0 0; + border-radius: $radius-medium $radius-medium 0 0; } &:last-child { border-bottom: $border-width solid $gray-400; - border-radius: 0 0 $radius-block-ui $radius-block-ui; + border-radius: 0 0 $radius-medium $radius-medium; } &.components-button { @@ -276,7 +276,7 @@ $block-inserter-tabs-height: 44px; bottom: 0; left: 0; right: 0; - border-radius: $radius-block-ui; + border-radius: $radius-small; opacity: 0.04; background: var(--wp-admin-theme-color); height: 100%; @@ -359,7 +359,7 @@ $block-inserter-tabs-height: 44px; min-height: $grid-unit-60 * 3; color: $gray-700; background: $gray-100; - border-radius: $radius-block-ui; + border-radius: $radius-small; } .block-editor-inserter__tips { @@ -577,7 +577,6 @@ $block-inserter-tabs-height: 44px; > button { background: $white; - border-radius: $radius-block-ui; display: none; // These styles are important so as focus isn't lost @@ -611,7 +610,6 @@ $block-inserter-tabs-height: 44px; max-width: 100%; outline: $border-width solid rgba($black, 0.1); outline-offset: -$border-width; - border-radius: $radius-block-ui; } .block-editor-inserter__media-list__item-preview-spinner { diff --git a/packages/block-editor/src/components/link-control/style.scss b/packages/block-editor/src/components/link-control/style.scss index 1390a285fe163..b0a5f6af2651b 100644 --- a/packages/block-editor/src/components/link-control/style.scss +++ b/packages/block-editor/src/components/link-control/style.scss @@ -78,7 +78,6 @@ $block-editor-link-control-number-of-actions: 1; @include input-control; display: block; border: $border-width solid $gray-600; - border-radius: $radius-block-ui; height: $button-size-next-default-40px; // components do not properly support unstable-large yet. margin: 0; padding: $grid-unit-10 $button-size-next-default-40px $grid-unit-10 $grid-unit-20; @@ -230,7 +229,7 @@ $block-editor-link-control-number-of-actions: 1; background-color: $gray-100; width: $grid-unit-40; height: $grid-unit-40; - border-radius: $radius-block-ui; + border-radius: $radius-small; } .block-editor-link-control__search-item-icon { @@ -252,7 +251,6 @@ $block-editor-link-control-number-of-actions: 1; } .block-editor-link-control__search-item-title { - border-radius: $radius-block-ui; line-height: 1.1; diff --git a/packages/block-editor/src/components/list-view/style.scss b/packages/block-editor/src/components/list-view/style.scss index 406053af89317..3d25597d2af90 100644 --- a/packages/block-editor/src/components/list-view/style.scss +++ b/packages/block-editor/src/components/list-view/style.scss @@ -101,16 +101,16 @@ // Border radius for corners of the selected item. &.is-first-selected td:first-child { - border-top-left-radius: $radius-block-ui; + border-top-left-radius: $radius-small; } &.is-first-selected td:last-child { - border-top-right-radius: $radius-block-ui; + border-top-right-radius: $radius-small; } &.is-last-selected td:first-child { - border-bottom-left-radius: $radius-block-ui; + border-bottom-left-radius: $radius-small; } &.is-last-selected td:last-child { - border-bottom-right-radius: $radius-block-ui; + border-bottom-right-radius: $radius-small; } &.is-branch-selected:not(.is-selected):not(.is-synced-branch) { background: rgba(var(--wp-admin-theme-color--rgb), 0.04); @@ -119,23 +119,23 @@ background: rgba(var(--wp-block-synced-color--rgb), 0.04); } &.is-branch-selected.is-first-selected td:first-child { - border-top-left-radius: $radius-block-ui; + border-top-left-radius: $radius-small; } &.is-branch-selected.is-first-selected td:last-child { - border-top-right-radius: $radius-block-ui; + border-top-right-radius: $radius-small; } &[data-expanded="false"] { &.is-branch-selected.is-first-selected td:first-child { - border-top-left-radius: $radius-block-ui; + border-top-left-radius: $radius-small; } &.is-branch-selected.is-first-selected td:last-child { - border-top-right-radius: $radius-block-ui; + border-top-right-radius: $radius-small; } &.is-branch-selected.is-last-selected td:first-child { - border-bottom-left-radius: $radius-block-ui; + border-bottom-left-radius: $radius-small; } &.is-branch-selected.is-last-selected td:last-child { - border-bottom-right-radius: $radius-block-ui; + border-bottom-right-radius: $radius-small; } } &.is-branch-selected:not(.is-selected) td { @@ -214,7 +214,6 @@ height: $grid-unit-40; padding: ($grid-unit-15 * 0.5) $grid-unit-05 ($grid-unit-15 * 0.5) 0; text-align: left; - border-radius: $radius-block-ui; position: relative; white-space: nowrap; @@ -406,7 +405,7 @@ right: 0; transform: translateY(-50%); background: rgba($black, 0.1); - border-radius: $radius-block-ui; + border-radius: $radius-x-small; padding: 2px 6px; max-width: 100%; box-sizing: border-box; @@ -429,10 +428,10 @@ background-size: cover; width: 18px; height: 18px; - border-radius: $radius-block-ui; + border-radius: $radius-x-small; &:not(:only-child) { - box-shadow: 0 0 0 $radius-block-ui $white; + box-shadow: 0 0 0 $radius-small $white; } &:not(:first-child) { @@ -442,7 +441,7 @@ &.is-selected .block-editor-list-view-block-select-button__image { &:not(:only-child) { - box-shadow: 0 0 0 $radius-block-ui var(--wp-admin-theme-color); + box-shadow: 0 0 0 $radius-small var(--wp-admin-theme-color); } } } diff --git a/packages/block-editor/src/components/rich-text/style.scss b/packages/block-editor/src/components/rich-text/style.scss index a3bb78b2521db..ca274d378d408 100644 --- a/packages/block-editor/src/components/rich-text/style.scss +++ b/packages/block-editor/src/components/rich-text/style.scss @@ -12,7 +12,7 @@ } .components-toolbar { - border-radius: $radius-block-ui; + border-radius: $radius-small; } .components-toolbar__control, diff --git a/packages/block-editor/src/components/warning/content.scss b/packages/block-editor/src/components/warning/content.scss index 0c1185a0782e4..9380a224b2ff9 100644 --- a/packages/block-editor/src/components/warning/content.scss +++ b/packages/block-editor/src/components/warning/content.scss @@ -7,7 +7,7 @@ // Block UI appearance. border: $border-width solid $gray-900; - border-radius: $radius-block-ui; + border-radius: $radius-small; background-color: $white; .block-editor-warning__message { diff --git a/packages/block-library/src/freeform/editor.scss b/packages/block-library/src/freeform/editor.scss index 7329eb6e5fb06..c2256ecd7a795 100644 --- a/packages/block-library/src/freeform/editor.scss +++ b/packages/block-library/src/freeform/editor.scss @@ -299,7 +299,7 @@ div[data-type="core/freeform"] { top: 0; border: $border-width solid $gray-300; border-bottom: none; - border-radius: $radius-block-ui; + border-radius: $radius-small; margin-bottom: $grid-unit-10; // On mobile, toolbars go edge to edge. diff --git a/packages/block-library/src/gallery/editor.scss b/packages/block-library/src/gallery/editor.scss index 3184b9d3d8fb2..61121f3dd866d 100644 --- a/packages/block-library/src/gallery/editor.scss +++ b/packages/block-library/src/gallery/editor.scss @@ -139,7 +139,7 @@ z-index: z-index(".block-library-gallery-item__inline-menu"); transition: box-shadow 0.2s ease-out; @include reduce-motion("transition"); - border-radius: $radius-block-ui; + border-radius: $radius-small; background: $white; border: $border-width solid $gray-900; diff --git a/packages/block-library/src/group/editor.scss b/packages/block-library/src/group/editor.scss index 041a2f9f884e8..11beecbab0eb6 100644 --- a/packages/block-library/src/group/editor.scss +++ b/packages/block-library/src/group/editor.scss @@ -43,7 +43,6 @@ pointer-events: none; min-height: $grid-unit-60 - $border-width - $border-width; border: $border-width dashed currentColor; - border-radius: $radius-block-ui; } // Let the parent be selectable in the placeholder area. diff --git a/packages/block-library/src/image/editor.scss b/packages/block-library/src/image/editor.scss index db6928766c0b7..636741c7d9ddb 100644 --- a/packages/block-library/src/image/editor.scss +++ b/packages/block-library/src/image/editor.scss @@ -13,9 +13,6 @@ // Disable any duotone filter applied in the selected state. filter: none !important; - // @todo this should eventually be overridden by a custom border-radius set in the inspector. - border-radius: $radius-block-ui; - > svg { opacity: 0; } diff --git a/packages/block-library/src/navigation/editor.scss b/packages/block-library/src/navigation/editor.scss index 619b8dc6f0c7b..a8d135656e44a 100644 --- a/packages/block-library/src/navigation/editor.scss +++ b/packages/block-library/src/navigation/editor.scss @@ -104,7 +104,6 @@ background: $gray-900; padding: 0; width: $button-size-small; - border-radius: $radius-block-ui; margin-right: 0; margin-left: auto; } @@ -326,7 +325,7 @@ $color-control-label-height: 20px; } .wp-block-navigation-placeholder__controls { - border-radius: $radius-block-ui; + border-radius: $radius-small; background-color: $white; box-shadow: inset 0 0 0 $border-width $gray-900; display: none; diff --git a/packages/commands/src/components/style.scss b/packages/commands/src/components/style.scss index e69853bad9599..bcf3d17d7baa6 100644 --- a/packages/commands/src/components/style.scss +++ b/packages/commands/src/components/style.scss @@ -33,7 +33,7 @@ border: $border-width solid $gray-600; border-right: 0; justify-content: center; - border-radius: $radius-block-ui 0 0 $radius-block-ui; + border-radius: $radius-small 0 0 $radius-small; & + [cmdk-input] { border-top-left-radius: 0; @@ -68,7 +68,7 @@ } [cmdk-item] { - border-radius: $radius-block-ui; + border-radius: $radius-small; cursor: pointer; display: flex; align-items: center; diff --git a/packages/dataviews/src/components/dataviews-filters/style.scss b/packages/dataviews/src/components/dataviews-filters/style.scss index f2841c16f0fec..ad834fb224e2e 100644 --- a/packages/dataviews/src/components/dataviews-filters/style.scss +++ b/packages/dataviews/src/components/dataviews-filters/style.scss @@ -169,7 +169,7 @@ display: flex; align-items: center; gap: $grid-unit-10; - border-radius: $radius-block-ui; + border-radius: $radius-small; box-sizing: border-box; padding: $grid-unit-10 $grid-unit-15; cursor: default; diff --git a/packages/dataviews/src/dataviews-layouts/grid/style.scss b/packages/dataviews/src/dataviews-layouts/grid/style.scss index d154d2b614def..5fab362b0b47b 100644 --- a/packages/dataviews/src/dataviews-layouts/grid/style.scss +++ b/packages/dataviews/src/dataviews-layouts/grid/style.scss @@ -118,7 +118,7 @@ background: $gray-100; padding: 0 $grid-unit-10; min-height: $grid-unit-30; - border-radius: $radius-block-ui; + border-radius: $radius-small; display: flex; align-items: center; font-size: 12px; diff --git a/packages/dataviews/src/dataviews-layouts/list/style.scss b/packages/dataviews/src/dataviews-layouts/list/style.scss index 7344af6c3d1e8..ea3236f6d75e1 100644 --- a/packages/dataviews/src/dataviews-layouts/list/style.scss +++ b/packages/dataviews/src/dataviews-layouts/list/style.scss @@ -114,12 +114,12 @@ ul.dataviews-view-list { &::before { position: absolute; content: ""; - top: calc(var(--wp-admin-border-width-focus) + 1px); + top: var(--wp-admin-border-width-focus); right: var(--wp-admin-border-width-focus); bottom: var(--wp-admin-border-width-focus); left: var(--wp-admin-border-width-focus); box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); - border-radius: $radius-block-ui; + border-radius: $radius-small; } } .dataviews-view-list__primary-field { diff --git a/packages/edit-post/src/components/back-button/style.scss b/packages/edit-post/src/components/back-button/style.scss index 8ffae89e31e05..aced752bfedfa 100644 --- a/packages/edit-post/src/components/back-button/style.scss +++ b/packages/edit-post/src/components/back-button/style.scss @@ -32,7 +32,7 @@ right: 9px; bottom: 9px + $border-width; // Height of toolbar in edit-post (not edit-site) is 61px tall. left: 9px; - border-radius: $radius-block-ui + $border-width + $border-width; + border-radius: $radius-small + $border-width + $border-width; box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) $gray-900; } @@ -54,7 +54,7 @@ .edit-post-fullscreen-mode-close_site-icon { width: $button-size; height: $button-size; - border-radius: $radius-block-ui; + border-radius: $radius-small; object-fit: cover; // Compensate for the top-bar border. margin-top: -($border-width); diff --git a/packages/edit-site/src/components/add-new-template/style.scss b/packages/edit-site/src/components/add-new-template/style.scss index 922083d14b75e..a83754ce2e547 100644 --- a/packages/edit-site/src/components/add-new-template/style.scss +++ b/packages/edit-site/src/components/add-new-template/style.scss @@ -82,7 +82,7 @@ .edit-site-custom-template-modal__no-results { border: $border-width solid $gray-400; - border-radius: $radius-block-ui; + border-radius: $radius-small; padding: $grid-unit-20; } @@ -132,7 +132,6 @@ .edit-site-add-new-template__template-list__contents { > .components-button { padding: $grid-unit-40; - border-radius: $radius-block-ui; display: flex; flex-direction: column; border: $border-width solid $gray-300; diff --git a/packages/edit-site/src/components/editor-canvas-container/style.scss b/packages/edit-site/src/components/editor-canvas-container/style.scss index fad566212e732..7df2b0ceca552 100644 --- a/packages/edit-site/src/components/editor-canvas-container/style.scss +++ b/packages/edit-site/src/components/editor-canvas-container/style.scss @@ -16,7 +16,7 @@ .edit-site-editor-canvas-container__section { background: $white; // Fallback color, overridden by JavaScript. - border-radius: $radius-block-ui; + border-radius: $radius-large; bottom: 0; left: 0; overflow: hidden; diff --git a/packages/edit-site/src/components/global-styles/screen-revisions/style.scss b/packages/edit-site/src/components/global-styles/screen-revisions/style.scss index 46972f4b7c52f..5d0e7cb185137 100644 --- a/packages/edit-site/src/components/global-styles/screen-revisions/style.scss +++ b/packages/edit-site/src/components/global-styles/screen-revisions/style.scss @@ -43,7 +43,7 @@ } &.is-selected { - border-radius: $radius-block-ui; + border-radius: $radius-small; // Only visible in Windows High Contrast mode. outline: 3px solid transparent; diff --git a/packages/edit-site/src/components/global-styles/style.scss b/packages/edit-site/src/components/global-styles/style.scss index f85d69ad864ad..9bab48e308947 100644 --- a/packages/edit-site/src/components/global-styles/style.scss +++ b/packages/edit-site/src/components/global-styles/style.scss @@ -19,7 +19,7 @@ min-height: 100px; margin-bottom: $grid-unit-20; background: $gray-100; - border-radius: $radius-block-ui; + border-radius: $radius-small; overflow: hidden; } @@ -45,7 +45,7 @@ display: flex !important; align-items: center; justify-content: center; - border-radius: $radius-block-ui; + border-radius: $radius-x-small; } .edit-site-global-styles-screen-typography__font-variants-count { @@ -113,14 +113,14 @@ position: relative; width: 100%; border: $gray-200 $border-width solid; - border-radius: $radius-block-ui; + border-radius: $radius-medium; overflow: hidden; } .edit-site-global-styles__shadow-preview-panel { height: $grid-unit-60 * 3; border: $gray-200 $border-width solid; - border-radius: $radius-block-ui; + border-radius: $radius-medium; overflow: auto; background-image: repeating-linear-gradient(45deg, #f5f5f5 25%, #0000 0, #0000 75%, #f5f5f5 0, #f5f5f5), repeating-linear-gradient(45deg, #f5f5f5 25%, #0000 0, #0000 75%, #f5f5f5 0, #f5f5f5); background-position: 0 0, 8px 8px; @@ -128,7 +128,7 @@ .edit-site-global-styles__shadow-preview-block { border: $gray-200 $border-width solid; - border-radius: $radius-block-ui; + border-radius: $radius-small; background-color: $white; width: 60%; height: 60px; diff --git a/packages/edit-site/src/components/global-styles/variations/style.scss b/packages/edit-site/src/components/global-styles/variations/style.scss index 8d9b4238efa33..5f57c72f180b1 100644 --- a/packages/edit-site/src/components/global-styles/variations/style.scss +++ b/packages/edit-site/src/components/global-styles/variations/style.scss @@ -1,11 +1,10 @@ .edit-site-global-styles-variations_item { box-sizing: border-box; // To round the outline in Windows 10 high contrast mode. - border-radius: $radius-block-ui; cursor: pointer; .edit-site-global-styles-variations_item-preview { - border-radius: $radius-block-ui; + border-radius: $radius-small; outline: $border-width solid rgba($black, 0.1); outline-offset: -$border-width; overflow: hidden; diff --git a/packages/edit-site/src/components/layout/style.scss b/packages/edit-site/src/components/layout/style.scss index 64fb1914af3dd..b2d929a7943db 100644 --- a/packages/edit-site/src/components/layout/style.scss +++ b/packages/edit-site/src/components/layout/style.scss @@ -120,7 +120,7 @@ overflow: hidden; .edit-site-layout:not(.is-full-canvas) & { - border-radius: $radius-block-ui * 4; + border-radius: $radius-large; } } } @@ -200,7 +200,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) { right: 9px; bottom: 9px; left: 9px; - border-radius: $radius-block-ui + $border-width + $border-width; + border-radius: $radius-medium; box-shadow: none; } diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index a5aa1eb9ac796..c62fe34daf7d6 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -126,8 +126,8 @@ .components-form-token-field__suggestions-list:not(:empty) { position: absolute; border: $border-width solid var(--wp-admin-theme-color); - border-bottom-left-radius: $radius-block-ui; - border-bottom-right-radius: $radius-block-ui; + border-bottom-left-radius: $radius-small; + border-bottom-right-radius: $radius-small; box-shadow: 0 0 0.5px 0.5px var(--wp-admin-theme-color); box-sizing: border-box; z-index: 1; diff --git a/packages/edit-site/src/components/page-templates/style.scss b/packages/edit-site/src/components/page-templates/style.scss index 4e21ca2c25be2..6a753921f6f40 100644 --- a/packages/edit-site/src/components/page-templates/style.scss +++ b/packages/edit-site/src/components/page-templates/style.scss @@ -36,7 +36,6 @@ } .dataviews-view-table & { - border-radius: $radius-block-ui; position: relative; width: 120px; max-height: 160px; @@ -49,7 +48,7 @@ width: 100%; height: 100%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); - border-radius: $radius-block-ui; + border-radius: $radius-medium; } } } diff --git a/packages/edit-site/src/components/post-list/style.scss b/packages/edit-site/src/components/post-list/style.scss index a86783c163c83..895a02b310672 100644 --- a/packages/edit-site/src/components/post-list/style.scss +++ b/packages/edit-site/src/components/post-list/style.scss @@ -68,7 +68,7 @@ background: $gray-100; color: $gray-700; padding: 0 $grid-unit-05; - border-radius: $radius-block-ui; + border-radius: $radius-small; font-size: 12px; font-weight: 400; flex-shrink: 0; diff --git a/packages/edit-site/src/components/sidebar-dataviews/style.scss b/packages/edit-site/src/components/sidebar-dataviews/style.scss index 9c5b8f48e944f..14e6bf1d03fca 100644 --- a/packages/edit-site/src/components/sidebar-dataviews/style.scss +++ b/packages/edit-site/src/components/sidebar-dataviews/style.scss @@ -8,7 +8,7 @@ } .edit-site-sidebar-dataviews-dataview-item { - border-radius: $radius-block-ui; + border-radius: $radius-small; padding-right: $grid-unit-10; .edit-site-sidebar-dataviews-dataview-item__dropdown-menu { diff --git a/packages/edit-site/src/components/sidebar-navigation-item/style.scss b/packages/edit-site/src/components/sidebar-navigation-item/style.scss index 908056d52af48..016027ef715a4 100644 --- a/packages/edit-site/src/components/sidebar-navigation-item/style.scss +++ b/packages/edit-site/src/components/sidebar-navigation-item/style.scss @@ -4,7 +4,6 @@ padding: $grid-unit-10 6px $grid-unit-10 $grid-unit-20; border: none; min-height: $grid-unit-50; - border-radius: $radius-block-ui; &:hover, &:focus, diff --git a/packages/edit-site/src/components/sidebar-navigation-screen/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss index 43b789d669ba4..f0260581a8988 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen/style.scss +++ b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss @@ -146,7 +146,6 @@ .components-input-control__input { color: $gray-200 !important; background: $gray-800 !important; - border-radius: $radius-block-ui; } .components-input-control__backdrop { border: 4px !important; diff --git a/packages/edit-site/src/components/style-book/style.scss b/packages/edit-site/src/components/style-book/style.scss index 3b2c6ab0867db..ab66ec288da31 100644 --- a/packages/edit-site/src/components/style-book/style.scss +++ b/packages/edit-site/src/components/style-book/style.scss @@ -3,13 +3,13 @@ // This is useful when the style book is used to fill a frame. height: 100%; &.is-button { - border-radius: $radius-block-ui * 4; + border-radius: $radius-large; } } .edit-site-style-book__iframe { &.is-button { - border-radius: $radius-block-ui * 4; + border-radius: $radius-large; } &.is-focused { outline: calc(2 * var(--wp-admin-border-width-focus)) solid var(--wp-admin-theme-color); diff --git a/packages/editor/src/components/document-outline/style.scss b/packages/editor/src/components/document-outline/style.scss index efd2606b82d39..49ce0c9b2d132 100644 --- a/packages/editor/src/components/document-outline/style.scss +++ b/packages/editor/src/components/document-outline/style.scss @@ -51,7 +51,7 @@ padding: 2px 5px 2px 1px; color: $gray-900; text-align: left; - border-radius: $radius-block-ui; + border-radius: $radius-small; &:disabled { cursor: default; diff --git a/packages/editor/src/components/post-card-panel/style.scss b/packages/editor/src/components/post-card-panel/style.scss index 3547b0ab10493..73b638673f3e9 100644 --- a/packages/editor/src/components/post-card-panel/style.scss +++ b/packages/editor/src/components/post-card-panel/style.scss @@ -46,7 +46,7 @@ background: $gray-100; color: $gray-700; padding: 0 $grid-unit-05; - border-radius: $radius-block-ui; + border-radius: $radius-small; font-size: 12px; font-weight: 400; flex-shrink: 0; diff --git a/packages/editor/src/components/post-featured-image/style.scss b/packages/editor/src/components/post-featured-image/style.scss index d3a4fbbcaef68..3a537471b42f2 100644 --- a/packages/editor/src/components/post-featured-image/style.scss +++ b/packages/editor/src/components/post-featured-image/style.scss @@ -22,7 +22,7 @@ } .components-drop-zone__content { - border-radius: $radius-block-ui; + border-radius: $radius-small; } // Align text and icons horizontally to avoid clipping when the featured image is not set. @@ -65,7 +65,6 @@ } .editor-post-featured-image__toggle { - border-radius: $radius-block-ui; height: 100%; line-height: 20px; padding: $grid-unit-10 0; diff --git a/packages/editor/src/components/post-locked-modal/style.scss b/packages/editor/src/components/post-locked-modal/style.scss index 03e86642493df..7f68002234466 100644 --- a/packages/editor/src/components/post-locked-modal/style.scss +++ b/packages/editor/src/components/post-locked-modal/style.scss @@ -3,7 +3,7 @@ } .editor-post-locked-modal__avatar { - border-radius: $radius-block-ui; + border-radius: $radius-round; margin-top: $grid-unit-20; min-width: initial !important; } diff --git a/packages/editor/src/components/post-publish-panel/style.scss b/packages/editor/src/components/post-publish-panel/style.scss index bcd7c798c7e9f..9892cf5430f9a 100644 --- a/packages/editor/src/components/post-publish-panel/style.scss +++ b/packages/editor/src/components/post-publish-panel/style.scss @@ -37,7 +37,7 @@ .components-site-icon { border: none; - border-radius: $radius-block-ui; + border-radius: $radius-small; margin-right: $grid-unit-15; flex-shrink: 0; diff --git a/packages/editor/src/components/resizable-editor/style.scss b/packages/editor/src/components/resizable-editor/style.scss index 91ff1144c4179..364fdf39ad315 100644 --- a/packages/editor/src/components/resizable-editor/style.scss +++ b/packages/editor/src/components/resizable-editor/style.scss @@ -16,7 +16,7 @@ cursor: ew-resize; outline: none; background: none; - border-radius: $radius-block-ui; + border-radius: $radius-full; border: 0; height: 100px; @@ -29,7 +29,7 @@ content: ""; width: $grid-unit-05; background-color: rgba($gray-700, 0.4); - border-radius: $radius-block-ui; + border-radius: $radius-full; } &.is-left { diff --git a/packages/patterns/src/components/style.scss b/packages/patterns/src/components/style.scss index 30fe0300503c4..1b053ab7ac251 100644 --- a/packages/patterns/src/components/style.scss +++ b/packages/patterns/src/components/style.scss @@ -13,8 +13,8 @@ .components-form-token-field__suggestions-list:not(:empty) { position: absolute; border: $border-width solid var(--wp-admin-theme-color); - border-bottom-left-radius: $radius-block-ui; - border-bottom-right-radius: $radius-block-ui; + border-bottom-left-radius: $radius-small; + border-bottom-right-radius: $radius-small; box-shadow: 0 0 0.5px 0.5px var(--wp-admin-theme-color); box-sizing: border-box; z-index: 1; diff --git a/packages/widgets/src/blocks/legacy-widget/editor.scss b/packages/widgets/src/blocks/legacy-widget/editor.scss index 6b04ce0a407e4..8c213eec86f9f 100644 --- a/packages/widgets/src/blocks/legacy-widget/editor.scss +++ b/packages/widgets/src/blocks/legacy-widget/editor.scss @@ -3,7 +3,7 @@ display: flow-root; } background: $white; - border-radius: $radius-block-ui; + border-radius: $radius-small; border: $border-width solid $gray-900; padding: $grid-unit-15 - $border-width; max-height: calc(100vh - #{ $border-width } - #{ $border-width }); @@ -95,7 +95,7 @@ cursor: pointer; &:hover::after { - border-radius: $radius-block-ui; + border-radius: $radius-small; border: $border-width solid $gray-600; bottom: 0; content: ""; diff --git a/packages/widgets/src/blocks/widget-group/editor.scss b/packages/widgets/src/blocks/widget-group/editor.scss index 38798ef34c7c6..1cd179539bc1a 100644 --- a/packages/widgets/src/blocks/widget-group/editor.scss +++ b/packages/widgets/src/blocks/widget-group/editor.scss @@ -1,6 +1,6 @@ .wp-block-widget-group { &.has-child-selected::after { - border-radius: $radius-block-ui; + border-radius: $radius-small; border: $border-width solid var(--wp-admin-theme-color); bottom: 0; content: ""; From 0a86ab3ef5253d18306ed6c81d6f1820428b4384 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 4 Sep 2024 15:56:04 +0200 Subject: [PATCH 16/52] Downloadable Block List: do not use composite store (#65038) Co-authored-by: ciampo Co-authored-by: tyxla --- .../src/components/downloadable-block-list-item/index.js | 3 +-- .../src/components/downloadable-blocks-list/index.js | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/block-directory/src/components/downloadable-block-list-item/index.js b/packages/block-directory/src/components/downloadable-block-list-item/index.js index 03e6e79d8928e..45a2930ad656e 100644 --- a/packages/block-directory/src/components/downloadable-block-list-item/index.js +++ b/packages/block-directory/src/components/downloadable-block-list-item/index.js @@ -65,7 +65,7 @@ function getDownloadableBlockLabel( ); } -function DownloadableBlockListItem( { composite, item, onClick } ) { +function DownloadableBlockListItem( { item, onClick } ) { const { author, description, icon, rating, title } = item; // getBlockType returns a block object if this block exists, or null if not. const isInstalled = !! getBlockType( item.name ); @@ -116,7 +116,6 @@ function DownloadableBlockListItem( { composite, item, onClick } ) { tooltipPosition="top center" /> } - store={ composite } disabled={ isInstalling || ! isInstallable } >
diff --git a/packages/block-directory/src/components/downloadable-blocks-list/index.js b/packages/block-directory/src/components/downloadable-blocks-list/index.js index 09f509c4ed49c..3911c3297376d 100644 --- a/packages/block-directory/src/components/downloadable-blocks-list/index.js +++ b/packages/block-directory/src/components/downloadable-blocks-list/index.js @@ -13,12 +13,10 @@ import DownloadableBlockListItem from '../downloadable-block-list-item'; import { store as blockDirectoryStore } from '../../store'; import { unlock } from '../../lock-unlock'; -const { CompositeV2: Composite, useCompositeStoreV2: useCompositeStore } = - unlock( componentsPrivateApis ); +const { CompositeV2: Composite } = unlock( componentsPrivateApis ); const noop = () => {}; function DownloadableBlocksList( { items, onHover = noop, onSelect } ) { - const composite = useCompositeStore(); const { installBlockType } = useDispatch( blockDirectoryStore ); if ( ! items.length ) { @@ -27,7 +25,6 @@ function DownloadableBlocksList( { items, onHover = noop, onSelect } ) { return ( { // Check if the block is registered (`getBlockType` // will return an object). If so, insert the block. From 1d5340ac8c1b0669439d31a7def8ebbf65dd5685 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 4 Sep 2024 15:56:30 +0200 Subject: [PATCH 17/52] Block Pattern Setup: do not use Composite store (#65039) Co-authored-by: ciampo Co-authored-by: tyxla --- .../src/components/block-pattern-setup/index.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/block-editor/src/components/block-pattern-setup/index.js b/packages/block-editor/src/components/block-pattern-setup/index.js index edd55e90dc3e2..6ec3f79b5f703 100644 --- a/packages/block-editor/src/components/block-pattern-setup/index.js +++ b/packages/block-editor/src/components/block-pattern-setup/index.js @@ -22,11 +22,9 @@ import usePatternsSetup from './use-patterns-setup'; import { VIEWMODES } from './constants'; import { unlock } from '../../lock-unlock'; -const { - CompositeV2: Composite, - CompositeItemV2: CompositeItem, - useCompositeStoreV2: useCompositeStore, -} = unlock( componentsPrivateApis ); +const { CompositeV2: Composite, CompositeItemV2: CompositeItem } = unlock( + componentsPrivateApis +); const SetupContent = ( { viewMode, @@ -35,7 +33,6 @@ const SetupContent = ( { onBlockPatternSelect, showTitles, } ) => { - const compositeStore = useCompositeStore(); const containerClass = 'block-editor-block-pattern-setup__container'; if ( viewMode === VIEWMODES.carousel ) { @@ -65,7 +62,6 @@ const SetupContent = ( { return (
Date: Wed, 4 Sep 2024 15:57:01 +0200 Subject: [PATCH 18/52] Pattern Transformations Menu: do not use Composite store (#65040) Co-authored-by: ciampo Co-authored-by: tyxla --- .../block-switcher/pattern-transformations-menu.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/block-editor/src/components/block-switcher/pattern-transformations-menu.js b/packages/block-editor/src/components/block-switcher/pattern-transformations-menu.js index 46fd83c92d91f..c2e7fa88a879b 100644 --- a/packages/block-editor/src/components/block-switcher/pattern-transformations-menu.js +++ b/packages/block-editor/src/components/block-switcher/pattern-transformations-menu.js @@ -21,11 +21,9 @@ import BlockPreview from '../block-preview'; import useTransformedPatterns from './use-transformed-patterns'; import { unlock } from '../../lock-unlock'; -const { - CompositeV2: Composite, - CompositeItemV2: CompositeItem, - useCompositeStoreV2: useCompositeStore, -} = unlock( componentsPrivateApis ); +const { CompositeV2: Composite, CompositeItemV2: CompositeItem } = unlock( + componentsPrivateApis +); function PatternTransformationsMenu( { blocks, @@ -82,10 +80,8 @@ function PreviewPatternsPopover( { patterns, onSelect } ) { } function BlockPatternsList( { patterns, onSelect } ) { - const composite = useCompositeStore(); return ( Date: Wed, 4 Sep 2024 15:58:24 +0200 Subject: [PATCH 19/52] Global Styles Shadow Panel: do not use Composite store (#65041) Co-authored-by: ciampo Co-authored-by: tyxla --- .../global-styles/shadow-panel-components.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/block-editor/src/components/global-styles/shadow-panel-components.js b/packages/block-editor/src/components/global-styles/shadow-panel-components.js index e3a6c71adf8fc..0f30f769f7b10 100644 --- a/packages/block-editor/src/components/global-styles/shadow-panel-components.js +++ b/packages/block-editor/src/components/global-styles/shadow-panel-components.js @@ -32,11 +32,9 @@ import { unlock } from '../../lock-unlock'; * @type {Array} */ const EMPTY_ARRAY = []; -const { - CompositeItemV2: CompositeItem, - CompositeV2: Composite, - useCompositeStoreV2: useCompositeStore, -} = unlock( componentsPrivateApis ); +const { CompositeItemV2: CompositeItem, CompositeV2: Composite } = unlock( + componentsPrivateApis +); export function ShadowPopoverContainer( { shadow, onShadowChange, settings } ) { const shadows = useShadowPresets( settings ); @@ -66,10 +64,8 @@ export function ShadowPopoverContainer( { shadow, onShadowChange, settings } ) { } export function ShadowPresets( { presets, activeShadow, onSelect } ) { - const compositeStore = useCompositeStore(); return ! presets ? null : ( Date: Wed, 4 Sep 2024 15:59:26 +0200 Subject: [PATCH 20/52] Block Inserter Listbox: do not use Composite store (#65042) Co-authored-by: ciampo Co-authored-by: tyxla --- .../src/components/inserter-listbox/index.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/block-editor/src/components/inserter-listbox/index.js b/packages/block-editor/src/components/inserter-listbox/index.js index 6af26a1d746bf..f1168f67fd611 100644 --- a/packages/block-editor/src/components/inserter-listbox/index.js +++ b/packages/block-editor/src/components/inserter-listbox/index.js @@ -12,17 +12,11 @@ export { default as InserterListboxGroup } from './group'; export { default as InserterListboxRow } from './row'; export { default as InserterListboxItem } from './item'; -const { CompositeV2: Composite, useCompositeStoreV2: useCompositeStore } = - unlock( componentsPrivateApis ); +const { CompositeV2: Composite } = unlock( componentsPrivateApis ); function InserterListbox( { children } ) { - const store = useCompositeStore( { - focusShift: true, - focusWrap: 'horizontal', - } ); - return ( - }> + }> { children } ); From ba63b90f01c4d4b80171cc0640e1e8dafe2e0e4e Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 4 Sep 2024 15:59:48 +0200 Subject: [PATCH 21/52] Block Inserter Media List: do not use Composite store (#65043) Co-authored-by: ciampo Co-authored-by: tyxla --- .../src/components/inserter/media-tab/media-list.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/inserter/media-tab/media-list.js b/packages/block-editor/src/components/inserter/media-tab/media-list.js index bfc858bc8c4de..9d03b3086176f 100644 --- a/packages/block-editor/src/components/inserter/media-tab/media-list.js +++ b/packages/block-editor/src/components/inserter/media-tab/media-list.js @@ -10,8 +10,7 @@ import { __ } from '@wordpress/i18n'; import { MediaPreview } from './media-preview'; import { unlock } from '../../../lock-unlock'; -const { CompositeV2: Composite, useCompositeStoreV2: useCompositeStore } = - unlock( componentsPrivateApis ); +const { CompositeV2: Composite } = unlock( componentsPrivateApis ); function MediaList( { mediaList, @@ -19,10 +18,8 @@ function MediaList( { onClick, label = __( 'Media List' ), } ) { - const compositeStore = useCompositeStore(); return ( Date: Wed, 4 Sep 2024 16:03:09 +0200 Subject: [PATCH 22/52] Add Custom Template modal: do not use Composite store (#65044) Co-authored-by: ciampo Co-authored-by: tyxla --- .../add-custom-template-modal-content.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/edit-site/src/components/add-new-template/add-custom-template-modal-content.js b/packages/edit-site/src/components/add-new-template/add-custom-template-modal-content.js index 0ef403379ccdb..f63a980954e36 100644 --- a/packages/edit-site/src/components/add-new-template/add-custom-template-modal-content.js +++ b/packages/edit-site/src/components/add-new-template/add-custom-template-modal-content.js @@ -23,11 +23,9 @@ import { useDebouncedInput } from '@wordpress/compose'; import { unlock } from '../../lock-unlock'; import { mapToIHasNameAndId } from './utils'; -const { - CompositeV2: Composite, - CompositeItemV2: CompositeItem, - useCompositeStoreV2: useCompositeStore, -} = unlock( componentsPrivateApis ); +const { CompositeV2: Composite, CompositeItemV2: CompositeItem } = unlock( + componentsPrivateApis +); const EMPTY_ARRAY = []; @@ -122,7 +120,6 @@ function useSearchSuggestions( entityForSuggestions, search ) { } function SuggestionList( { entityForSuggestions, onSelect } ) { - const composite = useCompositeStore( { orientation: 'vertical' } ); const [ search, setSearch, debouncedSearch ] = useDebouncedInput(); const suggestions = useSearchSuggestions( entityForSuggestions, @@ -146,7 +143,7 @@ function SuggestionList( { entityForSuggestions, onSelect } ) { ) } { !! suggestions?.length && ( Date: Wed, 4 Sep 2024 15:13:08 +0100 Subject: [PATCH 23/52] Media & Text: don't use background-image (#64981) * media-text block: don't use background-image * Add PR link to deprecated.js for future reference * Fix PHP indentation * Fix inconsistencies in some fixtures after markup changes * Update PHP tests to match new expected render * Add back old fixtures as new deprecated fixtures * Improve deprecation comment wording in styles Co-authored-by: Nik Tsekouras * Remove 'not contains' checks from PHP tests * Rename new CSS class to is-image-fill-element --------- Co-authored-by: sgomes Co-authored-by: ntsekouras Co-authored-by: skorasaurus --- .../src/media-text/deprecated.js | 162 +++++++++++++++++- packages/block-library/src/media-text/edit.js | 10 +- .../block-library/src/media-text/editor.scss | 4 +- .../src/media-text/image-fill.js | 11 ++ .../block-library/src/media-text/index.php | 96 ++++++----- .../src/media-text/media-container.js | 41 +++-- .../src/media-text/media-container.native.js | 2 - packages/block-library/src/media-text/save.js | 22 +-- .../block-library/src/media-text/style.scss | 21 +++ .../src/media-text/test/image-fill.js | 19 ++ .../src/media-text/test/media-container.js | 24 --- .../blocks/render-block-media-text-test.php | 28 ++- ..._media-text__deprecated-v5.serialized.html | 2 +- ...v7-image-fill-no-focal-point-selected.html | 13 ++ ...v7-image-fill-no-focal-point-selected.json | 29 ++++ ...e-fill-no-focal-point-selected.parsed.json | 29 ++++ ...ll-no-focal-point-selected.serialized.html | 5 + ...-image-fill-with-focal-point-selected.html | 13 ++ ...-image-fill-with-focal-point-selected.json | 33 ++++ ...fill-with-focal-point-selected.parsed.json | 33 ++++ ...-with-focal-point-selected.serialized.html | 5 + .../core__media-text__deprecated-v7.html | 13 ++ .../core__media-text__deprecated-v7.json | 30 ++++ ...ore__media-text__deprecated-v7.parsed.json | 29 ++++ ..._media-text__deprecated-v7.serialized.html | 5 + ...t__image-fill-no-focal-point-selected.html | 9 +- ...t__image-fill-no-focal-point-selected.json | 5 +- ...e-fill-no-focal-point-selected.parsed.json | 5 +- ...ll-no-focal-point-selected.serialized.html | 2 +- ..._image-fill-with-focal-point-selected.html | 9 +- ..._image-fill-with-focal-point-selected.json | 5 +- ...fill-with-focal-point-selected.parsed.json | 5 +- ...-with-focal-point-selected.serialized.html | 2 +- 33 files changed, 575 insertions(+), 146 deletions(-) create mode 100644 packages/block-library/src/media-text/image-fill.js create mode 100644 packages/block-library/src/media-text/test/image-fill.js delete mode 100644 packages/block-library/src/media-text/test/media-container.js create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7-image-fill-no-focal-point-selected.html create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7-image-fill-no-focal-point-selected.json create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7-image-fill-no-focal-point-selected.parsed.json create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7-image-fill-no-focal-point-selected.serialized.html create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7-image-fill-with-focal-point-selected.html create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7-image-fill-with-focal-point-selected.json create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7-image-fill-with-focal-point-selected.parsed.json create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7-image-fill-with-focal-point-selected.serialized.html create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7.html create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7.json create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7.parsed.json create mode 100644 test/integration/fixtures/blocks/core__media-text__deprecated-v7.serialized.html diff --git a/packages/block-library/src/media-text/deprecated.js b/packages/block-library/src/media-text/deprecated.js index 1cd1472f876c0..54c6f863311ff 100644 --- a/packages/block-library/src/media-text/deprecated.js +++ b/packages/block-library/src/media-text/deprecated.js @@ -30,7 +30,7 @@ const v1ToV5ImageFillStyles = ( url, focalPoint ) => { : {}; }; -const v6ImageFillStyles = ( url, focalPoint ) => { +const v6ToV7ImageFillStyles = ( url, focalPoint ) => { return url ? { backgroundImage: `url(${ url })`, @@ -198,6 +198,20 @@ const v6Attributes = { }, }; +const v7Attributes = { + ...v6Attributes, + align: { + type: 'string', + // v7 changed the default for the `align` attribute. + default: 'none', + }, + // New attribute. + useFeaturedImage: { + type: 'boolean', + default: false, + }, +}; + const v4ToV5Supports = { anchor: true, align: [ 'wide', 'full' ], @@ -237,6 +251,148 @@ const v6Supports = { }, }; +const v7Supports = { + ...v6Supports, + __experimentalBorder: { + color: true, + radius: true, + style: true, + width: true, + __experimentalDefaultControls: { + color: true, + radius: true, + style: true, + width: true, + }, + }, + color: { + gradients: true, + heading: true, + link: true, + __experimentalDefaultControls: { + background: true, + text: true, + }, + }, + interactivity: { + clientNavigation: true, + }, +}; + +// Version with 'none' as the default alignment. +// See: https://github.com/WordPress/gutenberg/pull/64981 +const v7 = { + attributes: v7Attributes, + supports: v7Supports, + usesContext: [ 'postId', 'postType' ], + save( { attributes } ) { + const { + isStackedOnMobile, + mediaAlt, + mediaPosition, + mediaType, + mediaUrl, + mediaWidth, + mediaId, + verticalAlignment, + imageFill, + focalPoint, + linkClass, + href, + linkTarget, + rel, + } = attributes; + const mediaSizeSlug = + attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG; + const newRel = ! rel ? undefined : rel; + + const imageClasses = clsx( { + [ `wp-image-${ mediaId }` ]: mediaId && mediaType === 'image', + [ `size-${ mediaSizeSlug }` ]: mediaId && mediaType === 'image', + } ); + + let image = mediaUrl ? ( + { + ) : null; + + if ( href ) { + image = ( + + { image } + + ); + } + + const mediaTypeRenders = { + image: () => image, + video: () =>