: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/* harmony default export */ const dimensions = ({
useBlockProps: dimensions_useBlockProps,
attributeKeys: ['minHeight', 'style'],
return hasDimensionsSupport(name, 'aspectRatio');
function dimensions_useBlockProps({
if (!hasDimensionsSupport(name, 'aspectRatio') || shouldSkipSerialization(name, DIMENSIONS_SUPPORT_KEY, 'aspectRatio')) {
const className = dist_clsx({
'has-aspect-ratio': !!style?.dimensions?.aspectRatio
// Allow dimensions-based inline style overrides to override any global styles rules that
// might be set for the block, and therefore affect the display of the aspect ratio.
const inlineStyleOverrides = {};
// Apply rules to unset incompatible styles.
// Note that a set `aspectRatio` will win out if both an aspect ratio and a minHeight are set.
// This is because the aspect ratio is a newer block support, so (in theory) any aspect ratio
// that is set should be intentional and should override any existing minHeight. The Cover block
// and dimensions controls have logic that will manually clear the aspect ratio if a minHeight
if (style?.dimensions?.aspectRatio) {
// To ensure the aspect ratio does not get overridden by `minHeight` unset any existing rule.
inlineStyleOverrides.minHeight = 'unset';
} else if (minHeight || style?.dimensions?.minHeight) {
// To ensure the minHeight does not get overridden by `aspectRatio` unset any existing rule.
inlineStyleOverrides.aspectRatio = 'unset';
style: inlineStyleOverrides
function useCustomSides() {
external_wp_deprecated_default()('wp.blockEditor.__experimentalUseCustomSides', {
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/style.js
const styleSupportKeys = [...TYPOGRAPHY_SUPPORT_KEYS, BORDER_SUPPORT_KEY, COLOR_SUPPORT_KEY, DIMENSIONS_SUPPORT_KEY, BACKGROUND_SUPPORT_KEY, SPACING_SUPPORT_KEY, SHADOW_SUPPORT_KEY];
const hasStyleSupport = nameOrType => styleSupportKeys.some(key => (0,external_wp_blocks_namespaceObject.hasBlockSupport)(nameOrType, key));
* Returns the inline styles to add depending on the style object
* @param {Object} styles Styles configuration.
* @return {Object} Flattened CSS variables declaration.
function getInlineStyles(styles = {}) {
// The goal is to move everything to server side generated engine styles
// This is temporary as we absorb more and more styles into the engine.
(0,external_wp_styleEngine_namespaceObject.getCSSRules)(styles).forEach(rule => {
output[rule.key] = rule.value;
* Filters registered block settings, extending attributes to include `style` attribute.
* @param {Object} settings Original block settings.
* @return {Object} Filtered block settings.
function style_addAttribute(settings) {
if (!hasStyleSupport(settings)) {
// Allow blocks to specify their own attribute definition with default values if needed.
if (!settings.attributes.style) {
Object.assign(settings.attributes, {
* A dictionary of paths to flag skipping block support serialization as the key,
* with values providing the style paths to be omitted from serialization.
* @type {Record<string, string[]>}
const skipSerializationPathsEdit = {
[`${BORDER_SUPPORT_KEY}.__experimentalSkipSerialization`]: ['border'],
[`${COLOR_SUPPORT_KEY}.__experimentalSkipSerialization`]: [COLOR_SUPPORT_KEY],
[`${TYPOGRAPHY_SUPPORT_KEY}.__experimentalSkipSerialization`]: [TYPOGRAPHY_SUPPORT_KEY],
[`${DIMENSIONS_SUPPORT_KEY}.__experimentalSkipSerialization`]: [DIMENSIONS_SUPPORT_KEY],
[`${SPACING_SUPPORT_KEY}.__experimentalSkipSerialization`]: [SPACING_SUPPORT_KEY],
[`${SHADOW_SUPPORT_KEY}.__experimentalSkipSerialization`]: [SHADOW_SUPPORT_KEY]
* A dictionary of paths to flag skipping block support serialization as the key,
* with values providing the style paths to be omitted from serialization.
* Extends the Edit skip paths to enable skipping additional paths in just
* the Save component. This allows a block support to be serialized within the
* editor, while using an alternate approach, such as server-side rendering, when
* @type {Record<string, string[]>}
const skipSerializationPathsSave = {
...skipSerializationPathsEdit,
[`${DIMENSIONS_SUPPORT_KEY}.aspectRatio`]: [`${DIMENSIONS_SUPPORT_KEY}.aspectRatio`],
// Skip serialization of aspect ratio in save mode.
[`${BACKGROUND_SUPPORT_KEY}`]: [BACKGROUND_SUPPORT_KEY] // Skip serialization of background support in save mode.
const skipSerializationPathsSaveChecks = {
[`${DIMENSIONS_SUPPORT_KEY}.aspectRatio`]: true,
[`${BACKGROUND_SUPPORT_KEY}`]: true
* A dictionary used to normalize feature names between support flags, style
* object properties and __experimentSkipSerialization configuration arrays.
* This allows not having to provide a migration for a support flag and possible
* backwards compatibility bridges, while still achieving consistency between
* the support flag and the skip serialization array.
* @type {Record<string, string>}
const renamedFeatures = {
* A utility function used to remove one or more paths from a style object.
* Works in a way similar to Lodash's `omit()`. See unit tests and examples below.
* It supports a single string path:
* omitStyle( { color: 'red' }, 'color' ); // {}
* omitStyle( { color: 'red', background: '#fff' }, [ 'color', 'background' ] ); // {}
* It also allows you to specify paths at multiple levels in a string.
* omitStyle( { typography: { textDecoration: 'underline' } }, 'typography.textDecoration' ); // {}
* You can remove multiple paths at the same time:
* textDecoration: 'underline',
* textTransform: 'uppercase',
* 'typography.textDecoration',
* 'typography.textTransform',
* You can also specify nested paths as arrays:
* textDecoration: 'underline',
* textTransform: 'uppercase',
* [ 'typography', 'textDecoration' ],
* [ 'typography', 'textTransform' ],
* With regards to nesting of styles, infinite depth is supported:
* [ 'border', 'radius', 'topRight' ],
* // { border: { radius: { topLeft: '10px' } } }
* The third argument, `preserveReference`, defines how to treat the input style object.
* It is mostly necessary to properly handle mutation when recursively handling the style object.
* Defaulting to `false`, this will always create a new object, avoiding to mutate `style`.
* However, when recursing, we change that value to `true` in order to work with a single copy
* of the original style object.
* @see https://lodash.com/docs/4.17.15#omit
* @param {Object} style Styles object.
* @param {Array|string} paths Paths to remove.
* @param {boolean} preserveReference True to mutate the `style` object, false otherwise.
* @return {Object} Styles object with the specified paths removed.
function omitStyle(style, paths, preserveReference = false) {
if (!preserveReference) {
newStyle = JSON.parse(JSON.stringify(style));
if (!Array.isArray(paths)) {
if (!Array.isArray(path)) {
const [firstSubpath, ...restPath] = path;
omitStyle(newStyle[firstSubpath], [restPath], true);
} else if (path.length === 1) {
delete newStyle[path[0]];
* Override props assigned to save component to inject the CSS variables definition.
* @param {Object} props Additional props applied to save element.
* @param {Object|string} blockNameOrType Block type.
* @param {Object} attributes Block attributes.
* @param {?Record<string, string[]>} skipPaths An object of keys and paths to skip serialization.
* @return {Object} Filtered props applied to save element.
function style_addSaveProps(props, blockNameOrType, attributes, skipPaths = skipSerializationPathsSave) {
if (!hasStyleSupport(blockNameOrType)) {
Object.entries(skipPaths).forEach(([indicator, path]) => {
const skipSerialization = skipSerializationPathsSaveChecks[indicator] || (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockNameOrType, indicator);
if (skipSerialization === true) {
style = omitStyle(style, path);
if (Array.isArray(skipSerialization)) {
skipSerialization.forEach(featureName => {
const feature = renamedFeatures[featureName] || featureName;
style = omitStyle(style, [[...path, feature]]);
...getInlineStyles(style),
function BlockStyleControls({
const settings = useBlockSettings(name, __unstableParentLayout);
const blockEditingMode = useBlockEditingMode();
// The text alignment UI for individual blocks is rendered in
// the block toolbar, so disable it here.
if (blockEditingMode !== 'default') {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorEdit, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BackgroundImagePanel, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(typography_TypographyPanel, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(border_BorderPanel, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dimensions_DimensionsPanel, {
/* harmony default export */ const style = ({
edit: BlockStyleControls,
hasSupport: hasStyleSupport,
addSaveProps: style_addSaveProps,
attributeKeys: ['style'],
useBlockProps: style_useBlockProps
// Defines which element types are supported, including their hover styles or
// any other elements that have been included under a single element type
// e.g. heading and h1-h6.
elements: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']
function style_useBlockProps({
const blockElementsContainerIdentifier = `wp-elements-${(0,external_wp_compose_namespaceObject.useInstanceId)(style_useBlockProps)}`;
// The .editor-styles-wrapper selector is required on elements styles. As it is
// added to all other editor styles, not providing it causes reset and global
// styles to override element styles because of higher specificity.
const baseElementSelector = `.editor-styles-wrapper .${blockElementsContainerIdentifier}`;
const blockElementStyles = style?.elements;
const styles = (0,external_wp_element_namespaceObject.useMemo)(() => {
if (!blockElementStyles) {
const elementCSSRules = [];
const skipSerialization = shouldSkipSerialization(name, COLOR_SUPPORT_KEY, elementType);
const elementStyles = blockElementStyles?.[elementType];
// Process primary element type styles.
const selector = scopeSelector(baseElementSelector, external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS[elementType]);
elementCSSRules.push((0,external_wp_styleEngine_namespaceObject.compileCSS)(elementStyles, {
// Process any interactive states for the element type.
pseudo.forEach(pseudoSelector => {
if (elementStyles[pseudoSelector]) {
elementCSSRules.push((0,external_wp_styleEngine_namespaceObject.compileCSS)(elementStyles[pseudoSelector], {
selector: scopeSelector(baseElementSelector, `${external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS[elementType]}${pseudoSelector}`)
// Process related elements e.g. h1-h6 for headings
elements.forEach(element => {
if (blockElementStyles[element]) {
elementCSSRules.push((0,external_wp_styleEngine_namespaceObject.compileCSS)(blockElementStyles[element], {
selector: scopeSelector(baseElementSelector, external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS[element])
return elementCSSRules.length > 0 ? elementCSSRules.join('') : undefined;
}, [baseElementSelector, blockElementStyles, name]);
return style_addSaveProps({
className: blockElementsContainerIdentifier
}, skipSerializationPathsEdit);
(0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/style/addAttribute', style_addAttribute);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/settings.js
const hasSettingsSupport = blockType => (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, '__experimentalSettings', false);
function settings_addAttribute(settings) {
if (!hasSettingsSupport(settings)) {
// Allow blocks to specify their own attribute definition with default values if needed.
if (!settings?.attributes?.settings) {
(0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/settings/addAttribute', settings_addAttribute);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/filter.js
const filter = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"
/* harmony default export */ const library_filter = (filter);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/duotone-control/index.js