From 46daa6ea3de69b8fe98ee2ce97890a29cde93487 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Tue, 16 Jan 2024 14:40:29 +0800 Subject: [PATCH 01/71] Add `setGutenbergExperiments` to `requestUtils` (#56663) * Add setGutenbergExperiments util * Use it in one of the tests * Fix test --- .../request-utils/gutenberg-experiments.ts | 40 +++++++++++++++++++ .../src/request-utils/index.ts | 4 ++ packages/e2e-tests/plugins/dataviews.php | 25 ------------ .../site-editor/new-templates-list.spec.js | 4 +- 4 files changed, 46 insertions(+), 27 deletions(-) create mode 100644 packages/e2e-test-utils-playwright/src/request-utils/gutenberg-experiments.ts delete mode 100644 packages/e2e-tests/plugins/dataviews.php diff --git a/packages/e2e-test-utils-playwright/src/request-utils/gutenberg-experiments.ts b/packages/e2e-test-utils-playwright/src/request-utils/gutenberg-experiments.ts new file mode 100644 index 00000000000000..6a21ba7d90aec6 --- /dev/null +++ b/packages/e2e-test-utils-playwright/src/request-utils/gutenberg-experiments.ts @@ -0,0 +1,40 @@ +/** + * Internal dependencies + */ +import type { RequestUtils } from './index'; + +/** + * Sets the Gutenberg experiments. + * + * @param this + * @param experiments Array of experimental flags to enable. Pass in an empty array to disable all experiments. + */ +async function setGutenbergExperiments( + this: RequestUtils, + experiments: string[] +) { + const response = await this.request.get( + '/wp-admin/admin.php?page=gutenberg-experiments' + ); + const html = await response.text(); + const nonce = html.match( /name="_wpnonce" value="([^"]+)"/ )![ 1 ]; + + await this.request.post( '/wp-admin/options.php', { + form: { + option_page: 'gutenberg-experiments', + action: 'update', + _wpnonce: nonce, + _wp_http_referer: '/wp-admin/admin.php?page=gutenberg-experiments', + ...Object.fromEntries( + experiments.map( ( experiment ) => [ + `gutenberg-experiments[${ experiment }]`, + 1, + ] ) + ), + submit: 'Save Changes', + }, + failOnStatusCode: true, + } ); +} + +export { setGutenbergExperiments }; diff --git a/packages/e2e-test-utils-playwright/src/request-utils/index.ts b/packages/e2e-test-utils-playwright/src/request-utils/index.ts index 064894793b8f31..5036f3d0e8a97c 100644 --- a/packages/e2e-test-utils-playwright/src/request-utils/index.ts +++ b/packages/e2e-test-utils-playwright/src/request-utils/index.ts @@ -36,6 +36,7 @@ import { resetPreferences } from './preferences'; import { getSiteSettings, updateSiteSettings } from './site-settings'; import { deleteAllWidgets, addWidgetBlock } from './widgets'; import { deleteAllPatternCategories } from './patterns'; +import { setGutenbergExperiments } from './gutenberg-experiments'; interface StorageState { cookies: Cookie[]; @@ -205,6 +206,9 @@ class RequestUtils { getThemeGlobalStylesRevisions.bind( this ); /** @borrows deleteAllPatternCategories as this.deleteAllPatternCategories */ deleteAllPatternCategories = deleteAllPatternCategories.bind( this ); + /** @borrows setGutenbergExperiments as this.setGutenbergExperiments */ + setGutenbergExperiments: typeof setGutenbergExperiments = + setGutenbergExperiments.bind( this ); } export type { StorageState }; diff --git a/packages/e2e-tests/plugins/dataviews.php b/packages/e2e-tests/plugins/dataviews.php deleted file mode 100644 index 60a611fcae8f12..00000000000000 --- a/packages/e2e-tests/plugins/dataviews.php +++ /dev/null @@ -1,25 +0,0 @@ - true ) ); - register_deactivation_hook( __FILE__, 'disable_dataviews_experiment' ); -} - -add_action( 'init', 'enable_dataviews_experiment' ); diff --git a/test/e2e/specs/site-editor/new-templates-list.spec.js b/test/e2e/specs/site-editor/new-templates-list.spec.js index df7f88b600442a..13484abcb13add 100644 --- a/test/e2e/specs/site-editor/new-templates-list.spec.js +++ b/test/e2e/specs/site-editor/new-templates-list.spec.js @@ -7,14 +7,14 @@ test.describe( 'Templates', () => { test.beforeAll( async ( { requestUtils } ) => { await Promise.all( [ requestUtils.activateTheme( 'emptytheme' ), - requestUtils.activatePlugin( 'gutenberg-test-dataviews' ), + requestUtils.setGutenbergExperiments( [ 'gutenberg-dataviews' ] ), ] ); } ); test.afterAll( async ( { requestUtils } ) => { await Promise.all( [ requestUtils.activateTheme( 'twentytwentyone' ), - requestUtils.deactivatePlugin( 'gutenberg-test-dataviews' ), requestUtils.deleteAllTemplates( 'wp_template' ), + requestUtils.setGutenbergExperiments( [] ), ] ); } ); test( 'Sorting', async ( { admin, page } ) => { From b8c177d255cf0b8bab7afa82bfbd40f93e69277f Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Tue, 16 Jan 2024 16:30:11 +0800 Subject: [PATCH 02/71] Add a basic e2e test for Pattern Overrides (#57792) --- .../editor/various/pattern-overrides.spec.js | 219 ++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 test/e2e/specs/editor/various/pattern-overrides.spec.js diff --git a/test/e2e/specs/editor/various/pattern-overrides.spec.js b/test/e2e/specs/editor/various/pattern-overrides.spec.js new file mode 100644 index 00000000000000..818a05881f53e6 --- /dev/null +++ b/test/e2e/specs/editor/various/pattern-overrides.spec.js @@ -0,0 +1,219 @@ +/** + * WordPress dependencies + */ +const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); + +test.describe( 'Pattern Overrides', () => { + test.beforeAll( async ( { requestUtils } ) => { + await Promise.all( [ + requestUtils.activateTheme( 'emptytheme' ), + requestUtils.setGutenbergExperiments( [ + 'gutenberg-pattern-partial-syncing', + ] ), + requestUtils.deleteAllBlocks(), + ] ); + } ); + + test.afterEach( async ( { requestUtils } ) => { + await requestUtils.deleteAllBlocks(); + } ); + + test.afterAll( async ( { requestUtils } ) => { + await Promise.all( [ + requestUtils.setGutenbergExperiments( [] ), + requestUtils.activateTheme( 'twentytwentyone' ), + ] ); + } ); + + test( 'Create a pattern with overrides', async ( { + page, + admin, + editor, + } ) => { + let patternId; + let editableParagraphId; + + await test.step( 'Create a synced pattern and assign blocks to allow overrides', async () => { + await admin.visitSiteEditor( { path: '/patterns' } ); + + await page + .getByRole( 'region', { name: 'Navigation' } ) + .getByRole( 'button', { name: 'Create pattern' } ) + .click(); + + await page + .getByRole( 'menu', { name: 'Create pattern' } ) + .getByRole( 'menuitem', { name: 'Create pattern' } ) + .click(); + + const createPatternDialog = page.getByRole( 'dialog', { + name: 'Create pattern', + } ); + await createPatternDialog + .getByRole( 'textbox', { name: 'Name' } ) + .fill( 'Pattern with overrides' ); + await createPatternDialog + .getByRole( 'checkbox', { name: 'Synced' } ) + .setChecked( true ); + await createPatternDialog + .getByRole( 'button', { name: 'Create' } ) + .click(); + + await editor.canvas + .getByRole( 'button', { name: 'Add default block' } ) + .click(); + await page.keyboard.type( 'This paragraph can be edited' ); + await page.keyboard.press( 'Enter' ); + await page.keyboard.type( "This one can't" ); + + await editor.canvas + .getByRole( 'document', { name: 'Block: Paragraph' } ) + .filter( { hasText: 'This paragraph can be edited' } ) + .focus(); + await editor.openDocumentSettingsSidebar(); + const editorSettings = page.getByRole( 'region', { + name: 'Editor settings', + } ); + const advancedPanel = editorSettings.getByRole( 'button', { + name: 'Advanced', + } ); + if ( + ( await advancedPanel.getAttribute( 'aria-expanded' ) ) === + 'false' + ) { + await advancedPanel.click(); + } + await editorSettings + .getByRole( 'checkbox', { name: 'Allow instance overrides' } ) + .setChecked( true ); + + await expect.poll( editor.getBlocks ).toMatchObject( [ + { + name: 'core/paragraph', + attributes: { + content: 'This paragraph can be edited', + metadata: { + id: expect.any( String ), + bindings: { + content: { + source: { name: 'pattern_attributes' }, + }, + }, + }, + }, + }, + { + name: 'core/paragraph', + attributes: { content: "This one can't" }, + }, + ] ); + + await page + .getByRole( 'region', { name: 'Editor top bar' } ) + .getByRole( 'button', { name: 'Save' } ) + .click(); + await page + .getByRole( 'region', { name: 'Save panel' } ) + .getByRole( 'button', { name: 'Save' } ) + .click(); + + await expect( + page.getByRole( 'button', { name: 'Dismiss this notice' } ) + ).toBeVisible(); + + patternId = new URL( page.url() ).searchParams.get( 'postId' ); + const blocks = await editor.getBlocks(); + editableParagraphId = blocks[ 0 ].attributes.metadata.id; + } ); + + await test.step( 'Create a post and insert the pattern with overrides', async () => { + await admin.createNewPost(); + + await editor.insertBlock( { + name: 'core/block', + attributes: { ref: patternId }, + } ); + await editor.insertBlock( { + name: 'core/block', + attributes: { ref: patternId }, + } ); + + const patternBlocks = editor.canvas.getByRole( 'document', { + name: 'Block: Pattern', + } ); + const paragraphs = patternBlocks.first().getByRole( 'document', { + name: 'Block: Paragraph', + } ); + await expect( paragraphs.first() ).not.toHaveAttribute( + 'inert', + 'true' + ); + await expect( paragraphs.last() ).toHaveAttribute( + 'inert', + 'true' + ); + + await expect( paragraphs.first() ).toHaveText( + 'This paragraph can be edited' + ); + + await paragraphs.first().selectText(); + await page.keyboard.type( 'I would word it this way' ); + + await patternBlocks + .last() + .getByRole( 'document', { + name: 'Block: Paragraph', + } ) + .first() + .selectText(); + await page.keyboard.type( 'This one is different' ); + + await expect.poll( editor.getBlocks ).toMatchObject( [ + { + name: 'core/block', + attributes: { + ref: patternId, + overrides: { + [ editableParagraphId ]: { + content: 'I would word it this way', + }, + }, + }, + }, + { + name: 'core/block', + attributes: { + ref: patternId, + overrides: { + [ editableParagraphId ]: { + content: 'This one is different', + }, + }, + }, + }, + ] ); + + await page + .getByRole( 'region', { name: 'Editor top bar' } ) + .getByRole( 'button', { name: 'Publish' } ) + .click(); + const editorPublishPanel = page.getByRole( 'region', { + name: 'Editor publish', + } ); + await editorPublishPanel + .getByRole( 'button', { name: 'Publish', exact: true } ) + .click(); + await editorPublishPanel + .getByRole( 'link', { name: 'View post' } ) + .click(); + + await expect( page.locator( 'p' ) ).toContainText( [ + 'I would word it this way', + 'This one can’t', + 'This one is different', + 'This one can’t', + ] ); + } ); + } ); +} ); From f6d29bd18e538ff63a52c7984376df58b5730a15 Mon Sep 17 00:00:00 2001 From: Carlos Bravo <37012961+c4rl0sbr4v0@users.noreply.github.com> Date: Tue, 16 Jan 2024 09:52:41 +0100 Subject: [PATCH 03/71] Interactivity API: Remove `data-wp-slot` and `data-wp-fill` (#57854) * Remove slot and fill directives * Remove slots tests * Update changelog --- .../directive-slots/block.json | 15 -- .../directive-slots/render.php | 69 ------- .../directive-slots/view.js | 20 -- packages/interactivity/CHANGELOG.md | 4 + packages/interactivity/src/directives.js | 59 ------ packages/interactivity/src/slots.js | 38 ---- .../interactivity/directive-slots.spec.ts | 186 ------------------ 7 files changed, 4 insertions(+), 387 deletions(-) delete mode 100644 packages/e2e-tests/plugins/interactive-blocks/directive-slots/block.json delete mode 100644 packages/e2e-tests/plugins/interactive-blocks/directive-slots/render.php delete mode 100644 packages/e2e-tests/plugins/interactive-blocks/directive-slots/view.js delete mode 100644 packages/interactivity/src/slots.js delete mode 100644 test/e2e/specs/interactivity/directive-slots.spec.ts diff --git a/packages/e2e-tests/plugins/interactive-blocks/directive-slots/block.json b/packages/e2e-tests/plugins/interactive-blocks/directive-slots/block.json deleted file mode 100644 index 6139c4e0620409..00000000000000 --- a/packages/e2e-tests/plugins/interactive-blocks/directive-slots/block.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://schemas.wp.org/trunk/block.json", - "apiVersion": 2, - "name": "test/directive-slots", - "title": "E2E Interactivity tests - directive slots", - "category": "text", - "icon": "heart", - "description": "", - "supports": { - "interactivity": true - }, - "textdomain": "e2e-interactivity", - "viewScript": "directive-slots-view", - "render": "file:./render.php" -} diff --git a/packages/e2e-tests/plugins/interactive-blocks/directive-slots/render.php b/packages/e2e-tests/plugins/interactive-blocks/directive-slots/render.php deleted file mode 100644 index c9a989ccaf0275..00000000000000 --- a/packages/e2e-tests/plugins/interactive-blocks/directive-slots/render.php +++ /dev/null @@ -1,69 +0,0 @@ - - -
-
-
[1]
-
[2]
-
[3]
-
[4]
-
[5]
-
- -
- initial -
- -
- - - - - - -
-
diff --git a/packages/e2e-tests/plugins/interactive-blocks/directive-slots/view.js b/packages/e2e-tests/plugins/interactive-blocks/directive-slots/view.js deleted file mode 100644 index a8673fea9eba92..00000000000000 --- a/packages/e2e-tests/plugins/interactive-blocks/directive-slots/view.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * WordPress dependencies - */ -import { store, getContext } from '@wordpress/interactivity'; - -const { state } = store( 'directive-slots', { - state: { - slot: '', - }, - actions: { - changeSlot( event ) { - state.slot = event.target.dataset.slot; - }, - updateSlotText() { - const context = getContext(); - const n = context.text[ 1 ]; - context.text = `[${ n } updated]`; - }, - }, -} ); diff --git a/packages/interactivity/CHANGELOG.md b/packages/interactivity/CHANGELOG.md index ff0c4942abb3f1..db396cfa11de12 100644 --- a/packages/interactivity/CHANGELOG.md +++ b/packages/interactivity/CHANGELOG.md @@ -6,6 +6,10 @@ - Add the `data-wp-run` directive along with the `useInit` and `useWatch` hooks. ([57805](https://github.com/WordPress/gutenberg/pull/57805)) +### Breaking Change + +- Remove `data-wp-slot` and `data-wp-fill`. ([#57854](https://github.com/WordPress/gutenberg/pull/57854)) + ### Bug Fix - Fix namespaces when there are nested interactive regions. ([#57029](https://github.com/WordPress/gutenberg/pull/57029)) diff --git a/packages/interactivity/src/directives.js b/packages/interactivity/src/directives.js index e9cc66fa50a6f0..cddab32079823e 100644 --- a/packages/interactivity/src/directives.js +++ b/packages/interactivity/src/directives.js @@ -16,7 +16,6 @@ import { deepSignal, peek } from 'deepsignal'; import { createPortal } from './portals'; import { useWatch, useInit } from './utils'; import { directive } from './hooks'; -import { SlotProvider, Slot, Fill } from './slots'; import { navigate } from './router'; const isObject = ( item ) => @@ -333,64 +332,6 @@ export default () => { element.props.children = evaluate( entry ); } ); - // data-wp-slot - directive( - 'slot', - ( { directives: { slot }, props: { children }, element } ) => { - const { value } = slot.find( - ( { suffix } ) => suffix === 'default' - ); - const name = typeof value === 'string' ? value : value.name; - const position = value.position || 'children'; - - if ( position === 'before' ) { - return ( - <> - - { children } - - ); - } - if ( position === 'after' ) { - return ( - <> - { children } - - - ); - } - if ( position === 'replace' ) { - return { children }; - } - if ( position === 'children' ) { - element.props.children = ( - { element.props.children } - ); - } - }, - { priority: 4 } - ); - - // data-wp-fill - directive( - 'fill', - ( { directives: { fill }, props: { children }, evaluate } ) => { - const entry = fill.find( ( { suffix } ) => suffix === 'default' ); - const slot = evaluate( entry ); - return { children }; - }, - { priority: 4 } - ); - - // data-wp-slot-provider - directive( - 'slot-provider', - ( { props: { children } } ) => ( - { children } - ), - { priority: 4 } - ); - // data-wp-run directive( 'run', ( { directives: { run }, evaluate } ) => { run.forEach( ( entry ) => evaluate( entry ) ); diff --git a/packages/interactivity/src/slots.js b/packages/interactivity/src/slots.js deleted file mode 100644 index e8bc6ddfa368f5..00000000000000 --- a/packages/interactivity/src/slots.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * External dependencies - */ -import { createContext } from 'preact'; -import { useContext, useEffect } from 'preact/hooks'; -import { signal } from '@preact/signals'; - -const slotsContext = createContext(); - -export const Fill = ( { slot, children } ) => { - const slots = useContext( slotsContext ); - - useEffect( () => { - if ( slot ) { - slots.value = { ...slots.value, [ slot ]: children }; - return () => { - slots.value = { ...slots.value, [ slot ]: null }; - }; - } - }, [ slots, slot, children ] ); - - return !! slot ? null : children; -}; - -export const SlotProvider = ( { children } ) => { - return ( - // TODO: We can change this to use deepsignal once this PR is merged. - // https://github.com/luisherranz/deepsignal/pull/38 - - { children } - - ); -}; - -export const Slot = ( { name, children } ) => { - const slots = useContext( slotsContext ); - return slots.value[ name ] || children; -}; diff --git a/test/e2e/specs/interactivity/directive-slots.spec.ts b/test/e2e/specs/interactivity/directive-slots.spec.ts deleted file mode 100644 index 195af52fdb1bd2..00000000000000 --- a/test/e2e/specs/interactivity/directive-slots.spec.ts +++ /dev/null @@ -1,186 +0,0 @@ -/** - * Internal dependencies - */ -import { test, expect } from './fixtures'; - -test.describe( 'data-wp-slot', () => { - test.beforeAll( async ( { interactivityUtils: utils } ) => { - await utils.activatePlugins(); - await utils.addPostWithBlock( 'test/directive-slots' ); - } ); - - test.beforeEach( async ( { interactivityUtils: utils, page } ) => { - await page.goto( utils.getLink( 'test/directive-slots' ) ); - } ); - - test.afterAll( async ( { interactivityUtils: utils } ) => { - await utils.deactivatePlugins(); - await utils.deleteAllPosts(); - } ); - - test( 'should render the fill in its children by default', async ( { - page, - } ) => { - const slot1 = page.getByTestId( 'slot-1' ); - const slots = page.getByTestId( 'slots' ); - const fillContainer = page.getByTestId( 'fill-container' ); - - await page.getByTestId( 'slot-1-button' ).click(); - - await expect( fillContainer ).toBeEmpty(); - await expect( slot1.getByTestId( 'fill' ) ).toBeVisible(); - await expect( slot1 ).toHaveText( 'fill inside slot 1' ); - await expect( slots.locator( 'css= > *' ) ).toHaveText( [ - 'fill inside slot 1', - '[2]', - '[3]', - '[4]', - '[5]', - ] ); - } ); - - test( 'should render the fill before if specified', async ( { page } ) => { - const slot2 = page.getByTestId( 'slot-2' ); - const slots = page.getByTestId( 'slots' ); - const fillContainer = page.getByTestId( 'fill-container' ); - - await page.getByTestId( 'slot-2-button' ).click(); - - await expect( fillContainer ).toBeEmpty(); - await expect( slot2 ).toHaveText( '[2]' ); - await expect( slots.getByTestId( 'fill' ) ).toBeVisible(); - await expect( slots.locator( 'css= > *' ) ).toHaveText( [ - '[1]', - 'fill inside slots', - '[2]', - '[3]', - '[4]', - '[5]', - ] ); - } ); - - test( 'should render the fill after if specified', async ( { page } ) => { - const slot3 = page.getByTestId( 'slot-3' ); - const slots = page.getByTestId( 'slots' ); - const fillContainer = page.getByTestId( 'fill-container' ); - - await page.getByTestId( 'slot-3-button' ).click(); - - await expect( fillContainer ).toBeEmpty(); - await expect( slot3 ).toHaveText( '[3]' ); - await expect( slots.getByTestId( 'fill' ) ).toBeVisible(); - await expect( slots.locator( 'css= > *' ) ).toHaveText( [ - '[1]', - '[2]', - '[3]', - 'fill inside slots', - '[4]', - '[5]', - ] ); - } ); - - test( 'should render the fill in its children if specified', async ( { - page, - } ) => { - const slot4 = page.getByTestId( 'slot-4' ); - const slots = page.getByTestId( 'slots' ); - const fillContainer = page.getByTestId( 'fill-container' ); - - await page.getByTestId( 'slot-4-button' ).click(); - - await expect( fillContainer ).toBeEmpty(); - await expect( slot4.getByTestId( 'fill' ) ).toBeVisible(); - await expect( slot4 ).toHaveText( 'fill inside slot 4' ); - await expect( slots.locator( 'css= > *' ) ).toHaveText( [ - '[1]', - '[2]', - '[3]', - 'fill inside slot 4', - '[5]', - ] ); - } ); - - test( 'should be replaced by the fill if specified', async ( { page } ) => { - const slot5 = page.getByTestId( 'slot-5' ); - const slots = page.getByTestId( 'slots' ); - const fillContainer = page.getByTestId( 'fill-container' ); - - await page.getByTestId( 'slot-5-button' ).click(); - - await expect( fillContainer ).toBeEmpty(); - await expect( slot5 ).toBeHidden(); - await expect( slots.getByTestId( 'fill' ) ).toBeVisible(); - await expect( slots.locator( 'css= > *' ) ).toHaveText( [ - '[1]', - '[2]', - '[3]', - '[4]', - 'fill inside slots', - ] ); - } ); - - test( 'should keep the fill in its original position if no slot matches', async ( { - page, - } ) => { - const fillContainer = page.getByTestId( 'fill-container' ); - await expect( fillContainer.getByTestId( 'fill' ) ).toBeVisible(); - - await page.getByTestId( 'slot-1-button' ).click(); - - await expect( fillContainer ).toBeEmpty(); - - await page.getByTestId( 'reset' ).click(); - - await expect( fillContainer.getByTestId( 'fill' ) ).toBeVisible(); - } ); - - test( 'should not be re-mounted when adding the fill before', async ( { - page, - } ) => { - const slot2 = page.getByTestId( 'slot-2' ); - const slots = page.getByTestId( 'slots' ); - - await expect( slot2 ).toHaveText( '[2]' ); - - await slot2.click(); - - await expect( slot2 ).toHaveText( '[2 updated]' ); - - await page.getByTestId( 'slot-2-button' ).click(); - - await expect( slots.getByTestId( 'fill' ) ).toBeVisible(); - await expect( slots.locator( 'css= > *' ) ).toHaveText( [ - '[1]', - 'fill inside slots', - '[2 updated]', - '[3]', - '[4]', - '[5]', - ] ); - } ); - - test( 'should not be re-mounted when adding the fill after', async ( { - page, - } ) => { - const slot3 = page.getByTestId( 'slot-3' ); - const slots = page.getByTestId( 'slots' ); - - await expect( slot3 ).toHaveText( '[3]' ); - - await slot3.click(); - - await expect( slot3 ).toHaveText( '[3 updated]' ); - - await page.getByTestId( 'slot-3-button' ).click(); - - await expect( slots.getByTestId( 'fill' ) ).toBeVisible(); - await expect( slots.locator( 'css= > *' ) ).toHaveText( [ - '[1]', - '[2]', - '[3 updated]', - 'fill inside slots', - '[4]', - '[5]', - ] ); - } ); -} ); From 45eb9a5b1e3aa57b163ec8f1651e89881ca22773 Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Tue, 16 Jan 2024 10:17:44 +0100 Subject: [PATCH 04/71] Editor styles: memo transform (#57810) --- .../src/utils/transform-styles/index.js | 89 +++++++++++-------- 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/packages/block-editor/src/utils/transform-styles/index.js b/packages/block-editor/src/utils/transform-styles/index.js index 742e3a9becaef3..808566776f6ea3 100644 --- a/packages/block-editor/src/utils/transform-styles/index.js +++ b/packages/block-editor/src/utils/transform-styles/index.js @@ -5,6 +5,52 @@ import postcss, { CssSyntaxError } from 'postcss'; import wrap from 'postcss-prefixwrap'; import rebaseUrl from 'postcss-urlrebase'; +const transformStylesCache = new WeakMap(); + +function transformStyle( + { css, ignoredSelectors = [], baseURL }, + wrapperSelector = '' +) { + // When there is no wrapper selector or base URL, there is no need + // to transform the CSS. This is most cases because in the default + // iframed editor, no wrapping is needed, and not many styles + // provide a base URL. + if ( ! wrapperSelector && ! baseURL ) { + return css; + } + + try { + return postcss( + [ + wrapperSelector && + wrap( wrapperSelector, { + ignoredSelectors: [ + ...ignoredSelectors, + wrapperSelector, + ], + } ), + baseURL && rebaseUrl( { rootUrl: baseURL } ), + ].filter( Boolean ) + ).process( css, {} ).css; // use sync PostCSS API + } catch ( error ) { + if ( error instanceof CssSyntaxError ) { + // eslint-disable-next-line no-console + console.warn( + 'wp.blockEditor.transformStyles Failed to transform CSS.', + error.message + '\n' + error.showSourceCode( false ) + ); + } else { + // eslint-disable-next-line no-console + console.warn( + 'wp.blockEditor.transformStyles Failed to transform CSS.', + error + ); + } + + return null; + } +} + /** * Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed. * @@ -18,45 +64,14 @@ import rebaseUrl from 'postcss-urlrebase'; * @return {Array} converted rules. */ const transformStyles = ( styles, wrapperSelector = '' ) => { - return styles.map( ( { css, ignoredSelectors = [], baseURL } ) => { - // When there is no wrapper selector or base URL, there is no need - // to transform the CSS. This is most cases because in the default - // iframed editor, no wrapping is needed, and not many styles - // provide a base URL. - if ( ! wrapperSelector && ! baseURL ) { - return css; + return styles.map( ( style ) => { + if ( transformStylesCache.has( style ) ) { + return transformStylesCache.get( style ); } - try { - return postcss( - [ - wrapperSelector && - wrap( wrapperSelector, { - ignoredSelectors: [ - ...ignoredSelectors, - wrapperSelector, - ], - } ), - baseURL && rebaseUrl( { rootUrl: baseURL } ), - ].filter( Boolean ) - ).process( css, {} ).css; // use sync PostCSS API - } catch ( error ) { - if ( error instanceof CssSyntaxError ) { - // eslint-disable-next-line no-console - console.warn( - 'wp.blockEditor.transformStyles Failed to transform CSS.', - error.message + '\n' + error.showSourceCode( false ) - ); - } else { - // eslint-disable-next-line no-console - console.warn( - 'wp.blockEditor.transformStyles Failed to transform CSS.', - error - ); - } - - return null; - } + const transformedStyle = transformStyle( style, wrapperSelector ); + transformStylesCache.set( style, transformedStyle ); + return transformedStyle; } ); }; From 33b6e641d6f3737a8880d22bad77cb4ee53be602 Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Tue, 16 Jan 2024 10:21:09 +0100 Subject: [PATCH 05/71] Iframe: calc compat styles once per page load (#57798) --- .../iframe/get-compatibility-styles.js | 120 +++++++++++++++++ .../src/components/iframe/index.js | 5 +- .../iframe/use-compatibility-styles.js | 122 ------------------ 3 files changed, 122 insertions(+), 125 deletions(-) create mode 100644 packages/block-editor/src/components/iframe/get-compatibility-styles.js delete mode 100644 packages/block-editor/src/components/iframe/use-compatibility-styles.js diff --git a/packages/block-editor/src/components/iframe/get-compatibility-styles.js b/packages/block-editor/src/components/iframe/get-compatibility-styles.js new file mode 100644 index 00000000000000..ab80e0e8eb43ea --- /dev/null +++ b/packages/block-editor/src/components/iframe/get-compatibility-styles.js @@ -0,0 +1,120 @@ +let compatibilityStyles = null; + +/** + * Returns a list of stylesheets that target the editor canvas. A stylesheet is + * considered targetting the editor a canvas if it contains the + * `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors. + * + * Ideally, this hook should be removed in the future and styles should be added + * explicitly as editor styles. + */ +export function getCompatibilityStyles() { + if ( compatibilityStyles ) { + return compatibilityStyles; + } + + // Only memoize the result once on load, since these stylesheets should not + // change. + compatibilityStyles = Array.from( document.styleSheets ).reduce( + ( accumulator, styleSheet ) => { + try { + // May fail for external styles. + // eslint-disable-next-line no-unused-expressions + styleSheet.cssRules; + } catch ( e ) { + return accumulator; + } + + const { ownerNode, cssRules } = styleSheet; + + // Stylesheet is added by another stylesheet. See + // https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/ownerNode#notes. + if ( ownerNode === null ) { + return accumulator; + } + + if ( ! cssRules ) { + return accumulator; + } + + // Don't try to add the reset styles, which were removed as a dependency + // from `edit-blocks` for the iframe since we don't need to reset admin + // styles. + if ( ownerNode.id === 'wp-reset-editor-styles-css' ) { + return accumulator; + } + + // Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs. + if ( ! ownerNode.id ) { + return accumulator; + } + + function matchFromRules( _cssRules ) { + return Array.from( _cssRules ).find( + ( { + selectorText, + conditionText, + cssRules: __cssRules, + } ) => { + // If the rule is conditional then it will not have selector text. + // Recurse into child CSS ruleset to determine selector eligibility. + if ( conditionText ) { + return matchFromRules( __cssRules ); + } + + return ( + selectorText && + ( selectorText.includes( + '.editor-styles-wrapper' + ) || + selectorText.includes( '.wp-block' ) ) + ); + } + ); + } + + if ( matchFromRules( cssRules ) ) { + const isInline = ownerNode.tagName === 'STYLE'; + + if ( isInline ) { + // If the current target is inline, + // it could be a dependency of an existing stylesheet. + // Look for that dependency and add it BEFORE the current target. + const mainStylesCssId = ownerNode.id.replace( + '-inline-css', + '-css' + ); + const mainStylesElement = + document.getElementById( mainStylesCssId ); + if ( mainStylesElement ) { + accumulator.push( mainStylesElement.cloneNode( true ) ); + } + } + + accumulator.push( ownerNode.cloneNode( true ) ); + + if ( ! isInline ) { + // If the current target is not inline, + // we still look for inline styles that could be relevant for the current target. + // If they exist, add them AFTER the current target. + const inlineStylesCssId = ownerNode.id.replace( + '-css', + '-inline-css' + ); + const inlineStylesElement = + document.getElementById( inlineStylesCssId ); + if ( inlineStylesElement ) { + accumulator.push( + inlineStylesElement.cloneNode( true ) + ); + } + } + } + + return accumulator; + }, + [] + ); + + return compatibilityStyles; +} diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index 1939f75811c8c5..de482c5f059dc8 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -28,7 +28,7 @@ import { useSelect } from '@wordpress/data'; */ import { useBlockSelectionClearer } from '../block-selection-clearer'; import { useWritingFlow } from '../writing-flow'; -import { useCompatibilityStyles } from './use-compatibility-styles'; +import { getCompatibilityStyles } from './get-compatibility-styles'; import { store as blockEditorStore } from '../../store'; function bubbleEvent( event, Constructor, frame ) { @@ -121,7 +121,6 @@ function Iframe( { const { styles = '', scripts = '' } = resolvedAssets; const [ iframeDocument, setIframeDocument ] = useState(); const [ bodyClasses, setBodyClasses ] = useState( [] ); - const compatStyles = useCompatibilityStyles(); const clearerRef = useBlockSelectionClearer(); const [ before, writingFlowRef, after ] = useWritingFlow(); const [ contentResizeListener, { height: contentHeight } ] = @@ -156,7 +155,7 @@ function Iframe( { contentDocument.dir = ownerDocument.dir; - for ( const compatStyle of compatStyles ) { + for ( const compatStyle of getCompatibilityStyles() ) { if ( contentDocument.getElementById( compatStyle.id ) ) { continue; } diff --git a/packages/block-editor/src/components/iframe/use-compatibility-styles.js b/packages/block-editor/src/components/iframe/use-compatibility-styles.js deleted file mode 100644 index eb738c7ebefdfe..00000000000000 --- a/packages/block-editor/src/components/iframe/use-compatibility-styles.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * WordPress dependencies - */ -import { useMemo } from '@wordpress/element'; - -/** - * Returns a list of stylesheets that target the editor canvas. A stylesheet is - * considered targetting the editor a canvas if it contains the - * `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors. - * - * Ideally, this hook should be removed in the future and styles should be added - * explicitly as editor styles. - */ -export function useCompatibilityStyles() { - // Only memoize the result once on load, since these stylesheets should not - // change. - return useMemo( () => { - // Search the document for stylesheets targetting the editor canvas. - return Array.from( document.styleSheets ).reduce( - ( accumulator, styleSheet ) => { - try { - // May fail for external styles. - // eslint-disable-next-line no-unused-expressions - styleSheet.cssRules; - } catch ( e ) { - return accumulator; - } - - const { ownerNode, cssRules } = styleSheet; - - // Stylesheet is added by another stylesheet. See - // https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet/ownerNode#notes. - if ( ownerNode === null ) { - return accumulator; - } - - if ( ! cssRules ) { - return accumulator; - } - - // Don't try to add the reset styles, which were removed as a dependency - // from `edit-blocks` for the iframe since we don't need to reset admin - // styles. - if ( ownerNode.id === 'wp-reset-editor-styles-css' ) { - return accumulator; - } - - // Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs. - if ( ! ownerNode.id ) { - return accumulator; - } - - function matchFromRules( _cssRules ) { - return Array.from( _cssRules ).find( - ( { - selectorText, - conditionText, - cssRules: __cssRules, - } ) => { - // If the rule is conditional then it will not have selector text. - // Recurse into child CSS ruleset to determine selector eligibility. - if ( conditionText ) { - return matchFromRules( __cssRules ); - } - - return ( - selectorText && - ( selectorText.includes( - '.editor-styles-wrapper' - ) || - selectorText.includes( '.wp-block' ) ) - ); - } - ); - } - - if ( matchFromRules( cssRules ) ) { - const isInline = ownerNode.tagName === 'STYLE'; - - if ( isInline ) { - // If the current target is inline, - // it could be a dependency of an existing stylesheet. - // Look for that dependency and add it BEFORE the current target. - const mainStylesCssId = ownerNode.id.replace( - '-inline-css', - '-css' - ); - const mainStylesElement = - document.getElementById( mainStylesCssId ); - if ( mainStylesElement ) { - accumulator.push( - mainStylesElement.cloneNode( true ) - ); - } - } - - accumulator.push( ownerNode.cloneNode( true ) ); - - if ( ! isInline ) { - // If the current target is not inline, - // we still look for inline styles that could be relevant for the current target. - // If they exist, add them AFTER the current target. - const inlineStylesCssId = ownerNode.id.replace( - '-css', - '-inline-css' - ); - const inlineStylesElement = - document.getElementById( inlineStylesCssId ); - if ( inlineStylesElement ) { - accumulator.push( - inlineStylesElement.cloneNode( true ) - ); - } - } - } - - return accumulator; - }, - [] - ); - }, [] ); -} From d452cb429a259867d04dc6c94913fc642412eed9 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Tue, 16 Jan 2024 19:09:02 +0900 Subject: [PATCH 06/71] Pullquote Block: Add padding and margin support (#45731) * Pullquote Block: Add padding and margin support * Update padding styles * Don't use __experimentalStyle --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/pullquote/block.json | 4 ++++ packages/block-library/src/pullquote/style.scss | 14 +++++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 84396caefbf474..bee68530eeb239 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -694,7 +694,7 @@ Give special visual emphasis to a quote from your text. ([Source](https://github - **Name:** core/pullquote - **Category:** text -- **Supports:** align (full, left, right, wide), anchor, color (background, gradients, link, text), typography (fontSize, lineHeight) +- **Supports:** align (full, left, right, wide), anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight) - **Attributes:** citation, textAlign, value ## Query Loop diff --git a/packages/block-library/src/pullquote/block.json b/packages/block-library/src/pullquote/block.json index 7fc81d5683bd19..f041d46cda8cdd 100644 --- a/packages/block-library/src/pullquote/block.json +++ b/packages/block-library/src/pullquote/block.json @@ -35,6 +35,10 @@ "text": true } }, + "spacing": { + "margin": true, + "padding": true + }, "typography": { "fontSize": true, "lineHeight": true, diff --git a/packages/block-library/src/pullquote/style.scss b/packages/block-library/src/pullquote/style.scss index 94d043d1cf2f5b..b53dbf6561638c 100644 --- a/packages/block-library/src/pullquote/style.scss +++ b/packages/block-library/src/pullquote/style.scss @@ -1,5 +1,5 @@ .wp-block-pullquote { - padding: 3em 0; + padding: 4em 0; text-align: center; // Default text-alignment where the `textAlign` attribute value isn't specified. overflow-wrap: break-word; // Break long strings of text without spaces so they don't overflow the block. box-sizing: border-box; @@ -10,6 +10,18 @@ color: inherit; } + blockquote { + margin: 0; + } + + p { + margin-top: 0; + + &:last-child { + margin-bottom: 0; + } + } + &.alignleft, &.alignright { max-width: $content-width * 0.5; From 23c3a67638901517df76dced33c73e6392171952 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Tue, 16 Jan 2024 11:47:18 +0100 Subject: [PATCH 07/71] Make the site hub View Site link always visible. (#57423) --- packages/edit-site/src/components/site-hub/index.js | 5 ++++- .../edit-site/src/components/site-hub/style.scss | 13 +------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/packages/edit-site/src/components/site-hub/index.js b/packages/edit-site/src/components/site-hub/index.js index 7af0d53090c578..f79df2df367090 100644 --- a/packages/edit-site/src/components/site-hub/index.js +++ b/packages/edit-site/src/components/site-hub/index.js @@ -180,7 +180,10 @@ const SiteHub = memo( ( { isTransparent, className } ) => { 'View site (opens in a new tab)' ) } icon={ external } - className="edit-site-site-hub__site-view-link" + className={ classnames( + 'edit-site-site-hub__site-view-link', + { 'is-transparent': isTransparent } + ) } /> ) } diff --git a/packages/edit-site/src/components/site-hub/style.scss b/packages/edit-site/src/components/site-hub/style.scss index 0fda40c2e8a9a0..ef063c39841fc8 100644 --- a/packages/edit-site/src/components/site-hub/style.scss +++ b/packages/edit-site/src/components/site-hub/style.scss @@ -9,6 +9,7 @@ } .edit-site-site-hub__site-title, + .edit-site-site-hub__site-view-link, .edit-site-site-hub_toggle-command-center { transition: opacity ease 0.1s; @@ -20,22 +21,10 @@ .edit-site-site-hub__site-view-link { flex-grow: 0; margin-right: var(--wp-admin-border-width-focus); - @include break-mobile() { - opacity: 0; - transition: opacity 0.2s ease-in-out; - } - &:focus { - opacity: 1; - } svg { fill: $gray-200; } } - &:hover { - .edit-site-site-hub__site-view-link { - opacity: 1; - } - } } .edit-site-site-hub__post-type { From b8ecb816188520fd7bb60d71005e01038e0d27af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Tue, 16 Jan 2024 12:53:48 +0100 Subject: [PATCH 08/71] DataViews: set primary field styles (#57846) Co-authored-by: James Koster --- packages/dataviews/src/style.scss | 64 +++++++++++------- packages/dataviews/src/view-grid.js | 10 +-- packages/dataviews/src/view-list.js | 4 +- packages/dataviews/src/view-table.js | 11 +++- .../src/components/page-pages/index.js | 65 +++++++++---------- .../page-patterns/dataviews-patterns.js | 33 +++++----- .../src/components/page-patterns/style.scss | 9 +++ .../src/components/page-templates/index.js | 31 +++------ .../sidebar-dataviews/default-views.js | 4 +- 9 files changed, 125 insertions(+), 106 deletions(-) diff --git a/packages/dataviews/src/style.scss b/packages/dataviews/src/style.scss index 06997fee49a05e..d5b962212af793 100644 --- a/packages/dataviews/src/style.scss +++ b/packages/dataviews/src/style.scss @@ -202,6 +202,44 @@ } } +.dataviews-view-list__primary-field, +.dataviews-view-grid__primary-field, +.dataviews-view-table__primary-field { + font-size: $default-font-size; + font-weight: 500; + color: $gray-900; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: block; + width: 100%; + + a { + text-decoration: none; + color: inherit; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: block; + width: 100%; + + &:hover { + color: $gray-900; + } + } + + button.components-button.is-link { + text-decoration: none; + color: inherit; + font-weight: inherit; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: block; + width: 100%; + } +} + .dataviews-view-grid { margin-bottom: $grid-unit-30; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; @@ -215,26 +253,6 @@ grid-template-columns: repeat(4, minmax(0, 1fr)) !important; // Todo: eliminate !important dependency } - .dataviews-view-grid__card { - .dataviews-view-grid__primary-field { - .dataviews-view-grid__title-field { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - display: block; - font-size: $default-font-size; - width: 100%; - } - - .dataviews-view-grid__title-field a, - button.dataviews-view-grid__title-field { - font-weight: 500; - color: $gray-900; - text-decoration: none; - } - } - } - .dataviews-view-grid__media { width: 100%; min-height: 200px; @@ -250,10 +268,6 @@ } } - .dataviews-view-grid__primary-field { - min-height: $grid-unit-30; - } - .dataviews-view-grid__fields { position: relative; font-size: 12px; @@ -296,6 +310,7 @@ &:not(.is-selected):hover { color: var(--wp-admin-theme-color); + .dataviews-view-list__primary-field, .dataviews-view-list__fields { color: var(--wp-admin-theme-color); } @@ -308,6 +323,7 @@ background-color: var(--wp-admin-theme-color); color: $white; + .dataviews-view-list__primary-field, .dataviews-view-list__fields, .components-button { color: $white; diff --git a/packages/dataviews/src/view-grid.js b/packages/dataviews/src/view-grid.js index 7c18d31dccd193..de0d5eca06b733 100644 --- a/packages/dataviews/src/view-grid.js +++ b/packages/dataviews/src/view-grid.js @@ -2,7 +2,6 @@ * WordPress dependencies */ import { - FlexBlock, __experimentalGrid as Grid, __experimentalHStack as HStack, __experimentalVStack as VStack, @@ -53,13 +52,10 @@ export default function ViewGrid( {
{ mediaField?.render( { item } ) }
- - + + { primaryField?.render( { item } ) } - + - { primaryField?.render( { item } ) } + + { primaryField?.render( { item } ) } +
{ visibleFields.map( ( field ) => { return ( diff --git a/packages/dataviews/src/view-table.js b/packages/dataviews/src/view-table.js index 22e68b4f56331a..8be188bf91c813 100644 --- a/packages/dataviews/src/view-table.js +++ b/packages/dataviews/src/view-table.js @@ -564,7 +564,16 @@ function ViewTable( { field.maxWidth || undefined, } } > - + { field.render( { item, } ) } diff --git a/packages/edit-site/src/components/page-pages/index.js b/packages/edit-site/src/components/page-pages/index.js index 45368c11833f39..5ef05273be02ce 100644 --- a/packages/edit-site/src/components/page-pages/index.js +++ b/packages/edit-site/src/components/page-pages/index.js @@ -1,11 +1,7 @@ /** * WordPress dependencies */ -import { - __experimentalView as View, - __experimentalVStack as VStack, - Button, -} from '@wordpress/components'; +import { Button } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { useEntityRecords, store as coreStore } from '@wordpress/core-data'; import { decodeEntities } from '@wordpress/html-entities'; @@ -82,10 +78,21 @@ function useView( type ) { const { editEntityRecord } = useDispatch( coreStore ); const customView = useMemo( () => { - return ( - editedViewRecord?.content && JSON.parse( editedViewRecord?.content ) - ); + const storedView = + editedViewRecord?.content && + JSON.parse( editedViewRecord?.content ); + if ( ! storedView ) { + return storedView; + } + + return { + ...storedView, + layout: { + ...( DEFAULT_CONFIG_PER_VIEW_TYPE[ storedView?.type ] || {} ), + }, + }; }, [ editedViewRecord?.content ] ); + const setCustomView = useCallback( ( viewToSet ) => { editEntityRecord( @@ -224,32 +231,22 @@ export default function PagePages() { id: 'title', getValue: ( { item } ) => item.title?.rendered, render: ( { item } ) => { - return ( - - - { [ LAYOUT_TABLE, LAYOUT_GRID ].includes( - view.type - ) ? ( - - { decodeEntities( - item.title?.rendered - ) || __( '(no title)' ) } - - ) : ( - decodeEntities( item.title?.rendered ) || - __( '(no title)' ) - ) } - - + return [ LAYOUT_TABLE, LAYOUT_GRID ].includes( + view.type + ) ? ( + + { decodeEntities( item.title?.rendered ) || + __( '(no title)' ) } + + ) : ( + decodeEntities( item.title?.rendered ) || + __( '(no title)' ) ); }, maxWidth: 400, diff --git a/packages/edit-site/src/components/page-patterns/dataviews-patterns.js b/packages/edit-site/src/components/page-patterns/dataviews-patterns.js index ad474d882cfcf6..19b9b6381ec3b1 100644 --- a/packages/edit-site/src/components/page-patterns/dataviews-patterns.js +++ b/packages/edit-site/src/components/page-patterns/dataviews-patterns.js @@ -4,7 +4,6 @@ import { __experimentalHStack as HStack, Button, - __experimentalHeading as Heading, Tooltip, Flex, } from '@wordpress/components'; @@ -197,24 +196,24 @@ function Title( { item, categoryId } ) { /> ) } - + { item.type === PATTERN_TYPES.theme ? ( - - { item.title } - + item.title ) : ( - - - + ) } diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss index dd3c52ef08c1a3..6be2f904a65ec5 100644 --- a/packages/edit-site/src/components/page-patterns/style.scss +++ b/packages/edit-site/src/components/page-patterns/style.scss @@ -254,6 +254,15 @@ top: 0; z-index: 2; } + + .edit-site-patterns__pattern-title { + display: block; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: inherit; + } } .dataviews-action-modal__duplicate-pattern { diff --git a/packages/edit-site/src/components/page-templates/index.js b/packages/edit-site/src/components/page-templates/index.js index ddc48542ee1b7a..0d4ddd31620abf 100644 --- a/packages/edit-site/src/components/page-templates/index.js +++ b/packages/edit-site/src/components/page-templates/index.js @@ -8,10 +8,8 @@ import removeAccents from 'remove-accents'; */ import { Icon, - __experimentalView as View, __experimentalText as Text, __experimentalHStack as HStack, - __experimentalVStack as VStack, VisuallyHidden, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; @@ -96,28 +94,19 @@ function normalizeSearchInput( input = '' ) { function TemplateTitle( { item, viewType } ) { if ( viewType === LAYOUT_LIST ) { - return ( - <> - { decodeEntities( item.title?.rendered ) || __( '(no title)' ) } - - ); + return decodeEntities( item.title?.rendered ) || __( '(no title)' ); } return ( - - - - { decodeEntities( item.title?.rendered ) || - __( '(no title)' ) } - - - + + { decodeEntities( item.title?.rendered ) || __( '(no title)' ) } + ); } diff --git a/packages/edit-site/src/components/sidebar-dataviews/default-views.js b/packages/edit-site/src/components/sidebar-dataviews/default-views.js index fe9f046f31972f..329103bd2b97d2 100644 --- a/packages/edit-site/src/components/sidebar-dataviews/default-views.js +++ b/packages/edit-site/src/components/sidebar-dataviews/default-views.js @@ -15,7 +15,9 @@ import { } from '../../utils/constants'; export const DEFAULT_CONFIG_PER_VIEW_TYPE = { - [ LAYOUT_TABLE ]: {}, + [ LAYOUT_TABLE ]: { + primaryField: 'title', + }, [ LAYOUT_GRID ]: { mediaField: 'featured-image', primaryField: 'title', From fc850220b27f980dcd3a68f92b32bf4c7b41e968 Mon Sep 17 00:00:00 2001 From: Carlos Bravo <37012961+c4rl0sbr4v0@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:42:40 +0100 Subject: [PATCH 09/71] Interactivity API: Remove wp-data-navigation-link directive (#57853) * Remove wp-data-navigation-link directive * Update changelog * Remove not needed functions * Revert "Remove not needed functions" This reverts commit 3461c772474e42ca89785fa9b302dbd85ff43b0c. * Move breaking change changelog to correct position * Add function style to changelog --- packages/interactivity/CHANGELOG.md | 1 + packages/interactivity/src/directives.js | 51 +----------------------- 2 files changed, 2 insertions(+), 50 deletions(-) diff --git a/packages/interactivity/CHANGELOG.md b/packages/interactivity/CHANGELOG.md index db396cfa11de12..913134d6700085 100644 --- a/packages/interactivity/CHANGELOG.md +++ b/packages/interactivity/CHANGELOG.md @@ -9,6 +9,7 @@ ### Breaking Change - Remove `data-wp-slot` and `data-wp-fill`. ([#57854](https://github.com/WordPress/gutenberg/pull/57854)) +- Remove `wp-data-navigation-link` directive. ([#57853](https://github.com/WordPress/gutenberg/pull/57853)) ### Bug Fix diff --git a/packages/interactivity/src/directives.js b/packages/interactivity/src/directives.js index cddab32079823e..931fa07493f44d 100644 --- a/packages/interactivity/src/directives.js +++ b/packages/interactivity/src/directives.js @@ -1,13 +1,7 @@ /** * External dependencies */ -import { - useContext, - useMemo, - useEffect, - useRef, - useLayoutEffect, -} from 'preact/hooks'; +import { useContext, useMemo, useRef, useLayoutEffect } from 'preact/hooks'; import { deepSignal, peek } from 'deepsignal'; /** @@ -16,7 +10,6 @@ import { deepSignal, peek } from 'deepsignal'; import { createPortal } from './portals'; import { useWatch, useInit } from './utils'; import { directive } from './hooks'; -import { navigate } from './router'; const isObject = ( item ) => item && typeof item === 'object' && ! Array.isArray( item ); @@ -264,48 +257,6 @@ export default () => { ); } ); - // data-wp-navigation-link - directive( - 'navigation-link', - ( { - directives: { 'navigation-link': navigationLink }, - props: { href }, - element, - } ) => { - const { value: link } = navigationLink.find( - ( { suffix } ) => suffix === 'default' - ); - - useEffect( () => { - // Prefetch the page if it is in the directive options. - if ( link?.prefetch ) { - // prefetch( href ); - } - } ); - - // Don't do anything if it's falsy. - if ( link !== false ) { - element.props.onclick = async ( event ) => { - event.preventDefault(); - - // Fetch the page (or return it from cache). - await navigate( href ); - - // Update the scroll, depending on the option. True by default. - if ( link?.scroll === 'smooth' ) { - window.scrollTo( { - top: 0, - left: 0, - behavior: 'smooth', - } ); - } else if ( link?.scroll !== false ) { - window.scrollTo( 0, 0 ); - } - }; - } - } - ); - // data-wp-ignore directive( 'ignore', From 9fb3715d7de29f68a0923618cd2ee15b935d7e49 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Wed, 10 Jan 2024 16:47:42 +0000 Subject: [PATCH 10/71] Update changelog files --- packages/a11y/CHANGELOG.md | 2 ++ packages/a11y/package.json | 2 +- packages/annotations/CHANGELOG.md | 2 ++ packages/annotations/package.json | 2 +- packages/api-fetch/CHANGELOG.md | 2 ++ packages/api-fetch/package.json | 2 +- packages/autop/CHANGELOG.md | 2 ++ packages/autop/package.json | 2 +- .../CHANGELOG.md | 2 ++ .../package.json | 2 +- packages/babel-plugin-makepot/CHANGELOG.md | 2 ++ packages/babel-plugin-makepot/package.json | 2 +- packages/babel-preset-default/CHANGELOG.md | 2 ++ packages/babel-preset-default/package.json | 2 +- packages/base-styles/CHANGELOG.md | 2 ++ packages/base-styles/package.json | 2 +- packages/blob/CHANGELOG.md | 2 ++ packages/blob/package.json | 2 +- packages/block-directory/CHANGELOG.md | 2 ++ packages/block-directory/package.json | 2 +- packages/block-editor/CHANGELOG.md | 2 ++ packages/block-editor/package.json | 2 +- packages/block-library/CHANGELOG.md | 2 ++ packages/block-library/package.json | 2 +- .../CHANGELOG.md | 2 ++ .../package.json | 2 +- .../CHANGELOG.md | 2 ++ .../package.json | 2 +- packages/blocks/CHANGELOG.md | 2 ++ packages/blocks/package.json | 2 +- packages/browserslist-config/CHANGELOG.md | 2 ++ packages/browserslist-config/package.json | 2 +- packages/commands/CHANGELOG.md | 2 ++ packages/commands/package.json | 2 +- packages/components/CHANGELOG.md | 18 +++++++++++++----- packages/components/package.json | 4 ++-- packages/compose/CHANGELOG.md | 2 ++ packages/compose/package.json | 2 +- packages/core-commands/CHANGELOG.md | 2 ++ packages/core-commands/package.json | 2 +- packages/core-data/CHANGELOG.md | 2 ++ packages/core-data/package.json | 2 +- .../CHANGELOG.md | 2 ++ .../package.json | 2 +- .../CHANGELOG.md | 2 ++ .../package.json | 2 +- packages/create-block/CHANGELOG.md | 2 ++ packages/create-block/package.json | 2 +- packages/customize-widgets/CHANGELOG.md | 2 ++ packages/customize-widgets/package.json | 2 +- packages/data-controls/CHANGELOG.md | 2 ++ packages/data-controls/package.json | 2 +- packages/data/CHANGELOG.md | 2 ++ packages/data/package.json | 2 +- packages/dataviews/CHANGELOG.md | 2 ++ packages/dataviews/package.json | 2 +- packages/date/CHANGELOG.md | 2 ++ packages/date/package.json | 2 +- .../CHANGELOG.md | 2 ++ .../package.json | 2 +- packages/deprecated/CHANGELOG.md | 2 ++ packages/deprecated/package.json | 2 +- packages/docgen/CHANGELOG.md | 2 ++ packages/docgen/package.json | 2 +- packages/dom-ready/CHANGELOG.md | 2 ++ packages/dom-ready/package.json | 2 +- packages/dom/CHANGELOG.md | 2 ++ packages/dom/package.json | 2 +- .../e2e-test-utils-playwright/CHANGELOG.md | 2 ++ .../e2e-test-utils-playwright/package.json | 2 +- packages/e2e-test-utils/CHANGELOG.md | 2 ++ packages/e2e-test-utils/package.json | 2 +- packages/e2e-tests/CHANGELOG.md | 2 ++ packages/e2e-tests/package.json | 2 +- packages/edit-post/CHANGELOG.md | 2 ++ packages/edit-post/package.json | 2 +- packages/edit-site/CHANGELOG.md | 2 ++ packages/edit-site/package.json | 2 +- packages/edit-widgets/CHANGELOG.md | 2 ++ packages/edit-widgets/package.json | 2 +- packages/editor/CHANGELOG.md | 2 ++ packages/editor/package.json | 2 +- packages/element/CHANGELOG.md | 2 ++ packages/element/package.json | 2 +- packages/env/CHANGELOG.md | 2 ++ packages/env/package.json | 2 +- packages/escape-html/CHANGELOG.md | 2 ++ packages/escape-html/package.json | 2 +- packages/eslint-plugin/CHANGELOG.md | 2 ++ packages/eslint-plugin/package.json | 2 +- packages/format-library/CHANGELOG.md | 2 ++ packages/format-library/package.json | 2 +- packages/hooks/CHANGELOG.md | 2 ++ packages/hooks/package.json | 2 +- packages/html-entities/CHANGELOG.md | 2 ++ packages/html-entities/package.json | 2 +- packages/i18n/CHANGELOG.md | 2 ++ packages/i18n/package.json | 2 +- packages/icons/CHANGELOG.md | 2 ++ packages/icons/package.json | 2 +- packages/interactivity/CHANGELOG.md | 6 ++++-- packages/interactivity/package.json | 2 +- packages/interface/CHANGELOG.md | 2 ++ packages/interface/package.json | 2 +- packages/is-shallow-equal/CHANGELOG.md | 2 ++ packages/is-shallow-equal/package.json | 2 +- packages/jest-console/CHANGELOG.md | 2 ++ packages/jest-console/package.json | 2 +- packages/jest-preset-default/CHANGELOG.md | 2 ++ packages/jest-preset-default/package.json | 2 +- packages/jest-puppeteer-axe/CHANGELOG.md | 2 ++ packages/jest-puppeteer-axe/package.json | 2 +- packages/keyboard-shortcuts/CHANGELOG.md | 2 ++ packages/keyboard-shortcuts/package.json | 2 +- packages/keycodes/CHANGELOG.md | 2 ++ packages/keycodes/package.json | 2 +- packages/lazy-import/CHANGELOG.md | 2 ++ packages/lazy-import/package.json | 2 +- packages/list-reusable-blocks/CHANGELOG.md | 2 ++ packages/list-reusable-blocks/package.json | 2 +- packages/media-utils/CHANGELOG.md | 2 ++ packages/media-utils/package.json | 2 +- packages/notices/CHANGELOG.md | 2 ++ packages/notices/package.json | 2 +- .../npm-package-json-lint-config/CHANGELOG.md | 2 ++ .../npm-package-json-lint-config/package.json | 2 +- packages/nux/CHANGELOG.md | 2 ++ packages/nux/package.json | 2 +- packages/patterns/CHANGELOG.md | 2 ++ packages/patterns/package.json | 2 +- packages/plugins/CHANGELOG.md | 2 ++ packages/plugins/package.json | 2 +- packages/postcss-plugins-preset/CHANGELOG.md | 2 ++ packages/postcss-plugins-preset/package.json | 2 +- packages/postcss-themes/CHANGELOG.md | 2 ++ packages/postcss-themes/package.json | 2 +- packages/preferences-persistence/CHANGELOG.md | 2 ++ packages/preferences-persistence/package.json | 2 +- packages/preferences/CHANGELOG.md | 2 ++ packages/preferences/package.json | 2 +- packages/prettier-config/CHANGELOG.md | 2 ++ packages/prettier-config/package.json | 2 +- packages/primitives/CHANGELOG.md | 2 ++ packages/primitives/package.json | 2 +- packages/priority-queue/CHANGELOG.md | 2 ++ packages/priority-queue/package.json | 2 +- packages/private-apis/CHANGELOG.md | 2 ++ packages/private-apis/package.json | 2 +- .../project-management-automation/CHANGELOG.md | 2 ++ .../project-management-automation/package.json | 2 +- packages/react-i18n/CHANGELOG.md | 2 ++ packages/react-i18n/package.json | 2 +- .../CHANGELOG.md | 2 ++ .../package.json | 2 +- packages/redux-routine/CHANGELOG.md | 2 ++ packages/redux-routine/package.json | 2 +- packages/reusable-blocks/CHANGELOG.md | 2 ++ packages/reusable-blocks/package.json | 2 +- packages/rich-text/CHANGELOG.md | 2 ++ packages/rich-text/package.json | 2 +- packages/router/CHANGELOG.md | 2 ++ packages/router/package.json | 2 +- packages/scripts/CHANGELOG.md | 2 ++ packages/scripts/package.json | 2 +- packages/server-side-render/CHANGELOG.md | 2 ++ packages/server-side-render/package.json | 2 +- packages/shortcode/CHANGELOG.md | 2 ++ packages/shortcode/package.json | 2 +- packages/style-engine/CHANGELOG.md | 2 ++ packages/style-engine/package.json | 2 +- packages/stylelint-config/CHANGELOG.md | 2 ++ packages/stylelint-config/package.json | 2 +- packages/sync/CHANGELOG.md | 2 ++ packages/sync/package.json | 2 +- packages/token-list/CHANGELOG.md | 2 ++ packages/token-list/package.json | 2 +- packages/undo-manager/CHANGELOG.md | 2 ++ packages/undo-manager/package.json | 2 +- packages/url/CHANGELOG.md | 2 ++ packages/url/package.json | 2 +- packages/viewport/CHANGELOG.md | 2 ++ packages/viewport/package.json | 2 +- packages/warning/CHANGELOG.md | 2 ++ packages/warning/package.json | 2 +- packages/widgets/CHANGELOG.md | 2 ++ packages/widgets/package.json | 2 +- packages/wordcount/CHANGELOG.md | 2 ++ packages/wordcount/package.json | 2 +- 188 files changed, 296 insertions(+), 102 deletions(-) diff --git a/packages/a11y/CHANGELOG.md b/packages/a11y/CHANGELOG.md index b78906a8b23e15..7c5c9d79784102 100644 --- a/packages/a11y/CHANGELOG.md +++ b/packages/a11y/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 399b5bd451455c..8ae9c45b7433d9 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/a11y", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "Accessibility (a11y) utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/annotations/CHANGELOG.md b/packages/annotations/CHANGELOG.md index 98c1d6e0f96219..42c37836527973 100644 --- a/packages/annotations/CHANGELOG.md +++ b/packages/annotations/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.49.0 (2024-01-10) + ## 2.48.0 (2023-12-13) ## 2.47.0 (2023-11-29) diff --git a/packages/annotations/package.json b/packages/annotations/package.json index 01ac7d7961f260..fbcf81fdf4f6fe 100644 --- a/packages/annotations/package.json +++ b/packages/annotations/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/annotations", - "version": "2.48.0", + "version": "2.49.0-prerelease", "description": "Annotate content in the Gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/api-fetch/CHANGELOG.md b/packages/api-fetch/CHANGELOG.md index cd9a3d8582dd93..67df4dad50c64c 100644 --- a/packages/api-fetch/CHANGELOG.md +++ b/packages/api-fetch/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.46.0 (2024-01-10) + ## 6.45.0 (2023-12-13) ## 6.44.0 (2023-11-29) diff --git a/packages/api-fetch/package.json b/packages/api-fetch/package.json index be6d4adb079ee9..fcd88a0099df68 100644 --- a/packages/api-fetch/package.json +++ b/packages/api-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/api-fetch", - "version": "6.45.0", + "version": "6.46.0-prerelease", "description": "Utility to make WordPress REST API requests.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/autop/CHANGELOG.md b/packages/autop/CHANGELOG.md index 301f58946ecdd8..4e4c9a91bc781d 100644 --- a/packages/autop/CHANGELOG.md +++ b/packages/autop/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/autop/package.json b/packages/autop/package.json index 8acd56c43fc8c1..7df62adc204845 100644 --- a/packages/autop/package.json +++ b/packages/autop/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/autop", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "WordPress's automatic paragraph functions `autop` and `removep`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md index bab957e21b3aee..19269095d73d70 100644 --- a/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md +++ b/packages/babel-plugin-import-jsx-pragma/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.32.0 (2024-01-10) + ## 4.31.0 (2023-12-13) ## 4.30.0 (2023-11-29) diff --git a/packages/babel-plugin-import-jsx-pragma/package.json b/packages/babel-plugin-import-jsx-pragma/package.json index e9f2b1b19596fa..c0cfeed10daaaf 100644 --- a/packages/babel-plugin-import-jsx-pragma/package.json +++ b/packages/babel-plugin-import-jsx-pragma/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "4.31.0", + "version": "4.32.0-prerelease", "description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-makepot/CHANGELOG.md b/packages/babel-plugin-makepot/CHANGELOG.md index af6099fa128a14..fd1a0546da3ad0 100644 --- a/packages/babel-plugin-makepot/CHANGELOG.md +++ b/packages/babel-plugin-makepot/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.33.0 (2024-01-10) + ## 5.32.0 (2023-12-13) ## 5.31.0 (2023-11-29) diff --git a/packages/babel-plugin-makepot/package.json b/packages/babel-plugin-makepot/package.json index 14d1364e72bf1c..486ef101ada3b9 100644 --- a/packages/babel-plugin-makepot/package.json +++ b/packages/babel-plugin-makepot/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-makepot", - "version": "5.32.0", + "version": "5.33.0-prerelease", "description": "WordPress Babel internationalization (i18n) plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-preset-default/CHANGELOG.md b/packages/babel-preset-default/CHANGELOG.md index 1b4af03b532b01..4149381dce16f8 100644 --- a/packages/babel-preset-default/CHANGELOG.md +++ b/packages/babel-preset-default/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.33.0 (2024-01-10) + ## 7.32.0 (2023-12-13) ## 7.31.0 (2023-11-29) diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json index 2461fb083c3fac..a3b4c864bb6fe8 100644 --- a/packages/babel-preset-default/package.json +++ b/packages/babel-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-preset-default", - "version": "7.32.0", + "version": "7.33.0-prerelease", "description": "Default Babel preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/base-styles/CHANGELOG.md b/packages/base-styles/CHANGELOG.md index 3f1e818df2efdd..a399317b2aef0d 100644 --- a/packages/base-styles/CHANGELOG.md +++ b/packages/base-styles/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.40.0 (2024-01-10) + ## 4.39.0 (2023-12-13) ## 4.38.0 (2023-11-29) diff --git a/packages/base-styles/package.json b/packages/base-styles/package.json index bc5984014ee6ce..86928afa0a515f 100644 --- a/packages/base-styles/package.json +++ b/packages/base-styles/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/base-styles", - "version": "4.39.0", + "version": "4.40.0-prerelease", "description": "Base SCSS utilities and variables for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blob/CHANGELOG.md b/packages/blob/CHANGELOG.md index 7dd54454a04885..b2a501021c5aaa 100644 --- a/packages/blob/CHANGELOG.md +++ b/packages/blob/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/blob/package.json b/packages/blob/package.json index b1bc807dfd0b40..16fc425e198787 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blob", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "Blob utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-directory/CHANGELOG.md b/packages/block-directory/CHANGELOG.md index 2a9b8c670db457..608fc4c4f005cf 100644 --- a/packages/block-directory/CHANGELOG.md +++ b/packages/block-directory/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.26.0 (2024-01-10) + ## 4.25.0 (2023-12-13) ## 4.24.0 (2023-11-29) diff --git a/packages/block-directory/package.json b/packages/block-directory/package.json index 2962204ac36e60..0dcd2f36ccd52b 100644 --- a/packages/block-directory/package.json +++ b/packages/block-directory/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-directory", - "version": "4.25.0", + "version": "4.26.0-prerelease", "description": "Extend editor with block directory features to search, download and install blocks.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-editor/CHANGELOG.md b/packages/block-editor/CHANGELOG.md index 64763eb66f7a87..a66143dd30ac92 100644 --- a/packages/block-editor/CHANGELOG.md +++ b/packages/block-editor/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 12.17.0 (2024-01-10) + ## 12.16.0 (2023-12-13) ## 12.15.0 (2023-11-29) diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index 1f9be9e2608b92..98aa8a709b2362 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-editor", - "version": "12.16.0", + "version": "12.17.0-prerelease", "description": "Generic block editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-library/CHANGELOG.md b/packages/block-library/CHANGELOG.md index d5079fbbb4ac2c..d17ee65991c0a3 100644 --- a/packages/block-library/CHANGELOG.md +++ b/packages/block-library/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.26.0 (2024-01-10) + ## 8.25.0 (2023-12-13) ## 8.24.0 (2023-11-29) diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 30e341d08923a0..c1f484ad9a9143 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-library", - "version": "8.25.0", + "version": "8.26.0-prerelease", "description": "Block library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-default-parser/CHANGELOG.md b/packages/block-serialization-default-parser/CHANGELOG.md index 5e8e65ddea45bd..b705866a049578 100644 --- a/packages/block-serialization-default-parser/CHANGELOG.md +++ b/packages/block-serialization-default-parser/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.49.0 (2024-01-10) + ## 4.48.0 (2023-12-13) ## 4.47.0 (2023-11-29) diff --git a/packages/block-serialization-default-parser/package.json b/packages/block-serialization-default-parser/package.json index 56a0c56269addc..f4d324cf6c9a90 100644 --- a/packages/block-serialization-default-parser/package.json +++ b/packages/block-serialization-default-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-default-parser", - "version": "4.48.0", + "version": "4.49.0-prerelease", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-spec-parser/CHANGELOG.md b/packages/block-serialization-spec-parser/CHANGELOG.md index 81813855697518..c6f586ce6b4805 100644 --- a/packages/block-serialization-spec-parser/CHANGELOG.md +++ b/packages/block-serialization-spec-parser/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.49.0 (2024-01-10) + ## 4.48.0 (2023-12-13) ## 4.47.0 (2023-11-29) diff --git a/packages/block-serialization-spec-parser/package.json b/packages/block-serialization-spec-parser/package.json index cdd2884211afe4..822868a5974182 100644 --- a/packages/block-serialization-spec-parser/package.json +++ b/packages/block-serialization-spec-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-spec-parser", - "version": "4.48.0", + "version": "4.49.0-prerelease", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blocks/CHANGELOG.md b/packages/blocks/CHANGELOG.md index 0cce621f5b6cdb..d932b12a54531c 100644 --- a/packages/blocks/CHANGELOG.md +++ b/packages/blocks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 12.26.0 (2024-01-10) + ## 12.25.0 (2023-12-13) ## 12.24.0 (2023-11-29) diff --git a/packages/blocks/package.json b/packages/blocks/package.json index a2aff291dbda35..355251c5d16dab 100644 --- a/packages/blocks/package.json +++ b/packages/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blocks", - "version": "12.25.0", + "version": "12.26.0-prerelease", "description": "Block API for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/browserslist-config/CHANGELOG.md b/packages/browserslist-config/CHANGELOG.md index 451716f50edb96..cf94e1caf70e53 100644 --- a/packages/browserslist-config/CHANGELOG.md +++ b/packages/browserslist-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.32.0 (2024-01-10) + ## 5.31.0 (2023-12-13) ## 5.30.0 (2023-11-29) diff --git a/packages/browserslist-config/package.json b/packages/browserslist-config/package.json index 815fe6eba00fe8..6e039d02c0f92a 100644 --- a/packages/browserslist-config/package.json +++ b/packages/browserslist-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/browserslist-config", - "version": "5.31.0", + "version": "5.32.0-prerelease", "description": "WordPress Browserslist shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/commands/CHANGELOG.md b/packages/commands/CHANGELOG.md index 8c697a90b20bee..3b42cc552899f1 100644 --- a/packages/commands/CHANGELOG.md +++ b/packages/commands/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.20.0 (2024-01-10) + ## Enhancements - Support conditional commands and commands loaders using the "disabled" config. diff --git a/packages/commands/package.json b/packages/commands/package.json index 20fcea5c67b118..ef3fa9f6bfbfd6 100644 --- a/packages/commands/package.json +++ b/packages/commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/commands", - "version": "0.19.0", + "version": "0.20.0-prerelease", "description": "Handles the commands menu.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index ba0629eff7f37d..570c7371072cc7 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -2,6 +2,19 @@ ## Unreleased +### Enhancements + +- `ColorPicker`: improve the UX around HSL sliders ([#57555](https://github.com/WordPress/gutenberg/pull/57555)). +- `BoxControl`, `BorderControl`, `BorderBoxControl`: Add opt-in prop for 40px default size ([#56185](https://github.com/WordPress/gutenberg/pull/56185)). +- `PaletteEdit`: improve unit tests ([#57645](https://github.com/WordPress/gutenberg/pull/57645)). +- `ColorPalette` and `CircularOptionPicker`: improve unit tests ([#57809](https://github.com/WordPress/gutenberg/pull/57809)). + +### Bug Fixes + +- `ToggleGroupControl`: Improve controlled value detection ([#57770](https://github.com/WordPress/gutenberg/pull/57770)). + +## 25.15.0 (2024-01-10) + ### Bug Fix - `NumberControl`: Make increment and decrement buttons keyboard accessible. ([#57402](https://github.com/WordPress/gutenberg/pull/57402)). @@ -19,12 +32,10 @@ - `DuotonePicker`: Remove top margin when no duotone options ([#57489](https://github.com/WordPress/gutenberg/pull/57489)). - `Snackbar`: Fix icon positioning ([#57377](https://github.com/WordPress/gutenberg/pull/57377)). - `GradientPicker`: Use slug while iterating over gradient entries to avoid React "duplicated key" warning ([#57361](https://github.com/WordPress/gutenberg/pull/57361)). -- `ToggleGroupControl`: Improve controlled value detection ([#57770](https://github.com/WordPress/gutenberg/pull/57770)). - `NavigatorProvider`: Exclude `size` value from `contain` CSS rule ([#57498](https://github.com/WordPress/gutenberg/pull/57498)). ### Enhancements -- `ColorPicker`: improve the UX around HSL sliders ([#57555](https://github.com/WordPress/gutenberg/pull/57555)). - Update `ariakit` to version `0.3.10` ([#57325](https://github.com/WordPress/gutenberg/pull/57325)). - Update `@ariakit/react` to version `0.3.12` and @ariakit/test to version `0.3.7` ([#57547](https://github.com/WordPress/gutenberg/pull/57547)). - `DropdownMenuV2`: do not collapse suffix width ([#57238](https://github.com/WordPress/gutenberg/pull/57238)). @@ -35,9 +46,6 @@ - `ToggleGroupControl`: Update button size in large variant to be 32px ([#57338](https://github.com/WordPress/gutenberg/pull/57338)). - `Tooltip`: improve unit tests ([#57345](https://github.com/WordPress/gutenberg/pull/57345)). - `Tooltip`: no-op when nested inside other `Tooltip` components ([#57202](https://github.com/WordPress/gutenberg/pull/57202)). -- `PaletteEdit`: improve unit tests ([#57645](https://github.com/WordPress/gutenberg/pull/57645)). -- `ColorPalette` and `CircularOptionPicker`: improve unit tests ([#57809](https://github.com/WordPress/gutenberg/pull/57809)). -- `BoxControl`, `BorderControl`, `BorderBoxControl`: Add opt-in prop for 40px default size ([#56185](https://github.com/WordPress/gutenberg/pull/56185)). ### Experimental diff --git a/packages/components/package.json b/packages/components/package.json index cd440998b93230..f49deb5413c35b 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/components", - "version": "25.14.0", + "version": "25.15.0-prerelease", "description": "UI components for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", @@ -88,4 +88,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/compose/CHANGELOG.md b/packages/compose/CHANGELOG.md index d6938f4f26f63f..25ea99778733f6 100644 --- a/packages/compose/CHANGELOG.md +++ b/packages/compose/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.26.0 (2024-01-10) + ## 6.25.0 (2023-12-13) ## 6.24.0 (2023-11-29) diff --git a/packages/compose/package.json b/packages/compose/package.json index 0dec375ed22430..713a7ac85f8cb3 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/compose", - "version": "6.25.0", + "version": "6.26.0-prerelease", "description": "WordPress higher-order components (HOCs).", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-commands/CHANGELOG.md b/packages/core-commands/CHANGELOG.md index 1abb8f289e7d9e..a65a04f4dbe048 100644 --- a/packages/core-commands/CHANGELOG.md +++ b/packages/core-commands/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.18.0 (2024-01-10) + ## 0.17.0 (2023-12-13) ## 0.16.0 (2023-11-29) diff --git a/packages/core-commands/package.json b/packages/core-commands/package.json index a3e42ee2c236ad..61d8e3037961a7 100644 --- a/packages/core-commands/package.json +++ b/packages/core-commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-commands", - "version": "0.17.0", + "version": "0.18.0-prerelease", "description": "WordPress core reusable commands.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-data/CHANGELOG.md b/packages/core-data/CHANGELOG.md index ae8d7543f8fbd5..306ee51c90eabd 100644 --- a/packages/core-data/CHANGELOG.md +++ b/packages/core-data/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.26.0 (2024-01-10) + ## 6.25.0 (2023-12-13) ## 6.24.0 (2023-11-29) diff --git a/packages/core-data/package.json b/packages/core-data/package.json index dfbdc2a073765a..565ef8e2fdf55c 100644 --- a/packages/core-data/package.json +++ b/packages/core-data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-data", - "version": "6.25.0", + "version": "6.26.0-prerelease", "description": "Access to and manipulation of core WordPress entities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block-interactive-template/CHANGELOG.md b/packages/create-block-interactive-template/CHANGELOG.md index 159c65e9ada19c..2025feabddc63d 100644 --- a/packages/create-block-interactive-template/CHANGELOG.md +++ b/packages/create-block-interactive-template/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.12.0 (2024-01-10) + ### Enhancement - Update the template to use `viewModule` in block.json ([#57712](https://github.com/WordPress/gutenberg/pull/57712)). diff --git a/packages/create-block-interactive-template/package.json b/packages/create-block-interactive-template/package.json index 4b89f9d49ae837..976ee68a0e2d09 100644 --- a/packages/create-block-interactive-template/package.json +++ b/packages/create-block-interactive-template/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block-interactive-template", - "version": "1.11.0", + "version": "1.12.0-prerelease", "description": "Template for @wordpress/create-block to create interactive blocks with the Interactivity API.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block-tutorial-template/CHANGELOG.md b/packages/create-block-tutorial-template/CHANGELOG.md index 021972a2178bbb..971da45400f011 100644 --- a/packages/create-block-tutorial-template/CHANGELOG.md +++ b/packages/create-block-tutorial-template/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.3.0 (2024-01-10) + ## 3.2.0 (2023-12-13) ## 3.1.0 (2023-11-29) diff --git a/packages/create-block-tutorial-template/package.json b/packages/create-block-tutorial-template/package.json index 994294adf3a482..47625bb4996cf3 100644 --- a/packages/create-block-tutorial-template/package.json +++ b/packages/create-block-tutorial-template/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block-tutorial-template", - "version": "3.2.0", + "version": "3.3.0-prerelease", "description": "This is a template for @wordpress/create-block that creates an example 'Copyright Date' block. This block is used in the official WordPress block development Quick Start Guide.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index a3a1b01bc09fbe..9d000b18d6aaed 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.33.0 (2024-01-10) + ### New Feature - Add support for the `viewModule` property ([#57712](https://github.com/WordPress/gutenberg/pull/57712)). diff --git a/packages/create-block/package.json b/packages/create-block/package.json index 32a04f4b9857e5..9a628ffdf4a331 100644 --- a/packages/create-block/package.json +++ b/packages/create-block/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block", - "version": "4.32.0", + "version": "4.33.0-prerelease", "description": "Generates PHP, JS and CSS code for registering a block for a WordPress plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/customize-widgets/CHANGELOG.md b/packages/customize-widgets/CHANGELOG.md index 733a2e88914e89..5ebaf223d81a37 100644 --- a/packages/customize-widgets/CHANGELOG.md +++ b/packages/customize-widgets/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.26.0 (2024-01-10) + ## 4.25.0 (2023-12-13) ## 4.24.0 (2023-11-29) diff --git a/packages/customize-widgets/package.json b/packages/customize-widgets/package.json index 88b32f5a23bec8..64b1eabcaeee4a 100644 --- a/packages/customize-widgets/package.json +++ b/packages/customize-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/customize-widgets", - "version": "4.25.0", + "version": "4.26.0-prerelease", "description": "Widgets blocks in Customizer Module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data-controls/CHANGELOG.md b/packages/data-controls/CHANGELOG.md index a5be93faab0043..964ab8830b1c0e 100644 --- a/packages/data-controls/CHANGELOG.md +++ b/packages/data-controls/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.18.0 (2024-01-10) + ## 3.17.0 (2023-12-13) ## 3.16.0 (2023-11-29) diff --git a/packages/data-controls/package.json b/packages/data-controls/package.json index 5018027820afe2..0f26fca0fc6539 100644 --- a/packages/data-controls/package.json +++ b/packages/data-controls/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data-controls", - "version": "3.17.0", + "version": "3.18.0-prerelease", "description": "A set of common controls for the @wordpress/data api.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data/CHANGELOG.md b/packages/data/CHANGELOG.md index 328928d93d509b..9c56bdfd15831d 100644 --- a/packages/data/CHANGELOG.md +++ b/packages/data/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 9.19.0 (2024-01-10) + ## 9.18.0 (2023-12-13) ## 9.17.0 (2023-11-29) diff --git a/packages/data/package.json b/packages/data/package.json index 37e9d8753cda02..cb57d35b87f138 100644 --- a/packages/data/package.json +++ b/packages/data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data", - "version": "9.18.0", + "version": "9.19.0-prerelease", "description": "Data module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dataviews/CHANGELOG.md b/packages/dataviews/CHANGELOG.md index bd4afefab43fef..231fa05170a08e 100644 --- a/packages/dataviews/CHANGELOG.md +++ b/packages/dataviews/CHANGELOG.md @@ -2,4 +2,6 @@ ## Unreleased +## 0.3.0 (2024-01-10) + ## 0.2.0 (2023-12-13) diff --git a/packages/dataviews/package.json b/packages/dataviews/package.json index 4dfb35948af468..4136be59c330da 100644 --- a/packages/dataviews/package.json +++ b/packages/dataviews/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dataviews", - "version": "0.2.0", + "version": "0.3.0-prerelease", "description": "DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/date/CHANGELOG.md b/packages/date/CHANGELOG.md index 73ad2bc3daa06f..d6158df35df7db 100644 --- a/packages/date/CHANGELOG.md +++ b/packages/date/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.49.0 (2024-01-10) + ## 4.48.0 (2023-12-13) ## 4.47.0 (2023-11-29) diff --git a/packages/date/package.json b/packages/date/package.json index 65f346132f928c..7963815604a18a 100644 --- a/packages/date/package.json +++ b/packages/date/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/date", - "version": "4.48.0", + "version": "4.49.0-prerelease", "description": "Date module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dependency-extraction-webpack-plugin/CHANGELOG.md b/packages/dependency-extraction-webpack-plugin/CHANGELOG.md index 414a5229117cee..c147941c98e80a 100644 --- a/packages/dependency-extraction-webpack-plugin/CHANGELOG.md +++ b/packages/dependency-extraction-webpack-plugin/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.0.0 (2024-01-10) + ### Breaking Changes - Drop support for webpack 4. diff --git a/packages/dependency-extraction-webpack-plugin/package.json b/packages/dependency-extraction-webpack-plugin/package.json index b3a296e3f00146..12d3613ede9988 100644 --- a/packages/dependency-extraction-webpack-plugin/package.json +++ b/packages/dependency-extraction-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dependency-extraction-webpack-plugin", - "version": "4.31.0", + "version": "5.0.0-prerelease", "description": "Extract WordPress script dependencies from webpack bundles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/deprecated/CHANGELOG.md b/packages/deprecated/CHANGELOG.md index f55a064fe5dcf6..3c10ecf640335e 100644 --- a/packages/deprecated/CHANGELOG.md +++ b/packages/deprecated/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/deprecated/package.json b/packages/deprecated/package.json index b67260df2cfe36..37a5b08f376ff5 100644 --- a/packages/deprecated/package.json +++ b/packages/deprecated/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/deprecated", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "Deprecation utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/docgen/CHANGELOG.md b/packages/docgen/CHANGELOG.md index 9ce1823b8bb6c5..8b3827a0c9e81f 100644 --- a/packages/docgen/CHANGELOG.md +++ b/packages/docgen/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.58.0 (2024-01-10) + ## 1.57.0 (2023-12-13) ## 1.56.0 (2023-11-29) diff --git a/packages/docgen/package.json b/packages/docgen/package.json index 55b7675309f4c6..5754ce37e92536 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/docgen", - "version": "1.57.0", + "version": "1.58.0-prerelease", "description": "Autogenerate public API documentation from exports and JSDoc comments.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom-ready/CHANGELOG.md b/packages/dom-ready/CHANGELOG.md index 5def1df47ebae7..05d3e7e79f07f8 100644 --- a/packages/dom-ready/CHANGELOG.md +++ b/packages/dom-ready/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/dom-ready/package.json b/packages/dom-ready/package.json index f4716f6bce3056..561066f1c63d93 100644 --- a/packages/dom-ready/package.json +++ b/packages/dom-ready/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom-ready", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "Execute callback after the DOM is loaded.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom/CHANGELOG.md b/packages/dom/CHANGELOG.md index 6e76f6e1e3276a..dda6f4e53b4897 100644 --- a/packages/dom/CHANGELOG.md +++ b/packages/dom/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/dom/package.json b/packages/dom/package.json index 8d783a97255924..901f866a23c269 100644 --- a/packages/dom/package.json +++ b/packages/dom/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "DOM utilities module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils-playwright/CHANGELOG.md b/packages/e2e-test-utils-playwright/CHANGELOG.md index cd848a23461ae2..8f3e85e901191f 100644 --- a/packages/e2e-test-utils-playwright/CHANGELOG.md +++ b/packages/e2e-test-utils-playwright/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.17.0 (2024-01-10) + ## 0.16.0 (2023-12-13) ## 0.15.0 (2023-11-29) diff --git a/packages/e2e-test-utils-playwright/package.json b/packages/e2e-test-utils-playwright/package.json index 6f84aa51be554a..8309f4dc6126ab 100644 --- a/packages/e2e-test-utils-playwright/package.json +++ b/packages/e2e-test-utils-playwright/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils-playwright", - "version": "0.16.0", + "version": "0.17.0-prerelease", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils/CHANGELOG.md b/packages/e2e-test-utils/CHANGELOG.md index 9602fa9a33434e..ef5b7f4de2f9d2 100644 --- a/packages/e2e-test-utils/CHANGELOG.md +++ b/packages/e2e-test-utils/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 10.20.0 (2024-01-10) + ## 10.19.0 (2023-12-13) ## 10.18.0 (2023-11-29) diff --git a/packages/e2e-test-utils/package.json b/packages/e2e-test-utils/package.json index b95b6cfb58d36f..12aa2cca7e9457 100644 --- a/packages/e2e-test-utils/package.json +++ b/packages/e2e-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils", - "version": "10.19.0", + "version": "10.20.0-prerelease", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-tests/CHANGELOG.md b/packages/e2e-tests/CHANGELOG.md index bf448011997806..bfd10d63c92710 100644 --- a/packages/e2e-tests/CHANGELOG.md +++ b/packages/e2e-tests/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.20.0 (2024-01-10) + ## 7.19.0 (2023-12-13) ## 7.18.0 (2023-11-29) diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index f9d8072adb9157..86d88c253cdb7e 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-tests", - "version": "7.19.0", + "version": "7.20.0-prerelease", "description": "End-To-End (E2E) tests for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-post/CHANGELOG.md b/packages/edit-post/CHANGELOG.md index 34ccd0953562f4..d029f33335102a 100644 --- a/packages/edit-post/CHANGELOG.md +++ b/packages/edit-post/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.26.0 (2024-01-10) + ### Deprecations - Move the panels visibility actions and selectors to the editor package deprecating `toggleEditorPanelEnabled`, `toggleEditorPanelOpened`, `removeEditorPanel`, `isEditorPanelRemoved`, `isEditorPanelOpened` and `isEditorPanelEnabled`. diff --git a/packages/edit-post/package.json b/packages/edit-post/package.json index 1b3b107a83413f..2a3053d109a2a4 100644 --- a/packages/edit-post/package.json +++ b/packages/edit-post/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-post", - "version": "7.25.0", + "version": "7.26.0-prerelease", "description": "Edit Post module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-site/CHANGELOG.md b/packages/edit-site/CHANGELOG.md index ff3e85639d1dee..d61e6028c00420 100644 --- a/packages/edit-site/CHANGELOG.md +++ b/packages/edit-site/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.26.0 (2024-01-10) + ## 5.25.0 (2023-12-13) ## 5.24.0 (2023-11-29) diff --git a/packages/edit-site/package.json b/packages/edit-site/package.json index e560e5e6827978..0debc2609e6ca4 100644 --- a/packages/edit-site/package.json +++ b/packages/edit-site/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-site", - "version": "5.25.0", + "version": "5.26.0-prerelease", "description": "Edit Site Page module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-widgets/CHANGELOG.md b/packages/edit-widgets/CHANGELOG.md index 34fb6a54d8c25d..efef3dd674b80c 100644 --- a/packages/edit-widgets/CHANGELOG.md +++ b/packages/edit-widgets/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.26.0 (2024-01-10) + ## 5.25.0 (2023-12-13) ## 5.24.0 (2023-11-29) diff --git a/packages/edit-widgets/package.json b/packages/edit-widgets/package.json index 974a0ba02905fe..85b553fb090a8b 100644 --- a/packages/edit-widgets/package.json +++ b/packages/edit-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-widgets", - "version": "5.25.0", + "version": "5.26.0-prerelease", "description": "Widgets Page module for WordPress..", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md index dc8fffd379798a..4484201d28fcc6 100644 --- a/packages/editor/CHANGELOG.md +++ b/packages/editor/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 13.26.0 (2024-01-10) + ### New Features - Add the editor panels visibility state to the editor store in addition to the following actions and selectors: `toggleEditorPanelEnabled`, `toggleEditorPanelOpened`, `removeEditorPanel`, `isEditorPanelRemoved`, `isEditorPanelOpened` and `isEditorPanelEnabled`. diff --git a/packages/editor/package.json b/packages/editor/package.json index 63656899e587c0..72d79660f7c76d 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/editor", - "version": "13.25.0", + "version": "13.26.0-prerelease", "description": "Enhanced block editor for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/element/CHANGELOG.md b/packages/element/CHANGELOG.md index 89c422ad27a0bb..e57fc1e022e451 100644 --- a/packages/element/CHANGELOG.md +++ b/packages/element/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.26.0 (2024-01-10) + ## 5.25.0 (2023-12-13) ## 5.24.0 (2023-11-29) diff --git a/packages/element/package.json b/packages/element/package.json index 6ce4714c25f0bf..4f4318038abbbf 100644 --- a/packages/element/package.json +++ b/packages/element/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/element", - "version": "5.25.0", + "version": "5.26.0-prerelease", "description": "Element React module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/env/CHANGELOG.md b/packages/env/CHANGELOG.md index 6605add7800961..154e8d36b3b447 100644 --- a/packages/env/CHANGELOG.md +++ b/packages/env/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 9.1.0 (2024-01-10) + ## 9.0.0 (2023-12-13) ### Breaking Change diff --git a/packages/env/package.json b/packages/env/package.json index cd3fd075568e2e..8e17750811551d 100644 --- a/packages/env/package.json +++ b/packages/env/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/env", - "version": "9.0.0", + "version": "9.1.0-prerelease", "description": "A zero-config, self contained local WordPress environment for development and testing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/escape-html/CHANGELOG.md b/packages/escape-html/CHANGELOG.md index 7b5f651626528e..8cb9c60a82c57a 100644 --- a/packages/escape-html/CHANGELOG.md +++ b/packages/escape-html/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.49.0 (2024-01-10) + ## 2.48.0 (2023-12-13) ## 2.47.0 (2023-11-29) diff --git a/packages/escape-html/package.json b/packages/escape-html/package.json index 2618d5818400c6..18c10a29b489ed 100644 --- a/packages/escape-html/package.json +++ b/packages/escape-html/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/escape-html", - "version": "2.48.0", + "version": "2.49.0-prerelease", "description": "Escape HTML utils.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 533c5e7788c663..10e82685d7b745 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 17.6.0 (2024-01-10) + ## 17.5.0 (2023-12-13) ## 17.4.0 (2023-11-29) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index ef0931dfb2c6c7..18bb33042f1d99 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/eslint-plugin", - "version": "17.5.0", + "version": "17.6.0-prerelease", "description": "ESLint plugin for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/format-library/CHANGELOG.md b/packages/format-library/CHANGELOG.md index 8b3d314e9a0f25..1ea92da62e1a48 100644 --- a/packages/format-library/CHANGELOG.md +++ b/packages/format-library/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.26.0 (2024-01-10) + ## 4.25.0 (2023-12-13) ## 4.24.0 (2023-11-29) diff --git a/packages/format-library/package.json b/packages/format-library/package.json index b71addc176e7c1..2d260875811708 100644 --- a/packages/format-library/package.json +++ b/packages/format-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/format-library", - "version": "4.25.0", + "version": "4.26.0-prerelease", "description": "Format library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/hooks/CHANGELOG.md b/packages/hooks/CHANGELOG.md index c428f26ed17f10..7b71f8d382f01e 100644 --- a/packages/hooks/CHANGELOG.md +++ b/packages/hooks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 0c29dacb178950..84074b3575c2db 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/hooks", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "WordPress hooks library.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/html-entities/CHANGELOG.md b/packages/html-entities/CHANGELOG.md index d7c1b049e37900..ba88048d21a5a6 100644 --- a/packages/html-entities/CHANGELOG.md +++ b/packages/html-entities/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/html-entities/package.json b/packages/html-entities/package.json index 92e85598707b90..b6ae9c2634dede 100644 --- a/packages/html-entities/package.json +++ b/packages/html-entities/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/html-entities", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "HTML entity utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/i18n/CHANGELOG.md b/packages/i18n/CHANGELOG.md index f227f81571087f..cca18773c660ea 100644 --- a/packages/i18n/CHANGELOG.md +++ b/packages/i18n/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.49.0 (2024-01-10) + ## 4.48.0 (2023-12-13) ## 4.47.0 (2023-11-29) diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 7346330946e19d..56769f3e33736c 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/i18n", - "version": "4.48.0", + "version": "4.49.0-prerelease", "description": "WordPress internationalization (i18n) library.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/icons/CHANGELOG.md b/packages/icons/CHANGELOG.md index df0e3e43b1d816..a5ca30a014f1db 100644 --- a/packages/icons/CHANGELOG.md +++ b/packages/icons/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 9.40.0 (2024-01-10) + ## 9.39.0 (2023-12-13) ## 9.38.0 (2023-11-29) diff --git a/packages/icons/package.json b/packages/icons/package.json index 31ebc3c57d1290..0c359d100a34b4 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/icons", - "version": "9.39.0", + "version": "9.40.0-prerelease", "description": "WordPress Icons package, based on dashicon.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/interactivity/CHANGELOG.md b/packages/interactivity/CHANGELOG.md index 913134d6700085..67b25a7e30ee0e 100644 --- a/packages/interactivity/CHANGELOG.md +++ b/packages/interactivity/CHANGELOG.md @@ -6,11 +6,13 @@ - Add the `data-wp-run` directive along with the `useInit` and `useWatch` hooks. ([57805](https://github.com/WordPress/gutenberg/pull/57805)) -### Breaking Change +### Breaking Changes -- Remove `data-wp-slot` and `data-wp-fill`. ([#57854](https://github.com/WordPress/gutenberg/pull/57854)) +- Remove `data-wp-slot` and `data-wp-fill`. ([#57854](https://github.com/WordPress/gutenberg/pull/57854)) - Remove `wp-data-navigation-link` directive. ([#57853](https://github.com/WordPress/gutenberg/pull/57853)) +## 3.2.0 (2024-01-10) + ### Bug Fix - Fix namespaces when there are nested interactive regions. ([#57029](https://github.com/WordPress/gutenberg/pull/57029)) diff --git a/packages/interactivity/package.json b/packages/interactivity/package.json index c856628c5d79e2..b7ed52dd288c8a 100644 --- a/packages/interactivity/package.json +++ b/packages/interactivity/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/interactivity", - "version": "3.1.0", + "version": "3.2.0-prerelease", "description": "Package that provides a standard and simple way to handle the frontend interactivity of Gutenberg blocks.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/interface/CHANGELOG.md b/packages/interface/CHANGELOG.md index 90e0326e02a47e..a684dc5a6a4eff 100644 --- a/packages/interface/CHANGELOG.md +++ b/packages/interface/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.26.0 (2024-01-10) + ## 5.25.0 (2023-12-13) ## 5.24.0 (2023-11-29) diff --git a/packages/interface/package.json b/packages/interface/package.json index 7356a7b52d1d45..8dfd6bf8ccf852 100644 --- a/packages/interface/package.json +++ b/packages/interface/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/interface", - "version": "5.25.0", + "version": "5.26.0-prerelease", "description": "Interface module for WordPress. The package contains shared functionality across the modern JavaScript-based WordPress screens.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/is-shallow-equal/CHANGELOG.md b/packages/is-shallow-equal/CHANGELOG.md index 46ad3508ad0416..d7d7028dd5e40a 100644 --- a/packages/is-shallow-equal/CHANGELOG.md +++ b/packages/is-shallow-equal/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.49.0 (2024-01-10) + ## 4.48.0 (2023-12-13) ## 4.47.0 (2023-11-29) diff --git a/packages/is-shallow-equal/package.json b/packages/is-shallow-equal/package.json index 6969d6a2fe8a05..d37a0d1a735c4f 100644 --- a/packages/is-shallow-equal/package.json +++ b/packages/is-shallow-equal/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/is-shallow-equal", - "version": "4.48.0", + "version": "4.49.0-prerelease", "description": "Test for shallow equality between two objects or arrays.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-console/CHANGELOG.md b/packages/jest-console/CHANGELOG.md index bf9aba56a98e12..f82d95dc08cd44 100644 --- a/packages/jest-console/CHANGELOG.md +++ b/packages/jest-console/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 7.20.0 (2024-01-10) + ## 7.19.0 (2023-12-13) ## 7.18.0 (2023-11-29) diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index 4a6f249a104d27..aec655cdef0253 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-console", - "version": "7.19.0", + "version": "7.20.0-prerelease", "description": "Custom Jest matchers for the Console object.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-preset-default/CHANGELOG.md b/packages/jest-preset-default/CHANGELOG.md index 5b945545507814..d0525fe187ad56 100644 --- a/packages/jest-preset-default/CHANGELOG.md +++ b/packages/jest-preset-default/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 11.20.0 (2024-01-10) + ## 11.19.0 (2023-12-13) ## 11.18.0 (2023-11-29) diff --git a/packages/jest-preset-default/package.json b/packages/jest-preset-default/package.json index 7bda9f2e279f25..0eea603b2ad17c 100644 --- a/packages/jest-preset-default/package.json +++ b/packages/jest-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-preset-default", - "version": "11.19.0", + "version": "11.20.0-prerelease", "description": "Default Jest preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-puppeteer-axe/CHANGELOG.md b/packages/jest-puppeteer-axe/CHANGELOG.md index 9114f0e0437727..89acfcecff4da6 100644 --- a/packages/jest-puppeteer-axe/CHANGELOG.md +++ b/packages/jest-puppeteer-axe/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.20.0 (2024-01-10) + ## 6.19.0 (2023-12-13) ## 6.18.0 (2023-11-29) diff --git a/packages/jest-puppeteer-axe/package.json b/packages/jest-puppeteer-axe/package.json index cdd09f7b791654..44f86cd158e7e9 100644 --- a/packages/jest-puppeteer-axe/package.json +++ b/packages/jest-puppeteer-axe/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-puppeteer-axe", - "version": "6.19.0", + "version": "6.20.0-prerelease", "description": "Axe API integration with Jest and Puppeteer.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/keyboard-shortcuts/CHANGELOG.md b/packages/keyboard-shortcuts/CHANGELOG.md index 32175acb451f57..2af0ab1eb2905a 100644 --- a/packages/keyboard-shortcuts/CHANGELOG.md +++ b/packages/keyboard-shortcuts/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.26.0 (2024-01-10) + ## 4.25.0 (2023-12-13) ## 4.24.0 (2023-11-29) diff --git a/packages/keyboard-shortcuts/package.json b/packages/keyboard-shortcuts/package.json index af36a49371a0be..8e1c2b35130fd1 100644 --- a/packages/keyboard-shortcuts/package.json +++ b/packages/keyboard-shortcuts/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/keyboard-shortcuts", - "version": "4.25.0", + "version": "4.26.0-prerelease", "description": "Handling keyboard shortcuts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/keycodes/CHANGELOG.md b/packages/keycodes/CHANGELOG.md index b65e8f808d595a..6fda0148feaa8a 100644 --- a/packages/keycodes/CHANGELOG.md +++ b/packages/keycodes/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/keycodes/package.json b/packages/keycodes/package.json index ecebbb58eb99f4..342d50ba8e6e0f 100644 --- a/packages/keycodes/package.json +++ b/packages/keycodes/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/keycodes", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "Keycodes utilities for WordPress. Used to check for keyboard events across browsers/operating systems.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/lazy-import/CHANGELOG.md b/packages/lazy-import/CHANGELOG.md index 87ebbe936eaa4c..214141e0d476d4 100644 --- a/packages/lazy-import/CHANGELOG.md +++ b/packages/lazy-import/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.36.0 (2024-01-10) + ## 1.35.0 (2023-12-13) ## 1.34.0 (2023-11-29) diff --git a/packages/lazy-import/package.json b/packages/lazy-import/package.json index b1967c0d4bedb0..644121850eab42 100644 --- a/packages/lazy-import/package.json +++ b/packages/lazy-import/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/lazy-import", - "version": "1.35.0", + "version": "1.36.0-prerelease", "description": "Lazily import a module, installing it automatically if missing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/list-reusable-blocks/CHANGELOG.md b/packages/list-reusable-blocks/CHANGELOG.md index d1dd89a70ad630..4c153c4539b359 100644 --- a/packages/list-reusable-blocks/CHANGELOG.md +++ b/packages/list-reusable-blocks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.26.0 (2024-01-10) + ## 4.25.0 (2023-12-13) ## 4.24.0 (2023-11-29) diff --git a/packages/list-reusable-blocks/package.json b/packages/list-reusable-blocks/package.json index bba7e2a7680e59..1decde84386eb7 100644 --- a/packages/list-reusable-blocks/package.json +++ b/packages/list-reusable-blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/list-reusable-blocks", - "version": "4.25.0", + "version": "4.26.0-prerelease", "description": "Adding Export/Import support to the reusable blocks listing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/media-utils/CHANGELOG.md b/packages/media-utils/CHANGELOG.md index 8d8a13b4ae6ab8..d7a8c61e149bf1 100644 --- a/packages/media-utils/CHANGELOG.md +++ b/packages/media-utils/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.40.0 (2024-01-10) + ## 4.39.0 (2023-12-13) ## 4.38.0 (2023-11-29) diff --git a/packages/media-utils/package.json b/packages/media-utils/package.json index 1086a79722cb06..3babc2af8c07e6 100644 --- a/packages/media-utils/package.json +++ b/packages/media-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/media-utils", - "version": "4.39.0", + "version": "4.40.0-prerelease", "description": "WordPress Media Upload Utils.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/notices/CHANGELOG.md b/packages/notices/CHANGELOG.md index 0b4c95da740056..03f5931c9899b9 100644 --- a/packages/notices/CHANGELOG.md +++ b/packages/notices/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.17.0 (2024-01-10) + ## 4.16.0 (2023-12-13) ## 4.15.0 (2023-11-29) diff --git a/packages/notices/package.json b/packages/notices/package.json index 7c40413adea511..eb7ea82e973e49 100644 --- a/packages/notices/package.json +++ b/packages/notices/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/notices", - "version": "4.16.0", + "version": "4.17.0-prerelease", "description": "State management for notices.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/npm-package-json-lint-config/CHANGELOG.md b/packages/npm-package-json-lint-config/CHANGELOG.md index 2eaaf4c0df1e92..3978d24103d0c1 100644 --- a/packages/npm-package-json-lint-config/CHANGELOG.md +++ b/packages/npm-package-json-lint-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.34.0 (2024-01-10) + ## 4.33.0 (2023-12-13) ## 4.32.0 (2023-11-29) diff --git a/packages/npm-package-json-lint-config/package.json b/packages/npm-package-json-lint-config/package.json index 3bbc4c6c2e47fd..2f16d73f738b43 100644 --- a/packages/npm-package-json-lint-config/package.json +++ b/packages/npm-package-json-lint-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/npm-package-json-lint-config", - "version": "4.33.0", + "version": "4.34.0-prerelease", "description": "WordPress npm-package-json-lint shareable configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/nux/CHANGELOG.md b/packages/nux/CHANGELOG.md index 9980b2d629d0ba..e20bca5073fb24 100644 --- a/packages/nux/CHANGELOG.md +++ b/packages/nux/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 8.11.0 (2024-01-10) + ## 8.10.0 (2023-12-13) ## 8.9.0 (2023-11-29) diff --git a/packages/nux/package.json b/packages/nux/package.json index 64511b2fa42d02..9af2b3682d3d1a 100644 --- a/packages/nux/package.json +++ b/packages/nux/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/nux", - "version": "8.10.0", + "version": "8.11.0-prerelease", "description": "NUX (New User eXperience) module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/patterns/CHANGELOG.md b/packages/patterns/CHANGELOG.md index 566bd024cf3805..10fd61c03f939e 100644 --- a/packages/patterns/CHANGELOG.md +++ b/packages/patterns/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.10.0 (2024-01-10) + ## 1.9.0 (2023-12-13) ## 1.8.0 (2023-11-29) diff --git a/packages/patterns/package.json b/packages/patterns/package.json index 54ec5178d640d6..7334017ca1a435 100644 --- a/packages/patterns/package.json +++ b/packages/patterns/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/patterns", - "version": "1.9.0", + "version": "1.10.0-prerelease", "description": "Management of user pattern editing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/plugins/CHANGELOG.md b/packages/plugins/CHANGELOG.md index b41c2e9f112bda..4fc131ebbcbd42 100644 --- a/packages/plugins/CHANGELOG.md +++ b/packages/plugins/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.17.0 (2024-01-10) + ## 6.16.0 (2023-12-13) ## 6.15.0 (2023-11-29) diff --git a/packages/plugins/package.json b/packages/plugins/package.json index b8b63a3c381d70..11def4a122ebf9 100644 --- a/packages/plugins/package.json +++ b/packages/plugins/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/plugins", - "version": "6.16.0", + "version": "6.17.0-prerelease", "description": "Plugins module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/postcss-plugins-preset/CHANGELOG.md b/packages/postcss-plugins-preset/CHANGELOG.md index 00e7fb9a8c6c4a..0599f401fe8e52 100644 --- a/packages/postcss-plugins-preset/CHANGELOG.md +++ b/packages/postcss-plugins-preset/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.33.0 (2024-01-10) + ## 4.32.0 (2023-12-13) ## 4.31.0 (2023-11-29) diff --git a/packages/postcss-plugins-preset/package.json b/packages/postcss-plugins-preset/package.json index 078c6b87a2ec16..449c6b8994c4a0 100644 --- a/packages/postcss-plugins-preset/package.json +++ b/packages/postcss-plugins-preset/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/postcss-plugins-preset", - "version": "4.32.0", + "version": "4.33.0-prerelease", "description": "PostCSS sharable plugins preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/postcss-themes/CHANGELOG.md b/packages/postcss-themes/CHANGELOG.md index 7c696adb50733f..7cb02c0f86cef0 100644 --- a/packages/postcss-themes/CHANGELOG.md +++ b/packages/postcss-themes/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.32.0 (2024-01-10) + ## 5.31.0 (2023-12-13) ## 5.30.0 (2023-11-29) diff --git a/packages/postcss-themes/package.json b/packages/postcss-themes/package.json index 845911ad918e5d..9bad42995cd33e 100644 --- a/packages/postcss-themes/package.json +++ b/packages/postcss-themes/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/postcss-themes", - "version": "5.31.0", + "version": "5.32.0-prerelease", "description": "PostCSS plugin to generate theme colors.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/preferences-persistence/CHANGELOG.md b/packages/preferences-persistence/CHANGELOG.md index b227aa5ad23739..7eb846236d15b6 100644 --- a/packages/preferences-persistence/CHANGELOG.md +++ b/packages/preferences-persistence/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.41.0 (2024-01-10) + ## 1.40.0 (2023-12-13) ## 1.39.0 (2023-11-29) diff --git a/packages/preferences-persistence/package.json b/packages/preferences-persistence/package.json index e17080383749e8..2a4fb8c576805e 100644 --- a/packages/preferences-persistence/package.json +++ b/packages/preferences-persistence/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/preferences-persistence", - "version": "1.40.0", + "version": "1.41.0-prerelease", "description": "Persistence utilities for `wordpress/preferences`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/preferences/CHANGELOG.md b/packages/preferences/CHANGELOG.md index 363f62c70b3d93..6d5b2a7c62c3cf 100644 --- a/packages/preferences/CHANGELOG.md +++ b/packages/preferences/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.26.0 (2024-01-10) + ## 3.25.0 (2023-12-13) ## 3.24.0 (2023-11-29) diff --git a/packages/preferences/package.json b/packages/preferences/package.json index e1164a7a1306c9..50e82e46759835 100644 --- a/packages/preferences/package.json +++ b/packages/preferences/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/preferences", - "version": "3.25.0", + "version": "3.26.0-prerelease", "description": "Utilities for managing WordPress preferences.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/prettier-config/CHANGELOG.md b/packages/prettier-config/CHANGELOG.md index be847570c06f78..4b05f17c43abf5 100644 --- a/packages/prettier-config/CHANGELOG.md +++ b/packages/prettier-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.6.0 (2024-01-10) + ## 3.5.0 (2023-12-13) ## 3.4.0 (2023-11-29) diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index 047963ddde99b9..c2e69e453f691e 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/prettier-config", - "version": "3.5.0", + "version": "3.6.0-prerelease", "description": "WordPress Prettier shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/primitives/CHANGELOG.md b/packages/primitives/CHANGELOG.md index bbea3951de7c95..0effaef62c3728 100644 --- a/packages/primitives/CHANGELOG.md +++ b/packages/primitives/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.47.0 (2024-01-10) + ## 3.46.0 (2023-12-13) ## 3.45.0 (2023-11-29) diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 614e586c7efe27..294ba82270d362 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/primitives", - "version": "3.46.0", + "version": "3.47.0-prerelease", "description": "WordPress cross-platform primitives.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/priority-queue/CHANGELOG.md b/packages/priority-queue/CHANGELOG.md index dc82da748d2eb0..ccb782a2fb156e 100644 --- a/packages/priority-queue/CHANGELOG.md +++ b/packages/priority-queue/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.49.0 (2024-01-10) + ## 2.48.0 (2023-12-13) ## 2.47.0 (2023-11-29) diff --git a/packages/priority-queue/package.json b/packages/priority-queue/package.json index 4bfbb09da8d57c..a90dc43ed04768 100644 --- a/packages/priority-queue/package.json +++ b/packages/priority-queue/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/priority-queue", - "version": "2.48.0", + "version": "2.49.0-prerelease", "description": "Generic browser priority queue.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/private-apis/CHANGELOG.md b/packages/private-apis/CHANGELOG.md index 4951a8b29a7dc1..3c2ce0530b5cf1 100644 --- a/packages/private-apis/CHANGELOG.md +++ b/packages/private-apis/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.31.0 (2024-01-10) + ## 0.30.0 (2023-12-13) ## 0.29.0 (2023-11-29) diff --git a/packages/private-apis/package.json b/packages/private-apis/package.json index 654c53a02210e9..953430fc97d1c2 100644 --- a/packages/private-apis/package.json +++ b/packages/private-apis/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/private-apis", - "version": "0.30.0", + "version": "0.31.0-prerelease", "description": "Internal experimental APIs for WordPress core.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/project-management-automation/CHANGELOG.md b/packages/project-management-automation/CHANGELOG.md index 09247de37995de..69fc6f7498ca86 100644 --- a/packages/project-management-automation/CHANGELOG.md +++ b/packages/project-management-automation/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.48.0 (2024-01-10) + ## 1.47.0 (2023-12-13) ## 1.46.0 (2023-11-29) diff --git a/packages/project-management-automation/package.json b/packages/project-management-automation/package.json index 5e3d1f85314e23..02ddae86044ebd 100644 --- a/packages/project-management-automation/package.json +++ b/packages/project-management-automation/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/project-management-automation", - "version": "1.47.0", + "version": "1.48.0-prerelease", "description": "GitHub Action that implements various automation to assist with managing the Gutenberg GitHub repository.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/react-i18n/CHANGELOG.md b/packages/react-i18n/CHANGELOG.md index 4e15abf8fadfb5..893d433ed76c40 100644 --- a/packages/react-i18n/CHANGELOG.md +++ b/packages/react-i18n/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.47.0 (2024-01-10) + ## 3.46.0 (2023-12-13) ## 3.45.0 (2023-11-29) diff --git a/packages/react-i18n/package.json b/packages/react-i18n/package.json index 753f5138a2a0f9..fa81c2bba5deca 100644 --- a/packages/react-i18n/package.json +++ b/packages/react-i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-i18n", - "version": "3.46.0", + "version": "3.47.0-prerelease", "description": "React bindings for @wordpress/i18n.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/readable-js-assets-webpack-plugin/CHANGELOG.md b/packages/readable-js-assets-webpack-plugin/CHANGELOG.md index 3a5dad2c518521..fccabbc78e0cd7 100644 --- a/packages/readable-js-assets-webpack-plugin/CHANGELOG.md +++ b/packages/readable-js-assets-webpack-plugin/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.32.0 (2024-01-10) + ## 2.31.0 (2023-12-13) ## 2.30.0 (2023-11-29) diff --git a/packages/readable-js-assets-webpack-plugin/package.json b/packages/readable-js-assets-webpack-plugin/package.json index d27c530ca15107..518f2cc0a80537 100644 --- a/packages/readable-js-assets-webpack-plugin/package.json +++ b/packages/readable-js-assets-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/readable-js-assets-webpack-plugin", - "version": "2.31.0", + "version": "2.32.0-prerelease", "description": "Generate a readable JS file for each JS asset.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/redux-routine/CHANGELOG.md b/packages/redux-routine/CHANGELOG.md index 9559858c133e45..e79717f26f4d91 100644 --- a/packages/redux-routine/CHANGELOG.md +++ b/packages/redux-routine/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.49.0 (2024-01-10) + ## 4.48.0 (2023-12-13) ## 4.47.0 (2023-11-29) diff --git a/packages/redux-routine/package.json b/packages/redux-routine/package.json index 2bdfb5fe8bffdb..82a296a97a0d68 100644 --- a/packages/redux-routine/package.json +++ b/packages/redux-routine/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/redux-routine", - "version": "4.48.0", + "version": "4.49.0-prerelease", "description": "Redux middleware for generator coroutines.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/reusable-blocks/CHANGELOG.md b/packages/reusable-blocks/CHANGELOG.md index 989f649f161f23..6b53ab6270411b 100644 --- a/packages/reusable-blocks/CHANGELOG.md +++ b/packages/reusable-blocks/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.26.0 (2024-01-10) + ## 4.25.0 (2023-12-13) ## 4.24.0 (2023-11-29) diff --git a/packages/reusable-blocks/package.json b/packages/reusable-blocks/package.json index c6e6df921270ab..07deea38569930 100644 --- a/packages/reusable-blocks/package.json +++ b/packages/reusable-blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/reusable-blocks", - "version": "4.25.0", + "version": "4.26.0-prerelease", "description": "Reusable blocks utilities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/rich-text/CHANGELOG.md b/packages/rich-text/CHANGELOG.md index ebc6157a84c1b1..18e1f531830219 100644 --- a/packages/rich-text/CHANGELOG.md +++ b/packages/rich-text/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 6.26.0 (2024-01-10) + ## 6.25.0 (2023-12-13) ## 6.24.0 (2023-11-29) diff --git a/packages/rich-text/package.json b/packages/rich-text/package.json index 645beb47bfa2a6..ac91805807c571 100644 --- a/packages/rich-text/package.json +++ b/packages/rich-text/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/rich-text", - "version": "6.25.0", + "version": "6.26.0-prerelease", "description": "Rich text value and manipulation API.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index 90f93aa1f97001..5a931c8c945db2 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.18.0 (2024-01-10) + ## 0.17.0 (2023-12-13) ## 0.16.0 (2023-11-29) diff --git a/packages/router/package.json b/packages/router/package.json index d9d640a9fe75c3..76ca9cba46588c 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/router", - "version": "0.17.0", + "version": "0.18.0-prerelease", "description": "Router API for WordPress pages.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index a917cd119c17a1..34c2f6049a3da7 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 27.0.0 (2024-01-10) + ### New Features - Add experimental support for `viewModule` field in block.json for `build` and `start` scripts ([#57461](https://github.com/WordPress/gutenberg/pull/57461)). diff --git a/packages/scripts/package.json b/packages/scripts/package.json index f97ab389a527b1..dbca51c0dc7632 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/scripts", - "version": "26.19.0", + "version": "27.0.0-prerelease", "description": "Collection of reusable scripts for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/server-side-render/CHANGELOG.md b/packages/server-side-render/CHANGELOG.md index 89f9150ade561e..245c503e45bb23 100644 --- a/packages/server-side-render/CHANGELOG.md +++ b/packages/server-side-render/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 4.26.0 (2024-01-10) + ## 4.25.0 (2023-12-13) ## 4.24.0 (2023-11-29) diff --git a/packages/server-side-render/package.json b/packages/server-side-render/package.json index c3e3bb66680e7a..73aea8946a2551 100644 --- a/packages/server-side-render/package.json +++ b/packages/server-side-render/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/server-side-render", - "version": "4.25.0", + "version": "4.26.0-prerelease", "description": "The component used with WordPress to server-side render a preview of dynamic blocks to display in the editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/shortcode/CHANGELOG.md b/packages/shortcode/CHANGELOG.md index 6d4bb284be7d4a..05eb9e9e24526f 100644 --- a/packages/shortcode/CHANGELOG.md +++ b/packages/shortcode/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/shortcode/package.json b/packages/shortcode/package.json index 1e29a5e03343c2..b640e88ac033fd 100644 --- a/packages/shortcode/package.json +++ b/packages/shortcode/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/shortcode", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "Shortcode module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/style-engine/CHANGELOG.md b/packages/style-engine/CHANGELOG.md index 35331cb4fe9a4a..2c3a6970e31717 100644 --- a/packages/style-engine/CHANGELOG.md +++ b/packages/style-engine/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 1.32.0 (2024-01-10) + ## 1.31.0 (2023-12-13) ## 1.30.0 (2023-11-29) diff --git a/packages/style-engine/package.json b/packages/style-engine/package.json index d11bc37c122bc2..a0ba7ef7d32c85 100644 --- a/packages/style-engine/package.json +++ b/packages/style-engine/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/style-engine", - "version": "1.31.0", + "version": "1.32.0-prerelease", "description": "A suite of parsers and compilers for WordPress styles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/stylelint-config/CHANGELOG.md b/packages/stylelint-config/CHANGELOG.md index b7b6cb712ff759..eb82f9f916d4e9 100644 --- a/packages/stylelint-config/CHANGELOG.md +++ b/packages/stylelint-config/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 21.32.0 (2024-01-10) + ## 21.31.0 (2023-12-13) ## 21.30.0 (2023-11-29) diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index ff3ed08296c5e9..c07b9ff1eaad66 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/stylelint-config", - "version": "21.31.0", + "version": "21.32.0-prerelease", "description": "stylelint config for WordPress development.", "author": "The WordPress Contributors", "license": "MIT", diff --git a/packages/sync/CHANGELOG.md b/packages/sync/CHANGELOG.md index 206d4957a12874..353e3dec2c583e 100644 --- a/packages/sync/CHANGELOG.md +++ b/packages/sync/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.11.0 (2024-01-10) + ## 0.10.0 (2023-12-13) ## 0.9.0 (2023-11-29) diff --git a/packages/sync/package.json b/packages/sync/package.json index 7f3e20f6bd75ad..51c9ce8522a281 100644 --- a/packages/sync/package.json +++ b/packages/sync/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/sync", - "version": "0.10.0", + "version": "0.11.0-prerelease", "description": "Sync Data.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/token-list/CHANGELOG.md b/packages/token-list/CHANGELOG.md index 7488e836b0c137..b9f1006ecbb3ad 100644 --- a/packages/token-list/CHANGELOG.md +++ b/packages/token-list/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.49.0 (2024-01-10) + ## 2.48.0 (2023-12-13) ## 2.47.0 (2023-11-29) diff --git a/packages/token-list/package.json b/packages/token-list/package.json index 3a877f9365d753..b7807fe59eb7c2 100644 --- a/packages/token-list/package.json +++ b/packages/token-list/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/token-list", - "version": "2.48.0", + "version": "2.49.0-prerelease", "description": "Constructable, plain JavaScript DOMTokenList implementation, supporting non-browser runtimes.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/undo-manager/CHANGELOG.md b/packages/undo-manager/CHANGELOG.md index 2ff22f8020a32e..0a3f1ffa8ba57c 100644 --- a/packages/undo-manager/CHANGELOG.md +++ b/packages/undo-manager/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 0.9.0 (2024-01-10) + ## 0.8.0 (2023-12-13) ## 0.7.0 (2023-11-29) diff --git a/packages/undo-manager/package.json b/packages/undo-manager/package.json index f1d47b82de47d8..e058bebc939c3f 100644 --- a/packages/undo-manager/package.json +++ b/packages/undo-manager/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/undo-manager", - "version": "0.8.0", + "version": "0.9.0-prerelease", "description": "A small package to manage undo/redo.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/url/CHANGELOG.md b/packages/url/CHANGELOG.md index 29ca8923380d96..f6befc2b0a8b0a 100644 --- a/packages/url/CHANGELOG.md +++ b/packages/url/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.50.0 (2024-01-10) + ## 3.49.0 (2023-12-13) ## 3.48.0 (2023-11-29) diff --git a/packages/url/package.json b/packages/url/package.json index 62cb1727928b4f..e56260cf74b670 100644 --- a/packages/url/package.json +++ b/packages/url/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/url", - "version": "3.49.0", + "version": "3.50.0-prerelease", "description": "WordPress URL utilities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/viewport/CHANGELOG.md b/packages/viewport/CHANGELOG.md index 4d03197988aeca..170371171003c3 100644 --- a/packages/viewport/CHANGELOG.md +++ b/packages/viewport/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 5.26.0 (2024-01-10) + ## 5.25.0 (2023-12-13) ## 5.24.0 (2023-11-29) diff --git a/packages/viewport/package.json b/packages/viewport/package.json index 9251dabe8752d8..4bd1820ddffddf 100644 --- a/packages/viewport/package.json +++ b/packages/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/viewport", - "version": "5.25.0", + "version": "5.26.0-prerelease", "description": "Viewport module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/warning/CHANGELOG.md b/packages/warning/CHANGELOG.md index 629291f88171be..20cae1aa42dc31 100644 --- a/packages/warning/CHANGELOG.md +++ b/packages/warning/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 2.49.0 (2024-01-10) + ## 2.48.0 (2023-12-13) ## 2.47.0 (2023-11-29) diff --git a/packages/warning/package.json b/packages/warning/package.json index 7a7e3958a922e5..e89f8ea203b8f1 100644 --- a/packages/warning/package.json +++ b/packages/warning/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/warning", - "version": "2.48.0", + "version": "2.49.0-prerelease", "description": "Warning utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/widgets/CHANGELOG.md b/packages/widgets/CHANGELOG.md index a24187330ba58a..3e79836af4d930 100644 --- a/packages/widgets/CHANGELOG.md +++ b/packages/widgets/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.26.0 (2024-01-10) + ## 3.25.0 (2023-12-13) ## 3.24.0 (2023-11-29) diff --git a/packages/widgets/package.json b/packages/widgets/package.json index 60d7c7c5c46968..ad5a74db92e8d4 100644 --- a/packages/widgets/package.json +++ b/packages/widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/widgets", - "version": "3.25.0", + "version": "3.26.0-prerelease", "description": "Functionality used by the widgets block editor in the Widgets screen and the Customizer.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/wordcount/CHANGELOG.md b/packages/wordcount/CHANGELOG.md index 9fab4788c9f41c..3b1ee558fbfe70 100644 --- a/packages/wordcount/CHANGELOG.md +++ b/packages/wordcount/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.49.0 (2024-01-10) + ## 3.48.0 (2023-12-13) ## 3.47.0 (2023-11-29) diff --git a/packages/wordcount/package.json b/packages/wordcount/package.json index 5e76d6ed042c6a..ac9400d8b1e3f8 100644 --- a/packages/wordcount/package.json +++ b/packages/wordcount/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/wordcount", - "version": "3.48.0", + "version": "3.49.0-prerelease", "description": "WordPress word count utility.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", From 827c25844460c5f09a4d9f170f8100c4a53ff7e1 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Tue, 16 Jan 2024 13:39:28 +0000 Subject: [PATCH 11/71] chore(release): publish - @wordpress/a11y@3.49.0 - @wordpress/annotations@2.49.0 - @wordpress/api-fetch@6.46.0 - @wordpress/autop@3.49.0 - @wordpress/babel-plugin-import-jsx-pragma@4.32.0 - @wordpress/babel-plugin-makepot@5.33.0 - @wordpress/babel-preset-default@7.33.0 - @wordpress/base-styles@4.40.0 - @wordpress/blob@3.49.0 - @wordpress/block-directory@4.26.0 - @wordpress/block-editor@12.17.0 - @wordpress/block-library@8.26.0 - @wordpress/block-serialization-default-parser@4.49.0 - @wordpress/block-serialization-spec-parser@4.49.0 - @wordpress/blocks@12.26.0 - @wordpress/browserslist-config@5.32.0 - @wordpress/commands@0.20.0 - @wordpress/components@25.15.0 - @wordpress/compose@6.26.0 - @wordpress/core-commands@0.18.0 - @wordpress/core-data@6.26.0 - @wordpress/create-block@4.33.0 - @wordpress/create-block-interactive-template@1.12.0 - @wordpress/create-block-tutorial-template@3.3.0 - @wordpress/customize-widgets@4.26.0 - @wordpress/data@9.19.0 - @wordpress/data-controls@3.18.0 - @wordpress/dataviews@0.3.0 - @wordpress/date@4.49.0 - @wordpress/dependency-extraction-webpack-plugin@5.0.0 - @wordpress/deprecated@3.49.0 - @wordpress/docgen@1.58.0 - @wordpress/dom@3.49.0 - @wordpress/dom-ready@3.49.0 - @wordpress/e2e-test-utils@10.20.0 - @wordpress/e2e-test-utils-playwright@0.17.0 - @wordpress/e2e-tests@7.20.0 - @wordpress/edit-post@7.26.0 - @wordpress/edit-site@5.26.0 - @wordpress/edit-widgets@5.26.0 - @wordpress/editor@13.26.0 - @wordpress/element@5.26.0 - @wordpress/env@9.1.0 - @wordpress/escape-html@2.49.0 - @wordpress/eslint-plugin@17.6.0 - @wordpress/format-library@4.26.0 - @wordpress/hooks@3.49.0 - @wordpress/html-entities@3.49.0 - @wordpress/i18n@4.49.0 - @wordpress/icons@9.40.0 - @wordpress/interactivity@3.2.0 - @wordpress/interface@5.26.0 - @wordpress/is-shallow-equal@4.49.0 - @wordpress/jest-console@7.20.0 - @wordpress/jest-preset-default@11.20.0 - @wordpress/jest-puppeteer-axe@6.20.0 - @wordpress/keyboard-shortcuts@4.26.0 - @wordpress/keycodes@3.49.0 - @wordpress/lazy-import@1.36.0 - @wordpress/list-reusable-blocks@4.26.0 - @wordpress/media-utils@4.40.0 - @wordpress/notices@4.17.0 - @wordpress/npm-package-json-lint-config@4.34.0 - @wordpress/nux@8.11.0 - @wordpress/patterns@1.10.0 - @wordpress/plugins@6.17.0 - @wordpress/postcss-plugins-preset@4.33.0 - @wordpress/postcss-themes@5.32.0 - @wordpress/preferences@3.26.0 - @wordpress/preferences-persistence@1.41.0 - @wordpress/prettier-config@3.6.0 - @wordpress/primitives@3.47.0 - @wordpress/priority-queue@2.49.0 - @wordpress/private-apis@0.31.0 - @wordpress/project-management-automation@1.48.0 - @wordpress/react-i18n@3.47.0 - @wordpress/readable-js-assets-webpack-plugin@2.32.0 - @wordpress/redux-routine@4.49.0 - @wordpress/reusable-blocks@4.26.0 - @wordpress/rich-text@6.26.0 - @wordpress/router@0.18.0 - @wordpress/scripts@27.0.0 - @wordpress/server-side-render@4.26.0 - @wordpress/shortcode@3.49.0 - @wordpress/style-engine@1.32.0 - @wordpress/stylelint-config@21.32.0 - @wordpress/sync@0.11.0 - @wordpress/token-list@2.49.0 - @wordpress/undo-manager@0.9.0 - @wordpress/url@3.50.0 - @wordpress/viewport@5.26.0 - @wordpress/warning@2.49.0 - @wordpress/widgets@3.26.0 - @wordpress/wordcount@3.49.0 --- package-lock.json | 186 +++++++++--------- packages/a11y/package.json | 2 +- packages/annotations/package.json | 2 +- packages/api-fetch/package.json | 2 +- packages/autop/package.json | 2 +- .../package.json | 2 +- packages/babel-plugin-makepot/package.json | 2 +- packages/babel-preset-default/package.json | 2 +- packages/base-styles/package.json | 2 +- packages/blob/package.json | 2 +- packages/block-directory/package.json | 2 +- packages/block-editor/package.json | 2 +- packages/block-library/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/blocks/package.json | 2 +- packages/browserslist-config/package.json | 2 +- packages/commands/package.json | 2 +- packages/components/package.json | 2 +- packages/compose/package.json | 2 +- packages/core-commands/package.json | 2 +- packages/core-data/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/create-block/package.json | 2 +- packages/customize-widgets/package.json | 2 +- packages/data-controls/package.json | 2 +- packages/data/package.json | 2 +- packages/dataviews/package.json | 2 +- packages/date/package.json | 2 +- .../package.json | 2 +- packages/deprecated/package.json | 2 +- packages/docgen/package.json | 2 +- packages/dom-ready/package.json | 2 +- packages/dom/package.json | 2 +- .../e2e-test-utils-playwright/package.json | 2 +- packages/e2e-test-utils/package.json | 2 +- packages/e2e-tests/package.json | 2 +- packages/edit-post/package.json | 2 +- packages/edit-site/package.json | 2 +- packages/edit-widgets/package.json | 2 +- packages/editor/package.json | 2 +- packages/element/package.json | 2 +- packages/env/package.json | 2 +- packages/escape-html/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- packages/format-library/package.json | 2 +- packages/hooks/package.json | 2 +- packages/html-entities/package.json | 2 +- packages/i18n/package.json | 2 +- packages/icons/package.json | 2 +- packages/interactivity/package.json | 2 +- packages/interface/package.json | 2 +- packages/is-shallow-equal/package.json | 2 +- packages/jest-console/package.json | 2 +- packages/jest-preset-default/package.json | 2 +- packages/jest-puppeteer-axe/package.json | 2 +- packages/keyboard-shortcuts/package.json | 2 +- packages/keycodes/package.json | 2 +- packages/lazy-import/package.json | 2 +- packages/list-reusable-blocks/package.json | 2 +- packages/media-utils/package.json | 2 +- packages/notices/package.json | 2 +- .../npm-package-json-lint-config/package.json | 2 +- packages/nux/package.json | 2 +- packages/patterns/package.json | 2 +- packages/plugins/package.json | 2 +- packages/postcss-plugins-preset/package.json | 2 +- packages/postcss-themes/package.json | 2 +- packages/preferences-persistence/package.json | 2 +- packages/preferences/package.json | 2 +- packages/prettier-config/package.json | 2 +- packages/primitives/package.json | 2 +- packages/priority-queue/package.json | 2 +- packages/private-apis/package.json | 2 +- .../package.json | 2 +- packages/react-i18n/package.json | 2 +- .../package.json | 2 +- packages/redux-routine/package.json | 2 +- packages/reusable-blocks/package.json | 2 +- packages/rich-text/package.json | 2 +- packages/router/package.json | 2 +- packages/scripts/package.json | 2 +- packages/server-side-render/package.json | 2 +- packages/shortcode/package.json | 2 +- packages/style-engine/package.json | 2 +- packages/stylelint-config/package.json | 2 +- packages/sync/package.json | 2 +- packages/token-list/package.json | 2 +- packages/undo-manager/package.json | 2 +- packages/url/package.json | 2 +- packages/viewport/package.json | 2 +- packages/warning/package.json | 2 +- packages/widgets/package.json | 2 +- packages/wordcount/package.json | 2 +- 95 files changed, 187 insertions(+), 187 deletions(-) diff --git a/package-lock.json b/package-lock.json index 626b31a3ee9f81..b74f66298d7876 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53831,7 +53831,7 @@ }, "packages/a11y": { "name": "@wordpress/a11y", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53844,7 +53844,7 @@ }, "packages/annotations": { "name": "@wordpress/annotations", - "version": "2.48.0", + "version": "2.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53872,7 +53872,7 @@ }, "packages/api-fetch": { "name": "@wordpress/api-fetch", - "version": "6.45.0", + "version": "6.46.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -53885,7 +53885,7 @@ }, "packages/autop": { "name": "@wordpress/autop", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -53896,7 +53896,7 @@ }, "packages/babel-plugin-import-jsx-pragma": { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "4.31.0", + "version": "4.32.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -53908,7 +53908,7 @@ }, "packages/babel-plugin-makepot": { "name": "@wordpress/babel-plugin-makepot", - "version": "5.32.0", + "version": "5.33.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -53925,7 +53925,7 @@ }, "packages/babel-preset-default": { "name": "@wordpress/babel-preset-default", - "version": "7.32.0", + "version": "7.33.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -53948,13 +53948,13 @@ }, "packages/base-styles": { "name": "@wordpress/base-styles", - "version": "4.39.0", + "version": "4.40.0", "dev": true, "license": "GPL-2.0-or-later" }, "packages/blob": { "name": "@wordpress/blob", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -53965,7 +53965,7 @@ }, "packages/block-directory": { "name": "@wordpress/block-directory", - "version": "4.25.0", + "version": "4.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54000,7 +54000,7 @@ }, "packages/block-editor": { "name": "@wordpress/block-editor", - "version": "12.16.0", + "version": "12.17.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54097,7 +54097,7 @@ }, "packages/block-library": { "name": "@wordpress/block-library", - "version": "8.25.0", + "version": "8.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54159,7 +54159,7 @@ }, "packages/block-serialization-default-parser": { "name": "@wordpress/block-serialization-default-parser", - "version": "4.48.0", + "version": "4.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -54170,7 +54170,7 @@ }, "packages/block-serialization-spec-parser": { "name": "@wordpress/block-serialization-spec-parser", - "version": "4.48.0", + "version": "4.49.0", "license": "GPL-2.0-or-later", "dependencies": { "pegjs": "^0.10.0", @@ -54182,7 +54182,7 @@ }, "packages/blocks": { "name": "@wordpress/blocks", - "version": "12.25.0", + "version": "12.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54236,7 +54236,7 @@ }, "packages/browserslist-config": { "name": "@wordpress/browserslist-config", - "version": "5.31.0", + "version": "5.32.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -54245,7 +54245,7 @@ }, "packages/commands": { "name": "@wordpress/commands", - "version": "0.19.0", + "version": "0.20.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54270,7 +54270,7 @@ }, "packages/components": { "name": "@wordpress/components", - "version": "25.14.0", + "version": "25.15.0", "license": "GPL-2.0-or-later", "dependencies": { "@ariakit/react": "^0.3.12", @@ -54375,7 +54375,7 @@ }, "packages/compose": { "name": "@wordpress/compose", - "version": "6.25.0", + "version": "6.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54401,7 +54401,7 @@ }, "packages/core-commands": { "name": "@wordpress/core-commands", - "version": "0.17.0", + "version": "0.18.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54426,7 +54426,7 @@ }, "packages/core-data": { "name": "@wordpress/core-data", - "version": "6.25.0", + "version": "6.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54470,7 +54470,7 @@ }, "packages/create-block": { "name": "@wordpress/create-block", - "version": "4.32.0", + "version": "4.33.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54498,13 +54498,13 @@ }, "packages/create-block-tutorial-template": { "name": "@wordpress/create-block-tutorial-template", - "version": "3.2.0", + "version": "3.3.0", "dev": true, "license": "GPL-2.0-or-later" }, "packages/customize-widgets": { "name": "@wordpress/customize-widgets", - "version": "4.25.0", + "version": "4.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54541,7 +54541,7 @@ }, "packages/data": { "name": "@wordpress/data", - "version": "9.18.0", + "version": "9.19.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54569,7 +54569,7 @@ }, "packages/data-controls": { "name": "@wordpress/data-controls", - "version": "3.17.0", + "version": "3.18.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54586,7 +54586,7 @@ }, "packages/dataviews": { "name": "@wordpress/dataviews", - "version": "0.2.0", + "version": "0.3.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54611,7 +54611,7 @@ }, "packages/date": { "name": "@wordpress/date", - "version": "4.48.0", + "version": "4.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54625,7 +54625,7 @@ }, "packages/dependency-extraction-webpack-plugin": { "name": "@wordpress/dependency-extraction-webpack-plugin", - "version": "4.31.0", + "version": "5.0.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54640,7 +54640,7 @@ }, "packages/deprecated": { "name": "@wordpress/deprecated", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54652,7 +54652,7 @@ }, "packages/docgen": { "name": "@wordpress/docgen", - "version": "1.57.0", + "version": "1.58.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54670,7 +54670,7 @@ }, "packages/dom": { "name": "@wordpress/dom", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54682,7 +54682,7 @@ }, "packages/dom-ready": { "name": "@wordpress/dom-ready", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -54693,7 +54693,7 @@ }, "packages/e2e-test-utils": { "name": "@wordpress/e2e-test-utils", - "version": "10.19.0", + "version": "10.20.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54715,7 +54715,7 @@ }, "packages/e2e-test-utils-playwright": { "name": "@wordpress/e2e-test-utils-playwright", - "version": "0.16.0", + "version": "0.17.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54738,7 +54738,7 @@ }, "packages/e2e-tests": { "name": "@wordpress/e2e-tests", - "version": "7.19.0", + "version": "7.20.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -54776,7 +54776,7 @@ }, "packages/edit-post": { "name": "@wordpress/edit-post", - "version": "7.25.0", + "version": "7.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54824,7 +54824,7 @@ }, "packages/edit-site": { "name": "@wordpress/edit-site", - "version": "5.25.0", + "version": "5.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54889,7 +54889,7 @@ }, "packages/edit-widgets": { "name": "@wordpress/edit-widgets", - "version": "5.25.0", + "version": "5.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54932,7 +54932,7 @@ }, "packages/editor": { "name": "@wordpress/editor", - "version": "13.25.0", + "version": "13.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -54983,7 +54983,7 @@ }, "packages/element": { "name": "@wordpress/element", - "version": "5.25.0", + "version": "5.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55001,7 +55001,7 @@ }, "packages/env": { "name": "@wordpress/env", - "version": "9.0.0", + "version": "9.1.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -55135,7 +55135,7 @@ }, "packages/escape-html": { "name": "@wordpress/escape-html", - "version": "2.48.0", + "version": "2.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -55146,7 +55146,7 @@ }, "packages/eslint-plugin": { "name": "@wordpress/eslint-plugin", - "version": "17.5.0", + "version": "17.6.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -55189,7 +55189,7 @@ }, "packages/format-library": { "name": "@wordpress/format-library", - "version": "4.25.0", + "version": "4.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55216,7 +55216,7 @@ }, "packages/hooks": { "name": "@wordpress/hooks", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -55227,7 +55227,7 @@ }, "packages/html-entities": { "name": "@wordpress/html-entities", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -55238,7 +55238,7 @@ }, "packages/i18n": { "name": "@wordpress/i18n", - "version": "4.48.0", + "version": "4.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55257,7 +55257,7 @@ }, "packages/icons": { "name": "@wordpress/icons", - "version": "9.39.0", + "version": "9.40.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55270,7 +55270,7 @@ }, "packages/interactivity": { "name": "@wordpress/interactivity", - "version": "3.1.0", + "version": "3.2.0", "license": "GPL-2.0-or-later", "dependencies": { "@preact/signals": "^1.1.3", @@ -55283,7 +55283,7 @@ }, "packages/interface": { "name": "@wordpress/interface", - "version": "5.25.0", + "version": "5.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55311,7 +55311,7 @@ }, "packages/is-shallow-equal": { "name": "@wordpress/is-shallow-equal", - "version": "4.48.0", + "version": "4.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -55322,7 +55322,7 @@ }, "packages/jest-console": { "name": "@wordpress/jest-console", - "version": "7.19.0", + "version": "7.20.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -55338,7 +55338,7 @@ }, "packages/jest-preset-default": { "name": "@wordpress/jest-preset-default", - "version": "11.19.0", + "version": "11.20.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -55355,7 +55355,7 @@ }, "packages/jest-puppeteer-axe": { "name": "@wordpress/jest-puppeteer-axe", - "version": "6.19.0", + "version": "6.20.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -55377,7 +55377,7 @@ }, "packages/keyboard-shortcuts": { "name": "@wordpress/keyboard-shortcuts", - "version": "4.25.0", + "version": "4.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55395,7 +55395,7 @@ }, "packages/keycodes": { "name": "@wordpress/keycodes", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55407,7 +55407,7 @@ }, "packages/lazy-import": { "name": "@wordpress/lazy-import", - "version": "1.35.0", + "version": "1.36.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -55421,7 +55421,7 @@ }, "packages/list-reusable-blocks": { "name": "@wordpress/list-reusable-blocks", - "version": "4.25.0", + "version": "4.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55443,7 +55443,7 @@ }, "packages/media-utils": { "name": "@wordpress/media-utils", - "version": "4.39.0", + "version": "4.40.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55458,7 +55458,7 @@ }, "packages/notices": { "name": "@wordpress/notices", - "version": "4.16.0", + "version": "4.17.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55474,7 +55474,7 @@ }, "packages/npm-package-json-lint-config": { "name": "@wordpress/npm-package-json-lint-config", - "version": "4.33.0", + "version": "4.34.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -55486,7 +55486,7 @@ }, "packages/nux": { "name": "@wordpress/nux", - "version": "8.10.0", + "version": "8.11.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55509,7 +55509,7 @@ }, "packages/patterns": { "name": "@wordpress/patterns", - "version": "1.9.0", + "version": "1.10.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55539,7 +55539,7 @@ }, "packages/plugins": { "name": "@wordpress/plugins", - "version": "6.16.0", + "version": "6.17.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55561,7 +55561,7 @@ }, "packages/postcss-plugins-preset": { "name": "@wordpress/postcss-plugins-preset", - "version": "4.32.0", + "version": "4.33.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -55577,7 +55577,7 @@ }, "packages/postcss-themes": { "name": "@wordpress/postcss-themes", - "version": "5.31.0", + "version": "5.32.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -55589,7 +55589,7 @@ }, "packages/preferences": { "name": "@wordpress/preferences", - "version": "3.25.0", + "version": "3.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55613,7 +55613,7 @@ }, "packages/preferences-persistence": { "name": "@wordpress/preferences-persistence", - "version": "1.40.0", + "version": "1.41.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55625,7 +55625,7 @@ }, "packages/prettier-config": { "name": "@wordpress/prettier-config", - "version": "3.5.0", + "version": "3.6.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -55637,7 +55637,7 @@ }, "packages/primitives": { "name": "@wordpress/primitives", - "version": "3.46.0", + "version": "3.47.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55650,7 +55650,7 @@ }, "packages/priority-queue": { "name": "@wordpress/priority-queue", - "version": "2.48.0", + "version": "2.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55662,7 +55662,7 @@ }, "packages/private-apis": { "name": "@wordpress/private-apis", - "version": "0.30.0", + "version": "0.31.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -55673,7 +55673,7 @@ }, "packages/project-management-automation": { "name": "@wordpress/project-management-automation", - "version": "1.47.0", + "version": "1.48.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -55686,7 +55686,7 @@ }, "packages/react-i18n": { "name": "@wordpress/react-i18n", - "version": "3.46.0", + "version": "3.47.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55834,7 +55834,7 @@ }, "packages/readable-js-assets-webpack-plugin": { "name": "@wordpress/readable-js-assets-webpack-plugin", - "version": "2.31.0", + "version": "2.32.0", "dev": true, "license": "GPL-2.0-or-later", "engines": { @@ -55846,7 +55846,7 @@ }, "packages/redux-routine": { "name": "@wordpress/redux-routine", - "version": "4.48.0", + "version": "4.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55890,7 +55890,7 @@ }, "packages/reusable-blocks": { "name": "@wordpress/reusable-blocks", - "version": "4.25.0", + "version": "4.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55916,7 +55916,7 @@ }, "packages/rich-text": { "name": "@wordpress/rich-text", - "version": "6.25.0", + "version": "6.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55940,7 +55940,7 @@ }, "packages/router": { "name": "@wordpress/router", - "version": "0.17.0", + "version": "0.18.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -55958,7 +55958,7 @@ }, "packages/scripts": { "name": "@wordpress/scripts", - "version": "26.19.0", + "version": "27.0.0", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -56180,7 +56180,7 @@ }, "packages/server-side-render": { "name": "@wordpress/server-side-render", - "version": "4.25.0", + "version": "4.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -56205,7 +56205,7 @@ }, "packages/shortcode": { "name": "@wordpress/shortcode", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -56217,7 +56217,7 @@ }, "packages/style-engine": { "name": "@wordpress/style-engine", - "version": "1.31.0", + "version": "1.32.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -56229,7 +56229,7 @@ }, "packages/stylelint-config": { "name": "@wordpress/stylelint-config", - "version": "21.31.0", + "version": "21.32.0", "dev": true, "license": "MIT", "dependencies": { @@ -56245,7 +56245,7 @@ }, "packages/sync": { "name": "@wordpress/sync", - "version": "0.10.0", + "version": "0.11.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -56265,7 +56265,7 @@ }, "packages/token-list": { "name": "@wordpress/token-list", - "version": "2.48.0", + "version": "2.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" @@ -56276,7 +56276,7 @@ }, "packages/undo-manager": { "name": "@wordpress/undo-manager", - "version": "0.8.0", + "version": "0.9.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -56288,7 +56288,7 @@ }, "packages/url": { "name": "@wordpress/url", - "version": "3.49.0", + "version": "3.50.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -56300,7 +56300,7 @@ }, "packages/viewport": { "name": "@wordpress/viewport", - "version": "5.25.0", + "version": "5.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -56317,7 +56317,7 @@ }, "packages/warning": { "name": "@wordpress/warning", - "version": "2.48.0", + "version": "2.49.0", "license": "GPL-2.0-or-later", "engines": { "node": ">=12" @@ -56325,7 +56325,7 @@ }, "packages/widgets": { "name": "@wordpress/widgets", - "version": "3.25.0", + "version": "3.26.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0", @@ -56349,7 +56349,7 @@ }, "packages/wordcount": { "name": "@wordpress/wordcount", - "version": "3.48.0", + "version": "3.49.0", "license": "GPL-2.0-or-later", "dependencies": { "@babel/runtime": "^7.16.0" diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 8ae9c45b7433d9..c2d1b666339bf6 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/a11y", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "Accessibility (a11y) utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/annotations/package.json b/packages/annotations/package.json index fbcf81fdf4f6fe..007b02ad29a71d 100644 --- a/packages/annotations/package.json +++ b/packages/annotations/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/annotations", - "version": "2.49.0-prerelease", + "version": "2.49.0", "description": "Annotate content in the Gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/api-fetch/package.json b/packages/api-fetch/package.json index fcd88a0099df68..02d0474156bfc1 100644 --- a/packages/api-fetch/package.json +++ b/packages/api-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/api-fetch", - "version": "6.46.0-prerelease", + "version": "6.46.0", "description": "Utility to make WordPress REST API requests.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/autop/package.json b/packages/autop/package.json index 7df62adc204845..e335e4ac7349b5 100644 --- a/packages/autop/package.json +++ b/packages/autop/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/autop", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "WordPress's automatic paragraph functions `autop` and `removep`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-import-jsx-pragma/package.json b/packages/babel-plugin-import-jsx-pragma/package.json index c0cfeed10daaaf..3af7e30b2e2340 100644 --- a/packages/babel-plugin-import-jsx-pragma/package.json +++ b/packages/babel-plugin-import-jsx-pragma/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-import-jsx-pragma", - "version": "4.32.0-prerelease", + "version": "4.32.0", "description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-plugin-makepot/package.json b/packages/babel-plugin-makepot/package.json index 486ef101ada3b9..6163ad1df3ff1b 100644 --- a/packages/babel-plugin-makepot/package.json +++ b/packages/babel-plugin-makepot/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-plugin-makepot", - "version": "5.33.0-prerelease", + "version": "5.33.0", "description": "WordPress Babel internationalization (i18n) plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/babel-preset-default/package.json b/packages/babel-preset-default/package.json index a3b4c864bb6fe8..66e63b24ff51eb 100644 --- a/packages/babel-preset-default/package.json +++ b/packages/babel-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/babel-preset-default", - "version": "7.33.0-prerelease", + "version": "7.33.0", "description": "Default Babel preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/base-styles/package.json b/packages/base-styles/package.json index 86928afa0a515f..64d3835a00aca3 100644 --- a/packages/base-styles/package.json +++ b/packages/base-styles/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/base-styles", - "version": "4.40.0-prerelease", + "version": "4.40.0", "description": "Base SCSS utilities and variables for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blob/package.json b/packages/blob/package.json index 16fc425e198787..53071228e0af1e 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blob", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "Blob utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-directory/package.json b/packages/block-directory/package.json index 0dcd2f36ccd52b..466d1fd783e952 100644 --- a/packages/block-directory/package.json +++ b/packages/block-directory/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-directory", - "version": "4.26.0-prerelease", + "version": "4.26.0", "description": "Extend editor with block directory features to search, download and install blocks.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index 98aa8a709b2362..cf8f13a0b9f113 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-editor", - "version": "12.17.0-prerelease", + "version": "12.17.0", "description": "Generic block editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-library/package.json b/packages/block-library/package.json index c1f484ad9a9143..49cbc294157188 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-library", - "version": "8.26.0-prerelease", + "version": "8.26.0", "description": "Block library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-default-parser/package.json b/packages/block-serialization-default-parser/package.json index f4d324cf6c9a90..668fc92eea94b6 100644 --- a/packages/block-serialization-default-parser/package.json +++ b/packages/block-serialization-default-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-default-parser", - "version": "4.49.0-prerelease", + "version": "4.49.0", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/block-serialization-spec-parser/package.json b/packages/block-serialization-spec-parser/package.json index 822868a5974182..df841c8a506c15 100644 --- a/packages/block-serialization-spec-parser/package.json +++ b/packages/block-serialization-spec-parser/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/block-serialization-spec-parser", - "version": "4.49.0-prerelease", + "version": "4.49.0", "description": "Block serialization specification parser for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/blocks/package.json b/packages/blocks/package.json index 355251c5d16dab..af0e0765745185 100644 --- a/packages/blocks/package.json +++ b/packages/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/blocks", - "version": "12.26.0-prerelease", + "version": "12.26.0", "description": "Block API for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/browserslist-config/package.json b/packages/browserslist-config/package.json index 6e039d02c0f92a..4b2747e505e162 100644 --- a/packages/browserslist-config/package.json +++ b/packages/browserslist-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/browserslist-config", - "version": "5.32.0-prerelease", + "version": "5.32.0", "description": "WordPress Browserslist shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/commands/package.json b/packages/commands/package.json index ef3fa9f6bfbfd6..5314cf671b1ba7 100644 --- a/packages/commands/package.json +++ b/packages/commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/commands", - "version": "0.20.0-prerelease", + "version": "0.20.0", "description": "Handles the commands menu.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/components/package.json b/packages/components/package.json index f49deb5413c35b..a16778a7778b56 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/components", - "version": "25.15.0-prerelease", + "version": "25.15.0", "description": "UI components for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/compose/package.json b/packages/compose/package.json index 713a7ac85f8cb3..851d3025b50a15 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/compose", - "version": "6.26.0-prerelease", + "version": "6.26.0", "description": "WordPress higher-order components (HOCs).", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-commands/package.json b/packages/core-commands/package.json index 61d8e3037961a7..076dce00569e09 100644 --- a/packages/core-commands/package.json +++ b/packages/core-commands/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-commands", - "version": "0.18.0-prerelease", + "version": "0.18.0", "description": "WordPress core reusable commands.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/core-data/package.json b/packages/core-data/package.json index 565ef8e2fdf55c..5970b985a58d49 100644 --- a/packages/core-data/package.json +++ b/packages/core-data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/core-data", - "version": "6.26.0-prerelease", + "version": "6.26.0", "description": "Access to and manipulation of core WordPress entities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block-interactive-template/package.json b/packages/create-block-interactive-template/package.json index 976ee68a0e2d09..e95e68fef062af 100644 --- a/packages/create-block-interactive-template/package.json +++ b/packages/create-block-interactive-template/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block-interactive-template", - "version": "1.12.0-prerelease", + "version": "1.12.0", "description": "Template for @wordpress/create-block to create interactive blocks with the Interactivity API.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block-tutorial-template/package.json b/packages/create-block-tutorial-template/package.json index 47625bb4996cf3..6a7f0b85901b02 100644 --- a/packages/create-block-tutorial-template/package.json +++ b/packages/create-block-tutorial-template/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block-tutorial-template", - "version": "3.3.0-prerelease", + "version": "3.3.0", "description": "This is a template for @wordpress/create-block that creates an example 'Copyright Date' block. This block is used in the official WordPress block development Quick Start Guide.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/create-block/package.json b/packages/create-block/package.json index 9a628ffdf4a331..b25dd050a1ef42 100644 --- a/packages/create-block/package.json +++ b/packages/create-block/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/create-block", - "version": "4.33.0-prerelease", + "version": "4.33.0", "description": "Generates PHP, JS and CSS code for registering a block for a WordPress plugin.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/customize-widgets/package.json b/packages/customize-widgets/package.json index 64b1eabcaeee4a..5ee1b3ddb6037c 100644 --- a/packages/customize-widgets/package.json +++ b/packages/customize-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/customize-widgets", - "version": "4.26.0-prerelease", + "version": "4.26.0", "description": "Widgets blocks in Customizer Module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data-controls/package.json b/packages/data-controls/package.json index 0f26fca0fc6539..2c1fc4dc011e79 100644 --- a/packages/data-controls/package.json +++ b/packages/data-controls/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data-controls", - "version": "3.18.0-prerelease", + "version": "3.18.0", "description": "A set of common controls for the @wordpress/data api.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/data/package.json b/packages/data/package.json index cb57d35b87f138..135e9697ad1b1c 100644 --- a/packages/data/package.json +++ b/packages/data/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/data", - "version": "9.19.0-prerelease", + "version": "9.19.0", "description": "Data module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dataviews/package.json b/packages/dataviews/package.json index 4136be59c330da..ddb51cc846985f 100644 --- a/packages/dataviews/package.json +++ b/packages/dataviews/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dataviews", - "version": "0.3.0-prerelease", + "version": "0.3.0", "description": "DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/date/package.json b/packages/date/package.json index 7963815604a18a..1553dba858339d 100644 --- a/packages/date/package.json +++ b/packages/date/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/date", - "version": "4.49.0-prerelease", + "version": "4.49.0", "description": "Date module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dependency-extraction-webpack-plugin/package.json b/packages/dependency-extraction-webpack-plugin/package.json index 12d3613ede9988..06b9efd857d03c 100644 --- a/packages/dependency-extraction-webpack-plugin/package.json +++ b/packages/dependency-extraction-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dependency-extraction-webpack-plugin", - "version": "5.0.0-prerelease", + "version": "5.0.0", "description": "Extract WordPress script dependencies from webpack bundles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/deprecated/package.json b/packages/deprecated/package.json index 37a5b08f376ff5..7dc51929550c37 100644 --- a/packages/deprecated/package.json +++ b/packages/deprecated/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/deprecated", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "Deprecation utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/docgen/package.json b/packages/docgen/package.json index 5754ce37e92536..844518cc1cbabb 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/docgen", - "version": "1.58.0-prerelease", + "version": "1.58.0", "description": "Autogenerate public API documentation from exports and JSDoc comments.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom-ready/package.json b/packages/dom-ready/package.json index 561066f1c63d93..d902a14c662f7b 100644 --- a/packages/dom-ready/package.json +++ b/packages/dom-ready/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom-ready", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "Execute callback after the DOM is loaded.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/dom/package.json b/packages/dom/package.json index 901f866a23c269..304653e4074b92 100644 --- a/packages/dom/package.json +++ b/packages/dom/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/dom", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "DOM utilities module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils-playwright/package.json b/packages/e2e-test-utils-playwright/package.json index 8309f4dc6126ab..89bfb6ab66ae80 100644 --- a/packages/e2e-test-utils-playwright/package.json +++ b/packages/e2e-test-utils-playwright/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils-playwright", - "version": "0.17.0-prerelease", + "version": "0.17.0", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-test-utils/package.json b/packages/e2e-test-utils/package.json index 12aa2cca7e9457..69436586275104 100644 --- a/packages/e2e-test-utils/package.json +++ b/packages/e2e-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-test-utils", - "version": "10.20.0-prerelease", + "version": "10.20.0", "description": "End-To-End (E2E) test utils for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index 86d88c253cdb7e..864eba1af12acf 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/e2e-tests", - "version": "7.20.0-prerelease", + "version": "7.20.0", "description": "End-To-End (E2E) tests for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-post/package.json b/packages/edit-post/package.json index 2a3053d109a2a4..4041630884f753 100644 --- a/packages/edit-post/package.json +++ b/packages/edit-post/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-post", - "version": "7.26.0-prerelease", + "version": "7.26.0", "description": "Edit Post module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-site/package.json b/packages/edit-site/package.json index 0debc2609e6ca4..830d525ed060a5 100644 --- a/packages/edit-site/package.json +++ b/packages/edit-site/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-site", - "version": "5.26.0-prerelease", + "version": "5.26.0", "description": "Edit Site Page module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/edit-widgets/package.json b/packages/edit-widgets/package.json index 85b553fb090a8b..8861148d173ca5 100644 --- a/packages/edit-widgets/package.json +++ b/packages/edit-widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/edit-widgets", - "version": "5.26.0-prerelease", + "version": "5.26.0", "description": "Widgets Page module for WordPress..", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/editor/package.json b/packages/editor/package.json index 72d79660f7c76d..b974c7443851f1 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/editor", - "version": "13.26.0-prerelease", + "version": "13.26.0", "description": "Enhanced block editor for WordPress posts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/element/package.json b/packages/element/package.json index 4f4318038abbbf..9f075bdfff56de 100644 --- a/packages/element/package.json +++ b/packages/element/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/element", - "version": "5.26.0-prerelease", + "version": "5.26.0", "description": "Element React module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/env/package.json b/packages/env/package.json index 8e17750811551d..5036479faa5323 100644 --- a/packages/env/package.json +++ b/packages/env/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/env", - "version": "9.1.0-prerelease", + "version": "9.1.0", "description": "A zero-config, self contained local WordPress environment for development and testing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/escape-html/package.json b/packages/escape-html/package.json index 18c10a29b489ed..cfeabcb8c06e94 100644 --- a/packages/escape-html/package.json +++ b/packages/escape-html/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/escape-html", - "version": "2.49.0-prerelease", + "version": "2.49.0", "description": "Escape HTML utils.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 18bb33042f1d99..b56a61ab160446 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/eslint-plugin", - "version": "17.6.0-prerelease", + "version": "17.6.0", "description": "ESLint plugin for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/format-library/package.json b/packages/format-library/package.json index 2d260875811708..280fd5d8c20422 100644 --- a/packages/format-library/package.json +++ b/packages/format-library/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/format-library", - "version": "4.26.0-prerelease", + "version": "4.26.0", "description": "Format library for the WordPress editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 84074b3575c2db..08fa1eb54819ca 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/hooks", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "WordPress hooks library.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/html-entities/package.json b/packages/html-entities/package.json index b6ae9c2634dede..10965eaf51faba 100644 --- a/packages/html-entities/package.json +++ b/packages/html-entities/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/html-entities", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "HTML entity utilities for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 56769f3e33736c..a2b2ed907cf966 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/i18n", - "version": "4.49.0-prerelease", + "version": "4.49.0", "description": "WordPress internationalization (i18n) library.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/icons/package.json b/packages/icons/package.json index 0c359d100a34b4..b94cb445b5760c 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/icons", - "version": "9.40.0-prerelease", + "version": "9.40.0", "description": "WordPress Icons package, based on dashicon.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/interactivity/package.json b/packages/interactivity/package.json index b7ed52dd288c8a..455af38b67fcaf 100644 --- a/packages/interactivity/package.json +++ b/packages/interactivity/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/interactivity", - "version": "3.2.0-prerelease", + "version": "3.2.0", "description": "Package that provides a standard and simple way to handle the frontend interactivity of Gutenberg blocks.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/interface/package.json b/packages/interface/package.json index 8dfd6bf8ccf852..feebc542d3a781 100644 --- a/packages/interface/package.json +++ b/packages/interface/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/interface", - "version": "5.26.0-prerelease", + "version": "5.26.0", "description": "Interface module for WordPress. The package contains shared functionality across the modern JavaScript-based WordPress screens.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/is-shallow-equal/package.json b/packages/is-shallow-equal/package.json index d37a0d1a735c4f..f2600696d54d67 100644 --- a/packages/is-shallow-equal/package.json +++ b/packages/is-shallow-equal/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/is-shallow-equal", - "version": "4.49.0-prerelease", + "version": "4.49.0", "description": "Test for shallow equality between two objects or arrays.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-console/package.json b/packages/jest-console/package.json index aec655cdef0253..4dfdea8d61175a 100644 --- a/packages/jest-console/package.json +++ b/packages/jest-console/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-console", - "version": "7.20.0-prerelease", + "version": "7.20.0", "description": "Custom Jest matchers for the Console object.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-preset-default/package.json b/packages/jest-preset-default/package.json index 0eea603b2ad17c..aa787861ed89d9 100644 --- a/packages/jest-preset-default/package.json +++ b/packages/jest-preset-default/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-preset-default", - "version": "11.20.0-prerelease", + "version": "11.20.0", "description": "Default Jest preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/jest-puppeteer-axe/package.json b/packages/jest-puppeteer-axe/package.json index 44f86cd158e7e9..d30e2ea7812862 100644 --- a/packages/jest-puppeteer-axe/package.json +++ b/packages/jest-puppeteer-axe/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/jest-puppeteer-axe", - "version": "6.20.0-prerelease", + "version": "6.20.0", "description": "Axe API integration with Jest and Puppeteer.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/keyboard-shortcuts/package.json b/packages/keyboard-shortcuts/package.json index 8e1c2b35130fd1..7f336adb525102 100644 --- a/packages/keyboard-shortcuts/package.json +++ b/packages/keyboard-shortcuts/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/keyboard-shortcuts", - "version": "4.26.0-prerelease", + "version": "4.26.0", "description": "Handling keyboard shortcuts.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/keycodes/package.json b/packages/keycodes/package.json index 342d50ba8e6e0f..c5ce48ea8c2c30 100644 --- a/packages/keycodes/package.json +++ b/packages/keycodes/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/keycodes", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "Keycodes utilities for WordPress. Used to check for keyboard events across browsers/operating systems.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/lazy-import/package.json b/packages/lazy-import/package.json index 644121850eab42..8ad948e62408aa 100644 --- a/packages/lazy-import/package.json +++ b/packages/lazy-import/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/lazy-import", - "version": "1.36.0-prerelease", + "version": "1.36.0", "description": "Lazily import a module, installing it automatically if missing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/list-reusable-blocks/package.json b/packages/list-reusable-blocks/package.json index 1decde84386eb7..403809ae7d72a0 100644 --- a/packages/list-reusable-blocks/package.json +++ b/packages/list-reusable-blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/list-reusable-blocks", - "version": "4.26.0-prerelease", + "version": "4.26.0", "description": "Adding Export/Import support to the reusable blocks listing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/media-utils/package.json b/packages/media-utils/package.json index 3babc2af8c07e6..b01403efff06ed 100644 --- a/packages/media-utils/package.json +++ b/packages/media-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/media-utils", - "version": "4.40.0-prerelease", + "version": "4.40.0", "description": "WordPress Media Upload Utils.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/notices/package.json b/packages/notices/package.json index eb7ea82e973e49..4f763cb6ed5766 100644 --- a/packages/notices/package.json +++ b/packages/notices/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/notices", - "version": "4.17.0-prerelease", + "version": "4.17.0", "description": "State management for notices.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/npm-package-json-lint-config/package.json b/packages/npm-package-json-lint-config/package.json index 2f16d73f738b43..a05901155c0ad3 100644 --- a/packages/npm-package-json-lint-config/package.json +++ b/packages/npm-package-json-lint-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/npm-package-json-lint-config", - "version": "4.34.0-prerelease", + "version": "4.34.0", "description": "WordPress npm-package-json-lint shareable configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/nux/package.json b/packages/nux/package.json index 9af2b3682d3d1a..e59b11cf9b9516 100644 --- a/packages/nux/package.json +++ b/packages/nux/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/nux", - "version": "8.11.0-prerelease", + "version": "8.11.0", "description": "NUX (New User eXperience) module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/patterns/package.json b/packages/patterns/package.json index 7334017ca1a435..bb130b52f8a98f 100644 --- a/packages/patterns/package.json +++ b/packages/patterns/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/patterns", - "version": "1.10.0-prerelease", + "version": "1.10.0", "description": "Management of user pattern editing.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/plugins/package.json b/packages/plugins/package.json index 11def4a122ebf9..9341fc509e6a89 100644 --- a/packages/plugins/package.json +++ b/packages/plugins/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/plugins", - "version": "6.17.0-prerelease", + "version": "6.17.0", "description": "Plugins module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/postcss-plugins-preset/package.json b/packages/postcss-plugins-preset/package.json index 449c6b8994c4a0..0fce1ad734cb9b 100644 --- a/packages/postcss-plugins-preset/package.json +++ b/packages/postcss-plugins-preset/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/postcss-plugins-preset", - "version": "4.33.0-prerelease", + "version": "4.33.0", "description": "PostCSS sharable plugins preset for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/postcss-themes/package.json b/packages/postcss-themes/package.json index 9bad42995cd33e..9eb9b4c37a647a 100644 --- a/packages/postcss-themes/package.json +++ b/packages/postcss-themes/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/postcss-themes", - "version": "5.32.0-prerelease", + "version": "5.32.0", "description": "PostCSS plugin to generate theme colors.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/preferences-persistence/package.json b/packages/preferences-persistence/package.json index 2a4fb8c576805e..1c40eeb80d3bab 100644 --- a/packages/preferences-persistence/package.json +++ b/packages/preferences-persistence/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/preferences-persistence", - "version": "1.41.0-prerelease", + "version": "1.41.0", "description": "Persistence utilities for `wordpress/preferences`.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/preferences/package.json b/packages/preferences/package.json index 50e82e46759835..ac1f1c9ade95cc 100644 --- a/packages/preferences/package.json +++ b/packages/preferences/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/preferences", - "version": "3.26.0-prerelease", + "version": "3.26.0", "description": "Utilities for managing WordPress preferences.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index c2e69e453f691e..3dc8c49a3b1f05 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/prettier-config", - "version": "3.6.0-prerelease", + "version": "3.6.0", "description": "WordPress Prettier shared configuration.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/primitives/package.json b/packages/primitives/package.json index 294ba82270d362..3aa66baee21dad 100644 --- a/packages/primitives/package.json +++ b/packages/primitives/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/primitives", - "version": "3.47.0-prerelease", + "version": "3.47.0", "description": "WordPress cross-platform primitives.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/priority-queue/package.json b/packages/priority-queue/package.json index a90dc43ed04768..c06d29acf5585e 100644 --- a/packages/priority-queue/package.json +++ b/packages/priority-queue/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/priority-queue", - "version": "2.49.0-prerelease", + "version": "2.49.0", "description": "Generic browser priority queue.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/private-apis/package.json b/packages/private-apis/package.json index 953430fc97d1c2..8bf5a27dbd8bb6 100644 --- a/packages/private-apis/package.json +++ b/packages/private-apis/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/private-apis", - "version": "0.31.0-prerelease", + "version": "0.31.0", "description": "Internal experimental APIs for WordPress core.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/project-management-automation/package.json b/packages/project-management-automation/package.json index 02ddae86044ebd..46fe20bf9e7279 100644 --- a/packages/project-management-automation/package.json +++ b/packages/project-management-automation/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/project-management-automation", - "version": "1.48.0-prerelease", + "version": "1.48.0", "description": "GitHub Action that implements various automation to assist with managing the Gutenberg GitHub repository.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/react-i18n/package.json b/packages/react-i18n/package.json index fa81c2bba5deca..b7798f268c13da 100644 --- a/packages/react-i18n/package.json +++ b/packages/react-i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-i18n", - "version": "3.47.0-prerelease", + "version": "3.47.0", "description": "React bindings for @wordpress/i18n.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/readable-js-assets-webpack-plugin/package.json b/packages/readable-js-assets-webpack-plugin/package.json index 518f2cc0a80537..da6750fd931361 100644 --- a/packages/readable-js-assets-webpack-plugin/package.json +++ b/packages/readable-js-assets-webpack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/readable-js-assets-webpack-plugin", - "version": "2.32.0-prerelease", + "version": "2.32.0", "description": "Generate a readable JS file for each JS asset.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/redux-routine/package.json b/packages/redux-routine/package.json index 82a296a97a0d68..347fa98b635100 100644 --- a/packages/redux-routine/package.json +++ b/packages/redux-routine/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/redux-routine", - "version": "4.49.0-prerelease", + "version": "4.49.0", "description": "Redux middleware for generator coroutines.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/reusable-blocks/package.json b/packages/reusable-blocks/package.json index 07deea38569930..947d85834784b3 100644 --- a/packages/reusable-blocks/package.json +++ b/packages/reusable-blocks/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/reusable-blocks", - "version": "4.26.0-prerelease", + "version": "4.26.0", "description": "Reusable blocks utilities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/rich-text/package.json b/packages/rich-text/package.json index ac91805807c571..ef935eea5686fc 100644 --- a/packages/rich-text/package.json +++ b/packages/rich-text/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/rich-text", - "version": "6.26.0-prerelease", + "version": "6.26.0", "description": "Rich text value and manipulation API.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/router/package.json b/packages/router/package.json index 76ca9cba46588c..4d882bdc5cd9d9 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/router", - "version": "0.18.0-prerelease", + "version": "0.18.0", "description": "Router API for WordPress pages.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index dbca51c0dc7632..b270cac5ea7bfd 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/scripts", - "version": "27.0.0-prerelease", + "version": "27.0.0", "description": "Collection of reusable scripts for WordPress development.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/server-side-render/package.json b/packages/server-side-render/package.json index 73aea8946a2551..221c36cb20072b 100644 --- a/packages/server-side-render/package.json +++ b/packages/server-side-render/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/server-side-render", - "version": "4.26.0-prerelease", + "version": "4.26.0", "description": "The component used with WordPress to server-side render a preview of dynamic blocks to display in the editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/shortcode/package.json b/packages/shortcode/package.json index b640e88ac033fd..3088836074b9db 100644 --- a/packages/shortcode/package.json +++ b/packages/shortcode/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/shortcode", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "Shortcode module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/style-engine/package.json b/packages/style-engine/package.json index a0ba7ef7d32c85..4c318049e4fe5e 100644 --- a/packages/style-engine/package.json +++ b/packages/style-engine/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/style-engine", - "version": "1.32.0-prerelease", + "version": "1.32.0", "description": "A suite of parsers and compilers for WordPress styles.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index c07b9ff1eaad66..40bc6becf03fbf 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/stylelint-config", - "version": "21.32.0-prerelease", + "version": "21.32.0", "description": "stylelint config for WordPress development.", "author": "The WordPress Contributors", "license": "MIT", diff --git a/packages/sync/package.json b/packages/sync/package.json index 51c9ce8522a281..e0e07f11a121ba 100644 --- a/packages/sync/package.json +++ b/packages/sync/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/sync", - "version": "0.11.0-prerelease", + "version": "0.11.0", "description": "Sync Data.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/token-list/package.json b/packages/token-list/package.json index b7807fe59eb7c2..6e47980844ca26 100644 --- a/packages/token-list/package.json +++ b/packages/token-list/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/token-list", - "version": "2.49.0-prerelease", + "version": "2.49.0", "description": "Constructable, plain JavaScript DOMTokenList implementation, supporting non-browser runtimes.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/undo-manager/package.json b/packages/undo-manager/package.json index e058bebc939c3f..fde1fcf604cbcf 100644 --- a/packages/undo-manager/package.json +++ b/packages/undo-manager/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/undo-manager", - "version": "0.9.0-prerelease", + "version": "0.9.0", "description": "A small package to manage undo/redo.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/url/package.json b/packages/url/package.json index e56260cf74b670..0c2d9993f49e96 100644 --- a/packages/url/package.json +++ b/packages/url/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/url", - "version": "3.50.0-prerelease", + "version": "3.50.0", "description": "WordPress URL utilities.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/viewport/package.json b/packages/viewport/package.json index 4bd1820ddffddf..dd11ff8db2ba6f 100644 --- a/packages/viewport/package.json +++ b/packages/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/viewport", - "version": "5.26.0-prerelease", + "version": "5.26.0", "description": "Viewport module for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/warning/package.json b/packages/warning/package.json index e89f8ea203b8f1..134d58c060d086 100644 --- a/packages/warning/package.json +++ b/packages/warning/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/warning", - "version": "2.49.0-prerelease", + "version": "2.49.0", "description": "Warning utility for WordPress.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/widgets/package.json b/packages/widgets/package.json index ad5a74db92e8d4..8f04224c63fb27 100644 --- a/packages/widgets/package.json +++ b/packages/widgets/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/widgets", - "version": "3.26.0-prerelease", + "version": "3.26.0", "description": "Functionality used by the widgets block editor in the Widgets screen and the Customizer.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", diff --git a/packages/wordcount/package.json b/packages/wordcount/package.json index ac9400d8b1e3f8..b8834399c8f283 100644 --- a/packages/wordcount/package.json +++ b/packages/wordcount/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/wordcount", - "version": "3.49.0-prerelease", + "version": "3.49.0", "description": "WordPress word count utility.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", From f6db63174d3d0e29e8ed5f041a7de83cb41ba8ef Mon Sep 17 00:00:00 2001 From: Milen Petrinski Date: Tue, 16 Jan 2024 16:14:29 +0200 Subject: [PATCH 12/71] Add gettext content when translating 'Header'. (#51066) * Add gettext content when translating 'Header'. * Oops, add import for _x(). --- packages/interface/src/components/interface-skeleton/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/interface/src/components/interface-skeleton/index.js b/packages/interface/src/components/interface-skeleton/index.js index baf98d153ed870..8d6a060259a292 100644 --- a/packages/interface/src/components/interface-skeleton/index.js +++ b/packages/interface/src/components/interface-skeleton/index.js @@ -11,7 +11,7 @@ import { __unstableUseNavigateRegions as useNavigateRegions, __unstableMotion as motion, } from '@wordpress/components'; -import { __ } from '@wordpress/i18n'; +import { __, _x } from '@wordpress/i18n'; import { useMergeRefs } from '@wordpress/compose'; /** @@ -68,7 +68,7 @@ function InterfaceSkeleton( const defaultLabels = { /* translators: accessibility text for the top bar landmark region. */ - header: __( 'Header' ), + header: _x( 'Header', 'header landmark area' ), /* translators: accessibility text for the content landmark region. */ body: __( 'Content' ), /* translators: accessibility text for the secondary sidebar landmark region. */ From cdd6cecbc5bbf5ce5f55da0301246acfcf56c426 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Tue, 16 Jan 2024 15:59:16 +0100 Subject: [PATCH 13/71] Components: move CHANGELOG entries under the correct release (#57885) --- packages/components/CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 570c7371072cc7..9a245d85ebf849 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -7,12 +7,17 @@ - `ColorPicker`: improve the UX around HSL sliders ([#57555](https://github.com/WordPress/gutenberg/pull/57555)). - `BoxControl`, `BorderControl`, `BorderBoxControl`: Add opt-in prop for 40px default size ([#56185](https://github.com/WordPress/gutenberg/pull/56185)). - `PaletteEdit`: improve unit tests ([#57645](https://github.com/WordPress/gutenberg/pull/57645)). -- `ColorPalette` and `CircularOptionPicker`: improve unit tests ([#57809](https://github.com/WordPress/gutenberg/pull/57809)). +- `PaletteEdit` and `CircularOptionPicker`: improve unit tests ([#57809](https://github.com/WordPress/gutenberg/pull/57809)). +- `Tooltip`: no-op when nested inside other `Tooltip` components ([#57202](https://github.com/WordPress/gutenberg/pull/57202)). ### Bug Fixes - `ToggleGroupControl`: Improve controlled value detection ([#57770](https://github.com/WordPress/gutenberg/pull/57770)). +### Experimental + +- `BoxControl`: Update design ([#56665](https://github.com/WordPress/gutenberg/pull/56665)). + ## 25.15.0 (2024-01-10) ### Bug Fix @@ -45,7 +50,6 @@ - `InputControl`, `NumberControl`, `UnitControl`, `SelectControl`, `TreeSelect`: Add `compact` size variant ([#57398](https://github.com/WordPress/gutenberg/pull/57398)). - `ToggleGroupControl`: Update button size in large variant to be 32px ([#57338](https://github.com/WordPress/gutenberg/pull/57338)). - `Tooltip`: improve unit tests ([#57345](https://github.com/WordPress/gutenberg/pull/57345)). -- `Tooltip`: no-op when nested inside other `Tooltip` components ([#57202](https://github.com/WordPress/gutenberg/pull/57202)). ### Experimental @@ -53,7 +57,6 @@ - `Tabs`: do not render hidden content ([#57046](https://github.com/WordPress/gutenberg/pull/57046)). - `Tabs`: improve hover and text alignment styles ([#57275](https://github.com/WordPress/gutenberg/pull/57275)). - `Tabs`: make sure `Tab`s are associated to the right `TabPanel`s, regardless of the order they're rendered in ([#57033](https://github.com/WordPress/gutenberg/pull/57033)). -- `BoxControl`: Update design ([#56665](https://github.com/WordPress/gutenberg/pull/56665)). ## 25.14.0 (2023-12-13) From df1819d1626c8b90903d067c45f68bb49f5f8e6b Mon Sep 17 00:00:00 2001 From: Carlos Bravo <37012961+c4rl0sbr4v0@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:08:33 +0100 Subject: [PATCH 14/71] Interactivity API: Prevent the use of components in `wp-text` (#57879) * Allow only strings for wp-text * Update changelog * Update with suggested commit, add try-catch and toString * Update tests, prevent [object Object] * Apply suggestion to preven duplicate evaluate calls * Change changelog --------- Co-authored-by: Luis Herranz --- .../interactive-blocks/directive-text/render.php | 14 ++++++++++++++ .../interactive-blocks/directive-text/view.js | 5 ++++- packages/interactivity/CHANGELOG.md | 4 ++++ packages/interactivity/src/directives.js | 8 +++++++- .../specs/interactivity/directives-text.spec.ts | 9 +++++++++ 5 files changed, 38 insertions(+), 2 deletions(-) diff --git a/packages/e2e-tests/plugins/interactive-blocks/directive-text/render.php b/packages/e2e-tests/plugins/interactive-blocks/directive-text/render.php index 98803669c6b0bc..91d03b6fb8e19a 100644 --- a/packages/e2e-tests/plugins/interactive-blocks/directive-text/render.php +++ b/packages/e2e-tests/plugins/interactive-blocks/directive-text/render.php @@ -34,4 +34,18 @@ Toggle Context Text
+
+ + + +
diff --git a/packages/e2e-tests/plugins/interactive-blocks/directive-text/view.js b/packages/e2e-tests/plugins/interactive-blocks/directive-text/view.js index 82f37f4f78f1fe..12b8ca9488ea10 100644 --- a/packages/e2e-tests/plugins/interactive-blocks/directive-text/view.js +++ b/packages/e2e-tests/plugins/interactive-blocks/directive-text/view.js @@ -1,11 +1,14 @@ /** * WordPress dependencies */ -import { store, getContext } from '@wordpress/interactivity'; +import { store, getContext, createElement } from '@wordpress/interactivity'; const { state } = store( 'directive-context', { state: { text: 'Text 1', + component: () => (createElement( 'div', {}, state.text )), + number: 1, + boolean: true }, actions: { toggleStateText() { diff --git a/packages/interactivity/CHANGELOG.md b/packages/interactivity/CHANGELOG.md index 67b25a7e30ee0e..a67775b781d556 100644 --- a/packages/interactivity/CHANGELOG.md +++ b/packages/interactivity/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Enhancements + +- Prevent the usage of Preact components in `wp-text`. ([#57879](https://github.com/WordPress/gutenberg/pull/57879)) + ### New Features - Add the `data-wp-run` directive along with the `useInit` and `useWatch` hooks. ([57805](https://github.com/WordPress/gutenberg/pull/57805)) diff --git a/packages/interactivity/src/directives.js b/packages/interactivity/src/directives.js index 931fa07493f44d..b31f8ddb4b84d4 100644 --- a/packages/interactivity/src/directives.js +++ b/packages/interactivity/src/directives.js @@ -280,7 +280,13 @@ export default () => { // data-wp-text directive( 'text', ( { directives: { text }, element, evaluate } ) => { const entry = text.find( ( { suffix } ) => suffix === 'default' ); - element.props.children = evaluate( entry ); + try { + const result = evaluate( entry ); + element.props.children = + typeof result === 'object' ? null : result.toString(); + } catch ( e ) { + element.props.children = null; + } } ); // data-wp-run diff --git a/test/e2e/specs/interactivity/directives-text.spec.ts b/test/e2e/specs/interactivity/directives-text.spec.ts index 8e83be26de15ca..3670c5931e15d8 100644 --- a/test/e2e/specs/interactivity/directives-text.spec.ts +++ b/test/e2e/specs/interactivity/directives-text.spec.ts @@ -33,4 +33,13 @@ test.describe( 'data-wp-text', () => { await page.getByTestId( 'toggle context text' ).click(); await expect( el ).toHaveText( 'Text 1' ); } ); + + test( 'Transforms results into strings', async ( { page } ) => { + const elObject = page.getByTestId( 'show state component' ); + await expect( elObject ).toBeHidden(); + const elNumber = page.getByTestId( 'show state number' ); + await expect( elNumber ).toHaveText( '1' ); + const elBool = page.getByTestId( 'show state boolean' ); + await expect( elBool ).toHaveText( 'true' ); + } ); } ); From 2c247e2ae62b5d61dcdf5c634c13c7ccf0731b0d Mon Sep 17 00:00:00 2001 From: Karthik Thayyil <30643833+kt-12@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:29:55 +0000 Subject: [PATCH 15/71] Call variation through callback so it's only loaded when needed - in support of trac 59969 (#56952) * call variation through callback so it's only loaded when needed. * move gutenberg_add_hooked_blocks from 6.4 to 6.5 * cs fixes * fix version number * revert some code * adapting to variation_calback * B/C for plugin * cs fixes * cs fixes * cs fixes * shims to support block variation changes for WP < 6.5 * EOL for PHPCS --- lib/compat/wordpress-6.5/blocks.php | 24 +++++++++++++++++++ lib/load.php | 1 + .../src/navigation-link/index.php | 20 ++++++++++++---- .../block-library/src/post-terms/index.php | 17 +++++++++---- .../block-library/src/template-part/index.php | 4 ++-- phpcs.xml.dist | 2 ++ 6 files changed, 57 insertions(+), 11 deletions(-) create mode 100644 lib/compat/wordpress-6.5/blocks.php diff --git a/lib/compat/wordpress-6.5/blocks.php b/lib/compat/wordpress-6.5/blocks.php new file mode 100644 index 00000000000000..b6890c14dc1f97 --- /dev/null +++ b/lib/compat/wordpress-6.5/blocks.php @@ -0,0 +1,24 @@ + 'render_block_core_navigation_link', - 'variations' => array_merge( $built_ins, $variations ), + 'render_callback' => 'render_block_core_navigation_link', + 'variation_callback' => 'build_navigation_link_block_variations', ) ); } diff --git a/packages/block-library/src/post-terms/index.php b/packages/block-library/src/post-terms/index.php index c97155b81e3a95..44291038383d42 100644 --- a/packages/block-library/src/post-terms/index.php +++ b/packages/block-library/src/post-terms/index.php @@ -59,9 +59,11 @@ function render_block_core_post_terms( $attributes, $content, $block ) { } /** - * Registers the `core/post-terms` block on the server. + * Returns the available variations for the `core/post-terms` block. + * + * @return array The available variations for the block. */ -function register_block_core_post_terms() { +function build_post_term_block_variations() { $taxonomies = get_taxonomies( array( 'publicly_queryable' => true, @@ -103,11 +105,18 @@ function register_block_core_post_terms() { } } + return array_merge( $built_ins, $custom_variations ); +} + +/** + * Registers the `core/post-terms` block on the server. + */ +function register_block_core_post_terms() { register_block_type_from_metadata( __DIR__ . '/post-terms', array( - 'render_callback' => 'render_block_core_post_terms', - 'variations' => array_merge( $built_ins, $custom_variations ), + 'render_callback' => 'render_block_core_post_terms', + 'variation_callback' => 'build_post_term_block_variations', ) ); } diff --git a/packages/block-library/src/template-part/index.php b/packages/block-library/src/template-part/index.php index 0c97f88b98e386..86a17f33c92f39 100644 --- a/packages/block-library/src/template-part/index.php +++ b/packages/block-library/src/template-part/index.php @@ -281,8 +281,8 @@ function register_block_core_template_part() { register_block_type_from_metadata( __DIR__ . '/template-part', array( - 'render_callback' => 'render_block_core_template_part', - 'variations' => build_template_part_block_variations(), + 'render_callback' => 'render_block_core_template_part', + 'variation_callback' => 'build_template_part_block_variations', ) ); } diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 21f3fcb8baee16..03a590d21644fd 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -115,6 +115,8 @@ + + From 56c02a0f5736ff577e41880942c19333883db028 Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Tue, 16 Jan 2024 21:35:26 +0100 Subject: [PATCH 16/71] Data: fix memoized createRegistrySelector (#57888) --- packages/data/src/factory.js | 15 ++- packages/data/src/test/registry-selectors.js | 135 +++++++++++++++++++ 2 files changed, 146 insertions(+), 4 deletions(-) create mode 100644 packages/data/src/test/registry-selectors.js diff --git a/packages/data/src/factory.js b/packages/data/src/factory.js index a4adc4dcf42517..389c4a7e2b33ab 100644 --- a/packages/data/src/factory.js +++ b/packages/data/src/factory.js @@ -39,11 +39,18 @@ * @return {Function} Registry selector that can be registered with a store. */ export function createRegistrySelector( registrySelector ) { + let selector; + let lastRegistry; // Create a selector function that is bound to the registry referenced by `selector.registry` // and that has the same API as a regular selector. Binding it in such a way makes it // possible to call the selector directly from another selector. - const selector = ( ...args ) => - registrySelector( selector.registry.select )( ...args ); + const wrappedSelector = ( ...args ) => { + if ( ! selector || lastRegistry !== wrappedSelector.registry ) { + selector = registrySelector( wrappedSelector.registry.select ); + lastRegistry = wrappedSelector.registry; + } + return selector( ...args ); + }; /** * Flag indicating that the selector is a registry selector that needs the correct registry @@ -52,9 +59,9 @@ export function createRegistrySelector( registrySelector ) { * * @type {boolean} */ - selector.isRegistrySelector = true; + wrappedSelector.isRegistrySelector = true; - return selector; + return wrappedSelector; } /** diff --git a/packages/data/src/test/registry-selectors.js b/packages/data/src/test/registry-selectors.js new file mode 100644 index 00000000000000..bc567474541e24 --- /dev/null +++ b/packages/data/src/test/registry-selectors.js @@ -0,0 +1,135 @@ +/** + * External dependencies + */ +import createSelector from 'rememo'; + +/** + * Internal dependencies + */ +import { createRegistry } from '../registry'; +import { createRegistrySelector } from '../factory'; +import createReduxStore from '../redux-store'; + +const getElementCount = createRegistrySelector( ( select ) => () => { + return select( 'elements' ).getElements().length; +} ); + +const getFilterValue = ( state ) => state; + +const getFilteredElements = createRegistrySelector( ( select ) => + createSelector( + ( state ) => { + const filter = getFilterValue( state ); + const elements = select( 'elements' ).getElements(); + if ( ! filter ) { + return elements; + } + return elements.filter( ( el ) => el.startsWith( filter ) ); + }, + ( state ) => [ + select( 'elements' ).getElements(), + getFilterValue( state ), + ] + ) +); + +const elementsStore = createReduxStore( 'elements', { + reducer( state = [], action ) { + if ( action.type === 'ADD' ) { + return [ ...state, ...action.elements ]; + } + return state; + }, + actions: { + add: ( ...elements ) => ( { type: 'ADD', elements } ), + }, + selectors: { + getElements: ( state ) => state, + }, +} ); + +const uiStore = createReduxStore( 'ui', { + reducer( state = '', action ) { + if ( action.type === 'FILTER' ) { + return action.value; + } + return state; + }, + actions: { + filter: ( value ) => ( { type: 'FILTER', value } ), + }, + selectors: { + getFilterValue, + getElementCount, + getFilteredElements, + }, +} ); + +describe( 'createRegistrySelector', () => { + it( 'can bind one selector to a registry', () => { + const registry = createRegistry(); + registry.register( elementsStore ); + registry.register( uiStore ); + + expect( registry.select( uiStore ).getElementCount() ).toBe( 0 ); + + registry.dispatch( elementsStore ).add( 'Carbon' ); + + expect( registry.select( uiStore ).getElementCount() ).toBe( 1 ); + } ); + + // Even without createSelector, this fails in trunk. + it.skip( 'can bind one selector to multiple registries', () => { + const registry1 = createRegistry(); + const registry2 = createRegistry(); + + registry1.register( elementsStore ); + registry1.register( uiStore ); + registry2.register( elementsStore ); + registry2.register( uiStore ); + + expect( registry1.select( uiStore ).getElementCount() ).toBe( 0 ); + expect( registry2.select( uiStore ).getElementCount() ).toBe( 0 ); + + registry1.dispatch( elementsStore ).add( 'Carbon' ); + + expect( registry1.select( uiStore ).getElementCount() ).toBe( 1 ); + expect( registry2.select( uiStore ).getElementCount() ).toBe( 0 ); + + registry2.dispatch( elementsStore ).add( 'Helium' ); + + expect( registry1.select( uiStore ).getElementCount() ).toBe( 1 ); + expect( registry2.select( uiStore ).getElementCount() ).toBe( 1 ); + } ); + + it( 'can bind a memoized selector to a registry', () => { + const registry = createRegistry(); + registry.register( elementsStore ); + registry.register( uiStore ); + + registry.dispatch( elementsStore ).add( 'Carbon', 'Nitrogen' ); + registry.dispatch( uiStore ).filter( 'Ca' ); + + // check that `getFilteredElements` return value is a memoized array + const elements1 = registry.select( uiStore ).getFilteredElements(); + expect( elements1 ).toEqual( [ 'Carbon' ] ); + const elements2 = registry.select( uiStore ).getFilteredElements(); + expect( elements2 ).toBe( elements1 ); // memoized + + // check that adding a new element triggers recalculation + registry.dispatch( elementsStore ).add( 'Calcium' ); + + const elements3 = registry.select( uiStore ).getFilteredElements(); + expect( elements3 ).toEqual( [ 'Carbon', 'Calcium' ] ); + const elements4 = registry.select( uiStore ).getFilteredElements(); + expect( elements4 ).toBe( elements3 ); // memoized + + // check that changing the filter triggers recalculation + registry.dispatch( uiStore ).filter( 'Ni' ); + + const elements5 = registry.select( uiStore ).getFilteredElements(); + expect( elements5 ).toEqual( [ 'Nitrogen' ] ); + const elements6 = registry.select( uiStore ).getFilteredElements(); + expect( elements6 ).toBe( elements5 ); // memoized + } ); +} ); From f478dfe29742602533d4a26c2f12c4bd68556cf0 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Wed, 17 Jan 2024 08:37:35 +0900 Subject: [PATCH 17/71] Button: Improve `disabled`-related prop descriptions (#57864) --- packages/components/src/button/README.md | 2 +- packages/components/src/button/types.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/components/src/button/README.md b/packages/components/src/button/README.md index 3f577991dc44be..a8cdcf82c96657 100644 --- a/packages/components/src/button/README.md +++ b/packages/components/src/button/README.md @@ -135,7 +135,7 @@ An accessible description for the button. #### `disabled`: `boolean` -Whether the button is disabled. If `true`, this will force a `button` element to be rendered. +Whether the button is disabled. If `true`, this will force a `button` element to be rendered, even when an `href` is given. - Required: No diff --git a/packages/components/src/button/types.ts b/packages/components/src/button/types.ts index b781786cc12711..e728739806af79 100644 --- a/packages/components/src/button/types.ts +++ b/packages/components/src/button/types.ts @@ -115,7 +115,9 @@ type BaseButtonProps = { */ variant?: 'primary' | 'secondary' | 'tertiary' | 'link'; /** - * Whether this is focusable. + * Whether to keep the button focusable when disabled. + * + * @default false */ __experimentalIsFocusable?: boolean; }; @@ -123,7 +125,8 @@ type BaseButtonProps = { type _ButtonProps = { /** * Whether the button is disabled. - * If `true`, this will force a `button` element to be rendered. + * + * If `true`, this will force a `button` element to be rendered, even when an `href` is given. */ disabled?: boolean; }; @@ -131,7 +134,8 @@ type _ButtonProps = { type AnchorProps = { /** * Whether the button is disabled. - * If `true`, this will force a `button` element to be rendered. + * + * If `true`, this will force a `button` element to be rendered, even when an `href` is given. */ disabled?: false; /** From 6c0cd1139548bc236668d535eb63a1a00aeba9c0 Mon Sep 17 00:00:00 2001 From: Ramon Date: Wed, 17 Jan 2024 10:44:13 +1100 Subject: [PATCH 18/71] Fluid typography: do not calculate fluid font size when min and max viewport widths are equal (#57866) * When the same value is provided for min and max viewport widths in the fluid typography config, do not calculate fluid typography values and return null. We could provide a fallback from the default values in gutenberg_get_typography_font_size_value() but I think it might be better to bypass returning clamp values altogether because fundamentally, the input is wrong. * Comment --- lib/block-supports/typography.php | 14 +++++++++++--- .../src/components/font-sizes/fluid-utils.js | 10 ++++++++-- .../src/components/font-sizes/test/fluid-utils.js | 9 +++++++++ phpunit/block-supports/typography-test.php | 10 ++++++++++ 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/lib/block-supports/typography.php b/lib/block-supports/typography.php index 3cda86cf0a2573..b3fa4b4252eed2 100644 --- a/lib/block-supports/typography.php +++ b/lib/block-supports/typography.php @@ -401,10 +401,18 @@ function gutenberg_get_computed_fluid_typography_value( $args = array() ) { return null; } - // Build CSS rule. - // Borrowed from https://websemantics.uk/tools/responsive-font-calculator/. + // Calculates the linear factor denominator. If it's 0, we cannot calculate a fluid value. + $linear_factor_denominator = $maximum_viewport_width['value'] - $minimum_viewport_width['value']; + if ( empty( $linear_factor_denominator ) ) { + return null; + } + + /* + * Build CSS rule. + * Borrowed from https://websemantics.uk/tools/responsive-font-calculator/. + */ $view_port_width_offset = round( $minimum_viewport_width['value'] / 100, 3 ) . $font_size_unit; - $linear_factor = 100 * ( ( $maximum_font_size['value'] - $minimum_font_size['value'] ) / ( $maximum_viewport_width['value'] - $minimum_viewport_width['value'] ) ); + $linear_factor = 100 * ( ( $maximum_font_size['value'] - $minimum_font_size['value'] ) / ( $linear_factor_denominator ) ); $linear_factor_scaled = round( $linear_factor * $scale_factor, 3 ); $linear_factor_scaled = empty( $linear_factor_scaled ) ? 1 : $linear_factor_scaled; $fluid_target_font_size = implode( '', $minimum_font_size_rem ) . " + ((1vw - $view_port_width_offset) * $linear_factor_scaled)"; diff --git a/packages/block-editor/src/components/font-sizes/fluid-utils.js b/packages/block-editor/src/components/font-sizes/fluid-utils.js index b26d542708c375..595011b68bafb6 100644 --- a/packages/block-editor/src/components/font-sizes/fluid-utils.js +++ b/packages/block-editor/src/components/font-sizes/fluid-utils.js @@ -181,6 +181,13 @@ export function getComputedFluidTypographyValue( { return null; } + // Calculates the linear factor denominator. If it's 0, we cannot calculate a fluid value. + const linearDenominator = + maximumViewportWidthParsed.value - minimumViewportWidthParsed.value; + if ( ! linearDenominator ) { + return null; + } + // Build CSS rule. // Borrowed from https://websemantics.uk/tools/responsive-font-calculator/. const minViewportWidthOffsetValue = roundToPrecision( @@ -193,8 +200,7 @@ export function getComputedFluidTypographyValue( { const linearFactor = 100 * ( ( maximumFontSizeParsed.value - minimumFontSizeParsed.value ) / - ( maximumViewportWidthParsed.value - - minimumViewportWidthParsed.value ) ); + linearDenominator ); const linearFactorScaled = roundToPrecision( ( linearFactor || 1 ) * scaleFactor, 3 diff --git a/packages/block-editor/src/components/font-sizes/test/fluid-utils.js b/packages/block-editor/src/components/font-sizes/test/fluid-utils.js index 0a1092a1d8128c..27b1cfe8c994a0 100644 --- a/packages/block-editor/src/components/font-sizes/test/fluid-utils.js +++ b/packages/block-editor/src/components/font-sizes/test/fluid-utils.js @@ -64,6 +64,15 @@ describe( 'getComputedFluidTypographyValue()', () => { ); } ); + it( 'should return `null` when maximum and minimum viewport width are equal', () => { + const fluidTypographyValues = getComputedFluidTypographyValue( { + fontSize: '30px', + minimumViewportWidth: '500px', + maximumViewportWidth: '500px', + } ); + expect( fluidTypographyValues ).toBeNull(); + } ); + it( 'should return a fluid font size when given a scale factor', () => { const fluidTypographyValues = getComputedFluidTypographyValue( { fontSize: '30px', diff --git a/phpunit/block-supports/typography-test.php b/phpunit/block-supports/typography-test.php index f6d5344222678c..ec7df51317a3f4 100644 --- a/phpunit/block-supports/typography-test.php +++ b/phpunit/block-supports/typography-test.php @@ -933,6 +933,16 @@ public function data_get_computed_fluid_typography_value() { ), 'expected_output' => 'clamp(50px, 3.125rem + ((1vw - 3.2px) * 7.353), 100px)', ), + 'returns `null` when maximum and minimum viewport width are equal' => array( + 'args' => array( + 'minimum_viewport_width' => '800px', + 'maximum_viewport_width' => '800px', + 'minimum_font_size' => '50px', + 'maximum_font_size' => '100px', + 'scale_factor' => 1, + ), + 'expected_output' => null, + ), 'returns `null` when `maximum_viewport_width` is an unsupported unit' => array( 'args' => array( 'minimum_viewport_width' => '320px', From e84b38d63688b2ea9c96a974962d5cee663102ef Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Wed, 17 Jan 2024 10:50:13 +0800 Subject: [PATCH 19/71] Allow heading and button in Pattern Overrides (#57789) * Allow heading and button in Pattern Overrides * Allow url for button --- lib/block-supports/pattern.php | 3 ++- package-lock.json | 2 ++ packages/block-library/package.json | 1 + packages/block-library/src/block/edit.js | 10 ++++++++-- packages/patterns/src/constants.js | 5 +++++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/block-supports/pattern.php b/lib/block-supports/pattern.php index 2f7717091ff506..7c344d669e1f91 100644 --- a/lib/block-supports/pattern.php +++ b/lib/block-supports/pattern.php @@ -13,7 +13,8 @@ * @param WP_Block_Type $block_type Block Type. */ function gutenberg_register_pattern_support( $block_type ) { - $pattern_support = 'core/paragraph' === $block_type->name ? true : false; + global $block_bindings_allowed_blocks; + $pattern_support = array_key_exists( $block_type->name, $block_bindings_allowed_blocks ); if ( $pattern_support ) { if ( ! $block_type->uses_context ) { diff --git a/package-lock.json b/package-lock.json index b74f66298d7876..85e61fb71c594e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54123,6 +54123,7 @@ "@wordpress/interactivity": "file:../interactivity", "@wordpress/keycodes": "file:../keycodes", "@wordpress/notices": "file:../notices", + "@wordpress/patterns": "file:../patterns", "@wordpress/primitives": "file:../primitives", "@wordpress/private-apis": "file:../private-apis", "@wordpress/reusable-blocks": "file:../reusable-blocks", @@ -69271,6 +69272,7 @@ "@wordpress/interactivity": "file:../interactivity", "@wordpress/keycodes": "file:../keycodes", "@wordpress/notices": "file:../notices", + "@wordpress/patterns": "file:../patterns", "@wordpress/primitives": "file:../primitives", "@wordpress/private-apis": "file:../private-apis", "@wordpress/reusable-blocks": "file:../reusable-blocks", diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 49cbc294157188..12f4e23d9da4d0 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -53,6 +53,7 @@ "@wordpress/interactivity": "file:../interactivity", "@wordpress/keycodes": "file:../keycodes", "@wordpress/notices": "file:../notices", + "@wordpress/patterns": "file:../patterns", "@wordpress/primitives": "file:../primitives", "@wordpress/private-apis": "file:../private-apis", "@wordpress/reusable-blocks": "file:../reusable-blocks", diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index 6331d33c27a7bb..9d03accb1204c0 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -27,6 +27,7 @@ import { store as blockEditorStore, BlockControls, } from '@wordpress/block-editor'; +import { privateApis as patternsPrivateApis } from '@wordpress/patterns'; import { parse, cloneBlock } from '@wordpress/blocks'; /** @@ -35,10 +36,13 @@ import { parse, cloneBlock } from '@wordpress/blocks'; import { unlock } from '../lock-unlock'; const { useLayoutClasses } = unlock( blockEditorPrivateApis ); +const { PARTIAL_SYNCING_SUPPORTED_BLOCKS } = unlock( patternsPrivateApis ); function isPartiallySynced( block ) { return ( - 'core/paragraph' === block.name && + Object.keys( PARTIAL_SYNCING_SUPPORTED_BLOCKS ).includes( + block.name + ) && !! block.attributes.metadata?.bindings && Object.values( block.attributes.metadata.bindings ).some( ( binding ) => binding.source.name === 'pattern_attributes' @@ -100,7 +104,7 @@ function applyInitialOverrides( blocks, overrides = {}, defaultValues ) { defaultValues[ blockId ] ??= {}; defaultValues[ blockId ][ attributeKey ] = block.attributes[ attributeKey ]; - if ( overrides[ blockId ] ) { + if ( overrides[ blockId ]?.[ attributeKey ] !== undefined ) { newAttributes[ attributeKey ] = overrides[ blockId ][ attributeKey ]; } @@ -130,6 +134,8 @@ function getOverridesFromBlocks( blocks, defaultValues ) { defaultValues[ blockId ][ attributeKey ] ) { overrides[ blockId ] ??= {}; + // TODO: We need a way to represent `undefined` in the serialized overrides. + // Also see: https://github.com/WordPress/gutenberg/pull/57249#discussion_r1452987871 overrides[ blockId ][ attributeKey ] = block.attributes[ attributeKey ]; } diff --git a/packages/patterns/src/constants.js b/packages/patterns/src/constants.js index 3e533d834fd75c..4a9f769658b2ec 100644 --- a/packages/patterns/src/constants.js +++ b/packages/patterns/src/constants.js @@ -23,4 +23,9 @@ export const PATTERN_SYNC_TYPES = { // TODO: This should not be hardcoded. Maybe there should be a config and/or an UI. export const PARTIAL_SYNCING_SUPPORTED_BLOCKS = { 'core/paragraph': { content: __( 'Content' ) }, + 'core/heading': { content: __( 'Content' ) }, + 'core/button': { + text: __( 'Text' ), + url: __( 'URL' ), + }, }; From 2881d64848d24dc9975566cb1f89f79a56658873 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Wed, 17 Jan 2024 14:05:43 +0800 Subject: [PATCH 20/71] Add a control to reset pattern overrides (#57845) * Add a control to reset pattern overrides * Address code reviews * Don't render reset button when there is no binding blocks * Set the `__experimentalIsFocusable` prop on the Reset to original toolbar button so that it maintains focus --------- Co-authored-by: Daniel Richards --- packages/block-library/src/block/edit.js | 46 +++++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index 9d03accb1204c0..c53f52bfb703e9 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -153,6 +153,13 @@ function setBlockEditMode( setEditMode, blocks, mode ) { } ); } +function getHasOverridableBlocks( blocks ) { + return blocks.some( ( block ) => { + if ( isPartiallySynced( block ) ) return true; + return getHasOverridableBlocks( block.innerBlocks ); + } ); +} + export default function ReusableBlockEdit( { name, attributes: { ref, overrides }, @@ -214,15 +221,23 @@ export default function ReusableBlockEdit( { [ innerBlocks, setBlockEditingMode ] ); - // Apply the initial overrides from the pattern block to the inner blocks. - useEffect( () => { - const initialBlocks = + const hasOverridableBlocks = useMemo( + () => getHasOverridableBlocks( innerBlocks ), + [ innerBlocks ] + ); + + const initialBlocks = useMemo( + () => // Clone the blocks to generate new client IDs. editedRecord.blocks?.map( ( block ) => cloneBlock( block ) ) ?? ( editedRecord.content && typeof editedRecord.content !== 'function' ? parse( editedRecord.content ) - : [] ); + : [] ), + [ editedRecord.blocks, editedRecord.content ] + ); + // Apply the initial overrides from the pattern block to the inner blocks. + useEffect( () => { defaultValuesRef.current = {}; const editingMode = getBlockEditingMode( patternClientId ); // Replace the contents of the blocks with the overrides. @@ -243,7 +258,7 @@ export default function ReusableBlockEdit( { }, [ __unstableMarkNextChangeAsNotPersistent, patternClientId, - editedRecord, + initialBlocks, replaceInnerBlocks, registry, getBlockEditingMode, @@ -299,6 +314,12 @@ export default function ReusableBlockEdit( { editOriginalProps.onClick( event ); }; + const resetOverrides = () => { + if ( overrides ) { + replaceInnerBlocks( patternClientId, initialBlocks ); + } + }; + let children = null; if ( hasAlreadyRendered ) { @@ -339,6 +360,21 @@ export default function ReusableBlockEdit( { ) } + + { hasOverridableBlocks && ( + + + + { __( 'Reset to original' ) } + + + + ) } + { children === null ? (
) : ( From aec6947ee08c32e7c16ef0cdd65e63ba0c14ede1 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Wed, 17 Jan 2024 16:33:52 +0800 Subject: [PATCH 21/71] Remove text align control for paragraph, heading, and button in contentOnly editing mode (#57906) * Remove text align control for paragraphs and buttons in contentOnly editing mode * Remove heading level and text align on content only mode heading blocks * Add a react native edit file for the heading block that does not use useBlockEditingMode --- packages/block-library/src/button/edit.js | 16 +- packages/block-library/src/heading/edit.js | 32 ++-- .../block-library/src/heading/edit.native.js | 144 ++++++++++++++++++ packages/block-library/src/paragraph/edit.js | 42 ++--- 4 files changed, 195 insertions(+), 39 deletions(-) create mode 100644 packages/block-library/src/heading/edit.native.js diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js index d41d917d5b8fe1..b46e145d760ad5 100644 --- a/packages/block-library/src/button/edit.js +++ b/packages/block-library/src/button/edit.js @@ -35,6 +35,7 @@ import { __experimentalLinkControl as LinkControl, __experimentalGetElementClassName, store as blockEditorStore, + useBlockEditingMode, } from '@wordpress/block-editor'; import { displayShortcut, isKeyboardEvent, ENTER } from '@wordpress/keycodes'; import { link, linkOff } from '@wordpress/icons'; @@ -189,6 +190,7 @@ function ButtonEdit( props ) { ref: useMergeRefs( [ setPopoverAnchor, ref ] ), onKeyDown, } ); + const blockEditingMode = useBlockEditingMode(); const [ isEditingURL, setIsEditingURL ] = useState( false ); const isURLSet = !! url; @@ -277,12 +279,14 @@ function ButtonEdit( props ) { />
- { - setAttributes( { textAlign: nextAlign } ); - } } - /> + { blockEditingMode === 'default' && ( + { + setAttributes( { textAlign: nextAlign } ); + } } + /> + ) } { ! isURLSet && isLinkTag && ( { const { getGlobalBlockCount, getSettings } = select( blockEditorStore ); @@ -90,20 +92,22 @@ function HeadingEdit( { return ( <> - - - setAttributes( { level: newLevel } ) - } - /> - { - setAttributes( { textAlign: nextAlign } ); - } } - /> - + { blockEditingMode === 'default' && ( + + + setAttributes( { level: newLevel } ) + } + /> + { + setAttributes( { textAlign: nextAlign } ); + } } + /> + + ) } { + const { getGlobalBlockCount, getSettings } = select( blockEditorStore ); + const settings = getSettings(); + + return { + canGenerateAnchors: + !! settings.generateAnchors || + getGlobalBlockCount( 'core/table-of-contents' ) > 0, + }; + }, [] ); + + const { __unstableMarkNextChangeAsNotPersistent } = + useDispatch( blockEditorStore ); + + // Initially set anchor for headings that have content but no anchor set. + // This is used when transforming a block to heading, or for legacy anchors. + useEffect( () => { + if ( ! canGenerateAnchors ) { + return; + } + + if ( ! anchor && content ) { + // This side-effect should not create an undo level. + __unstableMarkNextChangeAsNotPersistent(); + setAttributes( { + anchor: generateAnchor( clientId, content ), + } ); + } + setAnchor( clientId, anchor ); + + // Remove anchor map when block unmounts. + return () => setAnchor( clientId, null ); + }, [ anchor, content, clientId, canGenerateAnchors ] ); + + const onContentChange = ( value ) => { + const newAttrs = { content: value }; + if ( + canGenerateAnchors && + ( ! anchor || + ! value || + generateAnchor( clientId, content ) === anchor ) + ) { + newAttrs.anchor = generateAnchor( clientId, value ); + } + setAttributes( newAttrs ); + }; + + return ( + <> + + + setAttributes( { level: newLevel } ) + } + /> + { + setAttributes( { textAlign: nextAlign } ); + } } + /> + + { + let block; + + if ( isOriginal || value ) { + block = createBlock( 'core/heading', { + ...attributes, + content: value, + } ); + } else { + block = createBlock( + getDefaultBlockName() ?? 'core/heading' + ); + } + + if ( isOriginal ) { + block.clientId = clientId; + } + + return block; + } } + onReplace={ onReplace } + onRemove={ () => onReplace( [] ) } + placeholder={ placeholder || __( 'Heading' ) } + textAlign={ textAlign } + { ...( Platform.isNative && { deleteEnter: true } ) } // setup RichText on native mobile to delete the "Enter" key as it's handled by the JS/RN side + { ...blockProps } + /> + + ); +} + +export default HeadingEdit; diff --git a/packages/block-library/src/paragraph/edit.js b/packages/block-library/src/paragraph/edit.js index ac766f69dd846a..cecfdce474c51a 100644 --- a/packages/block-library/src/paragraph/edit.js +++ b/packages/block-library/src/paragraph/edit.js @@ -19,6 +19,7 @@ import { RichText, useBlockProps, useSettings, + useBlockEditingMode, } from '@wordpress/block-editor'; import { createBlock } from '@wordpress/blocks'; import { formatLtr } from '@wordpress/icons'; @@ -108,28 +109,31 @@ function ParagraphBlock( { } ), style: { direction }, } ); + const blockEditingMode = useBlockEditingMode(); return ( <> - - - setAttributes( { - align: newAlign, - dropCap: hasDropCapDisabled( newAlign ) - ? false - : dropCap, - } ) - } - /> - - setAttributes( { direction: newDirection } ) - } - /> - + { blockEditingMode === 'default' && ( + + + setAttributes( { + align: newAlign, + dropCap: hasDropCapDisabled( newAlign ) + ? false + : dropCap, + } ) + } + /> + + setAttributes( { direction: newDirection } ) + } + /> + + ) } Date: Wed, 17 Jan 2024 17:30:46 +0800 Subject: [PATCH 22/71] Add image block support for pattern overrides (#57909) * Add image block support for pattern overrides * Hide the crop controls in content only mode * Revert "Hide the crop controls in content only mode" This reverts commit 2cf4c3cc71831139dec2fea4ad72c1a8995eed1f. --- packages/patterns/src/constants.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/patterns/src/constants.js b/packages/patterns/src/constants.js index 4a9f769658b2ec..5fa9ec44f4e3aa 100644 --- a/packages/patterns/src/constants.js +++ b/packages/patterns/src/constants.js @@ -28,4 +28,9 @@ export const PARTIAL_SYNCING_SUPPORTED_BLOCKS = { text: __( 'Text' ), url: __( 'URL' ), }, + 'core/image': { + url: __( 'URL' ), + title: __( 'Title' ), + alt: __( 'Alt Text' ), + }, }; From b77d9f480068e794ef73b7a76c00a5ef3d84c719 Mon Sep 17 00:00:00 2001 From: Birgit Pauli-Haack Date: Wed, 17 Jan 2024 11:32:47 +0100 Subject: [PATCH 23/71] Update versions-in-wordpress.md (#57916) --- docs/contributors/versions-in-wordpress.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/contributors/versions-in-wordpress.md b/docs/contributors/versions-in-wordpress.md index 4449f13996c629..ce9eb458e73723 100644 --- a/docs/contributors/versions-in-wordpress.md +++ b/docs/contributors/versions-in-wordpress.md @@ -6,6 +6,7 @@ If anything looks incorrect here, please bring it up in #core-editor in [WordPre | Gutenberg Versions | WordPress Version | | ------------------ | ----------------- | +| 16.2-16.7 | 6.4.2 | | 16.2-16.7 | 6.4.1 | | 16.2-16.7 | 6.4 | | 15.2-16.1 | 6.3.1 | From e1598cf6b3333661e804de21e3eba86a74278738 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Wed, 17 Jan 2024 11:48:38 +0100 Subject: [PATCH 24/71] Use ClipboardJS latest version and clean up focus loss workaround. (#57156) Co-authored-by: Carolina Nymark --- package-lock.json | 46 ++++++++++--------- packages/compose/package.json | 2 +- .../src/hooks/use-copy-to-clipboard/index.js | 3 -- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 85e61fb71c594e..af61124db82df9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21922,16 +21922,6 @@ "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", "dev": true }, - "node_modules/clipboard": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz", - "integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==", - "dependencies": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, "node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -54389,7 +54379,7 @@ "@wordpress/priority-queue": "file:../priority-queue", "@wordpress/undo-manager": "file:../undo-manager", "change-case": "^4.1.2", - "clipboard": "^2.0.8", + "clipboard": "^2.0.11", "mousetrap": "^1.6.5", "use-memo-one": "^1.1.1" }, @@ -54400,6 +54390,16 @@ "react": "^18.0.0" } }, + "packages/compose/node_modules/clipboard": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", + "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", + "dependencies": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, "packages/core-commands": { "name": "@wordpress/core-commands", "version": "0.18.0", @@ -69475,9 +69475,21 @@ "@wordpress/priority-queue": "file:../priority-queue", "@wordpress/undo-manager": "file:../undo-manager", "change-case": "^4.1.2", - "clipboard": "^2.0.8", + "clipboard": "^2.0.11", "mousetrap": "^1.6.5", "use-memo-one": "^1.1.1" + }, + "dependencies": { + "clipboard": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", + "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + } } }, "@wordpress/core-commands": { @@ -73684,16 +73696,6 @@ "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", "dev": true }, - "clipboard": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz", - "integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==", - "requires": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", diff --git a/packages/compose/package.json b/packages/compose/package.json index 851d3025b50a15..63ebb740de6fa1 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -39,7 +39,7 @@ "@wordpress/priority-queue": "file:../priority-queue", "@wordpress/undo-manager": "file:../undo-manager", "change-case": "^4.1.2", - "clipboard": "^2.0.8", + "clipboard": "^2.0.11", "mousetrap": "^1.6.5", "use-memo-one": "^1.1.1" }, diff --git a/packages/compose/src/hooks/use-copy-to-clipboard/index.js b/packages/compose/src/hooks/use-copy-to-clipboard/index.js index 1d838a1158ecfb..94ab6048a4b467 100644 --- a/packages/compose/src/hooks/use-copy-to-clipboard/index.js +++ b/packages/compose/src/hooks/use-copy-to-clipboard/index.js @@ -54,9 +54,6 @@ export default function useCopyToClipboard( text, onSuccess ) { // button, ensuring that it is not reset to the body, and // further that it is kept within the rendered node. clearSelection(); - // Handle ClipboardJS focus bug, see - // https://github.com/zenorocha/clipboard.js/issues/680 - node.focus(); if ( onSuccessRef.current ) { onSuccessRef.current(); From 176617b7d98ba1c643cd92c19f2dc23bfebfe84d Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Wed, 17 Jan 2024 13:00:21 +0200 Subject: [PATCH 25/71] Fix visual indication of switch to default template in the post editor (#57718) * Fix visual indication of switch to default template in the post editor * fix logic for request template resolution * fix template resolution in site editor * add e2e test --- packages/edit-post/src/store/selectors.js | 27 ++++++++++---- .../use-init-edited-entity-from-url.js | 19 ++++++++-- .../various/post-editor-template-mode.spec.js | 36 +++++++++++++++++++ 3 files changed, 74 insertions(+), 8 deletions(-) diff --git a/packages/edit-post/src/store/selectors.js b/packages/edit-post/src/store/selectors.js index b6a54dfd0de2cb..1a39a516da8f52 100644 --- a/packages/edit-post/src/store/selectors.js +++ b/packages/edit-post/src/store/selectors.js @@ -594,12 +594,27 @@ export const getEditedPostTemplate = createRegistrySelector( } const post = select( editorStore ).getCurrentPost(); - if ( post.link ) { - return select( coreStore ).__experimentalGetTemplateForLink( - post.link - ); + let slugToCheck; + // In `draft` status we might not have a slug available, so we use the `single` + // post type templates slug(ex page, single-post, single-product etc..). + // Pages do not need the `single` prefix in the slug to be prioritized + // through template hierarchy. + if ( post.slug ) { + slugToCheck = + post.type === 'page' + ? `${ post.type }-${ post.slug }` + : `single-${ post.type }-${ post.slug }`; + } else { + slugToCheck = + post.type === 'page' ? 'page' : `single-${ post.type }`; } - - return null; + const defaultTemplateId = select( coreStore ).getDefaultTemplateId( { + slug: slugToCheck, + } ); + return select( coreStore ).getEditedEntityRecord( + 'postType', + 'wp_template', + defaultTemplateId + ); } ); diff --git a/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js b/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js index 7b1321fdf4b8ac..36056cf4b43bda 100644 --- a/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +++ b/packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js @@ -128,10 +128,25 @@ function useResolveEditedEntityAndContext( { postId, postType } ) { return currentTemplate.id; } } - // If no template is assigned, use the default template. + let slugToCheck; + // In `draft` status we might not have a slug available, so we use the `single` + // post type templates slug(ex page, single-post, single-product etc..). + // Pages do not need the `single` prefix in the slug to be prioritized + // through template hierarchy. + if ( editedEntity.slug ) { + slugToCheck = + postTypeToResolve === 'page' + ? `${ postTypeToResolve }-${ editedEntity.slug }` + : `single-${ postTypeToResolve }-${ editedEntity.slug }`; + } else { + slugToCheck = + postTypeToResolve === 'page' + ? 'page' + : `single-${ postTypeToResolve }`; + } return getDefaultTemplateId( { - slug: `${ postTypeToResolve }-${ editedEntity?.slug }`, + slug: slugToCheck, } ); } diff --git a/test/e2e/specs/editor/various/post-editor-template-mode.spec.js b/test/e2e/specs/editor/various/post-editor-template-mode.spec.js index 021199cc094950..6d6a36eab9b1d9 100644 --- a/test/e2e/specs/editor/various/post-editor-template-mode.spec.js +++ b/test/e2e/specs/editor/various/post-editor-template-mode.spec.js @@ -70,6 +70,42 @@ test.describe( 'Post Editor Template mode', () => { ).toBeVisible(); } ); + test( 'Swap templates and proper template resolution when switching to default template', async ( { + editor, + page, + requestUtils, + postEditorTemplateMode, + } ) => { + await requestUtils.activateTheme( 'emptytheme' ); + await postEditorTemplateMode.createPostAndSaveDraft(); + await page.reload(); + await postEditorTemplateMode.disableTemplateWelcomeGuide(); + await postEditorTemplateMode.openTemplatePopover(); + // Swap to a custom template, save and reload. + await page + .getByRole( 'menuitem', { + name: 'Swap template', + } ) + .click(); + await page + .getByRole( 'option', { + name: 'Custom', + } ) + .click(); + await editor.saveDraft(); + await page.reload(); + // Swap to the default template. + await postEditorTemplateMode.openTemplatePopover(); + await page + .getByRole( 'menuitem', { + name: 'Use default template', + } ) + .click(); + await expect( + page.getByRole( 'button', { name: 'Template options' } ) + ).toHaveText( 'Single Entries' ); + } ); + test( 'Allow creating custom block templates in classic themes', async ( { editor, page, From 7ae7564d2a5d82bce28bfe66c1f3f9c529c6f5e2 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Wed, 17 Jan 2024 12:22:43 +0100 Subject: [PATCH 26/71] Tidy up patterns selectors (#57913) --- .../src/store/private-selectors.js | 32 ++++----- packages/block-editor/src/store/selectors.js | 60 +++++----------- packages/block-editor/src/store/utils.js | 69 ++++++++++++------- 3 files changed, 75 insertions(+), 86 deletions(-) diff --git a/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js index d31a710fd94fe3..e8230eea89daa3 100644 --- a/packages/block-editor/src/store/private-selectors.js +++ b/packages/block-editor/src/store/private-selectors.js @@ -15,7 +15,7 @@ import { canInsertBlockType, __experimentalGetAllowedPatterns, } from './selectors'; -import { getUserPatterns, checkAllowListRecursive } from './utils'; +import { getAllPatterns, checkAllowListRecursive } from './utils'; /** * Returns true if the block interface is hidden, or false otherwise. @@ -253,26 +253,20 @@ export const getInserterMediaCategories = createSelector( */ export const hasAllowedPatterns = createSelector( ( state, rootClientId = null ) => { - const patterns = state.settings.__experimentalBlockPatterns; - const userPatterns = getUserPatterns( state ); + const patterns = getAllPatterns( state ); const { allowedBlockTypes } = getSettings( state ); - return [ ...userPatterns, ...patterns ].some( - ( { name, inserter = true } ) => { - if ( ! inserter ) { - return false; - } - const { blocks } = __experimentalGetParsedPattern( - state, - name - ); - return ( - checkAllowListRecursive( blocks, allowedBlockTypes ) && - blocks.every( ( { name: blockName } ) => - canInsertBlockType( state, blockName, rootClientId ) - ) - ); + return patterns.some( ( { name, inserter = true } ) => { + if ( ! inserter ) { + return false; } - ); + const { blocks } = __experimentalGetParsedPattern( state, name ); + return ( + checkAllowListRecursive( blocks, allowedBlockTypes ) && + blocks.every( ( { name: blockName } ) => + canInsertBlockType( state, blockName, rootClientId ) + ) + ); + } ); }, ( state, rootClientId ) => [ ...__experimentalGetAllowedPatterns.getDependants( diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 1cf3705454f9bd..5e47e966ef3345 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -27,7 +27,7 @@ import { createRegistrySelector } from '@wordpress/data'; * Internal dependencies */ import { - getUserPatterns, + getAllPatterns, checkAllowListRecursive, checkAllowList, } from './utils'; @@ -2015,7 +2015,7 @@ export const getInserterItems = createSelector( }, ( state, rootClientId ) => [ state.blockListSettings[ rootClientId ], - state.blocks.byClientId, + state.blocks.byClientId.get( rootClientId ), state.blocks.order, state.preferences.insertUsage, state.settings.allowedBlockTypes, @@ -2086,7 +2086,7 @@ export const getBlockTransformItems = createSelector( }, ( state, blocks, rootClientId ) => [ state.blockListSettings[ rootClientId ], - state.blocks.byClientId, + state.blocks.byClientId.get( rootClientId ), state.preferences.insertUsage, state.settings.allowedBlockTypes, state.settings.templateLock, @@ -2118,7 +2118,7 @@ export const hasInserterItems = createSelector( }, ( state, rootClientId ) => [ state.blockListSettings[ rootClientId ], - state.blocks.byClientId, + state.blocks.byClientId.get( rootClientId ), state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks( state ), @@ -2143,18 +2143,20 @@ export const getAllowedBlocks = createSelector( const blockTypes = getBlockTypes().filter( ( blockType ) => canIncludeBlockTypeInInserter( state, blockType, rootClientId ) ); + const hasReusableBlock = canInsertBlockTypeUnmemoized( state, 'core/block', rootClientId ) && getReusableBlocks( state ).length > 0; - return [ - ...blockTypes, - ...( hasReusableBlock ? [ 'core/block' ] : [] ), - ]; + if ( hasReusableBlock ) { + blockTypes.push( 'core/block' ); + } + + return blockTypes; }, ( state, rootClientId ) => [ state.blockListSettings[ rootClientId ], - state.blocks.byClientId, + state.blocks.byClientId.get( rootClientId ), state.settings.allowedBlockTypes, state.settings.templateLock, getReusableBlocks( state ), @@ -2237,21 +2239,10 @@ export const __experimentalGetDirectInsertBlock = createSelector( ] ); -export const __experimentalUserPatternCategories = createSelector( - ( state ) => { - return state?.settings?.__experimentalUserPatternCategories; - }, - ( state ) => [ state.settings.__experimentalUserPatternCategories ] -); - export const __experimentalGetParsedPattern = createSelector( ( state, patternName ) => { - const patterns = state.settings.__experimentalBlockPatterns; - const userPatterns = getUserPatterns( state ); - - const pattern = [ ...patterns, ...userPatterns ].find( - ( { name } ) => name === patternName - ); + const patterns = getAllPatterns( state ); + const pattern = patterns.find( ( { name } ) => name === patternName ); if ( ! pattern ) { return null; } @@ -2262,21 +2253,15 @@ export const __experimentalGetParsedPattern = createSelector( } ), }; }, - ( state ) => [ - state.settings.__experimentalBlockPatterns, - state.settings.__experimentalReusableBlocks, - state?.settings?.__experimentalUserPatternCategories, - ] + ( state ) => [ getAllPatterns( state ) ] ); const getAllAllowedPatterns = createSelector( ( state ) => { - const patterns = state.settings.__experimentalBlockPatterns; - const userPatterns = getUserPatterns( state ); - + const patterns = getAllPatterns( state ); const { allowedBlockTypes } = getSettings( state ); - const parsedPatterns = [ ...userPatterns, ...patterns ] + const parsedPatterns = patterns .filter( ( { inserter = true } ) => !! inserter ) .map( ( { name } ) => __experimentalGetParsedPattern( state, name ) @@ -2286,12 +2271,7 @@ const getAllAllowedPatterns = createSelector( ); return allowedPatterns; }, - ( state ) => [ - state.settings.__experimentalBlockPatterns, - state.settings.__experimentalReusableBlocks, - state.settings.allowedBlockTypes, - state?.settings?.__experimentalUserPatternCategories, - ] + ( state ) => [ getAllPatterns( state ), state.settings.allowedBlockTypes ] ); /** @@ -2315,9 +2295,7 @@ export const __experimentalGetAllowedPatterns = createSelector( return patternsAllowed; }, ( state, rootClientId ) => [ - state.settings.__experimentalBlockPatterns, - state.settings.__experimentalReusableBlocks, - state.settings.allowedBlockTypes, + getAllAllowedPatterns( state ), state.settings.templateLock, state.blockListSettings[ rootClientId ], state.blocks.byClientId.get( rootClientId ), @@ -2566,7 +2544,7 @@ export function __experimentalGetLastBlockAttributeChanges( state ) { * @return {Array} Reusable blocks */ function getReusableBlocks( state ) { - return state?.settings?.__experimentalReusableBlocks ?? EMPTY_ARRAY; + return state.settings.__experimentalReusableBlocks ?? EMPTY_ARRAY; } /** diff --git a/packages/block-editor/src/store/utils.js b/packages/block-editor/src/store/utils.js index 99281f55fcd093..7587dcdf56fd79 100644 --- a/packages/block-editor/src/store/utils.js +++ b/packages/block-editor/src/store/utils.js @@ -1,35 +1,52 @@ +/** + * External dependencies + */ +import createSelector from 'rememo'; + /** * Internal dependencies */ import { INSERTER_PATTERN_TYPES } from '../components/inserter/block-patterns-tab/utils'; -const EMPTY_ARRAY = []; +export const getUserPatterns = createSelector( + ( state ) => { + const userPatterns = state.settings.__experimentalReusableBlocks ?? []; + const userPatternCategories = + state.settings.__experimentalUserPatternCategories ?? []; + return userPatterns.map( ( userPattern ) => { + return { + name: `core/block/${ userPattern.id }`, + id: userPattern.id, + type: INSERTER_PATTERN_TYPES.user, + title: userPattern.title.raw, + categories: userPattern.wp_pattern_category.map( ( catId ) => { + const category = userPatternCategories.find( + ( { id } ) => id === catId + ); + return category ? category.slug : catId; + } ), + content: userPattern.content.raw, + syncStatus: userPattern.wp_pattern_sync_status, + }; + } ); + }, + ( state ) => [ + state.settings.__experimentalReusableBlocks, + state.settings.__experimentalUserPatternCategories, + ] +); -export function getUserPatterns( state ) { - const userPatterns = - state?.settings?.__experimentalReusableBlocks ?? EMPTY_ARRAY; - const userPatternCategories = - state?.settings?.__experimentalUserPatternCategories ?? []; - const categories = new Map(); - userPatternCategories.forEach( ( userCategory ) => - categories.set( userCategory.id, userCategory ) - ); - return userPatterns.map( ( userPattern ) => { - return { - name: `core/block/${ userPattern.id }`, - id: userPattern.id, - type: INSERTER_PATTERN_TYPES.user, - title: userPattern.title.raw, - categories: userPattern.wp_pattern_category.map( ( catId ) => - categories && categories.get( catId ) - ? categories.get( catId ).slug - : catId - ), - content: userPattern.content.raw, - syncStatus: userPattern.wp_pattern_sync_status, - }; - } ); -} +export const getAllPatterns = createSelector( + ( state ) => { + const patterns = state.settings.__experimentalBlockPatterns; + const userPatterns = getUserPatterns( state ); + return [ ...userPatterns, ...patterns ]; + }, + ( state ) => [ + state.settings.__experimentalBlockPatterns, + getUserPatterns( state ), + ] +); export const checkAllowList = ( list, item, defaultResult = null ) => { if ( typeof list === 'boolean' ) { From 9da04250da80c4bc402adcf244acf0499feb9b98 Mon Sep 17 00:00:00 2001 From: James Koster Date: Wed, 17 Jan 2024 12:00:48 +0000 Subject: [PATCH 27/71] Update Grid layout design (#57880) --- packages/dataviews/src/style.scss | 37 ++++++++++++++++--- packages/dataviews/src/view-grid.js | 24 +++++++----- .../src/components/page-pages/style.scss | 1 - .../src/components/page-templates/index.js | 24 ++++++------ 4 files changed, 58 insertions(+), 28 deletions(-) diff --git a/packages/dataviews/src/style.scss b/packages/dataviews/src/style.scss index d5b962212af793..156a9014600481 100644 --- a/packages/dataviews/src/style.scss +++ b/packages/dataviews/src/style.scss @@ -253,13 +253,28 @@ grid-template-columns: repeat(4, minmax(0, 1fr)) !important; // Todo: eliminate !important dependency } + .dataviews-view-grid__card { + border-radius: $radius-block-ui * 2; + border: 1px solid $gray-200; + height: 100%; + justify-content: flex-start; + + .dataviews-view-grid__title-actions { + padding: 0 $grid-unit-05; + } + + .dataviews-view-grid__primary-field { + min-height: $grid-unit-50; + } + } + .dataviews-view-grid__media { width: 100%; min-height: 200px; aspect-ratio: 1/1; - box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); - border-radius: $radius-block-ui * 2; overflow: hidden; + border-bottom: 1px solid $gray-200; + background-color: $gray-100; > * { object-fit: cover; @@ -268,17 +283,23 @@ } } + .dataviews-view-grid__primary-field { + padding: $grid-unit-10; + } + .dataviews-view-grid__fields { position: relative; font-size: 12px; line-height: 16px; + &:not(:empty) { + padding: $grid-unit-15; + padding-top: 0; + } + .dataviews-view-grid__field { - .dataviews-view-grid__field-header { - color: $gray-700; - } .dataviews-view-grid__field-value { - color: $gray-900; + color: $gray-700; } } } @@ -403,6 +424,10 @@ &:last-child { margin-right: 0; } + + &:empty { + display: none; + } } } diff --git a/packages/dataviews/src/view-grid.js b/packages/dataviews/src/view-grid.js index de0d5eca06b733..c8cc3516e1cbb6 100644 --- a/packages/dataviews/src/view-grid.js +++ b/packages/dataviews/src/view-grid.js @@ -5,6 +5,7 @@ import { __experimentalGrid as Grid, __experimentalHStack as HStack, __experimentalVStack as VStack, + Tooltip, } from '@wordpress/components'; import { useAsyncList } from '@wordpress/compose'; @@ -38,21 +39,24 @@ export default function ViewGrid( { const usedData = deferredRendering ? shownData : data; return ( { usedData.map( ( item ) => (
{ mediaField?.render( { item } ) }
- + { primaryField?.render( { item } ) } @@ -79,12 +83,14 @@ export default function ViewGrid( { key={ field.id } spacing={ 1 } > -
- { field.header } -
-
- { renderedValue } -
+ +
+ { renderedValue } +
+
); } ) } diff --git a/packages/edit-site/src/components/page-pages/style.scss b/packages/edit-site/src/components/page-pages/style.scss index c2d2cc25529c4a..2bd7c771fd60d9 100644 --- a/packages/edit-site/src/components/page-pages/style.scss +++ b/packages/edit-site/src/components/page-pages/style.scss @@ -1,5 +1,4 @@ .edit-site-page-pages__featured-image { - border-radius: $grid-unit-05; width: $grid-unit-50; height: $grid-unit-50; display: block; diff --git a/packages/edit-site/src/components/page-templates/index.js b/packages/edit-site/src/components/page-templates/index.js index 0d4ddd31620abf..fd28c22298ba16 100644 --- a/packages/edit-site/src/components/page-templates/index.js +++ b/packages/edit-site/src/components/page-templates/index.js @@ -216,18 +216,18 @@ export default function DataviewsTemplates() { id: 'description', getValue: ( { item } ) => item.description, render: ( { item } ) => { - return item.description ? ( - decodeEntities( item.description ) - ) : ( - <> - - - { __( 'No description.' ) } - - - ); + return item.description + ? decodeEntities( item.description ) + : view.type === LAYOUT_TABLE && ( + <> + + + { __( 'No description.' ) } + + + ); }, maxWidth: 200, enableSorting: false, From 7591f415a36e9e2256fe6ac3ce5a82af2da37914 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Wed, 17 Jan 2024 12:07:14 +0000 Subject: [PATCH 28/71] Bump plugin version to 17.5.0 --- gutenberg.php | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index 9559f838608da9..febd63e0be0308 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -5,7 +5,7 @@ * Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality. * Requires at least: 6.3 * Requires PHP: 7.0 - * Version: 17.5.0-rc.1 + * Version: 17.5.0 * Author: Gutenberg Team * Text Domain: gutenberg * diff --git a/package-lock.json b/package-lock.json index af61124db82df9..80ebc67b9cc1a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gutenberg", - "version": "17.5.0-rc.1", + "version": "17.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "gutenberg", - "version": "17.5.0-rc.1", + "version": "17.5.0", "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { diff --git a/package.json b/package.json index aae8275e714ab5..39f4ab82105e8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "17.5.0-rc.1", + "version": "17.5.0", "private": true, "description": "A new WordPress editor experience.", "author": "The WordPress Contributors", From 0b9d8aef1cc4d5716d531f3d9116a6ea8f501e2d Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Wed, 17 Jan 2024 12:19:07 +0000 Subject: [PATCH 29/71] Update Changelog for 17.5.0 --- changelog.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 9268dc7edd1fba..b24b8294744d68 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,8 +1,6 @@ == Changelog == -= 17.5.0-rc.1 = - - += 17.5.0 = ## Changelog @@ -207,7 +205,7 @@ - Add drag cursor to draggable list items. ([57493](https://github.com/WordPress/gutenberg/pull/57493)) ### Tools - +- DependencyExtractionWebpackPlugin: Throw when using scripts from modules. ([57795] - Dependency Extraction Webpack Plugin: Use `import` for module externals. ([57577](https://github.com/WordPress/gutenberg/pull/57577)) - DependencyExtractionWebpackPlugin: Add true shorthand for requestToExternalModule. ([57593](https://github.com/WordPress/gutenberg/pull/57593)) - DependencyExtractionWebpackPlugin: Use module for @wordpress/interactivity. ([57602](https://github.com/WordPress/gutenberg/pull/57602)) @@ -256,6 +254,8 @@ The following contributors merged PRs in this release: @afercia @andrewhayward @andrewserong @atachibana @c4rl0sbr4v0 @carolinan @chad1008 @ciampo @DAreRodz @dcalhoun @derekblank @desrosj @ellatrix @fai-sal @fluiddot @geriux @getdave @glendaviesnz @gziolo @hbhalodia @HrithikDalal @jameskoster @jeryj @jorgefilipecosta @jsnajdr @juanmaguitar @kevin940726 @Mamaduka @matiasbenedetto @mcsf @michalczaplinski @mirka @muhme @ndiego @ntsekouras @oandregal @ockham @ramonjd @scruffian @sirreal @Soean @t-hamano @talldan @tellthemachines @youknowriad + + = 17.3.2 = ## Changelog From 81c3c96ef0762e802af957bcd5739b9786bdc180 Mon Sep 17 00:00:00 2001 From: Artemio Morales Date: Wed, 17 Jan 2024 07:22:41 -0500 Subject: [PATCH 30/71] Block Bindings API: Refactor logic into Block Bindings class and singleton pattern (#57742) * Move bindings logic to Block Bindings class * Remove erroneous echo statement that was breaking UI * Fix error in registering block bindings sources * Add missing return statement * Add docblocks * Remove obsolete file * Fix docblock * Sync register_source docblock * Remove erroneous subpackage declaration * Update package name * Fix gutenberg package declarations * Remove extraneous comments * Move allowed_blocks property to filter function * Update description of Block Bindings class * Address PHPCS spacing issue * Rename function call and call using string in filter --- .../block-bindings/block-bindings.php | 69 +++++++++++++++++++ ...essing.php => class-wp-block-bindings.php} | 54 ++++++++++++++- lib/experimental/block-bindings/index.php | 5 +- .../block-bindings/sources/index.php | 32 --------- .../block-bindings/sources/pattern.php | 5 +- .../block-bindings/sources/post-meta.php | 5 +- lib/experimental/blocks.php | 48 ++++++------- 7 files changed, 148 insertions(+), 70 deletions(-) create mode 100644 lib/experimental/block-bindings/block-bindings.php rename lib/experimental/block-bindings/{html-processing.php => class-wp-block-bindings.php} (70%) delete mode 100644 lib/experimental/block-bindings/sources/index.php diff --git a/lib/experimental/block-bindings/block-bindings.php b/lib/experimental/block-bindings/block-bindings.php new file mode 100644 index 00000000000000..83a1d6132f5f43 --- /dev/null +++ b/lib/experimental/block-bindings/block-bindings.php @@ -0,0 +1,69 @@ +register_source( $source_name, $label, $apply ); + } +} + +/** + * Retrieves the list of registered block sources. + * + * @return array The list of registered block sources. + */ +if ( ! function_exists( 'wp_block_bindings_get_sources' ) ) { + function wp_block_bindings_get_sources() { + return wp_block_bindings()->get_sources(); + } +} + +/** + * Replaces the HTML content of a block based on the provided source value. + * + * @param string $block_content Block Content. + * @param string $block_name The name of the block to process. + * @param string $block_attr The attribute of the block we want to process. + * @param string $source_value The value used to replace the HTML. + * @return string The modified block content. + */ +if ( ! function_exists( 'wp_block_bindings_replace_html' ) ) { + function wp_block_bindings_replace_html( $block_content, $block_name, $block_attr, $source_value ) { + return wp_block_bindings()->replace_html( $block_content, $block_name, $block_attr, $source_value ); + } +} diff --git a/lib/experimental/block-bindings/html-processing.php b/lib/experimental/block-bindings/class-wp-block-bindings.php similarity index 70% rename from lib/experimental/block-bindings/html-processing.php rename to lib/experimental/block-bindings/class-wp-block-bindings.php index 515749d0a8e753..7eb443dd367a6f 100644 --- a/lib/experimental/block-bindings/html-processing.php +++ b/lib/experimental/block-bindings/class-wp-block-bindings.php @@ -1,11 +1,50 @@ sources[ $source_name ] = array( + 'label' => $label, + 'apply' => $apply, + ); + } + /** * Depending on the block attributes, replace the proper HTML based on the value returned by the source. * @@ -14,7 +53,7 @@ * @param string $block_attr The attribute of the block we want to process. * @param string $source_value The value used to replace the HTML. */ - function block_bindings_replace_html( $block_content, $block_name, $block_attr, $source_value ) { + public function replace_html( $block_content, $block_name, $block_attr, $source_value ) { $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block_name ); if ( null === $block_type ) { return; @@ -107,4 +146,13 @@ function block_bindings_replace_html( $block_content, $block_name, $block_attr, } return; } + + /** + * Retrieves the list of registered block sources. + * + * @return array The array of registered sources. + */ + public function get_sources() { + return $this->sources; + } } diff --git a/lib/experimental/block-bindings/index.php b/lib/experimental/block-bindings/index.php index cca857e93702f3..dc9a6c9b96957b 100644 --- a/lib/experimental/block-bindings/index.php +++ b/lib/experimental/block-bindings/index.php @@ -5,9 +5,8 @@ * @package gutenberg */ -require_once __DIR__ . '/sources/index.php'; -require_once __DIR__ . '/html-processing.php'; - +require_once __DIR__ . '/class-wp-block-bindings.php'; +require_once __DIR__ . '/block-bindings.php'; // Register the sources. $gutenberg_experiments = get_option( 'gutenberg-experiments' ); if ( $gutenberg_experiments ) { diff --git a/lib/experimental/block-bindings/sources/index.php b/lib/experimental/block-bindings/sources/index.php deleted file mode 100644 index 6d14bc96d86bac..00000000000000 --- a/lib/experimental/block-bindings/sources/index.php +++ /dev/null @@ -1,32 +0,0 @@ - $label, - 'apply' => $apply, - ); - } -} diff --git a/lib/experimental/block-bindings/sources/pattern.php b/lib/experimental/block-bindings/sources/pattern.php index e3456aa468d3eb..16bf46f4f06ab6 100644 --- a/lib/experimental/block-bindings/sources/pattern.php +++ b/lib/experimental/block-bindings/sources/pattern.php @@ -4,8 +4,7 @@ * * @package gutenberg */ - -if ( function_exists( 'register_block_bindings_source' ) ) { +if ( function_exists( 'wp_block_bindings_register_source' ) ) { $pattern_source_callback = function ( $source_attrs, $block_instance, $attribute_name ) { if ( ! _wp_array_get( $block_instance->attributes, array( 'metadata', 'id' ), false ) ) { return null; @@ -13,7 +12,7 @@ $block_id = $block_instance->attributes['metadata']['id']; return _wp_array_get( $block_instance->context, array( 'pattern/overrides', $block_id, $attribute_name ), null ); }; - register_block_bindings_source( + wp_block_bindings_register_source( 'pattern_attributes', __( 'Pattern Attributes', 'gutenberg' ), $pattern_source_callback diff --git a/lib/experimental/block-bindings/sources/post-meta.php b/lib/experimental/block-bindings/sources/post-meta.php index 99b6afc03c0d42..2d53dab6d321ac 100644 --- a/lib/experimental/block-bindings/sources/post-meta.php +++ b/lib/experimental/block-bindings/sources/post-meta.php @@ -4,8 +4,7 @@ * * @package gutenberg */ - -if ( function_exists( 'register_block_bindings_source' ) ) { +if ( function_exists( 'wp_block_bindings_register_source' ) ) { $post_meta_source_callback = function ( $source_attrs ) { // Use the postId attribute if available if ( isset( $source_attrs['postId'] ) ) { @@ -17,7 +16,7 @@ return get_post_meta( $post_id, $source_attrs['value'], true ); }; - register_block_bindings_source( + wp_block_bindings_register_source( 'post_meta', __( 'Post Meta', 'gutenberg' ), $post_meta_source_callback diff --git a/lib/experimental/blocks.php b/lib/experimental/blocks.php index 42663e127870c9..93b65f95fc61ae 100644 --- a/lib/experimental/blocks.php +++ b/lib/experimental/blocks.php @@ -88,16 +88,8 @@ function wp_enqueue_block_view_script( $block_name, $args ) { ) ) { require_once __DIR__ . '/block-bindings/index.php'; - // Allowed blocks that support block bindings. - // TODO: Look for a mechanism to opt-in for this. Maybe adding a property to block attributes? - global $block_bindings_allowed_blocks; - $block_bindings_allowed_blocks = array( - 'core/paragraph' => array( 'content' ), - 'core/heading' => array( 'content' ), - 'core/image' => array( 'url', 'title', 'alt' ), - 'core/button' => array( 'url', 'text' ), - ); - if ( ! function_exists( 'process_block_bindings' ) ) { + + if ( ! function_exists( 'gutenberg_process_block_bindings' ) ) { /** * Process the block bindings attribute. * @@ -105,9 +97,19 @@ function wp_enqueue_block_view_script( $block_name, $args ) { * @param array $block Block attributes. * @param WP_Block $block_instance The block instance. */ - function process_block_bindings( $block_content, $block, $block_instance ) { - // If the block doesn't have the bindings property, return. - if ( ! isset( $block['attrs']['metadata']['bindings'] ) ) { + function gutenberg_process_block_bindings( $block_content, $block, $block_instance ) { + + // Allowed blocks that support block bindings. + // TODO: Look for a mechanism to opt-in for this. Maybe adding a property to block attributes? + $allowed_blocks = array( + 'core/paragraph' => array( 'content' ), + 'core/heading' => array( 'content' ), + 'core/image' => array( 'url', 'title', 'alt' ), + 'core/button' => array( 'url', 'text' ), + ); + + // If the block doesn't have the bindings property or isn't one of the allowed block types, return. + if ( ! isset( $block['attrs']['metadata']['bindings'] ) || ! isset( $allowed_blocks[ $block_instance->name ] ) ) { return $block_content; } @@ -128,16 +130,13 @@ function process_block_bindings( $block_content, $block, $block_instance ) { // } // } // - global $block_bindings_allowed_blocks; - global $block_bindings_sources; + + $block_bindings_sources = wp_block_bindings_get_sources(); $modified_block_content = $block_content; foreach ( $block['attrs']['metadata']['bindings'] as $binding_attribute => $binding_source ) { - // If the block is not in the list, stop processing. - if ( ! isset( $block_bindings_allowed_blocks[ $block['blockName'] ] ) ) { - return $block_content; - } + // If the attribute is not in the list, process next attribute. - if ( ! in_array( $binding_attribute, $block_bindings_allowed_blocks[ $block['blockName'] ], true ) ) { + if ( ! in_array( $binding_attribute, $allowed_blocks[ $block_instance->name ], true ) ) { continue; } // If no source is provided, or that source is not registered, process next attribute. @@ -159,14 +158,11 @@ function process_block_bindings( $block_content, $block, $block_instance ) { } // Process the HTML based on the block and the attribute. - $modified_block_content = block_bindings_replace_html( $modified_block_content, $block['blockName'], $binding_attribute, $source_value ); + $modified_block_content = wp_block_bindings_replace_html( $modified_block_content, $block_instance->name, $binding_attribute, $source_value ); } return $modified_block_content; } - - // Add filter only to the blocks in the list. - foreach ( $block_bindings_allowed_blocks as $block_name => $attributes ) { - add_filter( 'render_block_' . $block_name, 'process_block_bindings', 20, 3 ); - } } + + add_filter( 'render_block', 'gutenberg_process_block_bindings', 20, 3 ); } From 8c1b69ca397f29977c60992d1905dca0c3381908 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Wed, 17 Jan 2024 14:26:29 +0200 Subject: [PATCH 31/71] BlockSwitcher: Defer transform calculations until the Dropdown is open (#57892) * BlockSwitcher: Defer transform calculations until the Dropdown is open * address feedback * fix e2e tests * add a test, fix a test * address feedback --- .../src/components/block-switcher/index.js | 244 +++++++------ .../src/components/block-switcher/style.scss | 6 + .../test/__snapshots__/index.js.snap | 116 ------ .../components/block-switcher/test/index.js | 343 ++++++------------ .../editor/various/block-switcher.spec.js | 56 +-- .../various/toolbar-roving-tabindex.spec.js | 5 +- 6 files changed, 282 insertions(+), 488 deletions(-) delete mode 100644 packages/block-editor/src/components/block-switcher/test/__snapshots__/index.js.snap diff --git a/packages/block-editor/src/components/block-switcher/index.js b/packages/block-editor/src/components/block-switcher/index.js index 8117c6f539b4f3..f3f976262ea588 100644 --- a/packages/block-editor/src/components/block-switcher/index.js +++ b/packages/block-editor/src/components/block-switcher/index.js @@ -29,75 +29,44 @@ import BlockStylesMenu from './block-styles-menu'; import PatternTransformationsMenu from './pattern-transformations-menu'; import useBlockDisplayTitle from '../block-title/use-block-display-title'; -export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => { +function BlockSwitcherDropdownMenuContents( { + onClose, + clientIds, + hasBlockStyles, + canRemove, +} ) { const { replaceBlocks, multiSelect, updateBlockAttributes } = useDispatch( blockEditorStore ); - const blockInformation = useBlockDisplayInformation( blocks[ 0 ].clientId ); - const { - possibleBlockTransformations, - canRemove, - hasBlockStyles, - icon, - patterns, - } = useSelect( + const { possibleBlockTransformations, patterns, blocks } = useSelect( ( select ) => { const { + getBlocksByClientId, getBlockRootClientId, getBlockTransformItems, __experimentalGetPatternTransformItems, - canRemoveBlocks, } = select( blockEditorStore ); - const { getBlockStyles, getBlockType } = select( blocksStore ); const rootClientId = getBlockRootClientId( Array.isArray( clientIds ) ? clientIds[ 0 ] : clientIds ); - const [ { name: firstBlockName } ] = blocks; - const _isSingleBlockSelected = blocks.length === 1; - const styles = - _isSingleBlockSelected && getBlockStyles( firstBlockName ); - let _icon; - if ( _isSingleBlockSelected ) { - _icon = blockInformation?.icon; // Take into account active block variations. - } else { - const isSelectionOfSameType = - new Set( blocks.map( ( { name } ) => name ) ).size === 1; - // When selection consists of blocks of multiple types, display an - // appropriate icon to communicate the non-uniformity. - _icon = isSelectionOfSameType - ? getBlockType( firstBlockName )?.icon - : copy; - } + const _blocks = getBlocksByClientId( clientIds ); return { + blocks: _blocks, possibleBlockTransformations: getBlockTransformItems( - blocks, + _blocks, rootClientId ), - canRemove: canRemoveBlocks( clientIds, rootClientId ), - hasBlockStyles: !! styles?.length, - icon: _icon, patterns: __experimentalGetPatternTransformItems( - blocks, + _blocks, rootClientId ), }; }, - [ clientIds, blocks, blockInformation?.icon ] + [ clientIds ] ); - const blockVariationTransformations = useBlockVariationTransforms( { clientIds, blocks, } ); - - const blockTitle = useBlockDisplayTitle( { - clientId: Array.isArray( clientIds ) ? clientIds[ 0 ] : clientIds, - maximumLength: 35, - } ); - - const isSingleBlock = blocks.length === 1; - const isReusable = isSingleBlock && isReusableBlock( blocks[ 0 ] ); - const isTemplate = isSingleBlock && isTemplatePart( blocks[ 0 ] ); - function selectForMultipleBlocks( insertedBlocks ) { if ( insertedBlocks.length > 1 ) { multiSelect( @@ -106,14 +75,12 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => { ); } } - // Simple block tranformation based on the `Block Transforms` API. function onBlockTransform( name ) { const newBlocks = switchToBlockType( blocks, name ); replaceBlocks( clientIds, newBlocks ); selectForMultipleBlocks( newBlocks ); } - function onBlockVariationTransform( name ) { updateBlockAttributes( blocks[ 0 ].clientId, { ...blockVariationTransformations.find( @@ -121,18 +88,18 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => { ).attributes, } ); } - // Pattern transformation through the `Patterns` API. function onPatternTransform( transformedBlocks ) { replaceBlocks( clientIds, transformedBlocks ); selectForMultipleBlocks( transformedBlocks ); } - /** * The `isTemplate` check is a stopgap solution here. * Ideally, the Transforms API should handle this * by allowing to exclude blocks from wildcard transformations. */ + const isSingleBlock = blocks.length === 1; + const isTemplate = isSingleBlock && isTemplatePart( blocks[ 0 ] ); const hasPossibleBlockTransformations = !! possibleBlockTransformations.length && canRemove && ! isTemplate; const hasPossibleBlockVariationTransformations = @@ -141,11 +108,118 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => { const hasBlockOrBlockVariationTransforms = hasPossibleBlockTransformations || hasPossibleBlockVariationTransformations; - const showDropdown = + const hasContents = hasBlockStyles || hasBlockOrBlockVariationTransforms || hasPatternTransformation; - if ( ! showDropdown ) { + if ( ! hasContents ) { + return ( +

+ { __( 'No transforms.' ) } +

+ ); + } + return ( +
+ { hasPatternTransformation && ( + { + onPatternTransform( transformedBlocks ); + onClose(); + } } + /> + ) } + { hasBlockOrBlockVariationTransforms && ( + { + onBlockTransform( name ); + onClose(); + } } + onSelectVariation={ ( name ) => { + onBlockVariationTransform( name ); + onClose(); + } } + /> + ) } + { hasBlockStyles && ( + + ) } +
+ ); +} + +export const BlockSwitcher = ( { clientIds } ) => { + const blockInformation = useBlockDisplayInformation( clientIds?.[ 0 ] ); + const { + canRemove, + hasBlockStyles, + icon, + invalidBlocks, + isReusable, + isTemplate, + } = useSelect( + ( select ) => { + const { + getBlockRootClientId, + getBlocksByClientId, + canRemoveBlocks, + } = select( blockEditorStore ); + const { getBlockStyles, getBlockType } = select( blocksStore ); + const _blocks = getBlocksByClientId( clientIds ); + if ( ! _blocks.length || _blocks.some( ( block ) => ! block ) ) { + return { invalidBlocks: true }; + } + const rootClientId = getBlockRootClientId( clientIds ); + const [ { name: firstBlockName } ] = _blocks; + const _isSingleBlockSelected = _blocks.length === 1; + let _icon; + if ( _isSingleBlockSelected ) { + _icon = blockInformation?.icon; // Take into account active block variations. + } else { + const isSelectionOfSameType = + new Set( _blocks.map( ( { name } ) => name ) ).size === 1; + // When selection consists of blocks of multiple types, display an + // appropriate icon to communicate the non-uniformity. + _icon = isSelectionOfSameType + ? getBlockType( firstBlockName )?.icon + : copy; + } + return { + canRemove: canRemoveBlocks( clientIds, rootClientId ), + hasBlockStyles: + _isSingleBlockSelected && + !! getBlockStyles( firstBlockName )?.length, + icon: _icon, + isReusable: + _isSingleBlockSelected && isReusableBlock( _blocks[ 0 ] ), + isTemplate: + _isSingleBlockSelected && isTemplatePart( _blocks[ 0 ] ), + }; + }, + [ clientIds, blockInformation?.icon ] + ); + const blockTitle = useBlockDisplayTitle( { + clientId: clientIds?.[ 0 ], + maximumLength: 35, + } ); + if ( invalidBlocks ) { + return null; + } + const hideDropdown = ! hasBlockStyles && ! canRemove; + if ( hideDropdown ) { return ( { ); } - + const isSingleBlock = clientIds.length === 1; const blockSwitcherLabel = isSingleBlock ? blockTitle : __( 'Multiple blocks selected' ); - const blockSwitcherDescription = isSingleBlock ? __( 'Change block type or style' ) : sprintf( @@ -178,11 +251,10 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => { _n( 'Change type of %d block', 'Change type of %d blocks', - blocks.length + clientIds.length ), - blocks.length + clientIds.length ); - return ( @@ -215,46 +287,12 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => { menuProps={ { orientation: 'both' } } > { ( { onClose } ) => ( -
- { hasPatternTransformation && ( - { - onPatternTransform( - transformedBlocks - ); - onClose(); - } } - /> - ) } - { hasBlockOrBlockVariationTransforms && ( - { - onBlockTransform( name ); - onClose(); - } } - onSelectVariation={ ( name ) => { - onBlockVariationTransform( name ); - onClose(); - } } - /> - ) } - { hasBlockStyles && ( - - ) } -
+ ) } ) } @@ -263,20 +301,4 @@ export const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => { ); }; -export const BlockSwitcher = ( { clientIds } ) => { - const blocks = useSelect( - ( select ) => - select( blockEditorStore ).getBlocksByClientId( clientIds ), - [ clientIds ] - ); - - if ( ! blocks.length || blocks.some( ( block ) => ! block ) ) { - return null; - } - - return ( - - ); -}; - export default BlockSwitcher; diff --git a/packages/block-editor/src/components/block-switcher/style.scss b/packages/block-editor/src/components/block-switcher/style.scss index d30c6587a520f8..6a8a720b9fd2e7 100644 --- a/packages/block-editor/src/components/block-switcher/style.scss +++ b/packages/block-editor/src/components/block-switcher/style.scss @@ -197,3 +197,9 @@ } } } + +.block-editor-block-switcher__no-transforms { + color: $gray-700; + padding: 6px $grid-unit; + margin: 0; +} diff --git a/packages/block-editor/src/components/block-switcher/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-switcher/test/__snapshots__/index.js.snap deleted file mode 100644 index 220815d1a6afd5..00000000000000 --- a/packages/block-editor/src/components/block-switcher/test/__snapshots__/index.js.snap +++ /dev/null @@ -1,116 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`BlockSwitcherDropdownMenu should render disabled block switcher with multi block of different types when no transforms 1`] = ` -
-
-
- -
-
-
-`; - -exports[`BlockSwitcherDropdownMenu should render enabled block switcher with multi block when transforms exist 1`] = ` -
-
-
- -
- - Change type of 2 blocks - -
-
-
-
-`; - -exports[`BlockSwitcherDropdownMenu should render switcher with blocks 1`] = ` -
-
-
- -
- - Change block type or style - -
-
-
-
-`; diff --git a/packages/block-editor/src/components/block-switcher/test/index.js b/packages/block-editor/src/components/block-switcher/test/index.js index 8882a5369ca014..ce900003e7a603 100644 --- a/packages/block-editor/src/components/block-switcher/test/index.js +++ b/packages/block-editor/src/components/block-switcher/test/index.js @@ -14,7 +14,7 @@ import { copy } from '@wordpress/icons'; /** * Internal dependencies */ -import { BlockSwitcher, BlockSwitcherDropdownMenu } from '../'; +import { BlockSwitcher } from '../'; jest.mock( '@wordpress/data/src/components/use-select', () => jest.fn() ); jest.mock( '../../block-title/use-block-display-title', () => @@ -22,23 +22,6 @@ jest.mock( '../../block-title/use-block-display-title', () => ); describe( 'BlockSwitcher', () => { - test( 'should not render block switcher without blocks', () => { - useSelect.mockImplementation( () => ( {} ) ); - const { container } = render( ); - expect( container ).toBeEmptyDOMElement(); - } ); - - test( 'should not render block switcher with null blocks', () => { - useSelect.mockImplementation( () => ( { blocks: [ null ] } ) ); - const { container } = render( - - ); - expect( container ).toBeEmptyDOMElement(); - } ); -} ); -describe( 'BlockSwitcherDropdownMenu', () => { const headingBlock1 = { attributes: { content: [ 'How are you?' ], @@ -49,66 +32,46 @@ describe( 'BlockSwitcherDropdownMenu', () => { originalContent: '

How are you?

', clientId: 'a1303fd6-3e60-4fff-a770-0e0ea656c5b9', }; - - const textBlock = { - attributes: { - content: [ 'I am great!' ], + const headingBlockType = { + category: 'text', + title: 'Heading', + edit: () => {}, + save: () => {}, + transforms: { + to: [ + { + type: 'block', + blocks: [ 'core/paragraph' ], + transform: () => {}, + }, + { + type: 'block', + blocks: [ 'core/paragraph' ], + transform: () => {}, + isMultiBlock: true, + }, + ], }, - isValid: true, - name: 'core/paragraph', - originalContent: '

I am great!

', - clientId: 'b1303fdb-3e60-43faf-a770-2e1ea656c5b8', }; - - const headingBlock2 = { - attributes: { - content: [ 'I am the greatest!' ], - level: 3, + const paragraphBlockType = { + category: 'text', + title: 'Paragraph', + edit: () => {}, + save: () => {}, + transforms: { + to: [ + { + type: 'block', + blocks: [ 'core/heading' ], + transform: () => {}, + }, + ], }, - isValid: true, - name: 'core/heading', - originalContent: '

I am the greatest!

', - clientId: 'c2403fd2-4e63-5ffa-b71c-1e0ea656c5b0', }; beforeAll( () => { - registerBlockType( 'core/heading', { - category: 'text', - title: 'Heading', - edit: () => {}, - save: () => {}, - transforms: { - to: [ - { - type: 'block', - blocks: [ 'core/paragraph' ], - transform: () => {}, - }, - { - type: 'block', - blocks: [ 'core/paragraph' ], - transform: () => {}, - isMultiBlock: true, - }, - ], - }, - } ); - - registerBlockType( 'core/paragraph', { - category: 'text', - title: 'Paragraph', - edit: () => {}, - save: () => {}, - transforms: { - to: [ - { - type: 'block', - blocks: [ 'core/heading' ], - transform: () => {}, - }, - ], - }, - } ); + registerBlockType( 'core/heading', headingBlockType ); + registerBlockType( 'core/paragraph', paragraphBlockType ); } ); afterAll( () => { @@ -116,184 +79,104 @@ describe( 'BlockSwitcherDropdownMenu', () => { unregisterBlockType( 'core/paragraph' ); } ); - test( 'should render switcher with blocks', () => { + test( 'should render switcher with block transforms', async () => { useSelect.mockImplementation( () => ( { possibleBlockTransformations: [ - { name: 'core/heading', frecency: 1 }, - { name: 'core/paragraph', frecency: 1 }, + { + name: 'core/heading', + title: headingBlockType.title, + frecency: 1, + }, + { + name: 'core/paragraph', + title: paragraphBlockType.title, + frecency: 1, + }, ], + blocks: [ headingBlock1 ], canRemove: true, } ) ); - const { container } = render( - + const user = userEvent.setup(); + render( ); + expect( + screen.getByRole( 'button', { + name: 'Block Name', + expanded: false, + } ) + ).toBeVisible(); + expect( + screen.queryByRole( 'menu', { + name: 'Block Name', + } ) + ).not.toBeInTheDocument(); + await user.type( + screen.getByRole( 'button', { + name: 'Block Name', + expanded: false, + } ), + '[ArrowDown]' ); - expect( container ).toMatchSnapshot(); + await waitFor( () => + expect( + screen.getByRole( 'button', { + name: 'Block Name', + expanded: true, + } ) + ).toBeVisible() + ); + const dropdown = screen.getByRole( 'menu', { + name: 'Block Name', + } ); + await waitFor( () => expect( dropdown ).toBeVisible() ); + const items = within( dropdown ).getAllByRole( 'menuitem' ); + expect( items ).toHaveLength( 2 ); + expect( items[ 0 ] ).toHaveTextContent( paragraphBlockType.title ); + expect( items[ 1 ] ).toHaveTextContent( headingBlockType.title ); } ); - test( 'should render disabled block switcher with multi block of different types when no transforms', () => { + test( 'should render disabled block switcher when we have a single selected block without styles and we cannot remove it', () => { useSelect.mockImplementation( () => ( { - possibleBlockTransformations: [], + blocks: [ headingBlock1 ], icon: copy, + hasBlockStyles: false, + canRemove: false, } ) ); - const { container } = render( - - ); - expect( container ).toMatchSnapshot(); + render( ); + expect( + screen.getByRole( 'button', { + name: 'Block Name', + } ) + ).toBeDisabled(); } ); - test( 'should render enabled block switcher with multi block when transforms exist', () => { + test( 'should render message for no available transforms', async () => { useSelect.mockImplementation( () => ( { - possibleBlockTransformations: [ - { name: 'core/heading', frecency: 1 }, - { name: 'core/paragraph', frecency: 1 }, - ], + possibleBlockTransformations: [], + blocks: [ headingBlock1 ], + icon: copy, canRemove: true, } ) ); - const { container } = render( - + render( ); + const user = userEvent.setup(); + await user.type( + screen.getByRole( 'button', { + name: 'Block Name', + expanded: false, + } ), + '[ArrowDown]' ); - expect( container ).toMatchSnapshot(); - } ); - - describe( 'Dropdown', () => { - beforeAll( () => { - useSelect.mockImplementation( () => ( { - possibleBlockTransformations: [ - { name: 'core/paragraph', frecency: 3 }, - ], - canRemove: true, - } ) ); - } ); - - test( 'should dropdown exist', () => { - render( - - ); - + await waitFor( () => expect( screen.getByRole( 'button', { name: 'Block Name', - expanded: false, + expanded: true, } ) - ).toBeVisible(); - } ); - - test( 'should simulate a keydown event, which should open transform toggle.', async () => { - const user = userEvent.setup(); - - render( - - ); - - expect( - screen.getByRole( 'button', { - name: 'Block Name', - expanded: false, - } ) - ).toBeVisible(); - expect( - screen.queryByRole( 'menu', { - name: 'Block Name', - } ) - ).not.toBeInTheDocument(); - - await user.type( - screen.getByRole( 'button', { - name: 'Block Name', - expanded: false, - } ), - '[ArrowDown]' - ); - - await waitFor( () => - expect( - screen.getByRole( 'button', { - name: 'Block Name', - expanded: true, - } ) - ).toBeVisible() - ); - - await waitFor( () => - expect( - screen.getByRole( 'menu', { - name: 'Block Name', - } ) - ).toBeVisible() - ); - } ); - - test( 'should simulate a click event, which should call onToggle.', async () => { - const user = userEvent.setup(); - - render( - - ); - - expect( - screen.getByRole( 'button', { - name: 'Block Name', - expanded: false, - } ) - ).toBeVisible(); - expect( - screen.queryByRole( 'menu', { - name: 'Block Name', - } ) - ).not.toBeInTheDocument(); - - await user.click( - screen.getByRole( 'button', { - name: 'Block Name', - expanded: false, - } ) - ); - - await waitFor( () => - expect( - screen.getByRole( 'button', { - name: 'Block Name', - expanded: true, - } ) - ).toBeVisible() - ); - - await waitFor( () => - expect( - screen.getByRole( 'menu', { - name: 'Block Name', - } ) - ).toBeVisible() - ); - } ); - - test( 'should create the transform items for the chosen block.', async () => { - const user = userEvent.setup(); - - render( - - ); - - await user.click( - screen.getByRole( 'button', { - name: 'Block Name', - expanded: false, - } ) - ); - - await waitFor( () => - expect( - within( - screen.getByRole( 'menu', { - name: 'Block Name', - } ) - ).getByRole( 'menuitem' ) - ).toBeInTheDocument() - ); - } ); + ).toBeVisible() + ); + expect( + screen.getByRole( 'menu', { + name: 'Block Name', + } ) + ).toHaveTextContent( 'No transforms.' ); } ); } ); diff --git a/test/e2e/specs/editor/various/block-switcher.spec.js b/test/e2e/specs/editor/various/block-switcher.spec.js index e68844ac4a9f63..8ddbcaa906f6df 100644 --- a/test/e2e/specs/editor/various/block-switcher.spec.js +++ b/test/e2e/specs/editor/various/block-switcher.spec.js @@ -77,7 +77,7 @@ test.describe( 'Block Switcher', () => { ).toHaveText( [ 'Paragraph', 'Heading', 'Columns', 'Group' ] ); } ); - test( 'Should not show the block switcher if all the blocks the list block transforms into are removed', async ( { + test( 'Should not show the block switcher if the block has no styles and cannot be removed', async ( { editor, page, pageUtils, @@ -86,36 +86,38 @@ test.describe( 'Block Switcher', () => { await editor.canvas .getByRole( 'button', { name: 'Add default block' } ) .click(); - await page.keyboard.type( '- List content' ); + await page.keyboard.type( '1' ); + await pageUtils.pressKeys( 'alt+F10' ); + const button = page + .getByRole( 'toolbar', { name: 'Block tools' } ) + .getByRole( 'button', { name: 'Paragraph' } ); + await expect( button ).toBeEnabled(); - // Remove blocks. - await page.waitForFunction( () => { - try { - window.wp.data - .dispatch( 'core/blocks' ) - .removeBlockTypes( [ - 'core/quote', - 'core/pullquote', - 'core/paragraph', - 'core/group', - 'core/heading', - 'core/columns', - ] ); - return true; - } catch { - return false; - } - } ); + await editor.clickBlockOptionsMenuItem( 'Lock' ); + await page.click( 'role=checkbox[name="Prevent removal"]' ); + await page.click( 'role=button[name="Apply"]' ); - await page.keyboard.press( 'ArrowUp' ); + // Verify the block switcher isn't enabled. + await expect( button ).toBeDisabled(); + } ); + + test( 'Should show a message if there are no transforms or styles available', async ( { + editor, + page, + pageUtils, + } ) => { + // Insert a list block. + await editor.canvas + .getByRole( 'button', { name: 'Add default block' } ) + .click(); + await page.keyboard.type( '- List content' ); await pageUtils.pressKeys( 'alt+F10' ); - // Verify the block switcher isn't enabled. - await expect( - page - .getByRole( 'toolbar', { name: 'Block tools' } ) - .getByRole( 'button', { name: 'List' } ) - ).toBeDisabled(); + await page + .getByRole( 'toolbar', { name: 'Block tools' } ) + .getByRole( 'button', { name: 'List item' } ) + .click(); + await expect( page.getByText( 'No transforms.' ) ).toBeVisible(); } ); test( 'Should show Columns block only if selected blocks are between limits (1-6)', async ( { diff --git a/test/e2e/specs/editor/various/toolbar-roving-tabindex.spec.js b/test/e2e/specs/editor/various/toolbar-roving-tabindex.spec.js index 70509348983e6b..2dc1e7c6b50515 100644 --- a/test/e2e/specs/editor/various/toolbar-roving-tabindex.spec.js +++ b/test/e2e/specs/editor/various/toolbar-roving-tabindex.spec.js @@ -57,10 +57,7 @@ test.describe( 'Toolbar roving tabindex', () => { // ensures list block toolbar uses roving tabindex await editor.insertBlock( { name: 'core/list' } ); await page.keyboard.type( 'List' ); - await ToolbarRovingTabindexUtils.testBlockToolbarKeyboardNavigation( - 'List text', - 'Select parent block: List' - ); + await ToolbarRovingTabindexUtils.focusBlockToolbar(); await page.click( `role=button[name="Select parent block: List"i]` ); await ToolbarRovingTabindexUtils.wrapCurrentBlockWithGroup( 'List' ); await ToolbarRovingTabindexUtils.testGroupKeyboardNavigation( From 6b224fc3f8c2c81f0a59236fe7eec54ac7d6c6bf Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Wed, 17 Jan 2024 12:30:53 +0000 Subject: [PATCH 32/71] Update the cherry pick script to work with the new version of gh (#57917) --- bin/cherry-pick.mjs | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/bin/cherry-pick.mjs b/bin/cherry-pick.mjs index 0c6a6c613638ba..dc71eed751cfdc 100644 --- a/bin/cherry-pick.mjs +++ b/bin/cherry-pick.mjs @@ -10,7 +10,7 @@ const LABEL = process.argv[ 2 ] || 'Backport to WP Beta/RC'; const BRANCH = getCurrentBranch(); const GITHUB_CLI_AVAILABLE = spawnSync( 'gh', [ 'auth', 'status' ] ) ?.stdout?.toString() - .includes( '✓ Logged in to github.com as' ); + .includes( '✓ Logged in to github.com' ); const AUTO_PROPAGATE_RESULTS_TO_GITHUB = GITHUB_CLI_AVAILABLE; @@ -114,16 +114,23 @@ async function fetchPRs() { const { items } = await GitHubFetch( `/search/issues?q=is:pr state:closed sort:updated label:"${ LABEL }" repo:WordPress/gutenberg` ); - const PRs = items.map( ( { id, number, title, pull_request, closed_at } ) => ( { - id, - number, - title, - pull_request, - } ) ) + const PRs = items + .map( ( { id, number, title, pull_request, closed_at } ) => ( { + id, + number, + title, + pull_request, + } ) ) .filter( ( { pull_request } ) => !! pull_request?.merged_at ) - .sort( ( a, b ) => new Date( a?.pull_request?.merged_at ) - new Date( b?.pull_request?.merged_at ) ); + .sort( + ( a, b ) => + new Date( a?.pull_request?.merged_at ) - + new Date( b?.pull_request?.merged_at ) + ); - console.log( 'Found the following PRs to cherry-pick (sorted by closed date in ascending order): ' ); + console.log( + 'Found the following PRs to cherry-pick (sorted by closed date in ascending order): ' + ); PRs.forEach( ( { number, title } ) => console.log( indent( `#${ number } – ${ title }` ) ) ); From e7e343c4bbf116c1bd953d091324d18adb95cd00 Mon Sep 17 00:00:00 2001 From: Carlos Bravo <37012961+c4rl0sbr4v0@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:37:44 +0100 Subject: [PATCH 33/71] Interactivity API: Update `preact`, `@preact/signals` and `deepsignal` dependencies (#57891) * Update preact, preact-signals, and deepsignal versions * Update changelog * Revert removal of role in wp-bind processing --- package-lock.json | 148 ++++++++++++----------- packages/interactivity/CHANGELOG.md | 4 + packages/interactivity/package.json | 6 +- packages/interactivity/src/directives.js | 13 +- 4 files changed, 83 insertions(+), 88 deletions(-) diff --git a/package-lock.json b/package-lock.json index 80ebc67b9cc1a7..6c47aab7fe1a1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7317,21 +7317,6 @@ "url": "https://opencollective.com/popperjs" } }, - "node_modules/@preact/signals": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@preact/signals/-/signals-1.1.3.tgz", - "integrity": "sha512-N09DuAVvc90bBZVRwD+aFhtGyHAmJLhS3IFoawO/bYJRcil4k83nBOchpCEoS0s5+BXBpahgp0Mjf+IOqP57Og==", - "dependencies": { - "@preact/signals-core": "^1.2.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/preact" - }, - "peerDependencies": { - "preact": "10.x" - } - }, "node_modules/@preact/signals-core": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.4.0.tgz", @@ -24240,31 +24225,6 @@ "node": ">=16.0.0" } }, - "node_modules/deepsignal": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/deepsignal/-/deepsignal-1.3.6.tgz", - "integrity": "sha512-yjd+vtiznL6YaMptOsKnEKkPr60OEApa+LRe+Qe6Ile/RfCOrELKk/YM3qVpXFZiyOI3Ng67GDEyjAlqVc697g==", - "peerDependencies": { - "@preact/signals": "^1.1.4", - "@preact/signals-core": "^1.3.1", - "@preact/signals-react": "^1.3.3", - "preact": "^10.16.0" - }, - "peerDependenciesMeta": { - "@preact/signals": { - "optional": true - }, - "@preact/signals-core": { - "optional": true - }, - "@preact/signals-react": { - "optional": true - }, - "preact": { - "optional": true - } - } - }, "node_modules/default-browser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", @@ -43621,15 +43581,6 @@ "node": ">=0.10.0" } }, - "node_modules/preact": { - "version": "10.13.2", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.13.2.tgz", - "integrity": "sha512-q44QFLhOhty2Bd0Y46fnYW0gD/cbVM9dUVtNTDKPcdXSMA7jfY+Jpd6rk3GB0lcQss0z5s/6CmVP0Z/hV+g6pw==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/preact" - } - }, "node_modules/prebuild-install": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", @@ -55274,14 +55225,63 @@ "version": "3.2.0", "license": "GPL-2.0-or-later", "dependencies": { - "@preact/signals": "^1.1.3", - "deepsignal": "^1.3.6", - "preact": "^10.13.2" + "@preact/signals": "^1.2.2", + "deepsignal": "^1.4.0", + "preact": "^10.19.3" }, "engines": { "node": ">=12" } }, + "packages/interactivity/node_modules/@preact/signals": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@preact/signals/-/signals-1.2.2.tgz", + "integrity": "sha512-ColCqdo4cRP18bAuIR4Oik5rDpiyFtPIJIygaYPMEAwTnl4buWkBOflGBSzhYyPyJfKpkwlekrvK+1pzQ2ldWw==", + "dependencies": { + "@preact/signals-core": "^1.4.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + }, + "peerDependencies": { + "preact": "10.x" + } + }, + "packages/interactivity/node_modules/deepsignal": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/deepsignal/-/deepsignal-1.4.0.tgz", + "integrity": "sha512-x0XUMT48s+xQRLc2fPFfxnYLCJ46vffw47OQ5NcHFzacOjfW5eA0NrEmI0bhQHL6MgUHkBVT4TIiWTVwzTEwpg==", + "peerDependencies": { + "@preact/signals": "^1.1.4", + "@preact/signals-core": "^1.5.1", + "@preact/signals-react": "^1.3.8 || ^2.0.0", + "preact": "^10.16.0" + }, + "peerDependenciesMeta": { + "@preact/signals": { + "optional": true + }, + "@preact/signals-core": { + "optional": true + }, + "@preact/signals-react": { + "optional": true + }, + "preact": { + "optional": true + } + } + }, + "packages/interactivity/node_modules/preact": { + "version": "10.19.3", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.3.tgz", + "integrity": "sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, "packages/interface": { "name": "@wordpress/interface", "version": "5.26.0", @@ -61425,14 +61425,6 @@ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz", "integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==" }, - "@preact/signals": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@preact/signals/-/signals-1.1.3.tgz", - "integrity": "sha512-N09DuAVvc90bBZVRwD+aFhtGyHAmJLhS3IFoawO/bYJRcil4k83nBOchpCEoS0s5+BXBpahgp0Mjf+IOqP57Og==", - "requires": { - "@preact/signals-core": "^1.2.3" - } - }, "@preact/signals-core": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.4.0.tgz", @@ -70102,9 +70094,29 @@ "@wordpress/interactivity": { "version": "file:packages/interactivity", "requires": { - "@preact/signals": "^1.1.3", - "deepsignal": "^1.3.6", - "preact": "^10.13.2" + "@preact/signals": "^1.2.2", + "deepsignal": "^1.4.0", + "preact": "^10.19.3" + }, + "dependencies": { + "@preact/signals": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@preact/signals/-/signals-1.2.2.tgz", + "integrity": "sha512-ColCqdo4cRP18bAuIR4Oik5rDpiyFtPIJIygaYPMEAwTnl4buWkBOflGBSzhYyPyJfKpkwlekrvK+1pzQ2ldWw==", + "requires": { + "@preact/signals-core": "^1.4.0" + } + }, + "deepsignal": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/deepsignal/-/deepsignal-1.4.0.tgz", + "integrity": "sha512-x0XUMT48s+xQRLc2fPFfxnYLCJ46vffw47OQ5NcHFzacOjfW5eA0NrEmI0bhQHL6MgUHkBVT4TIiWTVwzTEwpg==" + }, + "preact": { + "version": "10.19.3", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.3.tgz", + "integrity": "sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==" + } } }, "@wordpress/interface": { @@ -75509,11 +75521,6 @@ "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==", "dev": true }, - "deepsignal": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/deepsignal/-/deepsignal-1.3.6.tgz", - "integrity": "sha512-yjd+vtiznL6YaMptOsKnEKkPr60OEApa+LRe+Qe6Ile/RfCOrELKk/YM3qVpXFZiyOI3Ng67GDEyjAlqVc697g==" - }, "default-browser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", @@ -90301,11 +90308,6 @@ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" }, - "preact": { - "version": "10.13.2", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.13.2.tgz", - "integrity": "sha512-q44QFLhOhty2Bd0Y46fnYW0gD/cbVM9dUVtNTDKPcdXSMA7jfY+Jpd6rk3GB0lcQss0z5s/6CmVP0Z/hV+g6pw==" - }, "prebuild-install": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", diff --git a/packages/interactivity/CHANGELOG.md b/packages/interactivity/CHANGELOG.md index a67775b781d556..8514ecc6716f80 100644 --- a/packages/interactivity/CHANGELOG.md +++ b/packages/interactivity/CHANGELOG.md @@ -10,6 +10,10 @@ - Add the `data-wp-run` directive along with the `useInit` and `useWatch` hooks. ([57805](https://github.com/WordPress/gutenberg/pull/57805)) +### Enhancements + +- Update `preact`, `@preact/signals` and `deepsignal` dependencies. ([57891](https://github.com/WordPress/gutenberg/pull/57891)) + ### Breaking Changes - Remove `data-wp-slot` and `data-wp-fill`. ([#57854](https://github.com/WordPress/gutenberg/pull/57854)) diff --git a/packages/interactivity/package.json b/packages/interactivity/package.json index 455af38b67fcaf..35c8dd2d85bd8d 100644 --- a/packages/interactivity/package.json +++ b/packages/interactivity/package.json @@ -26,9 +26,9 @@ "react-native": "src/index", "types": "build-types", "dependencies": { - "@preact/signals": "^1.1.3", - "deepsignal": "^1.3.6", - "preact": "^10.13.2" + "@preact/signals": "^1.2.2", + "deepsignal": "^1.4.0", + "preact": "^10.19.3" }, "publishConfig": { "access": "public" diff --git a/packages/interactivity/src/directives.js b/packages/interactivity/src/directives.js index b31f8ddb4b84d4..c24c01ecdfa636 100644 --- a/packages/interactivity/src/directives.js +++ b/packages/interactivity/src/directives.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { useContext, useMemo, useRef, useLayoutEffect } from 'preact/hooks'; +import { useContext, useMemo, useRef } from 'preact/hooks'; import { deepSignal, peek } from 'deepsignal'; /** @@ -194,17 +194,6 @@ export default () => { const attribute = entry.suffix; const result = evaluate( entry ); element.props[ attribute ] = result; - // Preact doesn't handle the `role` attribute properly, as it doesn't remove it when `null`. - // We need this workaround until the following issue is solved: - // https://github.com/preactjs/preact/issues/4136 - useLayoutEffect( () => { - if ( - attribute === 'role' && - ( result === null || result === undefined ) - ) { - element.ref.current.removeAttribute( attribute ); - } - }, [ attribute, result ] ); // This seems necessary because Preact doesn't change the attributes // on the hydration, so we have to do it manually. It doesn't need From aa9b37401e4a54922dd9c3ba5f5545e20b4df96b Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Wed, 17 Jan 2024 23:50:41 +0900 Subject: [PATCH 34/71] Modified Date Block: Don't render change date tool (#57914) --- packages/block-library/src/post-date/edit.js | 71 +++++++++++--------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/packages/block-library/src/post-date/edit.js b/packages/block-library/src/post-date/edit.js index f8cd268358d49f..0a70758ac32f09 100644 --- a/packages/block-library/src/post-date/edit.js +++ b/packages/block-library/src/post-date/edit.js @@ -108,40 +108,45 @@ export default function PostDateEdit( { setAttributes( { textAlign: nextAlign } ); } } /> - { date && ! isDescendentOfQueryLoop && ( - - ( - - ) } - renderToggle={ ( { isOpen, onToggle } ) => { - const openOnArrowDown = ( event ) => { - if ( ! isOpen && event.keyCode === DOWN ) { - event.preventDefault(); - onToggle(); - } - }; - return ( - + ( + - ); - } } - /> - - ) } + ) } + renderToggle={ ( { isOpen, onToggle } ) => { + const openOnArrowDown = ( event ) => { + if ( + ! isOpen && + event.keyCode === DOWN + ) { + event.preventDefault(); + onToggle(); + } + }; + return ( + + ); + } } + /> +
+ ) }
From 4e982f45cc372cae344f05d3d838d6b03fb5596b Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Wed, 17 Jan 2024 10:31:22 -0600 Subject: [PATCH 35/71] HTML API: Backport updates from Core (#57022) (#57022) Updates from WordPress/wordpress-develop at 54a09a7ec99c59b8e640bd5aacebfdbf03bb02cc - WordPress/wordpress-develop#5535 Adds support for H1 - H6 elements in the HTML Processor. - WordPress/wordpress-develop#5725 Pause the Tag Processor when reaching the end of the document inside an incomplete syntax element. - Incorporates linting changes from "TODO:" to "todo". - WordPress/wordpress-develop#5762 Handles the "all other tags" rules in IN BODY insertion mode. - WordPress/wordpress-develop#5539 Adds support for list elements in the HTML Processor. This patch adds the blanket exclusion from the HTML API compatability layer after they were removed and started blocking updates from Core. The PHP files in the compatability layer are merged and maintained in the Core repo and all changes or updates need to happen first in Core and then be brought over to Gutenberg as built files. From Gutenberg's perspective they are no different than NPM packages. Co-authored-by: Anton Vlasenko <43744263+anton-vlasenko@users.noreply.github.com> Co-authored-by: Bernie Reiter <96308+ockham@users.noreply.github.com> --- ...class-gutenberg-html-open-elements-6-5.php | 462 +++++ .../class-gutenberg-html-processor-6-5.php | 1745 +++++++++++++++++ ...ass-gutenberg-html-processor-state-6-5.php | 143 ++ ...class-gutenberg-html-tag-processor-6-5.php | 509 ++++- lib/load.php | 3 + phpcs.xml.dist | 5 + 6 files changed, 2771 insertions(+), 96 deletions(-) create mode 100644 lib/compat/wordpress-6.5/html-api/class-gutenberg-html-open-elements-6-5.php create mode 100644 lib/compat/wordpress-6.5/html-api/class-gutenberg-html-processor-6-5.php create mode 100644 lib/compat/wordpress-6.5/html-api/class-gutenberg-html-processor-state-6-5.php diff --git a/lib/compat/wordpress-6.5/html-api/class-gutenberg-html-open-elements-6-5.php b/lib/compat/wordpress-6.5/html-api/class-gutenberg-html-open-elements-6-5.php new file mode 100644 index 00000000000000..0d8901225c792e --- /dev/null +++ b/lib/compat/wordpress-6.5/html-api/class-gutenberg-html-open-elements-6-5.php @@ -0,0 +1,462 @@ + Initially, the stack of open elements is empty. The stack grows + * > downwards; the topmost node on the stack is the first one added + * > to the stack, and the bottommost node of the stack is the most + * > recently added node in the stack (notwithstanding when the stack + * > is manipulated in a random access fashion as part of the handling + * > for misnested tags). + * + * @since 6.4.0 + * + * @access private + * + * @see https://html.spec.whatwg.org/#stack-of-open-elements + * @see WP_HTML_Processor + */ +class Gutenberg_HTML_Open_Elements_6_5 { + /** + * Holds the stack of open element references. + * + * @since 6.4.0 + * + * @var WP_HTML_Token[] + */ + public $stack = array(); + + /** + * Whether a P element is in button scope currently. + * + * This class optimizes scope lookup by pre-calculating + * this value when elements are added and removed to the + * stack of open elements which might change its value. + * This avoids frequent iteration over the stack. + * + * @since 6.4.0 + * + * @var bool + */ + private $has_p_in_button_scope = false; + + /** + * Reports if a specific node is in the stack of open elements. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $token Look for this node in the stack. + * @return bool Whether the referenced node is in the stack of open elements. + */ + public function contains_node( $token ) { + foreach ( $this->walk_up() as $item ) { + if ( $token->bookmark_name === $item->bookmark_name ) { + return true; + } + } + + return false; + } + + /** + * Returns how many nodes are currently in the stack of open elements. + * + * @since 6.4.0 + * + * @return int How many node are in the stack of open elements. + */ + public function count() { + return count( $this->stack ); + } + + /** + * Returns the node at the end of the stack of open elements, + * if one exists. If the stack is empty, returns null. + * + * @since 6.4.0 + * + * @return WP_HTML_Token|null Last node in the stack of open elements, if one exists, otherwise null. + */ + public function current_node() { + $current_node = end( $this->stack ); + + return $current_node ? $current_node : null; + } + + /** + * Returns whether an element is in a specific scope. + * + * ## HTML Support + * + * This function skips checking for the termination list because there + * are no supported elements which appear in the termination list. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope + * + * @param string $tag_name Name of tag check. + * @param string[] $termination_list List of elements that terminate the search. + * @return bool Whether the element was found in a specific scope. + */ + public function has_element_in_specific_scope( $tag_name, $termination_list ) { + foreach ( $this->walk_up() as $node ) { + if ( $node->node_name === $tag_name ) { + return true; + } + + if ( + '(internal: H1 through H6 - do not use)' === $tag_name && + in_array( $node->node_name, array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' ), true ) + ) { + return true; + } + + switch ( $node->node_name ) { + case 'HTML': + return false; + } + + if ( in_array( $node->node_name, $termination_list, true ) ) { + return false; + } + } + + return false; + } + + /** + * Returns whether a particular element is in scope. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#has-an-element-in-scope + * + * @param string $tag_name Name of tag to check. + * @return bool Whether given element is in scope. + */ + public function has_element_in_scope( $tag_name ) { + return $this->has_element_in_specific_scope( + $tag_name, + array( + + /* + * Because it's not currently possible to encounter + * one of the termination elements, they don't need + * to be listed here. If they were, they would be + * unreachable and only waste CPU cycles while + * scanning through HTML. + */ + ) + ); + } + + /** + * Returns whether a particular element is in list item scope. + * + * @since 6.4.0 + * @since 6.5.0 Implemented: no longer throws on every invocation. + * + * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope + * + * @param string $tag_name Name of tag to check. + * @return bool Whether given element is in scope. + */ + public function has_element_in_list_item_scope( $tag_name ) { + return $this->has_element_in_specific_scope( + $tag_name, + array( + // There are more elements that belong here which aren't currently supported. + 'OL', + 'UL', + ) + ); + } + + /** + * Returns whether a particular element is in button scope. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope + * + * @param string $tag_name Name of tag to check. + * @return bool Whether given element is in scope. + */ + public function has_element_in_button_scope( $tag_name ) { + return $this->has_element_in_specific_scope( $tag_name, array( 'BUTTON' ) ); + } + + /** + * Returns whether a particular element is in table scope. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#has-an-element-in-table-scope + * + * @throws WP_HTML_Unsupported_Exception Always until this function is implemented. + * + * @param string $tag_name Name of tag to check. + * @return bool Whether given element is in scope. + */ + public function has_element_in_table_scope( $tag_name ) { + throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on table scope.' ); + + return false; // The linter requires this unreachable code until the function is implemented and can return. + } + + /** + * Returns whether a particular element is in select scope. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#has-an-element-in-select-scope + * + * @throws WP_HTML_Unsupported_Exception Always until this function is implemented. + * + * @param string $tag_name Name of tag to check. + * @return bool Whether given element is in scope. + */ + public function has_element_in_select_scope( $tag_name ) { + throw new WP_HTML_Unsupported_Exception( 'Cannot process elements depending on select scope.' ); + + return false; // The linter requires this unreachable code until the function is implemented and can return. + } + + /** + * Returns whether a P is in BUTTON scope. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope + * + * @return bool Whether a P is in BUTTON scope. + */ + public function has_p_in_button_scope() { + return $this->has_p_in_button_scope; + } + + /** + * Pops a node off of the stack of open elements. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#stack-of-open-elements + * + * @return bool Whether a node was popped off of the stack. + */ + public function pop() { + $item = array_pop( $this->stack ); + + if ( null === $item ) { + return false; + } + + $this->after_element_pop( $item ); + return true; + } + + /** + * Pops nodes off of the stack of open elements until one with the given tag name has been popped. + * + * @since 6.4.0 + * + * @see WP_HTML_Open_Elements::pop + * + * @param string $tag_name Name of tag that needs to be popped off of the stack of open elements. + * @return bool Whether a tag of the given name was found and popped off of the stack of open elements. + */ + public function pop_until( $tag_name ) { + foreach ( $this->walk_up() as $item ) { + $this->pop(); + + if ( + '(internal: H1 through H6 - do not use)' === $tag_name && + in_array( $item->node_name, array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' ), true ) + ) { + return true; + } + + if ( $tag_name === $item->node_name ) { + return true; + } + } + + return false; + } + + /** + * Pushes a node onto the stack of open elements. + * + * @since 6.4.0 + * + * @see https://html.spec.whatwg.org/#stack-of-open-elements + * + * @param WP_HTML_Token $stack_item Item to add onto stack. + */ + public function push( $stack_item ) { + $this->stack[] = $stack_item; + $this->after_element_push( $stack_item ); + } + + /** + * Removes a specific node from the stack of open elements. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $token The node to remove from the stack of open elements. + * @return bool Whether the node was found and removed from the stack of open elements. + */ + public function remove_node( $token ) { + foreach ( $this->walk_up() as $position_from_end => $item ) { + if ( $token->bookmark_name !== $item->bookmark_name ) { + continue; + } + + $position_from_start = $this->count() - $position_from_end - 1; + array_splice( $this->stack, $position_from_start, 1 ); + $this->after_element_pop( $item ); + return true; + } + + return false; + } + + + /** + * Steps through the stack of open elements, starting with the top element + * (added first) and walking downwards to the one added last. + * + * This generator function is designed to be used inside a "foreach" loop. + * + * Example: + * + * $html = 'We are here'; + * foreach ( $stack->walk_down() as $node ) { + * echo "{$node->node_name} -> "; + * } + * > EM -> STRONG -> A -> + * + * To start with the most-recently added element and walk towards the top, + * see WP_HTML_Open_Elements::walk_up(). + * + * @since 6.4.0 + */ + public function walk_down() { + $count = count( $this->stack ); + + for ( $i = 0; $i < $count; $i++ ) { + yield $this->stack[ $i ]; + } + } + + /** + * Steps through the stack of open elements, starting with the bottom element + * (added last) and walking upwards to the one added first. + * + * This generator function is designed to be used inside a "foreach" loop. + * + * Example: + * + * $html = 'We are here'; + * foreach ( $stack->walk_up() as $node ) { + * echo "{$node->node_name} -> "; + * } + * > A -> STRONG -> EM -> + * + * To start with the first added element and walk towards the bottom, + * see WP_HTML_Open_Elements::walk_down(). + * + * @since 6.4.0 + * @since 6.5.0 Accepts $above_this_node to start traversal above a given node, if it exists. + * + * @param ?WP_HTML_Token $above_this_node Start traversing above this node, if provided and if the node exists. + */ + public function walk_up( $above_this_node = null ) { + $has_found_node = null === $above_this_node; + + for ( $i = count( $this->stack ) - 1; $i >= 0; $i-- ) { + $node = $this->stack[ $i ]; + + if ( ! $has_found_node ) { + $has_found_node = $node === $above_this_node; + continue; + } + + yield $node; + } + } + + /* + * Internal helpers. + */ + + /** + * Updates internal flags after adding an element. + * + * Certain conditions (such as "has_p_in_button_scope") are maintained here as + * flags that are only modified when adding and removing elements. This allows + * the HTML Processor to quickly check for these conditions instead of iterating + * over the open stack elements upon each new tag it encounters. These flags, + * however, need to be maintained as items are added and removed from the stack. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $item Element that was added to the stack of open elements. + */ + public function after_element_push( $item ) { + /* + * When adding support for new elements, expand this switch to trap + * cases where the precalculated value needs to change. + */ + switch ( $item->node_name ) { + case 'BUTTON': + $this->has_p_in_button_scope = false; + break; + + case 'P': + $this->has_p_in_button_scope = true; + break; + } + } + + /** + * Updates internal flags after removing an element. + * + * Certain conditions (such as "has_p_in_button_scope") are maintained here as + * flags that are only modified when adding and removing elements. This allows + * the HTML Processor to quickly check for these conditions instead of iterating + * over the open stack elements upon each new tag it encounters. These flags, + * however, need to be maintained as items are added and removed from the stack. + * + * @since 6.4.0 + * + * @param WP_HTML_Token $item Element that was removed from the stack of open elements. + */ + public function after_element_pop( $item ) { + /* + * When adding support for new elements, expand this switch to trap + * cases where the precalculated value needs to change. + */ + switch ( $item->node_name ) { + case 'BUTTON': + $this->has_p_in_button_scope = $this->has_element_in_button_scope( 'P' ); + break; + + case 'P': + $this->has_p_in_button_scope = $this->has_element_in_button_scope( 'P' ); + break; + } + } +} diff --git a/lib/compat/wordpress-6.5/html-api/class-gutenberg-html-processor-6-5.php b/lib/compat/wordpress-6.5/html-api/class-gutenberg-html-processor-6-5.php new file mode 100644 index 00000000000000..eae2b1eda815ca --- /dev/null +++ b/lib/compat/wordpress-6.5/html-api/class-gutenberg-html-processor-6-5.php @@ -0,0 +1,1745 @@ +next_tag( array( 'breadcrumbs' => array( 'DIV', 'FIGURE', 'IMG' ) ) ) ) { + * $processor->add_class( 'responsive-image' ); + * } + * + * #### Breadcrumbs + * + * Breadcrumbs represent the stack of open elements from the root + * of the document or fragment down to the currently-matched node, + * if one is currently selected. Call WP_HTML_Processor::get_breadcrumbs() + * to inspect the breadcrumbs for a matched tag. + * + * Breadcrumbs can specify nested HTML structure and are equivalent + * to a CSS selector comprising tag names separated by the child + * combinator, such as "DIV > FIGURE > IMG". + * + * Since all elements find themselves inside a full HTML document + * when parsed, the return value from `get_breadcrumbs()` will always + * contain any implicit outermost elements. For example, when parsing + * with `create_fragment()` in the `BODY` context (the default), any + * tag in the given HTML document will contain `array( 'HTML', 'BODY', … )` + * in its breadcrumbs. + * + * Despite containing the implied outermost elements in their breadcrumbs, + * tags may be found with the shortest-matching breadcrumb query. That is, + * `array( 'IMG' )` matches all IMG elements and `array( 'P', 'IMG' )` + * matches all IMG elements directly inside a P element. To ensure that no + * partial matches erroneously match it's possible to specify in a query + * the full breadcrumb match all the way down from the root HTML element. + * + * Example: + * + * $html = '
A lovely day outside
'; + * // ----- Matches here. + * $processor->next_tag( array( 'breadcrumbs' => array( 'FIGURE', 'IMG' ) ) ); + * + * $html = '
A lovely day outside
'; + * // ---- Matches here. + * $processor->next_tag( array( 'breadcrumbs' => array( 'FIGURE', 'FIGCAPTION', 'EM' ) ) ); + * + * $html = '
'; + * // ----- Matches here, because IMG must be a direct child of the implicit BODY. + * $processor->next_tag( array( 'breadcrumbs' => array( 'BODY', 'IMG' ) ) ); + * + * ## HTML Support + * + * This class implements a small part of the HTML5 specification. + * It's designed to operate within its support and abort early whenever + * encountering circumstances it can't properly handle. This is + * the principle way in which this class remains as simple as possible + * without cutting corners and breaking compliance. + * + * ### Supported elements + * + * If any unsupported element appears in the HTML input the HTML Processor + * will abort early and stop all processing. This draconian measure ensures + * that the HTML Processor won't break any HTML it doesn't fully understand. + * + * The following list specifies the HTML tags that _are_ supported: + * + * - Containers: ADDRESS, BLOCKQUOTE, DETAILS, DIALOG, DIV, FOOTER, HEADER, MAIN, MENU, SPAN, SUMMARY. + * - Custom elements: All custom elements are supported. :) + * - Form elements: BUTTON, DATALIST, FIELDSET, LABEL, LEGEND, METER, PROGRESS, SEARCH. + * - Formatting elements: B, BIG, CODE, EM, FONT, I, SMALL, STRIKE, STRONG, TT, U. + * - Heading elements: H1, H2, H3, H4, H5, H6, HGROUP. + * - Links: A. + * - Lists: DD, DL, DT, LI, OL, LI. + * - Media elements: AUDIO, CANVAS, FIGCAPTION, FIGURE, IMG, MAP, PICTURE, VIDEO. + * - Paragraph: P. + * - Phrasing elements: ABBR, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR. + * - Sectioning elements: ARTICLE, ASIDE, NAV, SECTION. + * - Templating elements: SLOT. + * - Text decoration: RUBY. + * - Deprecated elements: ACRONYM, BLINK, CENTER, DIR, ISINDEX, MULTICOL, NEXTID, SPACER. + * + * ### Supported markup + * + * Some kinds of non-normative HTML involve reconstruction of formatting elements and + * re-parenting of mis-nested elements. For example, a DIV tag found inside a TABLE + * may in fact belong _before_ the table in the DOM. If the HTML Processor encounters + * such a case it will stop processing. + * + * The following list specifies HTML markup that _is_ supported: + * + * - Markup involving only those tags listed above. + * - Fully-balanced and non-overlapping tags. + * - HTML with unexpected tag closers. + * - Some unbalanced or overlapping tags. + * - P tags after unclosed P tags. + * - BUTTON tags after unclosed BUTTON tags. + * - A tags after unclosed A tags that don't involve any active formatting elements. + * + * @since 6.4.0 + * + * @see WP_HTML_Tag_Processor + * @see https://html.spec.whatwg.org/ + */ +class Gutenberg_HTML_Processor_6_5 extends Gutenberg_HTML_Tag_Processor_6_5 { + /** + * The maximum number of bookmarks allowed to exist at any given time. + * + * HTML processing requires more bookmarks than basic tag processing, + * so this class constant from the Tag Processor is overwritten. + * + * @since 6.4.0 + * + * @var int + */ + const MAX_BOOKMARKS = 100; + + /** + * Static query for instructing the Tag Processor to visit every token. + * + * @access private + * + * @since 6.4.0 + * + * @var array + */ + const VISIT_EVERYTHING = array( 'tag_closers' => 'visit' ); + + /** + * Holds the working state of the parser, including the stack of + * open elements and the stack of active formatting elements. + * + * Initialized in the constructor. + * + * @since 6.4.0 + * + * @var WP_HTML_Processor_State + */ + private $state = null; + + /** + * Used to create unique bookmark names. + * + * This class sets a bookmark for every tag in the HTML document that it encounters. + * The bookmark name is auto-generated and increments, starting with `1`. These are + * internal bookmarks and are automatically released when the referring WP_HTML_Token + * goes out of scope and is garbage-collected. + * + * @since 6.4.0 + * + * @see WP_HTML_Processor::$release_internal_bookmark_on_destruct + * + * @var int + */ + private $bookmark_counter = 0; + + /** + * Stores an explanation for why something failed, if it did. + * + * @see self::get_last_error + * + * @since 6.4.0 + * + * @var string|null + */ + private $last_error = null; + + /** + * Releases a bookmark when PHP garbage-collects its wrapping WP_HTML_Token instance. + * + * This function is created inside the class constructor so that it can be passed to + * the stack of open elements and the stack of active formatting elements without + * exposing it as a public method on the class. + * + * @since 6.4.0 + * + * @var closure + */ + private $release_internal_bookmark_on_destruct = null; + + /* + * Public Interface Functions + */ + + /** + * Creates an HTML processor in the fragment parsing mode. + * + * Use this for cases where you are processing chunks of HTML that + * will be found within a bigger HTML document, such as rendered + * block output that exists within a post, `the_content` inside a + * rendered site layout. + * + * Fragment parsing occurs within a context, which is an HTML element + * that the document will eventually be placed in. It becomes important + * when special elements have different rules than others, such as inside + * a TEXTAREA or a TITLE tag where things that look like tags are text, + * or inside a SCRIPT tag where things that look like HTML syntax are JS. + * + * The context value should be a representation of the tag into which the + * HTML is found. For most cases this will be the body element. The HTML + * form is provided because a context element may have attributes that + * impact the parse, such as with a SCRIPT tag and its `type` attribute. + * + * ## Current HTML Support + * + * - The only supported context is ``, which is the default value. + * - The only supported document encoding is `UTF-8`, which is the default value. + * + * @since 6.4.0 + * + * @param string $html Input HTML fragment to process. + * @param string $context Context element for the fragment, must be default of ``. + * @param string $encoding Text encoding of the document; must be default of 'UTF-8'. + * @return WP_HTML_Processor|null The created processor if successful, otherwise null. + */ + public static function create_fragment( $html, $context = '', $encoding = 'UTF-8' ) { + if ( '' !== $context || 'UTF-8' !== $encoding ) { + return null; + } + + $p = new self( $html, self::CONSTRUCTOR_UNLOCK_CODE ); + $p->state->context_node = array( 'BODY', array() ); + $p->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_IN_BODY; + + // @todo Create "fake" bookmarks for non-existent but implied nodes. + $p->bookmarks['root-node'] = new WP_HTML_Span( 0, 0 ); + $p->bookmarks['context-node'] = new WP_HTML_Span( 0, 0 ); + + $p->state->stack_of_open_elements->push( + new WP_HTML_Token( + 'root-node', + 'HTML', + false + ) + ); + + $p->state->stack_of_open_elements->push( + new WP_HTML_Token( + 'context-node', + $p->state->context_node[0], + false + ) + ); + + return $p; + } + + /** + * Constructor. + * + * Do not use this method. Use the static creator methods instead. + * + * @access private + * + * @since 6.4.0 + * + * @see WP_HTML_Processor::create_fragment() + * + * @param string $html HTML to process. + * @param string|null $use_the_static_create_methods_instead This constructor should not be called manually. + */ + public function __construct( $html, $use_the_static_create_methods_instead = null ) { + parent::__construct( $html ); + + if ( self::CONSTRUCTOR_UNLOCK_CODE !== $use_the_static_create_methods_instead ) { + _doing_it_wrong( + __METHOD__, + sprintf( + /* translators: %s: WP_HTML_Processor::create_fragment(). */ + __( 'Call %s to create an HTML Processor instead of calling the constructor directly.' ), + 'WP_HTML_Processor::create_fragment()' + ), + '6.4.0' + ); + } + + $this->state = new Gutenberg_HTML_Processor_State_6_5(); + + /* + * Create this wrapper so that it's possible to pass + * a private method into WP_HTML_Token classes without + * exposing it to any public API. + */ + $this->release_internal_bookmark_on_destruct = function ( $name ) { + parent::release_bookmark( $name ); + }; + } + + /** + * Returns the last error, if any. + * + * Various situations lead to parsing failure but this class will + * return `false` in all those cases. To determine why something + * failed it's possible to request the last error. This can be + * helpful to know to distinguish whether a given tag couldn't + * be found or if content in the document caused the processor + * to give up and abort processing. + * + * Example + * + * $processor = WP_HTML_Processor::create_fragment( '