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
canRemoveBlocks
[56000] Fix | Delete
} = select(store);
[56001] Fix | Delete
const selectedBlockClientIds = getSelectedBlockClientIds();
[56002] Fix | Delete
const selectedBlocks = getBlocksByClientId(selectedBlockClientIds);
[56003] Fix | Delete
[56004] Fix | Delete
// selectedBlocks can have `null`s when something tries to call `selectBlock` with an inexistent clientId.
[56005] Fix | Delete
// These nulls will cause fatal errors down the line.
[56006] Fix | Delete
// In order to prevent discrepancies between selectedBlockClientIds and selectedBlocks, we effectively treat the entire selection as invalid.
[56007] Fix | Delete
// @see https://github.com/WordPress/gutenberg/pull/59410#issuecomment-2006304536
[56008] Fix | Delete
if (selectedBlocks.filter(block => !block).length > 0) {
[56009] Fix | Delete
return {
[56010] Fix | Delete
invalidSelection: true
[56011] Fix | Delete
};
[56012] Fix | Delete
}
[56013] Fix | Delete
const rootClientId = getBlockRootClientId(selectedBlockClientIds[0]);
[56014] Fix | Delete
return {
[56015] Fix | Delete
blocks: selectedBlocks,
[56016] Fix | Delete
clientIds: selectedBlockClientIds,
[56017] Fix | Delete
possibleBlockTransformations: getBlockTransformItems(selectedBlocks, rootClientId),
[56018] Fix | Delete
canRemove: canRemoveBlocks(selectedBlockClientIds),
[56019] Fix | Delete
invalidSelection: false
[56020] Fix | Delete
};
[56021] Fix | Delete
}, []);
[56022] Fix | Delete
if (invalidSelection) {
[56023] Fix | Delete
return {
[56024] Fix | Delete
isLoading: false,
[56025] Fix | Delete
commands: []
[56026] Fix | Delete
};
[56027] Fix | Delete
}
[56028] Fix | Delete
const isTemplate = blocks.length === 1 && (0,external_wp_blocks_namespaceObject.isTemplatePart)(blocks[0]);
[56029] Fix | Delete
function selectForMultipleBlocks(insertedBlocks) {
[56030] Fix | Delete
if (insertedBlocks.length > 1) {
[56031] Fix | Delete
multiSelect(insertedBlocks[0].clientId, insertedBlocks[insertedBlocks.length - 1].clientId);
[56032] Fix | Delete
}
[56033] Fix | Delete
}
[56034] Fix | Delete
[56035] Fix | Delete
// Simple block tranformation based on the `Block Transforms` API.
[56036] Fix | Delete
function onBlockTransform(name) {
[56037] Fix | Delete
const newBlocks = (0,external_wp_blocks_namespaceObject.switchToBlockType)(blocks, name);
[56038] Fix | Delete
replaceBlocks(clientIds, newBlocks);
[56039] Fix | Delete
selectForMultipleBlocks(newBlocks);
[56040] Fix | Delete
}
[56041] Fix | Delete
[56042] Fix | Delete
/**
[56043] Fix | Delete
* The `isTemplate` check is a stopgap solution here.
[56044] Fix | Delete
* Ideally, the Transforms API should handle this
[56045] Fix | Delete
* by allowing to exclude blocks from wildcard transformations.
[56046] Fix | Delete
*/
[56047] Fix | Delete
const hasPossibleBlockTransformations = !!possibleBlockTransformations.length && canRemove && !isTemplate;
[56048] Fix | Delete
if (!clientIds || clientIds.length < 1 || !hasPossibleBlockTransformations) {
[56049] Fix | Delete
return {
[56050] Fix | Delete
isLoading: false,
[56051] Fix | Delete
commands: []
[56052] Fix | Delete
};
[56053] Fix | Delete
}
[56054] Fix | Delete
const commands = possibleBlockTransformations.map(transformation => {
[56055] Fix | Delete
const {
[56056] Fix | Delete
name,
[56057] Fix | Delete
title,
[56058] Fix | Delete
icon
[56059] Fix | Delete
} = transformation;
[56060] Fix | Delete
return {
[56061] Fix | Delete
name: 'core/block-editor/transform-to-' + name.replace('/', '-'),
[56062] Fix | Delete
// translators: %s: block title/name.
[56063] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('Transform to %s'), title),
[56064] Fix | Delete
icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_icon, {
[56065] Fix | Delete
icon: icon
[56066] Fix | Delete
}),
[56067] Fix | Delete
callback: ({
[56068] Fix | Delete
close
[56069] Fix | Delete
}) => {
[56070] Fix | Delete
onBlockTransform(name);
[56071] Fix | Delete
close();
[56072] Fix | Delete
}
[56073] Fix | Delete
};
[56074] Fix | Delete
});
[56075] Fix | Delete
return {
[56076] Fix | Delete
isLoading: false,
[56077] Fix | Delete
commands
[56078] Fix | Delete
};
[56079] Fix | Delete
};
[56080] Fix | Delete
const useActionsCommands = () => {
[56081] Fix | Delete
const {
[56082] Fix | Delete
clientIds
[56083] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[56084] Fix | Delete
const {
[56085] Fix | Delete
getSelectedBlockClientIds
[56086] Fix | Delete
} = select(store);
[56087] Fix | Delete
const selectedBlockClientIds = getSelectedBlockClientIds();
[56088] Fix | Delete
return {
[56089] Fix | Delete
clientIds: selectedBlockClientIds
[56090] Fix | Delete
};
[56091] Fix | Delete
}, []);
[56092] Fix | Delete
const {
[56093] Fix | Delete
getBlockRootClientId,
[56094] Fix | Delete
canMoveBlocks,
[56095] Fix | Delete
getBlockCount
[56096] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[56097] Fix | Delete
const {
[56098] Fix | Delete
setBlockMovingClientId,
[56099] Fix | Delete
setNavigationMode,
[56100] Fix | Delete
selectBlock
[56101] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[56102] Fix | Delete
if (!clientIds || clientIds.length < 1) {
[56103] Fix | Delete
return {
[56104] Fix | Delete
isLoading: false,
[56105] Fix | Delete
commands: []
[56106] Fix | Delete
};
[56107] Fix | Delete
}
[56108] Fix | Delete
const rootClientId = getBlockRootClientId(clientIds[0]);
[56109] Fix | Delete
const canMove = canMoveBlocks(clientIds) && getBlockCount(rootClientId) !== 1;
[56110] Fix | Delete
const commands = [];
[56111] Fix | Delete
if (canMove) {
[56112] Fix | Delete
commands.push({
[56113] Fix | Delete
name: 'move-to',
[56114] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Move to'),
[56115] Fix | Delete
callback: () => {
[56116] Fix | Delete
setNavigationMode(true);
[56117] Fix | Delete
selectBlock(clientIds[0]);
[56118] Fix | Delete
setBlockMovingClientId(clientIds[0]);
[56119] Fix | Delete
},
[56120] Fix | Delete
icon: move_to
[56121] Fix | Delete
});
[56122] Fix | Delete
}
[56123] Fix | Delete
return {
[56124] Fix | Delete
isLoading: false,
[56125] Fix | Delete
commands: commands.map(command => ({
[56126] Fix | Delete
...command,
[56127] Fix | Delete
name: 'core/block-editor/action-' + command.name,
[56128] Fix | Delete
callback: ({
[56129] Fix | Delete
close
[56130] Fix | Delete
}) => {
[56131] Fix | Delete
command.callback();
[56132] Fix | Delete
close();
[56133] Fix | Delete
}
[56134] Fix | Delete
}))
[56135] Fix | Delete
};
[56136] Fix | Delete
};
[56137] Fix | Delete
const useQuickActionsCommands = () => {
[56138] Fix | Delete
const {
[56139] Fix | Delete
clientIds,
[56140] Fix | Delete
isUngroupable,
[56141] Fix | Delete
isGroupable
[56142] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[56143] Fix | Delete
const {
[56144] Fix | Delete
getSelectedBlockClientIds,
[56145] Fix | Delete
isUngroupable: _isUngroupable,
[56146] Fix | Delete
isGroupable: _isGroupable
[56147] Fix | Delete
} = select(store);
[56148] Fix | Delete
const selectedBlockClientIds = getSelectedBlockClientIds();
[56149] Fix | Delete
return {
[56150] Fix | Delete
clientIds: selectedBlockClientIds,
[56151] Fix | Delete
isUngroupable: _isUngroupable(),
[56152] Fix | Delete
isGroupable: _isGroupable()
[56153] Fix | Delete
};
[56154] Fix | Delete
}, []);
[56155] Fix | Delete
const {
[56156] Fix | Delete
canInsertBlockType,
[56157] Fix | Delete
getBlockRootClientId,
[56158] Fix | Delete
getBlocksByClientId,
[56159] Fix | Delete
canRemoveBlocks
[56160] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[56161] Fix | Delete
const {
[56162] Fix | Delete
getDefaultBlockName,
[56163] Fix | Delete
getGroupingBlockName
[56164] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blocks_namespaceObject.store);
[56165] Fix | Delete
const blocks = getBlocksByClientId(clientIds);
[56166] Fix | Delete
const {
[56167] Fix | Delete
removeBlocks,
[56168] Fix | Delete
replaceBlocks,
[56169] Fix | Delete
duplicateBlocks,
[56170] Fix | Delete
insertAfterBlock,
[56171] Fix | Delete
insertBeforeBlock
[56172] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[56173] Fix | Delete
const onGroup = () => {
[56174] Fix | Delete
if (!blocks.length) {
[56175] Fix | Delete
return;
[56176] Fix | Delete
}
[56177] Fix | Delete
const groupingBlockName = getGroupingBlockName();
[56178] Fix | Delete
[56179] Fix | Delete
// Activate the `transform` on `core/group` which does the conversion.
[56180] Fix | Delete
const newBlocks = (0,external_wp_blocks_namespaceObject.switchToBlockType)(blocks, groupingBlockName);
[56181] Fix | Delete
if (!newBlocks) {
[56182] Fix | Delete
return;
[56183] Fix | Delete
}
[56184] Fix | Delete
replaceBlocks(clientIds, newBlocks);
[56185] Fix | Delete
};
[56186] Fix | Delete
const onUngroup = () => {
[56187] Fix | Delete
if (!blocks.length) {
[56188] Fix | Delete
return;
[56189] Fix | Delete
}
[56190] Fix | Delete
const innerBlocks = blocks[0].innerBlocks;
[56191] Fix | Delete
if (!innerBlocks.length) {
[56192] Fix | Delete
return;
[56193] Fix | Delete
}
[56194] Fix | Delete
replaceBlocks(clientIds, innerBlocks);
[56195] Fix | Delete
};
[56196] Fix | Delete
if (!clientIds || clientIds.length < 1) {
[56197] Fix | Delete
return {
[56198] Fix | Delete
isLoading: false,
[56199] Fix | Delete
commands: []
[56200] Fix | Delete
};
[56201] Fix | Delete
}
[56202] Fix | Delete
const rootClientId = getBlockRootClientId(clientIds[0]);
[56203] Fix | Delete
const canInsertDefaultBlock = canInsertBlockType(getDefaultBlockName(), rootClientId);
[56204] Fix | Delete
const canDuplicate = blocks.every(block => {
[56205] Fix | Delete
return !!block && (0,external_wp_blocks_namespaceObject.hasBlockSupport)(block.name, 'multiple', true) && canInsertBlockType(block.name, rootClientId);
[56206] Fix | Delete
});
[56207] Fix | Delete
const canRemove = canRemoveBlocks(clientIds);
[56208] Fix | Delete
const commands = [];
[56209] Fix | Delete
if (canDuplicate) {
[56210] Fix | Delete
commands.push({
[56211] Fix | Delete
name: 'duplicate',
[56212] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Duplicate'),
[56213] Fix | Delete
callback: () => duplicateBlocks(clientIds, true),
[56214] Fix | Delete
icon: library_copy
[56215] Fix | Delete
});
[56216] Fix | Delete
}
[56217] Fix | Delete
if (canInsertDefaultBlock) {
[56218] Fix | Delete
commands.push({
[56219] Fix | Delete
name: 'add-before',
[56220] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Add before'),
[56221] Fix | Delete
callback: () => {
[56222] Fix | Delete
const clientId = Array.isArray(clientIds) ? clientIds[0] : clientId;
[56223] Fix | Delete
insertBeforeBlock(clientId);
[56224] Fix | Delete
},
[56225] Fix | Delete
icon: library_plus
[56226] Fix | Delete
}, {
[56227] Fix | Delete
name: 'add-after',
[56228] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Add after'),
[56229] Fix | Delete
callback: () => {
[56230] Fix | Delete
const clientId = Array.isArray(clientIds) ? clientIds[clientIds.length - 1] : clientId;
[56231] Fix | Delete
insertAfterBlock(clientId);
[56232] Fix | Delete
},
[56233] Fix | Delete
icon: library_plus
[56234] Fix | Delete
});
[56235] Fix | Delete
}
[56236] Fix | Delete
if (isGroupable) {
[56237] Fix | Delete
commands.push({
[56238] Fix | Delete
name: 'Group',
[56239] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Group'),
[56240] Fix | Delete
callback: onGroup,
[56241] Fix | Delete
icon: library_group
[56242] Fix | Delete
});
[56243] Fix | Delete
}
[56244] Fix | Delete
if (isUngroupable) {
[56245] Fix | Delete
commands.push({
[56246] Fix | Delete
name: 'ungroup',
[56247] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Ungroup'),
[56248] Fix | Delete
callback: onUngroup,
[56249] Fix | Delete
icon: library_ungroup
[56250] Fix | Delete
});
[56251] Fix | Delete
}
[56252] Fix | Delete
if (canRemove) {
[56253] Fix | Delete
commands.push({
[56254] Fix | Delete
name: 'remove',
[56255] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Delete'),
[56256] Fix | Delete
callback: () => removeBlocks(clientIds, true),
[56257] Fix | Delete
icon: library_trash
[56258] Fix | Delete
});
[56259] Fix | Delete
}
[56260] Fix | Delete
return {
[56261] Fix | Delete
isLoading: false,
[56262] Fix | Delete
commands: commands.map(command => ({
[56263] Fix | Delete
...command,
[56264] Fix | Delete
name: 'core/block-editor/action-' + command.name,
[56265] Fix | Delete
callback: ({
[56266] Fix | Delete
close
[56267] Fix | Delete
}) => {
[56268] Fix | Delete
command.callback();
[56269] Fix | Delete
close();
[56270] Fix | Delete
}
[56271] Fix | Delete
}))
[56272] Fix | Delete
};
[56273] Fix | Delete
};
[56274] Fix | Delete
const useBlockCommands = () => {
[56275] Fix | Delete
(0,external_wp_commands_namespaceObject.useCommandLoader)({
[56276] Fix | Delete
name: 'core/block-editor/blockTransforms',
[56277] Fix | Delete
hook: useTransformCommands
[56278] Fix | Delete
});
[56279] Fix | Delete
(0,external_wp_commands_namespaceObject.useCommandLoader)({
[56280] Fix | Delete
name: 'core/block-editor/blockActions',
[56281] Fix | Delete
hook: useActionsCommands
[56282] Fix | Delete
});
[56283] Fix | Delete
(0,external_wp_commands_namespaceObject.useCommandLoader)({
[56284] Fix | Delete
name: 'core/block-editor/blockQuickActions',
[56285] Fix | Delete
hook: useQuickActionsCommands,
[56286] Fix | Delete
context: 'block-selection-edit'
[56287] Fix | Delete
});
[56288] Fix | Delete
};
[56289] Fix | Delete
[56290] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-canvas/index.js
[56291] Fix | Delete
/**
[56292] Fix | Delete
* WordPress dependencies
[56293] Fix | Delete
*/
[56294] Fix | Delete
[56295] Fix | Delete
[56296] Fix | Delete
[56297] Fix | Delete
/**
[56298] Fix | Delete
* Internal dependencies
[56299] Fix | Delete
*/
[56300] Fix | Delete
[56301] Fix | Delete
[56302] Fix | Delete
[56303] Fix | Delete
[56304] Fix | Delete
[56305] Fix | Delete
[56306] Fix | Delete
[56307] Fix | Delete
[56308] Fix | Delete
[56309] Fix | Delete
[56310] Fix | Delete
function ExperimentalBlockCanvas({
[56311] Fix | Delete
shouldIframe = true,
[56312] Fix | Delete
height = '300px',
[56313] Fix | Delete
children = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockList, {}),
[56314] Fix | Delete
styles,
[56315] Fix | Delete
contentRef: contentRefProp,
[56316] Fix | Delete
iframeProps
[56317] Fix | Delete
}) {
[56318] Fix | Delete
useBlockCommands();
[56319] Fix | Delete
const resetTypingRef = useMouseMoveTypingReset();
[56320] Fix | Delete
const clearerRef = useBlockSelectionClearer();
[56321] Fix | Delete
const localRef = (0,external_wp_element_namespaceObject.useRef)();
[56322] Fix | Delete
const contentRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([contentRefProp, clearerRef, localRef]);
[56323] Fix | Delete
if (!shouldIframe) {
[56324] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(BlockTools, {
[56325] Fix | Delete
__unstableContentRef: localRef,
[56326] Fix | Delete
style: {
[56327] Fix | Delete
height,
[56328] Fix | Delete
display: 'flex'
[56329] Fix | Delete
},
[56330] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(editor_styles, {
[56331] Fix | Delete
styles: styles,
[56332] Fix | Delete
scope: ".editor-styles-wrapper"
[56333] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(writing_flow, {
[56334] Fix | Delete
ref: contentRef,
[56335] Fix | Delete
className: "editor-styles-wrapper",
[56336] Fix | Delete
tabIndex: -1,
[56337] Fix | Delete
style: {
[56338] Fix | Delete
height: '100%',
[56339] Fix | Delete
width: '100%'
[56340] Fix | Delete
},
[56341] Fix | Delete
children: children
[56342] Fix | Delete
})]
[56343] Fix | Delete
});
[56344] Fix | Delete
}
[56345] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockTools, {
[56346] Fix | Delete
__unstableContentRef: localRef,
[56347] Fix | Delete
style: {
[56348] Fix | Delete
height,
[56349] Fix | Delete
display: 'flex'
[56350] Fix | Delete
},
[56351] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(iframe, {
[56352] Fix | Delete
...iframeProps,
[56353] Fix | Delete
ref: resetTypingRef,
[56354] Fix | Delete
contentRef: contentRef,
[56355] Fix | Delete
style: {
[56356] Fix | Delete
...iframeProps?.style
[56357] Fix | Delete
},
[56358] Fix | Delete
name: "editor-canvas",
[56359] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(editor_styles, {
[56360] Fix | Delete
styles: styles
[56361] Fix | Delete
}), children]
[56362] Fix | Delete
})
[56363] Fix | Delete
});
[56364] Fix | Delete
}
[56365] Fix | Delete
[56366] Fix | Delete
/**
[56367] Fix | Delete
* BlockCanvas component is a component used to display the canvas of the block editor.
[56368] Fix | Delete
* What we call the canvas is an iframe containing the block list that you can manipulate.
[56369] Fix | Delete
* The component is also responsible of wiring up all the necessary hooks to enable
[56370] Fix | Delete
* the keyboard navigation across blocks in the editor and inject content styles into the iframe.
[56371] Fix | Delete
*
[56372] Fix | Delete
* @example
[56373] Fix | Delete
*
[56374] Fix | Delete
* ```jsx
[56375] Fix | Delete
* function MyBlockEditor() {
[56376] Fix | Delete
* const [ blocks, updateBlocks ] = useState([]);
[56377] Fix | Delete
* return (
[56378] Fix | Delete
* <BlockEditorProvider
[56379] Fix | Delete
* value={ blocks }
[56380] Fix | Delete
* onInput={ updateBlocks }
[56381] Fix | Delete
* onChange={ persistBlocks }
[56382] Fix | Delete
* >
[56383] Fix | Delete
* <BlockCanvas height="400px" />
[56384] Fix | Delete
* </BlockEditorProvider>
[56385] Fix | Delete
* );
[56386] Fix | Delete
* }
[56387] Fix | Delete
* ```
[56388] Fix | Delete
*
[56389] Fix | Delete
* @param {Object} props Component props.
[56390] Fix | Delete
* @param {string} props.height Canvas height, defaults to 300px.
[56391] Fix | Delete
* @param {Array} props.styles Content styles to inject into the iframe.
[56392] Fix | Delete
* @param {Element} props.children Content of the canvas, defaults to the BlockList component.
[56393] Fix | Delete
* @return {Element} Block Breadcrumb.
[56394] Fix | Delete
*/
[56395] Fix | Delete
function BlockCanvas({
[56396] Fix | Delete
children,
[56397] Fix | Delete
height,
[56398] Fix | Delete
styles
[56399] Fix | Delete
}) {
[56400] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ExperimentalBlockCanvas, {
[56401] Fix | Delete
height: height,
[56402] Fix | Delete
styles: styles,
[56403] Fix | Delete
children: children
[56404] Fix | Delete
});
[56405] Fix | Delete
}
[56406] Fix | Delete
/* harmony default export */ const block_canvas = (BlockCanvas);
[56407] Fix | Delete
[56408] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-style-selector/index.js
[56409] Fix | Delete
/**
[56410] Fix | Delete
* WordPress dependencies
[56411] Fix | Delete
*/
[56412] Fix | Delete
[56413] Fix | Delete
[56414] Fix | Delete
[56415] Fix | Delete
[56416] Fix | Delete
[56417] Fix | Delete
const ColorSelectorSVGIcon = () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
[56418] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[56419] Fix | Delete
viewBox: "0 0 20 20",
[56420] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[56421] Fix | Delete
d: "M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"
[56422] Fix | Delete
})
[56423] Fix | Delete
});
[56424] Fix | Delete
[56425] Fix | Delete
/**
[56426] Fix | Delete
* Color Selector Icon component.
[56427] Fix | Delete
*
[56428] Fix | Delete
* @param {Object} props Component properties.
[56429] Fix | Delete
* @param {Object} props.style Style object.
[56430] Fix | Delete
* @param {string} props.className Class name for component.
[56431] Fix | Delete
*
[56432] Fix | Delete
* @return {*} React Icon component.
[56433] Fix | Delete
*/
[56434] Fix | Delete
const ColorSelectorIcon = ({
[56435] Fix | Delete
style,
[56436] Fix | Delete
className
[56437] Fix | Delete
}) => {
[56438] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[56439] Fix | Delete
className: "block-library-colors-selector__icon-container",
[56440] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[56441] Fix | Delete
className: `${className} block-library-colors-selector__state-selection`,
[56442] Fix | Delete
style: style,
[56443] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorSelectorSVGIcon, {})
[56444] Fix | Delete
})
[56445] Fix | Delete
});
[56446] Fix | Delete
};
[56447] Fix | Delete
[56448] Fix | Delete
/**
[56449] Fix | Delete
* Renders the Colors Selector Toolbar with the icon button.
[56450] Fix | Delete
*
[56451] Fix | Delete
* @param {Object} props Component properties.
[56452] Fix | Delete
* @param {Object} props.TextColor Text color component that wraps icon.
[56453] Fix | Delete
* @param {Object} props.BackgroundColor Background color component that wraps icon.
[56454] Fix | Delete
*
[56455] Fix | Delete
* @return {*} React toggle button component.
[56456] Fix | Delete
*/
[56457] Fix | Delete
const renderToggleComponent = ({
[56458] Fix | Delete
TextColor,
[56459] Fix | Delete
BackgroundColor
[56460] Fix | Delete
}) => ({
[56461] Fix | Delete
onToggle,
[56462] Fix | Delete
isOpen
[56463] Fix | Delete
}) => {
[56464] Fix | Delete
const openOnArrowDown = event => {
[56465] Fix | Delete
if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) {
[56466] Fix | Delete
event.preventDefault();
[56467] Fix | Delete
onToggle();
[56468] Fix | Delete
}
[56469] Fix | Delete
};
[56470] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
[56471] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
[56472] Fix | Delete
className: "components-toolbar__control block-library-colors-selector__toggle",
[56473] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Open Colors Selector'),
[56474] Fix | Delete
onClick: onToggle,
[56475] Fix | Delete
onKeyDown: openOnArrowDown,
[56476] Fix | Delete
icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BackgroundColor, {
[56477] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TextColor, {
[56478] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorSelectorIcon, {})
[56479] Fix | Delete
})
[56480] Fix | Delete
})
[56481] Fix | Delete
})
[56482] Fix | Delete
});
[56483] Fix | Delete
};
[56484] Fix | Delete
const BlockColorsStyleSelector = ({
[56485] Fix | Delete
children,
[56486] Fix | Delete
...other
[56487] Fix | Delete
}) => {
[56488] Fix | Delete
external_wp_deprecated_default()(`wp.blockEditor.BlockColorsStyleSelector`, {
[56489] Fix | Delete
alternative: 'block supports API',
[56490] Fix | Delete
since: '6.1',
[56491] Fix | Delete
version: '6.3'
[56492] Fix | Delete
});
[56493] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
[56494] Fix | Delete
popoverProps: {
[56495] Fix | Delete
placement: 'bottom-start'
[56496] Fix | Delete
},
[56497] Fix | Delete
className: "block-library-colors-selector",
[56498] Fix | Delete
contentClassName: "block-library-colors-selector__popover",
[56499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function