: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
const textDecoration = decodeValue(inheritedValue?.typography?.textDecoration);
const setTextDecoration = newValue => {
onChange(setImmutably(value, ['typography', 'textDecoration'], newValue || undefined));
const hasTextDecoration = () => !!value?.typography?.textDecoration;
const resetTextDecoration = () => setTextDecoration(undefined);
const hasWritingModeControl = useHasWritingModeControl(settings);
const writingMode = decodeValue(inheritedValue?.typography?.writingMode);
const setWritingMode = newValue => {
onChange(setImmutably(value, ['typography', 'writingMode'], newValue || undefined));
const hasWritingMode = () => !!value?.typography?.writingMode;
const resetWritingMode = () => setWritingMode(undefined);
const hasTextAlignmentControl = useHasTextAlignmentControl(settings);
const textAlign = decodeValue(inheritedValue?.typography?.textAlign);
const setTextAlign = newValue => {
onChange(setImmutably(value, ['typography', 'textAlign'], newValue || undefined));
const hasTextAlign = () => !!value?.typography?.textAlign;
const resetTextAlign = () => setTextAlign(undefined);
const resetAllFilter = (0,external_wp_element_namespaceObject.useCallback)(previousValue => {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Wrapper, {
resetAllFilter: resetAllFilter,
children: [hasFontFamilyEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
label: (0,external_wp_i18n_namespaceObject.__)('Font'),
onDeselect: resetFontFamily,
isShownByDefault: defaultControls.fontFamily,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FontFamilyControl, {
fontFamilies: mergedFontFamilies,
size: "__unstable-large",
__nextHasNoMarginBottom: true
}), hasFontSizeEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
label: (0,external_wp_i18n_namespaceObject.__)('Size'),
onDeselect: resetFontSize,
isShownByDefault: defaultControls.fontSize,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FontSizePicker, {
fontSizes: mergedFontSizes,
disableCustomFontSizes: disableCustomFontSizes,
}), hasAppearanceControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
className: "single-column",
label: appearanceControlLabel,
hasValue: hasFontAppearance,
onDeselect: resetFontAppearance,
isShownByDefault: defaultControls.fontAppearance,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FontAppearanceControl, {
onChange: setFontAppearance,
hasFontStyles: hasFontStyles,
hasFontWeights: hasFontWeights,
size: "__unstable-large",
__nextHasNoMarginBottom: true
}), hasLineHeightEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
className: "single-column",
label: (0,external_wp_i18n_namespaceObject.__)('Line height'),
onDeselect: resetLineHeight,
isShownByDefault: defaultControls.lineHeight,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(line_height_control, {
__nextHasNoMarginBottom: true,
__unstableInputWidth: "auto",
}), hasLetterSpacingControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
className: "single-column",
label: (0,external_wp_i18n_namespaceObject.__)('Letter spacing'),
hasValue: hasLetterSpacing,
onDeselect: resetLetterSpacing,
isShownByDefault: defaultControls.letterSpacing,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(LetterSpacingControl, {
onChange: setLetterSpacing,
size: "__unstable-large",
__unstableInputWidth: "auto"
}), hasTextColumnsControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
className: "single-column",
label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
hasValue: hasTextColumns,
onDeselect: resetTextColumns,
isShownByDefault: defaultControls.textColumns,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalNumberControl, {
label: (0,external_wp_i18n_namespaceObject.__)('Columns'),
onChange: setTextColumns,
size: "__unstable-large",
}), hasTextDecorationControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
className: "single-column",
label: (0,external_wp_i18n_namespaceObject.__)('Decoration'),
hasValue: hasTextDecoration,
onDeselect: resetTextDecoration,
isShownByDefault: defaultControls.textDecoration,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TextDecorationControl, {
onChange: setTextDecoration,
size: "__unstable-large",
__unstableInputWidth: "auto"
}), hasWritingModeControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
className: "single-column",
label: (0,external_wp_i18n_namespaceObject.__)('Orientation'),
hasValue: hasWritingMode,
onDeselect: resetWritingMode,
isShownByDefault: defaultControls.writingMode,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WritingModeControl, {
onChange: setWritingMode,
size: "__unstable-large",
__nextHasNoMarginBottom: true
}), hasTextTransformControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
label: (0,external_wp_i18n_namespaceObject.__)('Letter case'),
hasValue: hasTextTransform,
onDeselect: resetTextTransform,
isShownByDefault: defaultControls.textTransform,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TextTransformControl, {
onChange: setTextTransform,
size: "__unstable-large",
__nextHasNoMarginBottom: true
}), hasTextAlignmentControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
label: (0,external_wp_i18n_namespaceObject.__)('Text alignment'),
onDeselect: resetTextAlign,
isShownByDefault: defaultControls.textAlign,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TextAlignmentControl, {
size: "__unstable-large",
__nextHasNoMarginBottom: true
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/line-height.js
const LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';
* Inspector control panel containing the line height related configuration
* @return {Element} Line height edit element.
function LineHeightEdit(props) {
const onChange = newLineHeightValue => {
lineHeight: newLineHeightValue
style: cleanEmptyObject(newStyle)
return /*#__PURE__*/_jsx(LineHeightControl, {
__unstableInputWidth: "100%",
__nextHasNoMarginBottom: true,
value: style?.typography?.lineHeight,
* Custom hook that checks if line-height settings have been disabled.
* @param {string} name The name of the block.
* @return {boolean} Whether setting is disabled.
function useIsLineHeightDisabled({
const [isEnabled] = useSettings('typography.lineHeight');
return !isEnabled || !hasBlockSupport(blockName, LINE_HEIGHT_SUPPORT_KEY);
;// CONCATENATED MODULE: external ["wp","tokenList"]
const external_wp_tokenList_namespaceObject = window["wp"]["tokenList"];
var external_wp_tokenList_default = /*#__PURE__*/__webpack_require__.n(external_wp_tokenList_namespaceObject);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/font-family.js
const FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';
kebabCase: font_family_kebabCase
} = unlock(external_wp_components_namespaceObject.privateApis);
* Filters registered block settings, extending attributes to include
* the `fontFamily` attribute.
* @param {Object} settings Original block settings
* @return {Object} Filtered block settings
function font_family_addAttributes(settings) {
if (!(0,external_wp_blocks_namespaceObject.hasBlockSupport)(settings, FONT_FAMILY_SUPPORT_KEY)) {
// Allow blocks to specify a default value if needed.
if (!settings.attributes.fontFamily) {
Object.assign(settings.attributes, {
* Override props assigned to save component to inject font family.
* @param {Object} props Additional props applied to save element
* @param {Object} blockType Block type
* @param {Object} attributes Block attributes
* @return {Object} Filtered props applied to save element
function font_family_addSaveProps(props, blockType, attributes) {
if (!(0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockType, FONT_FAMILY_SUPPORT_KEY)) {
if (shouldSkipSerialization(blockType, TYPOGRAPHY_SUPPORT_KEY, 'fontFamily')) {
if (!attributes?.fontFamily) {
// Use TokenList to dedupe classes.
const classes = new (external_wp_tokenList_default())(props.className);
classes.add(`has-${font_family_kebabCase(attributes?.fontFamily)}-font-family`);
const newClassName = classes.value;
props.className = newClassName ? newClassName : undefined;
function font_family_useBlockProps({
return font_family_addSaveProps({}, name, {
/* harmony default export */ const font_family = ({
useBlockProps: font_family_useBlockProps,
addSaveProps: font_family_addSaveProps,
attributeKeys: ['fontFamily'],
return (0,external_wp_blocks_namespaceObject.hasBlockSupport)(name, FONT_FAMILY_SUPPORT_KEY);
* Resets the font family block support attribute. This can be used when
* disabling the font family support controls for a block via a progressive
* @param {Object} props Block props.
* @param {Object} props.setAttributes Function to set block's attributes.
function resetFontFamily({
(0,external_wp_hooks_namespaceObject.addFilter)('blocks.registerBlockType', 'core/fontFamily/addAttribute', font_family_addAttributes);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/utils.js
kebabCase: utils_kebabCase
} = unlock(external_wp_components_namespaceObject.privateApis);
* Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values.
* If namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.
* @param {Array} fontSizes Array of font size objects containing at least the "name" and "size" values as properties.
* @param {?string} fontSizeAttribute Content of the font size attribute (slug).
* @param {?number} customFontSizeAttribute Contents of the custom font size attribute (value).
* @return {?Object} If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug.
* Otherwise, an object with just the size value based on customFontSize is returned.
const utils_getFontSize = (fontSizes, fontSizeAttribute, customFontSizeAttribute) => {
const fontSizeObject = fontSizes?.find(({
}) => slug === fontSizeAttribute);
size: customFontSizeAttribute
* Returns the corresponding font size object for a given value.
* @param {Array} fontSizes Array of font size objects.
* @param {number} value Font size value.
* @return {Object} Font size object.
function utils_getFontSizeObjectByValue(fontSizes, value) {
const fontSizeObject = fontSizes?.find(({
* Returns a class based on fontSizeName.
* @param {string} fontSizeSlug Slug of the fontSize.
* @return {string | undefined} String with the class corresponding to the fontSize passed.
* The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'.
function getFontSizeClass(fontSizeSlug) {
return `has-${utils_kebabCase(fontSizeSlug)}-font-size`;
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/font-size.js
const FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';
* Filters registered block settings, extending attributes to include
* `fontSize` and `fontWeight` attributes.
* @param {Object} settings Original block settings.
* @return {Object} Filtered block settings.
function font_size_addAttributes(settings) {
if (!(0,external_wp_blocks_namespaceObject.hasBlockSupport)(settings, FONT_SIZE_SUPPORT_KEY)) {
// Allow blocks to specify a default value if needed.
if (!settings.attributes.fontSize) {
Object.assign(settings.attributes, {
* Override props assigned to save component to inject font size.
* @param {Object} props Additional props applied to save element.
* @param {Object} blockNameOrType Block type.
* @param {Object} attributes Block attributes.
* @return {Object} Filtered props applied to save element.
function font_size_addSaveProps(props, blockNameOrType, attributes) {
if (!(0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockNameOrType, FONT_SIZE_SUPPORT_KEY)) {
if (shouldSkipSerialization(blockNameOrType, TYPOGRAPHY_SUPPORT_KEY, 'fontSize')) {
// Use TokenList to dedupe classes.
const classes = new (external_wp_tokenList_default())(props.className);
classes.add(getFontSizeClass(attributes.fontSize));
const newClassName = classes.value;
props.className = newClassName ? newClassName : undefined;
* Inspector control panel containing the font size related configuration
* @return {Element} Font size edit element.
function FontSizeEdit(props) {