Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: block-editor.js
style
[37500] Fix | Delete
} = attributes;
[37501] Fix | Delete
[37502] Fix | Delete
// Collect color CSS classes.
[37503] Fix | Delete
const backgroundClass = getColorClassName('background-color', backgroundColor);
[37504] Fix | Delete
const textClass = getColorClassName('color', textColor);
[37505] Fix | Delete
const gradientClass = __experimentalGetGradientClass(gradient);
[37506] Fix | Delete
const hasGradient = gradientClass || style?.color?.gradient;
[37507] Fix | Delete
[37508] Fix | Delete
// Determine color CSS class name list.
[37509] Fix | Delete
const className = dist_clsx(textClass, gradientClass, {
[37510] Fix | Delete
// Don't apply the background class if there's a gradient.
[37511] Fix | Delete
[backgroundClass]: !hasGradient && !!backgroundClass,
[37512] Fix | Delete
'has-text-color': textColor || style?.color?.text,
[37513] Fix | Delete
'has-background': backgroundColor || style?.color?.background || gradient || style?.color?.gradient,
[37514] Fix | Delete
'has-link-color': style?.elements?.link?.color
[37515] Fix | Delete
});
[37516] Fix | Delete
[37517] Fix | Delete
// Collect inline styles for colors.
[37518] Fix | Delete
const colorStyles = style?.color || {};
[37519] Fix | Delete
const styleProp = getInlineStyles({
[37520] Fix | Delete
color: colorStyles
[37521] Fix | Delete
});
[37522] Fix | Delete
return {
[37523] Fix | Delete
className: className || undefined,
[37524] Fix | Delete
style: styleProp
[37525] Fix | Delete
};
[37526] Fix | Delete
}
[37527] Fix | Delete
[37528] Fix | Delete
/**
[37529] Fix | Delete
* Determines the color related props for a block derived from its color block
[37530] Fix | Delete
* support attributes.
[37531] Fix | Delete
*
[37532] Fix | Delete
* Inline styles are forced for named colors to ensure these selections are
[37533] Fix | Delete
* reflected when themes do not load their color stylesheets in the editor.
[37534] Fix | Delete
*
[37535] Fix | Delete
* @param {Object} attributes Block attributes.
[37536] Fix | Delete
*
[37537] Fix | Delete
* @return {Object} ClassName & style props from colors block support.
[37538] Fix | Delete
*/
[37539] Fix | Delete
function useColorProps(attributes) {
[37540] Fix | Delete
const {
[37541] Fix | Delete
backgroundColor,
[37542] Fix | Delete
textColor,
[37543] Fix | Delete
gradient
[37544] Fix | Delete
} = attributes;
[37545] Fix | Delete
const [userPalette, themePalette, defaultPalette, userGradients, themeGradients, defaultGradients] = use_settings_useSettings('color.palette.custom', 'color.palette.theme', 'color.palette.default', 'color.gradients.custom', 'color.gradients.theme', 'color.gradients.default');
[37546] Fix | Delete
const colors = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userPalette || []), ...(themePalette || []), ...(defaultPalette || [])], [userPalette, themePalette, defaultPalette]);
[37547] Fix | Delete
const gradients = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userGradients || []), ...(themeGradients || []), ...(defaultGradients || [])], [userGradients, themeGradients, defaultGradients]);
[37548] Fix | Delete
const colorProps = getColorClassesAndStyles(attributes);
[37549] Fix | Delete
[37550] Fix | Delete
// Force inline styles to apply colors when themes do not load their color
[37551] Fix | Delete
// stylesheets in the editor.
[37552] Fix | Delete
if (backgroundColor) {
[37553] Fix | Delete
const backgroundColorObject = getColorObjectByAttributeValues(colors, backgroundColor);
[37554] Fix | Delete
colorProps.style.backgroundColor = backgroundColorObject.color;
[37555] Fix | Delete
}
[37556] Fix | Delete
if (gradient) {
[37557] Fix | Delete
colorProps.style.background = getGradientValueBySlug(gradients, gradient);
[37558] Fix | Delete
}
[37559] Fix | Delete
if (textColor) {
[37560] Fix | Delete
const textColorObject = getColorObjectByAttributeValues(colors, textColor);
[37561] Fix | Delete
colorProps.style.color = textColorObject.color;
[37562] Fix | Delete
}
[37563] Fix | Delete
return colorProps;
[37564] Fix | Delete
}
[37565] Fix | Delete
[37566] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/use-spacing-props.js
[37567] Fix | Delete
/**
[37568] Fix | Delete
* Internal dependencies
[37569] Fix | Delete
*/
[37570] Fix | Delete
[37571] Fix | Delete
[37572] Fix | Delete
// This utility is intended to assist where the serialization of the spacing
[37573] Fix | Delete
// block support is being skipped for a block but the spacing related CSS
[37574] Fix | Delete
// styles still need to be generated so they can be applied to inner elements.
[37575] Fix | Delete
[37576] Fix | Delete
/**
[37577] Fix | Delete
* Provides the CSS class names and inline styles for a block's spacing support
[37578] Fix | Delete
* attributes.
[37579] Fix | Delete
*
[37580] Fix | Delete
* @param {Object} attributes Block attributes.
[37581] Fix | Delete
*
[37582] Fix | Delete
* @return {Object} Spacing block support derived CSS classes & styles.
[37583] Fix | Delete
*/
[37584] Fix | Delete
function getSpacingClassesAndStyles(attributes) {
[37585] Fix | Delete
const {
[37586] Fix | Delete
style
[37587] Fix | Delete
} = attributes;
[37588] Fix | Delete
[37589] Fix | Delete
// Collect inline styles for spacing.
[37590] Fix | Delete
const spacingStyles = style?.spacing || {};
[37591] Fix | Delete
const styleProp = getInlineStyles({
[37592] Fix | Delete
spacing: spacingStyles
[37593] Fix | Delete
});
[37594] Fix | Delete
return {
[37595] Fix | Delete
style: styleProp
[37596] Fix | Delete
};
[37597] Fix | Delete
}
[37598] Fix | Delete
[37599] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/use-typography-props.js
[37600] Fix | Delete
/**
[37601] Fix | Delete
* External dependencies
[37602] Fix | Delete
*/
[37603] Fix | Delete
[37604] Fix | Delete
[37605] Fix | Delete
/**
[37606] Fix | Delete
* WordPress dependencies
[37607] Fix | Delete
*/
[37608] Fix | Delete
[37609] Fix | Delete
[37610] Fix | Delete
/**
[37611] Fix | Delete
* Internal dependencies
[37612] Fix | Delete
*/
[37613] Fix | Delete
[37614] Fix | Delete
[37615] Fix | Delete
[37616] Fix | Delete
[37617] Fix | Delete
const {
[37618] Fix | Delete
kebabCase: use_typography_props_kebabCase
[37619] Fix | Delete
} = unlock(external_wp_components_namespaceObject.privateApis);
[37620] Fix | Delete
[37621] Fix | Delete
/*
[37622] Fix | Delete
* This utility is intended to assist where the serialization of the typography
[37623] Fix | Delete
* block support is being skipped for a block but the typography related CSS
[37624] Fix | Delete
* styles still need to be generated so they can be applied to inner elements.
[37625] Fix | Delete
*/
[37626] Fix | Delete
/**
[37627] Fix | Delete
* Provides the CSS class names and inline styles for a block's typography support
[37628] Fix | Delete
* attributes.
[37629] Fix | Delete
*
[37630] Fix | Delete
* @param {Object} attributes Block attributes.
[37631] Fix | Delete
* @param {Object|boolean} settings Merged theme.json settings
[37632] Fix | Delete
*
[37633] Fix | Delete
* @return {Object} Typography block support derived CSS classes & styles.
[37634] Fix | Delete
*/
[37635] Fix | Delete
function getTypographyClassesAndStyles(attributes, settings) {
[37636] Fix | Delete
let typographyStyles = attributes?.style?.typography || {};
[37637] Fix | Delete
typographyStyles = {
[37638] Fix | Delete
...typographyStyles,
[37639] Fix | Delete
fontSize: getTypographyFontSizeValue({
[37640] Fix | Delete
size: attributes?.style?.typography?.fontSize
[37641] Fix | Delete
}, settings)
[37642] Fix | Delete
};
[37643] Fix | Delete
const style = getInlineStyles({
[37644] Fix | Delete
typography: typographyStyles
[37645] Fix | Delete
});
[37646] Fix | Delete
const fontFamilyClassName = !!attributes?.fontFamily ? `has-${use_typography_props_kebabCase(attributes.fontFamily)}-font-family` : '';
[37647] Fix | Delete
const textAlignClassName = !!attributes?.style?.typography?.textAlign ? `has-text-align-${attributes?.style?.typography?.textAlign}` : '';
[37648] Fix | Delete
const className = dist_clsx(fontFamilyClassName, textAlignClassName, getFontSizeClass(attributes?.fontSize));
[37649] Fix | Delete
return {
[37650] Fix | Delete
className,
[37651] Fix | Delete
style
[37652] Fix | Delete
};
[37653] Fix | Delete
}
[37654] Fix | Delete
[37655] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/use-cached-truthy.js
[37656] Fix | Delete
/**
[37657] Fix | Delete
* WordPress dependencies
[37658] Fix | Delete
*/
[37659] Fix | Delete
[37660] Fix | Delete
[37661] Fix | Delete
/**
[37662] Fix | Delete
* Keeps an up-to-date copy of the passed value and returns it. If value becomes falsy, it will return the last truthy copy.
[37663] Fix | Delete
*
[37664] Fix | Delete
* @param {any} value
[37665] Fix | Delete
* @return {any} value
[37666] Fix | Delete
*/
[37667] Fix | Delete
function useCachedTruthy(value) {
[37668] Fix | Delete
const [cachedValue, setCachedValue] = (0,external_wp_element_namespaceObject.useState)(value);
[37669] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[37670] Fix | Delete
if (value) {
[37671] Fix | Delete
setCachedValue(value);
[37672] Fix | Delete
}
[37673] Fix | Delete
}, [value]);
[37674] Fix | Delete
return cachedValue;
[37675] Fix | Delete
}
[37676] Fix | Delete
[37677] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/use-zoom-out.js
[37678] Fix | Delete
/**
[37679] Fix | Delete
* WordPress dependencies
[37680] Fix | Delete
*/
[37681] Fix | Delete
[37682] Fix | Delete
[37683] Fix | Delete
[37684] Fix | Delete
/**
[37685] Fix | Delete
* Internal dependencies
[37686] Fix | Delete
*/
[37687] Fix | Delete
[37688] Fix | Delete
[37689] Fix | Delete
/**
[37690] Fix | Delete
* A hook used to set the editor mode to zoomed out mode, invoking the hook sets the mode.
[37691] Fix | Delete
*
[37692] Fix | Delete
* @param {boolean} zoomOut If we should enter into zoomOut mode or not
[37693] Fix | Delete
*/
[37694] Fix | Delete
function useZoomOut(zoomOut = true) {
[37695] Fix | Delete
const {
[37696] Fix | Delete
__unstableSetEditorMode
[37697] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[37698] Fix | Delete
const {
[37699] Fix | Delete
__unstableGetEditorMode
[37700] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[37701] Fix | Delete
const originalEditingMode = (0,external_wp_element_namespaceObject.useRef)(null);
[37702] Fix | Delete
const mode = __unstableGetEditorMode();
[37703] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[37704] Fix | Delete
// Only set this on mount so we know what to return to when we unmount.
[37705] Fix | Delete
if (!originalEditingMode.current) {
[37706] Fix | Delete
originalEditingMode.current = mode;
[37707] Fix | Delete
}
[37708] Fix | Delete
return () => {
[37709] Fix | Delete
// We need to use __unstableGetEditorMode() here and not `mode`, as mode may not update on unmount
[37710] Fix | Delete
if (__unstableGetEditorMode() === 'zoom-out' && __unstableGetEditorMode() !== originalEditingMode.current) {
[37711] Fix | Delete
__unstableSetEditorMode(originalEditingMode.current);
[37712] Fix | Delete
}
[37713] Fix | Delete
};
[37714] Fix | Delete
}, []);
[37715] Fix | Delete
[37716] Fix | Delete
// The effect opens the zoom-out view if we want it open and it's not currently in zoom-out mode.
[37717] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[37718] Fix | Delete
if (zoomOut && mode !== 'zoom-out') {
[37719] Fix | Delete
__unstableSetEditorMode('zoom-out');
[37720] Fix | Delete
} else if (!zoomOut && __unstableGetEditorMode() === 'zoom-out' && originalEditingMode.current !== mode) {
[37721] Fix | Delete
__unstableSetEditorMode(originalEditingMode.current);
[37722] Fix | Delete
}
[37723] Fix | Delete
}, [__unstableSetEditorMode, zoomOut, mode]);
[37724] Fix | Delete
}
[37725] Fix | Delete
[37726] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/index.js
[37727] Fix | Delete
/**
[37728] Fix | Delete
* Internal dependencies
[37729] Fix | Delete
*/
[37730] Fix | Delete
[37731] Fix | Delete
[37732] Fix | Delete
[37733] Fix | Delete
[37734] Fix | Delete
[37735] Fix | Delete
[37736] Fix | Delete
[37737] Fix | Delete
[37738] Fix | Delete
[37739] Fix | Delete
[37740] Fix | Delete
[37741] Fix | Delete
[37742] Fix | Delete
[37743] Fix | Delete
[37744] Fix | Delete
[37745] Fix | Delete
[37746] Fix | Delete
[37747] Fix | Delete
[37748] Fix | Delete
[37749] Fix | Delete
[37750] Fix | Delete
[37751] Fix | Delete
[37752] Fix | Delete
[37753] Fix | Delete
[37754] Fix | Delete
[37755] Fix | Delete
[37756] Fix | Delete
[37757] Fix | Delete
[37758] Fix | Delete
createBlockEditFilter([block_bindings, align, text_align, hooks_anchor, custom_class_name, style, duotone, position, layout, content_lock_ui, block_hooks, layout_child].filter(Boolean));
[37759] Fix | Delete
createBlockListBlockFilter([align, text_align, background, style, color, dimensions, duotone, font_family, font_size, border, position, block_style_variation, layout_child]);
[37760] Fix | Delete
createBlockSaveFilter([align, text_align, hooks_anchor, aria_label, custom_class_name, border, color, style, font_family, font_size]);
[37761] Fix | Delete
[37762] Fix | Delete
[37763] Fix | Delete
[37764] Fix | Delete
[37765] Fix | Delete
[37766] Fix | Delete
[37767] Fix | Delete
[37768] Fix | Delete
[37769] Fix | Delete
[37770] Fix | Delete
[37771] Fix | Delete
[37772] Fix | Delete
[37773] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/with-colors.js
[37774] Fix | Delete
/**
[37775] Fix | Delete
* WordPress dependencies
[37776] Fix | Delete
*/
[37777] Fix | Delete
[37778] Fix | Delete
[37779] Fix | Delete
[37780] Fix | Delete
[37781] Fix | Delete
/**
[37782] Fix | Delete
* Internal dependencies
[37783] Fix | Delete
*/
[37784] Fix | Delete
[37785] Fix | Delete
[37786] Fix | Delete
[37787] Fix | Delete
[37788] Fix | Delete
const {
[37789] Fix | Delete
kebabCase: with_colors_kebabCase
[37790] Fix | Delete
} = unlock(external_wp_components_namespaceObject.privateApis);
[37791] Fix | Delete
[37792] Fix | Delete
/**
[37793] Fix | Delete
* Capitalizes the first letter in a string.
[37794] Fix | Delete
*
[37795] Fix | Delete
* @param {string} str The string whose first letter the function will capitalize.
[37796] Fix | Delete
*
[37797] Fix | Delete
* @return {string} Capitalized string.
[37798] Fix | Delete
*/
[37799] Fix | Delete
const upperFirst = ([firstLetter, ...rest]) => firstLetter.toUpperCase() + rest.join('');
[37800] Fix | Delete
[37801] Fix | Delete
/**
[37802] Fix | Delete
* Higher order component factory for injecting the `colorsArray` argument as
[37803] Fix | Delete
* the colors prop in the `withCustomColors` HOC.
[37804] Fix | Delete
*
[37805] Fix | Delete
* @param {Array} colorsArray An array of color objects.
[37806] Fix | Delete
*
[37807] Fix | Delete
* @return {Function} The higher order component.
[37808] Fix | Delete
*/
[37809] Fix | Delete
const withCustomColorPalette = colorsArray => (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => props => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, {
[37810] Fix | Delete
...props,
[37811] Fix | Delete
colors: colorsArray
[37812] Fix | Delete
}), 'withCustomColorPalette');
[37813] Fix | Delete
[37814] Fix | Delete
/**
[37815] Fix | Delete
* Higher order component factory for injecting the editor colors as the
[37816] Fix | Delete
* `colors` prop in the `withColors` HOC.
[37817] Fix | Delete
*
[37818] Fix | Delete
* @return {Function} The higher order component.
[37819] Fix | Delete
*/
[37820] Fix | Delete
const withEditorColorPalette = () => (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => props => {
[37821] Fix | Delete
const [userPalette, themePalette, defaultPalette] = use_settings_useSettings('color.palette.custom', 'color.palette.theme', 'color.palette.default');
[37822] Fix | Delete
const allColors = (0,external_wp_element_namespaceObject.useMemo)(() => [...(userPalette || []), ...(themePalette || []), ...(defaultPalette || [])], [userPalette, themePalette, defaultPalette]);
[37823] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, {
[37824] Fix | Delete
...props,
[37825] Fix | Delete
colors: allColors
[37826] Fix | Delete
});
[37827] Fix | Delete
}, 'withEditorColorPalette');
[37828] Fix | Delete
[37829] Fix | Delete
/**
[37830] Fix | Delete
* Helper function used with `createHigherOrderComponent` to create
[37831] Fix | Delete
* higher order components for managing color logic.
[37832] Fix | Delete
*
[37833] Fix | Delete
* @param {Array} colorTypes An array of color types (e.g. 'backgroundColor, borderColor).
[37834] Fix | Delete
* @param {Function} withColorPalette A HOC for injecting the 'colors' prop into the WrappedComponent.
[37835] Fix | Delete
*
[37836] Fix | Delete
* @return {Component} The component that can be used as a HOC.
[37837] Fix | Delete
*/
[37838] Fix | Delete
function createColorHOC(colorTypes, withColorPalette) {
[37839] Fix | Delete
const colorMap = colorTypes.reduce((colorObject, colorType) => {
[37840] Fix | Delete
return {
[37841] Fix | Delete
...colorObject,
[37842] Fix | Delete
...(typeof colorType === 'string' ? {
[37843] Fix | Delete
[colorType]: with_colors_kebabCase(colorType)
[37844] Fix | Delete
} : colorType)
[37845] Fix | Delete
};
[37846] Fix | Delete
}, {});
[37847] Fix | Delete
return (0,external_wp_compose_namespaceObject.compose)([withColorPalette, WrappedComponent => {
[37848] Fix | Delete
return class extends external_wp_element_namespaceObject.Component {
[37849] Fix | Delete
constructor(props) {
[37850] Fix | Delete
super(props);
[37851] Fix | Delete
this.setters = this.createSetters();
[37852] Fix | Delete
this.colorUtils = {
[37853] Fix | Delete
getMostReadableColor: this.getMostReadableColor.bind(this)
[37854] Fix | Delete
};
[37855] Fix | Delete
this.state = {};
[37856] Fix | Delete
}
[37857] Fix | Delete
getMostReadableColor(colorValue) {
[37858] Fix | Delete
const {
[37859] Fix | Delete
colors
[37860] Fix | Delete
} = this.props;
[37861] Fix | Delete
return getMostReadableColor(colors, colorValue);
[37862] Fix | Delete
}
[37863] Fix | Delete
createSetters() {
[37864] Fix | Delete
return Object.keys(colorMap).reduce((settersAccumulator, colorAttributeName) => {
[37865] Fix | Delete
const upperFirstColorAttributeName = upperFirst(colorAttributeName);
[37866] Fix | Delete
const customColorAttributeName = `custom${upperFirstColorAttributeName}`;
[37867] Fix | Delete
settersAccumulator[`set${upperFirstColorAttributeName}`] = this.createSetColor(colorAttributeName, customColorAttributeName);
[37868] Fix | Delete
return settersAccumulator;
[37869] Fix | Delete
}, {});
[37870] Fix | Delete
}
[37871] Fix | Delete
createSetColor(colorAttributeName, customColorAttributeName) {
[37872] Fix | Delete
return colorValue => {
[37873] Fix | Delete
const colorObject = getColorObjectByColorValue(this.props.colors, colorValue);
[37874] Fix | Delete
this.props.setAttributes({
[37875] Fix | Delete
[colorAttributeName]: colorObject && colorObject.slug ? colorObject.slug : undefined,
[37876] Fix | Delete
[customColorAttributeName]: colorObject && colorObject.slug ? undefined : colorValue
[37877] Fix | Delete
});
[37878] Fix | Delete
};
[37879] Fix | Delete
}
[37880] Fix | Delete
static getDerivedStateFromProps({
[37881] Fix | Delete
attributes,
[37882] Fix | Delete
colors
[37883] Fix | Delete
}, previousState) {
[37884] Fix | Delete
return Object.entries(colorMap).reduce((newState, [colorAttributeName, colorContext]) => {
[37885] Fix | Delete
const colorObject = getColorObjectByAttributeValues(colors, attributes[colorAttributeName], attributes[`custom${upperFirst(colorAttributeName)}`]);
[37886] Fix | Delete
const previousColorObject = previousState[colorAttributeName];
[37887] Fix | Delete
const previousColor = previousColorObject?.color;
[37888] Fix | Delete
/**
[37889] Fix | Delete
* The "and previousColorObject" condition checks that a previous color object was already computed.
[37890] Fix | Delete
* At the start previousColorObject and colorValue are both equal to undefined
[37891] Fix | Delete
* bus as previousColorObject does not exist we should compute the object.
[37892] Fix | Delete
*/
[37893] Fix | Delete
if (previousColor === colorObject.color && previousColorObject) {
[37894] Fix | Delete
newState[colorAttributeName] = previousColorObject;
[37895] Fix | Delete
} else {
[37896] Fix | Delete
newState[colorAttributeName] = {
[37897] Fix | Delete
...colorObject,
[37898] Fix | Delete
class: getColorClassName(colorContext, colorObject.slug)
[37899] Fix | Delete
};
[37900] Fix | Delete
}
[37901] Fix | Delete
return newState;
[37902] Fix | Delete
}, {});
[37903] Fix | Delete
}
[37904] Fix | Delete
render() {
[37905] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, {
[37906] Fix | Delete
...this.props,
[37907] Fix | Delete
colors: undefined,
[37908] Fix | Delete
...this.state,
[37909] Fix | Delete
...this.setters,
[37910] Fix | Delete
colorUtils: this.colorUtils
[37911] Fix | Delete
});
[37912] Fix | Delete
}
[37913] Fix | Delete
};
[37914] Fix | Delete
}]);
[37915] Fix | Delete
}
[37916] Fix | Delete
[37917] Fix | Delete
/**
[37918] Fix | Delete
* A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic
[37919] Fix | Delete
* for class generation color value, retrieval and color attribute setting.
[37920] Fix | Delete
*
[37921] Fix | Delete
* Use this higher-order component to work with a custom set of colors.
[37922] Fix | Delete
*
[37923] Fix | Delete
* @example
[37924] Fix | Delete
*
[37925] Fix | Delete
* ```jsx
[37926] Fix | Delete
* const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ];
[37927] Fix | Delete
* const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS );
[37928] Fix | Delete
* // ...
[37929] Fix | Delete
* export default compose(
[37930] Fix | Delete
* withCustomColors( 'backgroundColor', 'borderColor' ),
[37931] Fix | Delete
* MyColorfulComponent,
[37932] Fix | Delete
* );
[37933] Fix | Delete
* ```
[37934] Fix | Delete
*
[37935] Fix | Delete
* @param {Array} colorsArray The array of color objects (name, slug, color, etc... ).
[37936] Fix | Delete
*
[37937] Fix | Delete
* @return {Function} Higher-order component.
[37938] Fix | Delete
*/
[37939] Fix | Delete
function createCustomColorsHOC(colorsArray) {
[37940] Fix | Delete
return (...colorTypes) => {
[37941] Fix | Delete
const withColorPalette = withCustomColorPalette(colorsArray);
[37942] Fix | Delete
return (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(createColorHOC(colorTypes, withColorPalette), 'withCustomColors');
[37943] Fix | Delete
};
[37944] Fix | Delete
}
[37945] Fix | Delete
[37946] Fix | Delete
/**
[37947] Fix | Delete
* A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting.
[37948] Fix | Delete
*
[37949] Fix | Delete
* For use with the default editor/theme color palette.
[37950] Fix | Delete
*
[37951] Fix | Delete
* @example
[37952] Fix | Delete
*
[37953] Fix | Delete
* ```jsx
[37954] Fix | Delete
* export default compose(
[37955] Fix | Delete
* withColors( 'backgroundColor', { textColor: 'color' } ),
[37956] Fix | Delete
* MyColorfulComponent,
[37957] Fix | Delete
* );
[37958] Fix | Delete
* ```
[37959] Fix | Delete
*
[37960] Fix | Delete
* @param {...(Object|string)} colorTypes The arguments can be strings or objects. If the argument is an object,
[37961] Fix | Delete
* it should contain the color attribute name as key and the color context as value.
[37962] Fix | Delete
* If the argument is a string the value should be the color attribute name,
[37963] Fix | Delete
* the color context is computed by applying a kebab case transform to the value.
[37964] Fix | Delete
* Color context represents the context/place where the color is going to be used.
[37965] Fix | Delete
* The class name of the color is generated using 'has' followed by the color name
[37966] Fix | Delete
* and ending with the color context all in kebab case e.g: has-green-background-color.
[37967] Fix | Delete
*
[37968] Fix | Delete
* @return {Function} Higher-order component.
[37969] Fix | Delete
*/
[37970] Fix | Delete
function withColors(...colorTypes) {
[37971] Fix | Delete
const withColorPalette = withEditorColorPalette();
[37972] Fix | Delete
return (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(createColorHOC(colorTypes, withColorPalette), 'withColors');
[37973] Fix | Delete
}
[37974] Fix | Delete
[37975] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors/index.js
[37976] Fix | Delete
[37977] Fix | Delete
[37978] Fix | Delete
[37979] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/gradients/index.js
[37980] Fix | Delete
[37981] Fix | Delete
[37982] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/font-sizes/font-size-picker.js
[37983] Fix | Delete
/**
[37984] Fix | Delete
* WordPress dependencies
[37985] Fix | Delete
*/
[37986] Fix | Delete
[37987] Fix | Delete
[37988] Fix | Delete
/**
[37989] Fix | Delete
* Internal dependencies
[37990] Fix | Delete
*/
[37991] Fix | Delete
[37992] Fix | Delete
[37993] Fix | Delete
function font_size_picker_FontSizePicker(props) {
[37994] Fix | Delete
const [fontSizes, customFontSize] = use_settings_useSettings('typography.fontSizes', 'typography.customFontSize');
[37995] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FontSizePicker, {
[37996] Fix | Delete
...props,
[37997] Fix | Delete
fontSizes: fontSizes,
[37998] Fix | Delete
disableCustomFontSizes: !customFontSize
[37999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function