diff --git a/docs/contributors/versions-in-wordpress.md b/docs/contributors/versions-in-wordpress.md
index 4449f13996c62..ce9eb458e7372 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 |
diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md
index 84396caefbf47..bee68530eeb23 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/lib/block-supports/pattern.php b/lib/block-supports/pattern.php
index 2f7717091ff50..7c344d669e1f9 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/lib/block-supports/typography.php b/lib/block-supports/typography.php
index 3cda86cf0a257..b3fa4b4252eed 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/lib/compat/wordpress-6.5/blocks.php b/lib/compat/wordpress-6.5/blocks.php
new file mode 100644
index 0000000000000..b6890c14dc1f9
--- /dev/null
+++ b/lib/compat/wordpress-6.5/blocks.php
@@ -0,0 +1,24 @@
+=12"
@@ -56325,7 +56326,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 +56350,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"
@@ -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",
@@ -69473,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": {
@@ -73682,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/a11y/CHANGELOG.md b/packages/a11y/CHANGELOG.md
index b78906a8b23e1..7c5c9d7978410 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 399b5bd451455..c2d1b666339bf 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",
"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 98c1d6e0f9621..42c3783652797 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 01ac7d7961f26..007b02ad29a71 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",
"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 cd9a3d8582dd9..67df4dad50c64 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 be6d4adb079ee..02d0474156bfc 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",
"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 301f58946ecdd..4e4c9a91bc781 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 8acd56c43fc8c..e335e4ac7349b 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",
"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 bab957e21b3ae..19269095d73d7 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 e9f2b1b19596f..3af7e30b2e234 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",
"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 af6099fa128a1..fd1a0546da3ad 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 14d1364e72bf1..6163ad1df3ff1 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",
"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 1b4af03b532b0..4149381dce16f 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 2461fb083c3fa..66e63b24ff51e 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",
"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 3f1e818df2efd..a399317b2aef0 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 bc5984014ee6c..64d3835a00aca 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",
"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 7dd54454a0488..b2a501021c5aa 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 b1bc807dfd0b4..53071228e0af1 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",
"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 2a9b8c670db45..608fc4c4f005c 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 2962204ac36e6..466d1fd783e95 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",
"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 64763eb66f7a8..a66143dd30ac9 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 1f9be9e2608b9..cf8f13a0b9f11 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",
"description": "Generic block editor.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
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 b26d542708c37..595011b68bafb 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 0a1092a1d8128..27b1cfe8c994a 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/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js
index d31a710fd94fe..e8230eea89daa 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 1cf3705454f9b..5e47e966ef334 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 99281f55fcd09..7587dcdf56fd7 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' ) {
diff --git a/packages/block-library/CHANGELOG.md b/packages/block-library/CHANGELOG.md
index d5079fbbb4ac2..d17ee65991c0a 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 30e341d08923a..12f4e23d9da4d 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",
"description": "Block library for the WordPress editor.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
@@ -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 6331d33c27a7b..c53f52bfb703e 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 ];
}
@@ -147,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 },
@@ -208,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.
@@ -237,7 +258,7 @@ export default function ReusableBlockEdit( {
}, [
__unstableMarkNextChangeAsNotPersistent,
patternClientId,
- editedRecord,
+ initialBlocks,
replaceInnerBlocks,
registry,
getBlockEditingMode,
@@ -293,6 +314,12 @@ export default function ReusableBlockEdit( {
editOriginalProps.onClick( event );
};
+ const resetOverrides = () => {
+ if ( overrides ) {
+ replaceInnerBlocks( patternClientId, initialBlocks );
+ }
+ };
+
let children = null;
if ( hasAlreadyRendered ) {
@@ -333,6 +360,21 @@ export default function ReusableBlockEdit( {
) }
+
+ { hasOverridableBlocks && (
+
+
+
+ { __( 'Reset to original' ) }
+
+
+
+ ) }
+
{ children === null ? (
) : (
diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js
index d41d917d5b8fe..b46e145d760ad 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/navigation-link/index.php b/packages/block-library/src/navigation-link/index.php
index f7c26afd1f88d..1dcb2996a8e15 100644
--- a/packages/block-library/src/navigation-link/index.php
+++ b/packages/block-library/src/navigation-link/index.php
@@ -368,11 +368,11 @@ function block_core_navigation_link_unregister_variation( $name ) {
/**
* Register the navigation link block.
+ * Returns an array of variations for the navigation link block.
*
- * @uses render_block_core_navigation()
- * @throws WP_Error An WP_Error exception parsing the block definition.
+ * @return array
*/
-function register_block_core_navigation_link() {
+function build_navigation_link_block_variations() {
// This will only handle post types and taxonomies registered until this point (init on priority 9).
// See action hooks below for other post types and taxonomies.
// See https://github.com/WordPress/gutenberg/issues/53826 for details.
@@ -407,11 +407,21 @@ function register_block_core_navigation_link() {
}
}
+ return array_merge( $built_ins, $variations );
+}
+
+/**
+ * Register the navigation link block.
+ *
+ * @uses render_block_core_navigation()
+ * @throws WP_Error An WP_Error exception parsing the block definition.
+ */
+function register_block_core_navigation_link() {
register_block_type_from_metadata(
__DIR__ . '/navigation-link',
array(
- 'render_callback' => '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/paragraph/edit.js b/packages/block-library/src/paragraph/edit.js
index ac766f69dd846..cecfdce474c51 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 } )
+ }
+ />
+
+ ) }
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/pullquote/block.json b/packages/block-library/src/pullquote/block.json
index 7fc81d5683bd1..f041d46cda8cd 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 94d043d1cf2f5..b53dbf6561638 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;
diff --git a/packages/block-library/src/template-part/index.php b/packages/block-library/src/template-part/index.php
index 0c97f88b98e38..86a17f33c92f3 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/packages/block-serialization-default-parser/CHANGELOG.md b/packages/block-serialization-default-parser/CHANGELOG.md
index 5e8e65ddea45b..b705866a04957 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 56a0c56269add..668fc92eea94b 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",
"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 8181385569751..c6f586ce6b480 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 cdd2884211afe..df841c8a506c1 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",
"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 0cce621f5b6cd..d932b12a54531 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 a2aff291dbda3..af0e076574518 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",
"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 451716f50edb9..cf94e1caf70e5 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 815fe6eba00fe..4b2747e505e16 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",
"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 8c697a90b20be..3b42cc552899f 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 20fcea5c67b11..5314cf671b1ba 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",
"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 ba0629eff7f37..9a245d85ebf84 100644
--- a/packages/components/CHANGELOG.md
+++ b/packages/components/CHANGELOG.md
@@ -2,6 +2,24 @@
## 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)).
+- `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
- `NumberControl`: Make increment and decrement buttons keyboard accessible. ([#57402](https://github.com/WordPress/gutenberg/pull/57402)).
@@ -19,12 +37,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)).
@@ -34,10 +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)).
-- `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
@@ -45,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)
diff --git a/packages/components/package.json b/packages/components/package.json
index cd440998b9323..a16778a7778b5 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",
"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/components/src/button/README.md b/packages/components/src/button/README.md
index 3f577991dc44b..a8cdcf82c9665 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 b781786cc1271..e728739806af7 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;
/**
diff --git a/packages/compose/CHANGELOG.md b/packages/compose/CHANGELOG.md
index d6938f4f26f63..25ea99778733f 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 0dec375ed2243..63ebb740de6fa 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",
"description": "WordPress higher-order components (HOCs).",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
@@ -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 1d838a1158ecf..94ab6048a4b46 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();
diff --git a/packages/core-commands/CHANGELOG.md b/packages/core-commands/CHANGELOG.md
index 1abb8f289e7d9..a65a04f4dbe04 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 a3e42ee2c236a..076dce00569e0 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",
"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 ae8d7543f8fbd..306ee51c90eab 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 dfbdc2a073765..5970b985a58d4 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",
"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 159c65e9ada19..2025feabddc63 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 4b89f9d49ae83..e95e68fef062a 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",
"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 021972a2178bb..971da45400f01 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 994294adf3a48..6a7f0b85901b0 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",
"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 a3a1b01bc09fb..9d000b18d6aae 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 32a04f4b9857e..b25dd050a1ef4 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",
"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 733a2e88914e8..5ebaf223d81a3 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 88b32f5a23bec..5ee1b3ddb6037 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",
"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 a5be93faab004..964ab8830b1c0 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 5018027820afe..2c1fc4dc011e7 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",
"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 328928d93d509..9c56bdfd15831 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 37e9d8753cda0..135e9697ad1b1 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",
"description": "Data module for WordPress.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
diff --git a/packages/data/src/factory.js b/packages/data/src/factory.js
index a4adc4dcf4251..389c4a7e2b33a 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 0000000000000..bc567474541e2
--- /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
+ } );
+} );
diff --git a/packages/dataviews/CHANGELOG.md b/packages/dataviews/CHANGELOG.md
index bd4afefab43fe..231fa05170a08 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 4dfb35948af46..ddb51cc846985 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",
"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/dataviews/src/style.scss b/packages/dataviews/src/style.scss
index 06997fee49a05..d5b962212af79 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 7c18d31dccd19..de0d5eca06b73 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 22e68b4f56331..8be188bf91c81 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/date/CHANGELOG.md b/packages/date/CHANGELOG.md
index 73ad2bc3daa06..d6158df35df7d 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 65f346132f928..1553dba858339 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",
"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 414a5229117ce..c147941c98e80 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 b3a296e3f0014..06b9efd857d03 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",
"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 f55a064fe5dcf..3c10ecf640335 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 b67260df2cfe3..7dc51929550c3 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",
"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 9ce1823b8bb6c..8b3827a0c9e81 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 55b7675309f4c..844518cc1cbab 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",
"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 5def1df47ebae..05d3e7e79f07f 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 f4716f6bce305..d902a14c662f7 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",
"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 6e76f6e1e3276..dda6f4e53b489 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 8d783a9725592..304653e4074b9 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",
"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 cd848a23461ae..8f3e85e901191 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 6f84aa51be554..89bfb6ab66ae8 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",
"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 9602fa9a33434..ef5b7f4de2f9d 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 b95b6cfb58d36..6943658627510 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",
"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 bf44801199780..bfd10d63c9271 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 f9d8072adb915..864eba1af12ac 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",
"description": "End-To-End (E2E) tests for WordPress.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
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 98803669c6b0b..91d03b6fb8e19 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 82f37f4f78f1f..12b8ca9488ea1 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/edit-post/CHANGELOG.md b/packages/edit-post/CHANGELOG.md
index 34ccd0953562f..d029f33335102 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 1b3b107a83413..4041630884f75 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",
"description": "Edit Post module for WordPress.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
diff --git a/packages/edit-post/src/store/selectors.js b/packages/edit-post/src/store/selectors.js
index b6a54dfd0de2c..1a39a516da8f5 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/CHANGELOG.md b/packages/edit-site/CHANGELOG.md
index ff3e85639d1de..d61e6028c0042 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 e560e5e682797..830d525ed060a 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",
"description": "Edit Site Page module for WordPress.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
diff --git a/packages/edit-site/src/components/page-pages/index.js b/packages/edit-site/src/components/page-pages/index.js
index 45368c11833f3..5ef05273be02c 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 ad474d882cfcf..19b9b6381ec3b 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 dd3c52ef08c1a..6be2f904a65ec 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 ddc48542ee1b7..0d4ddd31620ab 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 fe9f046f31972..329103bd2b97d 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',
diff --git a/packages/edit-site/src/components/site-hub/index.js b/packages/edit-site/src/components/site-hub/index.js
index 7af0d53090c57..f79df2df36709 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 0fda40c2e8a9a..ef063c39841fc 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 {
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 7b1321fdf4b8a..36056cf4b43bd 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/packages/edit-widgets/CHANGELOG.md b/packages/edit-widgets/CHANGELOG.md
index 34fb6a54d8c25..efef3dd674b80 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 974a0ba02905f..8861148d173ca 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",
"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 dc8fffd379798..4484201d28fcc 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 63656899e587c..b974c7443851f 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",
"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 89c422ad27a0b..e57fc1e022e45 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 6ce4714c25f0b..9f075bdfff56d 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",
"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 6605add780096..154e8d36b3b44 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 cd3fd075568e2..5036479faa532 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",
"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 7b5f651626528..8cb9c60a82c57 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 2618d5818400c..cfeabcb8c06e9 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",
"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 533c5e7788c66..10e82685d7b74 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 ef0931dfb2c6c..b56a61ab16044 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",
"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 8b3d314e9a0f2..1ea92da62e1a4 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 b71addc176e7c..280fd5d8c2042 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",
"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 c428f26ed17f1..7b71f8d382f01 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 0c29dacb17895..08fa1eb54819c 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",
"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 d7c1b049e3790..ba88048d21a5a 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 92e85598707b9..10965eaf51fab 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",
"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 f227f81571087..cca18773c660e 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 7346330946e19..a2b2ed907cf96 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",
"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 df0e3e43b1d81..a5ca30a014f1d 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 31ebc3c57d129..b94cb445b5760 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",
"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 db396cfa11de1..a67775b781d55 100644
--- a/packages/interactivity/CHANGELOG.md
+++ b/packages/interactivity/CHANGELOG.md
@@ -2,13 +2,20 @@
## 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))
-### Breaking Change
+### Breaking Changes
+
+- 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))
-- Remove `data-wp-slot` and `data-wp-fill`. ([#57854](https://github.com/WordPress/gutenberg/pull/57854))
+## 3.2.0 (2024-01-10)
### Bug Fix
diff --git a/packages/interactivity/package.json b/packages/interactivity/package.json
index c856628c5d79e..455af38b67fca 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",
"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/interactivity/src/directives.js b/packages/interactivity/src/directives.js
index cddab32079823..b31f8ddb4b84d 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',
@@ -329,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/packages/interface/CHANGELOG.md b/packages/interface/CHANGELOG.md
index 90e0326e02a47..a684dc5a6a4ef 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 7356a7b52d1d4..feebc542d3a78 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",
"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/interface/src/components/interface-skeleton/index.js b/packages/interface/src/components/interface-skeleton/index.js
index baf98d153ed87..8d6a060259a29 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. */
diff --git a/packages/is-shallow-equal/CHANGELOG.md b/packages/is-shallow-equal/CHANGELOG.md
index 46ad3508ad041..d7d7028dd5e40 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 6969d6a2fe8a0..f2600696d54d6 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",
"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 bf9aba56a98e1..f82d95dc08cd4 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 4a6f249a104d2..4dfdea8d61175 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",
"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 5b94554550781..d0525fe187ad5 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 7bda9f2e279f2..aa787861ed89d 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",
"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 9114f0e043772..89acfcecff4da 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 cdd09f7b79165..d30e2ea781286 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",
"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 32175acb451f5..2af0ab1eb2905 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 af36a49371a0b..7f336adb52510 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",
"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 b65e8f808d595..6fda0148feaa8 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 ecebbb58eb99f..c5ce48ea8c2c3 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",
"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 87ebbe936eaa4..214141e0d476d 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 b1967c0d4bedb..8ad948e62408a 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",
"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 d1dd89a70ad63..4c153c4539b35 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 bba7e2a7680e5..403809ae7d72a 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",
"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 8d8a13b4ae6ab..d7a8c61e149bf 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 1086a79722cb0..b01403efff06e 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",
"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 0b4c95da74005..03f5931c9899b 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 7c40413adea51..4f763cb6ed576 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",
"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 2eaaf4c0df1e9..3978d24103d0c 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 3bbc4c6c2e47f..a05901155c0ad 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",
"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 9980b2d629d0b..e20bca5073fb2 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 64511b2fa42d0..e59b11cf9b951 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",
"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 566bd024cf380..10fd61c03f939 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 54ec5178d640d..bb130b52f8a98 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",
"description": "Management of user pattern editing.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
diff --git a/packages/patterns/src/constants.js b/packages/patterns/src/constants.js
index 3e533d834fd75..5fa9ec44f4e3a 100644
--- a/packages/patterns/src/constants.js
+++ b/packages/patterns/src/constants.js
@@ -23,4 +23,14 @@ 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' ),
+ },
+ 'core/image': {
+ url: __( 'URL' ),
+ title: __( 'Title' ),
+ alt: __( 'Alt Text' ),
+ },
};
diff --git a/packages/plugins/CHANGELOG.md b/packages/plugins/CHANGELOG.md
index b41c2e9f112bd..4fc131ebbcbd4 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 b8b63a3c381d7..9341fc509e6a8 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",
"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 00e7fb9a8c6c4..0599f401fe8e5 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 078c6b87a2ec1..0fce1ad734cb9 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",
"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 7c696adb50733..7cb02c0f86cef 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 845911ad918e5..9eb9b4c37a647 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",
"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 b227aa5ad2373..7eb846236d15b 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 e17080383749e..1c40eeb80d3ba 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",
"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 363f62c70b3d9..6d5b2a7c62c3c 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 e1164a7a1306c..ac1f1c9ade95c 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",
"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 be847570c06f7..4b05f17c43abf 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 047963ddde99b..3dc8c49a3b1f0 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",
"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 bbea3951de7c9..0effaef62c372 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 614e586c7efe2..3aa66baee21da 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",
"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 dc82da748d2eb..ccb782a2fb156 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 4bfbb09da8d57..c06d29acf5585 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",
"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 4951a8b29a7dc..3c2ce0530b5cf 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 654c53a02210e..8bf5a27dbd8bb 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",
"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 09247de37995d..69fc6f7498ca8 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 5e3d1f85314e2..46fe20bf9e727 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",
"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 4e15abf8fadfb..893d433ed76c4 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 753f5138a2a0f..b7798f268c13d 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",
"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 3a5dad2c51852..fccabbc78e0cd 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 d27c530ca1510..da6750fd93136 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",
"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 9559858c133e4..e79717f26f4d9 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 2bdfb5fe8bffd..347fa98b63510 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",
"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 989f649f161f2..6b53ab6270411 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 c6e6df921270a..947d85834784b 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",
"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 ebc6157a84c1b..18e1f53183021 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 645beb47bfa2a..ef935eea5686f 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",
"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 90f93aa1f9700..5a931c8c945db 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 d9d640a9fe75c..4d882bdc5cd9d 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",
"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 a917cd119c17a..34c2f6049a3da 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 f97ab389a527b..b270cac5ea7bf 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",
"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 89f9150ade561..245c503e45bb2 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 c3e3bb66680e7..221c36cb20072 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",
"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 6d4bb284be7d4..05eb9e9e24526 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 1e29a5e03343c..3088836074b9d 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",
"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 35331cb4fe9a4..2c3a6970e3171 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 d11bc37c122bc..4c318049e4fe5 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",
"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 b7b6cb712ff75..eb82f9f916d4e 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 ff3ed08296c5e..40bc6becf03fb 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",
"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 206d4957a1287..353e3dec2c583 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 7f3e20f6bd75a..e0e07f11a121b 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",
"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 7488e836b0c13..b9f1006ecbb3a 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 3a877f9365d75..6e47980844ca2 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",
"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 2ff22f8020a32..0a3f1ffa8ba57 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 f1d47b82de47d..fde1fcf604cbc 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",
"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 29ca8923380d9..f6befc2b0a8b0 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 62cb1727928b4..0c2d9993f49e9 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",
"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 4d03197988aec..170371171003c 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 9251dabe8752d..dd11ff8db2ba6 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",
"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 629291f88171b..20cae1aa42dc3 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 7a7e3958a922e..134d58c060d08 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",
"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 a24187330ba58..3e79836af4d93 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 60d7c7c5c4696..8f04224c63fb2 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",
"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 9fab4788c9f41..3b1ee558fbfe7 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 5e76d6ed042c6..b8834399c8f28 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",
"description": "WordPress word count utility.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 21f3fcb8baee1..03a590d21644f 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -115,6 +115,8 @@
+
+
diff --git a/phpunit/block-supports/typography-test.php b/phpunit/block-supports/typography-test.php
index f6d5344222678..ec7df51317a3f 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',
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 021199cc09495..6d6a36eab9b1d 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,
diff --git a/test/e2e/specs/interactivity/directives-text.spec.ts b/test/e2e/specs/interactivity/directives-text.spec.ts
index 8e83be26de15c..3670c5931e15d 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' );
+ } );
} );