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
children: patterns.map(pattern => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pattern_transformations_menu_BlockPattern, {
[53000] Fix | Delete
pattern: pattern,
[53001] Fix | Delete
onSelect: onSelect
[53002] Fix | Delete
}, pattern.name))
[53003] Fix | Delete
});
[53004] Fix | Delete
}
[53005] Fix | Delete
function pattern_transformations_menu_BlockPattern({
[53006] Fix | Delete
pattern,
[53007] Fix | Delete
onSelect
[53008] Fix | Delete
}) {
[53009] Fix | Delete
// TODO check pattern/preview width...
[53010] Fix | Delete
const baseClassName = 'block-editor-block-switcher__preview-patterns-container';
[53011] Fix | Delete
const descriptionId = (0,external_wp_compose_namespaceObject.useInstanceId)(pattern_transformations_menu_BlockPattern, `${baseClassName}-list__item-description`);
[53012] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[53013] Fix | Delete
className: `${baseClassName}-list__list-item`,
[53014] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(pattern_transformations_menu_CompositeItem, {
[53015] Fix | Delete
render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[53016] Fix | Delete
role: "option",
[53017] Fix | Delete
"aria-label": pattern.title,
[53018] Fix | Delete
"aria-describedby": pattern.description ? descriptionId : undefined,
[53019] Fix | Delete
className: `${baseClassName}-list__item`
[53020] Fix | Delete
}),
[53021] Fix | Delete
onClick: () => onSelect(pattern.transformedBlocks),
[53022] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_preview, {
[53023] Fix | Delete
blocks: pattern.transformedBlocks,
[53024] Fix | Delete
viewportWidth: pattern.viewportWidth || 500
[53025] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[53026] Fix | Delete
className: `${baseClassName}-list__item-title`,
[53027] Fix | Delete
children: pattern.title
[53028] Fix | Delete
})]
[53029] Fix | Delete
}), !!pattern.description && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
[53030] Fix | Delete
id: descriptionId,
[53031] Fix | Delete
children: pattern.description
[53032] Fix | Delete
})]
[53033] Fix | Delete
});
[53034] Fix | Delete
}
[53035] Fix | Delete
/* harmony default export */ const pattern_transformations_menu = (PatternTransformationsMenu);
[53036] Fix | Delete
[53037] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-switcher/index.js
[53038] Fix | Delete
/**
[53039] Fix | Delete
* WordPress dependencies
[53040] Fix | Delete
*/
[53041] Fix | Delete
[53042] Fix | Delete
[53043] Fix | Delete
[53044] Fix | Delete
[53045] Fix | Delete
[53046] Fix | Delete
[53047] Fix | Delete
/**
[53048] Fix | Delete
* Internal dependencies
[53049] Fix | Delete
*/
[53050] Fix | Delete
[53051] Fix | Delete
[53052] Fix | Delete
[53053] Fix | Delete
[53054] Fix | Delete
[53055] Fix | Delete
[53056] Fix | Delete
[53057] Fix | Delete
[53058] Fix | Delete
[53059] Fix | Delete
[53060] Fix | Delete
function BlockSwitcherDropdownMenuContents({
[53061] Fix | Delete
onClose,
[53062] Fix | Delete
clientIds,
[53063] Fix | Delete
hasBlockStyles,
[53064] Fix | Delete
canRemove,
[53065] Fix | Delete
isUsingBindings
[53066] Fix | Delete
}) {
[53067] Fix | Delete
const {
[53068] Fix | Delete
replaceBlocks,
[53069] Fix | Delete
multiSelect,
[53070] Fix | Delete
updateBlockAttributes
[53071] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[53072] Fix | Delete
const {
[53073] Fix | Delete
possibleBlockTransformations,
[53074] Fix | Delete
patterns,
[53075] Fix | Delete
blocks
[53076] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[53077] Fix | Delete
const {
[53078] Fix | Delete
getBlocksByClientId,
[53079] Fix | Delete
getBlockRootClientId,
[53080] Fix | Delete
getBlockTransformItems,
[53081] Fix | Delete
__experimentalGetPatternTransformItems
[53082] Fix | Delete
} = select(store);
[53083] Fix | Delete
const rootClientId = getBlockRootClientId(Array.isArray(clientIds) ? clientIds[0] : clientIds);
[53084] Fix | Delete
const _blocks = getBlocksByClientId(clientIds);
[53085] Fix | Delete
return {
[53086] Fix | Delete
blocks: _blocks,
[53087] Fix | Delete
possibleBlockTransformations: getBlockTransformItems(_blocks, rootClientId),
[53088] Fix | Delete
patterns: __experimentalGetPatternTransformItems(_blocks, rootClientId)
[53089] Fix | Delete
};
[53090] Fix | Delete
}, [clientIds]);
[53091] Fix | Delete
const blockVariationTransformations = useBlockVariationTransforms({
[53092] Fix | Delete
clientIds,
[53093] Fix | Delete
blocks
[53094] Fix | Delete
});
[53095] Fix | Delete
function selectForMultipleBlocks(insertedBlocks) {
[53096] Fix | Delete
if (insertedBlocks.length > 1) {
[53097] Fix | Delete
multiSelect(insertedBlocks[0].clientId, insertedBlocks[insertedBlocks.length - 1].clientId);
[53098] Fix | Delete
}
[53099] Fix | Delete
}
[53100] Fix | Delete
// Simple block tranformation based on the `Block Transforms` API.
[53101] Fix | Delete
function onBlockTransform(name) {
[53102] Fix | Delete
const newBlocks = (0,external_wp_blocks_namespaceObject.switchToBlockType)(blocks, name);
[53103] Fix | Delete
replaceBlocks(clientIds, newBlocks);
[53104] Fix | Delete
selectForMultipleBlocks(newBlocks);
[53105] Fix | Delete
}
[53106] Fix | Delete
function onBlockVariationTransform(name) {
[53107] Fix | Delete
updateBlockAttributes(blocks[0].clientId, {
[53108] Fix | Delete
...blockVariationTransformations.find(({
[53109] Fix | Delete
name: variationName
[53110] Fix | Delete
}) => variationName === name).attributes
[53111] Fix | Delete
});
[53112] Fix | Delete
}
[53113] Fix | Delete
// Pattern transformation through the `Patterns` API.
[53114] Fix | Delete
function onPatternTransform(transformedBlocks) {
[53115] Fix | Delete
replaceBlocks(clientIds, transformedBlocks);
[53116] Fix | Delete
selectForMultipleBlocks(transformedBlocks);
[53117] Fix | Delete
}
[53118] Fix | Delete
/**
[53119] Fix | Delete
* The `isTemplate` check is a stopgap solution here.
[53120] Fix | Delete
* Ideally, the Transforms API should handle this
[53121] Fix | Delete
* by allowing to exclude blocks from wildcard transformations.
[53122] Fix | Delete
*/
[53123] Fix | Delete
const isSingleBlock = blocks.length === 1;
[53124] Fix | Delete
const isTemplate = isSingleBlock && (0,external_wp_blocks_namespaceObject.isTemplatePart)(blocks[0]);
[53125] Fix | Delete
const hasPossibleBlockTransformations = !!possibleBlockTransformations.length && canRemove && !isTemplate;
[53126] Fix | Delete
const hasPossibleBlockVariationTransformations = !!blockVariationTransformations?.length;
[53127] Fix | Delete
const hasPatternTransformation = !!patterns?.length && canRemove;
[53128] Fix | Delete
const hasBlockOrBlockVariationTransforms = hasPossibleBlockTransformations || hasPossibleBlockVariationTransformations;
[53129] Fix | Delete
const hasContents = hasBlockStyles || hasBlockOrBlockVariationTransforms || hasPatternTransformation;
[53130] Fix | Delete
if (!hasContents) {
[53131] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
[53132] Fix | Delete
className: "block-editor-block-switcher__no-transforms",
[53133] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('No transforms.')
[53134] Fix | Delete
});
[53135] Fix | Delete
}
[53136] Fix | Delete
const connectedBlockDescription = isSingleBlock ? (0,external_wp_i18n_namespaceObject._x)('This block is connected.', 'block toolbar button label and description') : (0,external_wp_i18n_namespaceObject._x)('These blocks are connected.', 'block toolbar button label and description');
[53137] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[53138] Fix | Delete
className: "block-editor-block-switcher__container",
[53139] Fix | Delete
children: [hasPatternTransformation && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pattern_transformations_menu, {
[53140] Fix | Delete
blocks: blocks,
[53141] Fix | Delete
patterns: patterns,
[53142] Fix | Delete
onSelect: transformedBlocks => {
[53143] Fix | Delete
onPatternTransform(transformedBlocks);
[53144] Fix | Delete
onClose();
[53145] Fix | Delete
}
[53146] Fix | Delete
}), hasBlockOrBlockVariationTransforms && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_transformations_menu, {
[53147] Fix | Delete
className: "block-editor-block-switcher__transforms__menugroup",
[53148] Fix | Delete
possibleBlockTransformations: possibleBlockTransformations,
[53149] Fix | Delete
possibleBlockVariationTransformations: blockVariationTransformations,
[53150] Fix | Delete
blocks: blocks,
[53151] Fix | Delete
onSelect: name => {
[53152] Fix | Delete
onBlockTransform(name);
[53153] Fix | Delete
onClose();
[53154] Fix | Delete
},
[53155] Fix | Delete
onSelectVariation: name => {
[53156] Fix | Delete
onBlockVariationTransform(name);
[53157] Fix | Delete
onClose();
[53158] Fix | Delete
}
[53159] Fix | Delete
}), hasBlockStyles && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockStylesMenu, {
[53160] Fix | Delete
hoveredBlock: blocks[0],
[53161] Fix | Delete
onSwitch: onClose
[53162] Fix | Delete
}), isUsingBindings && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
[53163] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
[53164] Fix | Delete
className: "block-editor-block-switcher__binding-indicator",
[53165] Fix | Delete
children: connectedBlockDescription
[53166] Fix | Delete
})
[53167] Fix | Delete
})]
[53168] Fix | Delete
});
[53169] Fix | Delete
}
[53170] Fix | Delete
const BlockSwitcher = ({
[53171] Fix | Delete
clientIds,
[53172] Fix | Delete
disabled,
[53173] Fix | Delete
isUsingBindings
[53174] Fix | Delete
}) => {
[53175] Fix | Delete
const {
[53176] Fix | Delete
canRemove,
[53177] Fix | Delete
hasBlockStyles,
[53178] Fix | Delete
icon,
[53179] Fix | Delete
invalidBlocks,
[53180] Fix | Delete
isReusable,
[53181] Fix | Delete
isTemplate
[53182] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[53183] Fix | Delete
const {
[53184] Fix | Delete
getBlocksByClientId,
[53185] Fix | Delete
getBlockAttributes,
[53186] Fix | Delete
canRemoveBlocks
[53187] Fix | Delete
} = select(store);
[53188] Fix | Delete
const {
[53189] Fix | Delete
getBlockStyles,
[53190] Fix | Delete
getBlockType,
[53191] Fix | Delete
getActiveBlockVariation
[53192] Fix | Delete
} = select(external_wp_blocks_namespaceObject.store);
[53193] Fix | Delete
const _blocks = getBlocksByClientId(clientIds);
[53194] Fix | Delete
if (!_blocks.length || _blocks.some(block => !block)) {
[53195] Fix | Delete
return {
[53196] Fix | Delete
invalidBlocks: true
[53197] Fix | Delete
};
[53198] Fix | Delete
}
[53199] Fix | Delete
const [{
[53200] Fix | Delete
name: firstBlockName
[53201] Fix | Delete
}] = _blocks;
[53202] Fix | Delete
const _isSingleBlockSelected = _blocks.length === 1;
[53203] Fix | Delete
const blockType = getBlockType(firstBlockName);
[53204] Fix | Delete
let _icon;
[53205] Fix | Delete
if (_isSingleBlockSelected) {
[53206] Fix | Delete
const match = getActiveBlockVariation(firstBlockName, getBlockAttributes(clientIds[0]));
[53207] Fix | Delete
// Take into account active block variations.
[53208] Fix | Delete
_icon = match?.icon || blockType.icon;
[53209] Fix | Delete
} else {
[53210] Fix | Delete
const isSelectionOfSameType = new Set(_blocks.map(({
[53211] Fix | Delete
name
[53212] Fix | Delete
}) => name)).size === 1;
[53213] Fix | Delete
// When selection consists of blocks of multiple types, display an
[53214] Fix | Delete
// appropriate icon to communicate the non-uniformity.
[53215] Fix | Delete
_icon = isSelectionOfSameType ? blockType.icon : library_copy;
[53216] Fix | Delete
}
[53217] Fix | Delete
return {
[53218] Fix | Delete
canRemove: canRemoveBlocks(clientIds),
[53219] Fix | Delete
hasBlockStyles: _isSingleBlockSelected && !!getBlockStyles(firstBlockName)?.length,
[53220] Fix | Delete
icon: _icon,
[53221] Fix | Delete
isReusable: _isSingleBlockSelected && (0,external_wp_blocks_namespaceObject.isReusableBlock)(_blocks[0]),
[53222] Fix | Delete
isTemplate: _isSingleBlockSelected && (0,external_wp_blocks_namespaceObject.isTemplatePart)(_blocks[0])
[53223] Fix | Delete
};
[53224] Fix | Delete
}, [clientIds]);
[53225] Fix | Delete
const blockTitle = useBlockDisplayTitle({
[53226] Fix | Delete
clientId: clientIds?.[0],
[53227] Fix | Delete
maximumLength: 35
[53228] Fix | Delete
});
[53229] Fix | Delete
if (invalidBlocks) {
[53230] Fix | Delete
return null;
[53231] Fix | Delete
}
[53232] Fix | Delete
const isSingleBlock = clientIds.length === 1;
[53233] Fix | Delete
const blockSwitcherLabel = isSingleBlock ? blockTitle : (0,external_wp_i18n_namespaceObject.__)('Multiple blocks selected');
[53234] Fix | Delete
const hideDropdown = disabled || !hasBlockStyles && !canRemove;
[53235] Fix | Delete
if (hideDropdown) {
[53236] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
[53237] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
[53238] Fix | Delete
disabled: true,
[53239] Fix | Delete
className: "block-editor-block-switcher__no-switcher-icon",
[53240] Fix | Delete
title: blockSwitcherLabel,
[53241] Fix | Delete
icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[53242] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_icon, {
[53243] Fix | Delete
icon: icon,
[53244] Fix | Delete
showColors: true
[53245] Fix | Delete
}), (isReusable || isTemplate) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[53246] Fix | Delete
className: "block-editor-block-switcher__toggle-text",
[53247] Fix | Delete
children: blockTitle
[53248] Fix | Delete
})]
[53249] Fix | Delete
})
[53250] Fix | Delete
})
[53251] Fix | Delete
});
[53252] Fix | Delete
}
[53253] Fix | Delete
const blockSwitcherDescription = isSingleBlock ? (0,external_wp_i18n_namespaceObject.__)('Change block type or style') : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: number of blocks. */
[53254] Fix | Delete
(0,external_wp_i18n_namespaceObject._n)('Change type of %d block', 'Change type of %d blocks', clientIds.length), clientIds.length);
[53255] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
[53256] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
[53257] Fix | Delete
children: toggleProps => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
[53258] Fix | Delete
className: "block-editor-block-switcher",
[53259] Fix | Delete
label: blockSwitcherLabel,
[53260] Fix | Delete
popoverProps: {
[53261] Fix | Delete
placement: 'bottom-start',
[53262] Fix | Delete
className: 'block-editor-block-switcher__popover'
[53263] Fix | Delete
},
[53264] Fix | Delete
icon: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[53265] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_icon, {
[53266] Fix | Delete
icon: icon,
[53267] Fix | Delete
className: "block-editor-block-switcher__toggle",
[53268] Fix | Delete
showColors: true
[53269] Fix | Delete
}), (isReusable || isTemplate) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
[53270] Fix | Delete
className: "block-editor-block-switcher__toggle-text",
[53271] Fix | Delete
children: blockTitle
[53272] Fix | Delete
})]
[53273] Fix | Delete
}),
[53274] Fix | Delete
toggleProps: {
[53275] Fix | Delete
describedBy: blockSwitcherDescription,
[53276] Fix | Delete
...toggleProps
[53277] Fix | Delete
},
[53278] Fix | Delete
menuProps: {
[53279] Fix | Delete
orientation: 'both'
[53280] Fix | Delete
},
[53281] Fix | Delete
children: ({
[53282] Fix | Delete
onClose
[53283] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockSwitcherDropdownMenuContents, {
[53284] Fix | Delete
onClose: onClose,
[53285] Fix | Delete
clientIds: clientIds,
[53286] Fix | Delete
hasBlockStyles: hasBlockStyles,
[53287] Fix | Delete
canRemove: canRemove,
[53288] Fix | Delete
isUsingBindings: isUsingBindings
[53289] Fix | Delete
})
[53290] Fix | Delete
})
[53291] Fix | Delete
})
[53292] Fix | Delete
});
[53293] Fix | Delete
};
[53294] Fix | Delete
/* harmony default export */ const block_switcher = (BlockSwitcher);
[53295] Fix | Delete
[53296] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-toolbar/block-toolbar-last-item.js
[53297] Fix | Delete
/**
[53298] Fix | Delete
* WordPress dependencies
[53299] Fix | Delete
*/
[53300] Fix | Delete
[53301] Fix | Delete
const {
[53302] Fix | Delete
Fill: __unstableBlockToolbarLastItem,
[53303] Fix | Delete
Slot: block_toolbar_last_item_Slot
[53304] Fix | Delete
} = (0,external_wp_components_namespaceObject.createSlotFill)('__unstableBlockToolbarLastItem');
[53305] Fix | Delete
__unstableBlockToolbarLastItem.Slot = block_toolbar_last_item_Slot;
[53306] Fix | Delete
/* harmony default export */ const block_toolbar_last_item = (__unstableBlockToolbarLastItem);
[53307] Fix | Delete
[53308] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/hooks/supports.js
[53309] Fix | Delete
/**
[53310] Fix | Delete
* WordPress dependencies
[53311] Fix | Delete
*/
[53312] Fix | Delete
[53313] Fix | Delete
[53314] Fix | Delete
const ALIGN_SUPPORT_KEY = 'align';
[53315] Fix | Delete
const ALIGN_WIDE_SUPPORT_KEY = 'alignWide';
[53316] Fix | Delete
const supports_BORDER_SUPPORT_KEY = '__experimentalBorder';
[53317] Fix | Delete
const supports_COLOR_SUPPORT_KEY = 'color';
[53318] Fix | Delete
const CUSTOM_CLASS_NAME_SUPPORT_KEY = 'customClassName';
[53319] Fix | Delete
const supports_FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';
[53320] Fix | Delete
const supports_FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';
[53321] Fix | Delete
const supports_LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';
[53322] Fix | Delete
/**
[53323] Fix | Delete
* Key within block settings' support array indicating support for font style.
[53324] Fix | Delete
*/
[53325] Fix | Delete
const supports_FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';
[53326] Fix | Delete
/**
[53327] Fix | Delete
* Key within block settings' support array indicating support for font weight.
[53328] Fix | Delete
*/
[53329] Fix | Delete
const supports_FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';
[53330] Fix | Delete
/**
[53331] Fix | Delete
* Key within block settings' supports array indicating support for text
[53332] Fix | Delete
* align e.g. settings found in `block.json`.
[53333] Fix | Delete
*/
[53334] Fix | Delete
const supports_TEXT_ALIGN_SUPPORT_KEY = 'typography.textAlign';
[53335] Fix | Delete
/**
[53336] Fix | Delete
* Key within block settings' supports array indicating support for text
[53337] Fix | Delete
* columns e.g. settings found in `block.json`.
[53338] Fix | Delete
*/
[53339] Fix | Delete
const supports_TEXT_COLUMNS_SUPPORT_KEY = 'typography.textColumns';
[53340] Fix | Delete
/**
[53341] Fix | Delete
* Key within block settings' supports array indicating support for text
[53342] Fix | Delete
* decorations e.g. settings found in `block.json`.
[53343] Fix | Delete
*/
[53344] Fix | Delete
const supports_TEXT_DECORATION_SUPPORT_KEY = 'typography.__experimentalTextDecoration';
[53345] Fix | Delete
/**
[53346] Fix | Delete
* Key within block settings' supports array indicating support for writing mode
[53347] Fix | Delete
* e.g. settings found in `block.json`.
[53348] Fix | Delete
*/
[53349] Fix | Delete
const supports_WRITING_MODE_SUPPORT_KEY = 'typography.__experimentalWritingMode';
[53350] Fix | Delete
/**
[53351] Fix | Delete
* Key within block settings' supports array indicating support for text
[53352] Fix | Delete
* transforms e.g. settings found in `block.json`.
[53353] Fix | Delete
*/
[53354] Fix | Delete
const supports_TEXT_TRANSFORM_SUPPORT_KEY = 'typography.__experimentalTextTransform';
[53355] Fix | Delete
[53356] Fix | Delete
/**
[53357] Fix | Delete
* Key within block settings' supports array indicating support for letter-spacing
[53358] Fix | Delete
* e.g. settings found in `block.json`.
[53359] Fix | Delete
*/
[53360] Fix | Delete
const supports_LETTER_SPACING_SUPPORT_KEY = 'typography.__experimentalLetterSpacing';
[53361] Fix | Delete
const LAYOUT_SUPPORT_KEY = 'layout';
[53362] Fix | Delete
const supports_TYPOGRAPHY_SUPPORT_KEYS = [supports_LINE_HEIGHT_SUPPORT_KEY, supports_FONT_SIZE_SUPPORT_KEY, supports_FONT_STYLE_SUPPORT_KEY, supports_FONT_WEIGHT_SUPPORT_KEY, supports_FONT_FAMILY_SUPPORT_KEY, supports_TEXT_ALIGN_SUPPORT_KEY, supports_TEXT_COLUMNS_SUPPORT_KEY, supports_TEXT_DECORATION_SUPPORT_KEY, supports_TEXT_TRANSFORM_SUPPORT_KEY, supports_WRITING_MODE_SUPPORT_KEY, supports_LETTER_SPACING_SUPPORT_KEY];
[53363] Fix | Delete
const EFFECTS_SUPPORT_KEYS = ['shadow'];
[53364] Fix | Delete
const supports_SPACING_SUPPORT_KEY = 'spacing';
[53365] Fix | Delete
const supports_styleSupportKeys = [...EFFECTS_SUPPORT_KEYS, ...supports_TYPOGRAPHY_SUPPORT_KEYS, supports_BORDER_SUPPORT_KEY, supports_COLOR_SUPPORT_KEY, supports_SPACING_SUPPORT_KEY];
[53366] Fix | Delete
[53367] Fix | Delete
/**
[53368] Fix | Delete
* Returns true if the block defines support for align.
[53369] Fix | Delete
*
[53370] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53371] Fix | Delete
* @return {boolean} Whether the block supports the feature.
[53372] Fix | Delete
*/
[53373] Fix | Delete
const hasAlignSupport = nameOrType => (0,external_wp_blocks_namespaceObject.hasBlockSupport)(nameOrType, ALIGN_SUPPORT_KEY);
[53374] Fix | Delete
[53375] Fix | Delete
/**
[53376] Fix | Delete
* Returns the block support value for align, if defined.
[53377] Fix | Delete
*
[53378] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53379] Fix | Delete
* @return {unknown} The block support value.
[53380] Fix | Delete
*/
[53381] Fix | Delete
const getAlignSupport = nameOrType => getBlockSupport(nameOrType, ALIGN_SUPPORT_KEY);
[53382] Fix | Delete
[53383] Fix | Delete
/**
[53384] Fix | Delete
* Returns true if the block defines support for align wide.
[53385] Fix | Delete
*
[53386] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53387] Fix | Delete
* @return {boolean} Whether the block supports the feature.
[53388] Fix | Delete
*/
[53389] Fix | Delete
const hasAlignWideSupport = nameOrType => hasBlockSupport(nameOrType, ALIGN_WIDE_SUPPORT_KEY);
[53390] Fix | Delete
[53391] Fix | Delete
/**
[53392] Fix | Delete
* Returns the block support value for align wide, if defined.
[53393] Fix | Delete
*
[53394] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53395] Fix | Delete
* @return {unknown} The block support value.
[53396] Fix | Delete
*/
[53397] Fix | Delete
const getAlignWideSupport = nameOrType => getBlockSupport(nameOrType, ALIGN_WIDE_SUPPORT_KEY);
[53398] Fix | Delete
[53399] Fix | Delete
/**
[53400] Fix | Delete
* Determine whether there is block support for border properties.
[53401] Fix | Delete
*
[53402] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53403] Fix | Delete
* @param {string} feature Border feature to check support for.
[53404] Fix | Delete
*
[53405] Fix | Delete
* @return {boolean} Whether there is support.
[53406] Fix | Delete
*/
[53407] Fix | Delete
function supports_hasBorderSupport(nameOrType, feature = 'any') {
[53408] Fix | Delete
if (external_wp_element_namespaceObject.Platform.OS !== 'web') {
[53409] Fix | Delete
return false;
[53410] Fix | Delete
}
[53411] Fix | Delete
const support = (0,external_wp_blocks_namespaceObject.getBlockSupport)(nameOrType, supports_BORDER_SUPPORT_KEY);
[53412] Fix | Delete
if (support === true) {
[53413] Fix | Delete
return true;
[53414] Fix | Delete
}
[53415] Fix | Delete
if (feature === 'any') {
[53416] Fix | Delete
return !!(support?.color || support?.radius || support?.width || support?.style);
[53417] Fix | Delete
}
[53418] Fix | Delete
return !!support?.[feature];
[53419] Fix | Delete
}
[53420] Fix | Delete
[53421] Fix | Delete
/**
[53422] Fix | Delete
* Get block support for border properties.
[53423] Fix | Delete
*
[53424] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53425] Fix | Delete
* @param {string} feature Border feature to get.
[53426] Fix | Delete
*
[53427] Fix | Delete
* @return {unknown} The block support.
[53428] Fix | Delete
*/
[53429] Fix | Delete
const getBorderSupport = (nameOrType, feature) => getBlockSupport(nameOrType, [supports_BORDER_SUPPORT_KEY, feature]);
[53430] Fix | Delete
[53431] Fix | Delete
/**
[53432] Fix | Delete
* Returns true if the block defines support for color.
[53433] Fix | Delete
*
[53434] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53435] Fix | Delete
* @return {boolean} Whether the block supports the feature.
[53436] Fix | Delete
*/
[53437] Fix | Delete
const supports_hasColorSupport = nameOrType => {
[53438] Fix | Delete
const colorSupport = getBlockSupport(nameOrType, supports_COLOR_SUPPORT_KEY);
[53439] Fix | Delete
return colorSupport && (colorSupport.link === true || colorSupport.gradient === true || colorSupport.background !== false || colorSupport.text !== false);
[53440] Fix | Delete
};
[53441] Fix | Delete
[53442] Fix | Delete
/**
[53443] Fix | Delete
* Returns true if the block defines support for link color.
[53444] Fix | Delete
*
[53445] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53446] Fix | Delete
* @return {boolean} Whether the block supports the feature.
[53447] Fix | Delete
*/
[53448] Fix | Delete
const supports_hasLinkColorSupport = nameOrType => {
[53449] Fix | Delete
if (Platform.OS !== 'web') {
[53450] Fix | Delete
return false;
[53451] Fix | Delete
}
[53452] Fix | Delete
const colorSupport = getBlockSupport(nameOrType, supports_COLOR_SUPPORT_KEY);
[53453] Fix | Delete
return colorSupport !== null && typeof colorSupport === 'object' && !!colorSupport.link;
[53454] Fix | Delete
};
[53455] Fix | Delete
[53456] Fix | Delete
/**
[53457] Fix | Delete
* Returns true if the block defines support for gradient color.
[53458] Fix | Delete
*
[53459] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53460] Fix | Delete
* @return {boolean} Whether the block supports the feature.
[53461] Fix | Delete
*/
[53462] Fix | Delete
const supports_hasGradientSupport = nameOrType => {
[53463] Fix | Delete
const colorSupport = (0,external_wp_blocks_namespaceObject.getBlockSupport)(nameOrType, supports_COLOR_SUPPORT_KEY);
[53464] Fix | Delete
return colorSupport !== null && typeof colorSupport === 'object' && !!colorSupport.gradients;
[53465] Fix | Delete
};
[53466] Fix | Delete
[53467] Fix | Delete
/**
[53468] Fix | Delete
* Returns true if the block defines support for background color.
[53469] Fix | Delete
*
[53470] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53471] Fix | Delete
* @return {boolean} Whether the block supports the feature.
[53472] Fix | Delete
*/
[53473] Fix | Delete
const supports_hasBackgroundColorSupport = nameOrType => {
[53474] Fix | Delete
const colorSupport = (0,external_wp_blocks_namespaceObject.getBlockSupport)(nameOrType, supports_COLOR_SUPPORT_KEY);
[53475] Fix | Delete
return colorSupport && colorSupport.background !== false;
[53476] Fix | Delete
};
[53477] Fix | Delete
[53478] Fix | Delete
/**
[53479] Fix | Delete
* Returns true if the block defines support for text-align.
[53480] Fix | Delete
*
[53481] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53482] Fix | Delete
* @return {boolean} Whether the block supports the feature.
[53483] Fix | Delete
*/
[53484] Fix | Delete
const hasTextAlignSupport = nameOrType => (0,external_wp_blocks_namespaceObject.hasBlockSupport)(nameOrType, supports_TEXT_ALIGN_SUPPORT_KEY);
[53485] Fix | Delete
[53486] Fix | Delete
/**
[53487] Fix | Delete
* Returns the block support value for text-align, if defined.
[53488] Fix | Delete
*
[53489] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53490] Fix | Delete
* @return {unknown} The block support value.
[53491] Fix | Delete
*/
[53492] Fix | Delete
const getTextAlignSupport = nameOrType => getBlockSupport(nameOrType, supports_TEXT_ALIGN_SUPPORT_KEY);
[53493] Fix | Delete
[53494] Fix | Delete
/**
[53495] Fix | Delete
* Returns true if the block defines support for background color.
[53496] Fix | Delete
*
[53497] Fix | Delete
* @param {string|Object} nameOrType Block name or type object.
[53498] Fix | Delete
* @return {boolean} Whether the block supports the feature.
[53499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function