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
/**
[48500] Fix | Delete
* WordPress dependencies
[48501] Fix | Delete
*/
[48502] Fix | Delete
[48503] Fix | Delete
[48504] Fix | Delete
[48505] Fix | Delete
/**
[48506] Fix | Delete
* Internal dependencies
[48507] Fix | Delete
*/
[48508] Fix | Delete
[48509] Fix | Delete
[48510] Fix | Delete
[48511] Fix | Delete
[48512] Fix | Delete
function DefaultAppender({
[48513] Fix | Delete
rootClientId
[48514] Fix | Delete
}) {
[48515] Fix | Delete
const canInsertDefaultBlock = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).canInsertBlockType((0,external_wp_blocks_namespaceObject.getDefaultBlockName)(), rootClientId));
[48516] Fix | Delete
if (canInsertDefaultBlock) {
[48517] Fix | Delete
// Render the default block appender if the context supports use
[48518] Fix | Delete
// of the default appender.
[48519] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DefaultBlockAppender, {
[48520] Fix | Delete
rootClientId: rootClientId
[48521] Fix | Delete
});
[48522] Fix | Delete
}
[48523] Fix | Delete
[48524] Fix | Delete
// Fallback in case the default block can't be inserted.
[48525] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(button_block_appender, {
[48526] Fix | Delete
rootClientId: rootClientId,
[48527] Fix | Delete
className: "block-list-appender__toggle"
[48528] Fix | Delete
});
[48529] Fix | Delete
}
[48530] Fix | Delete
function BlockListAppender({
[48531] Fix | Delete
rootClientId,
[48532] Fix | Delete
CustomAppender,
[48533] Fix | Delete
className,
[48534] Fix | Delete
tagName: TagName = 'div'
[48535] Fix | Delete
}) {
[48536] Fix | Delete
const isDragOver = (0,external_wp_data_namespaceObject.useSelect)(select => {
[48537] Fix | Delete
const {
[48538] Fix | Delete
getBlockInsertionPoint,
[48539] Fix | Delete
isBlockInsertionPointVisible,
[48540] Fix | Delete
getBlockCount
[48541] Fix | Delete
} = select(store);
[48542] Fix | Delete
const insertionPoint = getBlockInsertionPoint();
[48543] Fix | Delete
// Ideally we should also check for `isDragging` but currently it
[48544] Fix | Delete
// requires a lot more setup. We can revisit this once we refactor
[48545] Fix | Delete
// the DnD utility hooks.
[48546] Fix | Delete
return isBlockInsertionPointVisible() && rootClientId === insertionPoint?.rootClientId && getBlockCount(rootClientId) === 0;
[48547] Fix | Delete
}, [rootClientId]);
[48548] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName
[48549] Fix | Delete
// A `tabIndex` is used on the wrapping `div` element in order to
[48550] Fix | Delete
// force a focus event to occur when an appender `button` element
[48551] Fix | Delete
// is clicked. In some browsers (Firefox, Safari), button clicks do
[48552] Fix | Delete
// not emit a focus event, which could cause this event to propagate
[48553] Fix | Delete
// unexpectedly. The `tabIndex` ensures that the interaction is
[48554] Fix | Delete
// captured as a focus, without also adding an extra tab stop.
[48555] Fix | Delete
//
[48556] Fix | Delete
// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
[48557] Fix | Delete
, {
[48558] Fix | Delete
tabIndex: -1,
[48559] Fix | Delete
className: dist_clsx('block-list-appender wp-block', className, {
[48560] Fix | Delete
'is-drag-over': isDragOver
[48561] Fix | Delete
})
[48562] Fix | Delete
// Needed in case the whole editor is content editable (for multi
[48563] Fix | Delete
// selection). It fixes an edge case where ArrowDown and ArrowRight
[48564] Fix | Delete
// should collapse the selection to the end of that selection and
[48565] Fix | Delete
// not into the appender.
[48566] Fix | Delete
,
[48567] Fix | Delete
contentEditable: false
[48568] Fix | Delete
// The appender exists to let you add the first Paragraph before
[48569] Fix | Delete
// any is inserted. To that end, this appender should visually be
[48570] Fix | Delete
// presented as a block. That means theme CSS should style it as if
[48571] Fix | Delete
// it were an empty paragraph block. That means a `wp-block` class to
[48572] Fix | Delete
// ensure the width is correct, and a [data-block] attribute to ensure
[48573] Fix | Delete
// the correct margin is applied, especially for classic themes which
[48574] Fix | Delete
// have commonly targeted that attribute for margins.
[48575] Fix | Delete
,
[48576] Fix | Delete
"data-block": true,
[48577] Fix | Delete
children: CustomAppender ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CustomAppender, {}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DefaultAppender, {
[48578] Fix | Delete
rootClientId: rootClientId
[48579] Fix | Delete
})
[48580] Fix | Delete
});
[48581] Fix | Delete
}
[48582] Fix | Delete
[48583] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-popover/inbetween.js
[48584] Fix | Delete
/**
[48585] Fix | Delete
* External dependencies
[48586] Fix | Delete
*/
[48587] Fix | Delete
[48588] Fix | Delete
[48589] Fix | Delete
/**
[48590] Fix | Delete
* WordPress dependencies
[48591] Fix | Delete
*/
[48592] Fix | Delete
[48593] Fix | Delete
[48594] Fix | Delete
[48595] Fix | Delete
[48596] Fix | Delete
[48597] Fix | Delete
/**
[48598] Fix | Delete
* Internal dependencies
[48599] Fix | Delete
*/
[48600] Fix | Delete
[48601] Fix | Delete
[48602] Fix | Delete
[48603] Fix | Delete
[48604] Fix | Delete
const inbetween_MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;
[48605] Fix | Delete
const InsertionPointOpenRef = (0,external_wp_element_namespaceObject.createContext)();
[48606] Fix | Delete
function BlockPopoverInbetween({
[48607] Fix | Delete
previousClientId,
[48608] Fix | Delete
nextClientId,
[48609] Fix | Delete
children,
[48610] Fix | Delete
__unstablePopoverSlot,
[48611] Fix | Delete
__unstableContentRef,
[48612] Fix | Delete
operation = 'insert',
[48613] Fix | Delete
nearestSide = 'right',
[48614] Fix | Delete
...props
[48615] Fix | Delete
}) {
[48616] Fix | Delete
// This is a temporary hack to get the inbetween inserter to recompute properly.
[48617] Fix | Delete
const [popoverRecomputeCounter, forcePopoverRecompute] = (0,external_wp_element_namespaceObject.useReducer)(
[48618] Fix | Delete
// Module is there to make sure that the counter doesn't overflow.
[48619] Fix | Delete
s => (s + 1) % inbetween_MAX_POPOVER_RECOMPUTE_COUNTER, 0);
[48620] Fix | Delete
const {
[48621] Fix | Delete
orientation,
[48622] Fix | Delete
rootClientId,
[48623] Fix | Delete
isVisible
[48624] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[48625] Fix | Delete
const {
[48626] Fix | Delete
getBlockListSettings,
[48627] Fix | Delete
getBlockRootClientId,
[48628] Fix | Delete
isBlockVisible
[48629] Fix | Delete
} = select(store);
[48630] Fix | Delete
const _rootClientId = getBlockRootClientId(previousClientId !== null && previousClientId !== void 0 ? previousClientId : nextClientId);
[48631] Fix | Delete
return {
[48632] Fix | Delete
orientation: getBlockListSettings(_rootClientId)?.orientation || 'vertical',
[48633] Fix | Delete
rootClientId: _rootClientId,
[48634] Fix | Delete
isVisible: isBlockVisible(previousClientId) && isBlockVisible(nextClientId)
[48635] Fix | Delete
};
[48636] Fix | Delete
}, [previousClientId, nextClientId]);
[48637] Fix | Delete
const previousElement = useBlockElement(previousClientId);
[48638] Fix | Delete
const nextElement = useBlockElement(nextClientId);
[48639] Fix | Delete
const isVertical = orientation === 'vertical';
[48640] Fix | Delete
const popoverAnchor = (0,external_wp_element_namespaceObject.useMemo)(() => {
[48641] Fix | Delete
if (
[48642] Fix | Delete
// popoverRecomputeCounter is by definition always equal or greater than 0.
[48643] Fix | Delete
// This check is only there to satisfy the correctness of the
[48644] Fix | Delete
// exhaustive-deps rule for the `useMemo` hook.
[48645] Fix | Delete
popoverRecomputeCounter < 0 || !previousElement && !nextElement || !isVisible) {
[48646] Fix | Delete
return undefined;
[48647] Fix | Delete
}
[48648] Fix | Delete
const contextElement = operation === 'group' ? nextElement || previousElement : previousElement || nextElement;
[48649] Fix | Delete
return {
[48650] Fix | Delete
contextElement,
[48651] Fix | Delete
getBoundingClientRect() {
[48652] Fix | Delete
const previousRect = previousElement ? previousElement.getBoundingClientRect() : null;
[48653] Fix | Delete
const nextRect = nextElement ? nextElement.getBoundingClientRect() : null;
[48654] Fix | Delete
let left = 0;
[48655] Fix | Delete
let top = 0;
[48656] Fix | Delete
let width = 0;
[48657] Fix | Delete
let height = 0;
[48658] Fix | Delete
if (operation === 'group') {
[48659] Fix | Delete
const targetRect = nextRect || previousRect;
[48660] Fix | Delete
top = targetRect.top;
[48661] Fix | Delete
// No spacing is likely around blocks in this operation.
[48662] Fix | Delete
// So width of the inserter containing rect is set to 0.
[48663] Fix | Delete
width = 0;
[48664] Fix | Delete
height = targetRect.bottom - targetRect.top;
[48665] Fix | Delete
// Popover calculates its distance from mid-block so some
[48666] Fix | Delete
// adjustments are needed to make it appear in the right place.
[48667] Fix | Delete
left = nearestSide === 'left' ? targetRect.left - 2 : targetRect.right - 2;
[48668] Fix | Delete
} else if (isVertical) {
[48669] Fix | Delete
// vertical
[48670] Fix | Delete
top = previousRect ? previousRect.bottom : nextRect.top;
[48671] Fix | Delete
width = previousRect ? previousRect.width : nextRect.width;
[48672] Fix | Delete
height = nextRect && previousRect ? nextRect.top - previousRect.bottom : 0;
[48673] Fix | Delete
left = previousRect ? previousRect.left : nextRect.left;
[48674] Fix | Delete
} else {
[48675] Fix | Delete
top = previousRect ? previousRect.top : nextRect.top;
[48676] Fix | Delete
height = previousRect ? previousRect.height : nextRect.height;
[48677] Fix | Delete
if ((0,external_wp_i18n_namespaceObject.isRTL)()) {
[48678] Fix | Delete
// non vertical, rtl
[48679] Fix | Delete
left = nextRect ? nextRect.right : previousRect.left;
[48680] Fix | Delete
width = previousRect && nextRect ? previousRect.left - nextRect.right : 0;
[48681] Fix | Delete
} else {
[48682] Fix | Delete
// non vertical, ltr
[48683] Fix | Delete
left = previousRect ? previousRect.right : nextRect.left;
[48684] Fix | Delete
width = previousRect && nextRect ? nextRect.left - previousRect.right : 0;
[48685] Fix | Delete
}
[48686] Fix | Delete
}
[48687] Fix | Delete
return new window.DOMRect(left, top, width, height);
[48688] Fix | Delete
}
[48689] Fix | Delete
};
[48690] Fix | Delete
}, [previousElement, nextElement, popoverRecomputeCounter, isVertical, isVisible, operation, nearestSide]);
[48691] Fix | Delete
const popoverScrollRef = use_popover_scroll(__unstableContentRef);
[48692] Fix | Delete
[48693] Fix | Delete
// This is only needed for a smooth transition when moving blocks.
[48694] Fix | Delete
// When blocks are moved up/down, their position can be set by
[48695] Fix | Delete
// updating the `transform` property manually (i.e. without using CSS
[48696] Fix | Delete
// transitions or animations). The animation, which can also scroll the block
[48697] Fix | Delete
// editor, can sometimes cause the position of the Popover to get out of sync.
[48698] Fix | Delete
// A MutationObserver is therefore used to make sure that changes to the
[48699] Fix | Delete
// selectedElement's attribute (i.e. `transform`) can be tracked and used to
[48700] Fix | Delete
// trigger the Popover to rerender.
[48701] Fix | Delete
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
[48702] Fix | Delete
if (!previousElement) {
[48703] Fix | Delete
return;
[48704] Fix | Delete
}
[48705] Fix | Delete
const observer = new window.MutationObserver(forcePopoverRecompute);
[48706] Fix | Delete
observer.observe(previousElement, {
[48707] Fix | Delete
attributes: true
[48708] Fix | Delete
});
[48709] Fix | Delete
return () => {
[48710] Fix | Delete
observer.disconnect();
[48711] Fix | Delete
};
[48712] Fix | Delete
}, [previousElement]);
[48713] Fix | Delete
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
[48714] Fix | Delete
if (!nextElement) {
[48715] Fix | Delete
return;
[48716] Fix | Delete
}
[48717] Fix | Delete
const observer = new window.MutationObserver(forcePopoverRecompute);
[48718] Fix | Delete
observer.observe(nextElement, {
[48719] Fix | Delete
attributes: true
[48720] Fix | Delete
});
[48721] Fix | Delete
return () => {
[48722] Fix | Delete
observer.disconnect();
[48723] Fix | Delete
};
[48724] Fix | Delete
}, [nextElement]);
[48725] Fix | Delete
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
[48726] Fix | Delete
if (!previousElement) {
[48727] Fix | Delete
return;
[48728] Fix | Delete
}
[48729] Fix | Delete
previousElement.ownerDocument.defaultView.addEventListener('resize', forcePopoverRecompute);
[48730] Fix | Delete
return () => {
[48731] Fix | Delete
previousElement.ownerDocument.defaultView?.removeEventListener('resize', forcePopoverRecompute);
[48732] Fix | Delete
};
[48733] Fix | Delete
}, [previousElement]);
[48734] Fix | Delete
[48735] Fix | Delete
// If there's either a previous or a next element, show the inbetween popover.
[48736] Fix | Delete
// Note that drag and drop uses the inbetween popover to show the drop indicator
[48737] Fix | Delete
// before the first block and after the last block.
[48738] Fix | Delete
if (!previousElement && !nextElement || !isVisible) {
[48739] Fix | Delete
return null;
[48740] Fix | Delete
}
[48741] Fix | Delete
[48742] Fix | Delete
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
[48743] Fix | Delete
// While ideally it would be enough to capture the
[48744] Fix | Delete
// bubbling focus event from the Inserter, due to the
[48745] Fix | Delete
// characteristics of click focusing of `button`s in
[48746] Fix | Delete
// Firefox and Safari, it is not reliable.
[48747] Fix | Delete
//
[48748] Fix | Delete
// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
[48749] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Popover, {
[48750] Fix | Delete
ref: popoverScrollRef,
[48751] Fix | Delete
animate: false,
[48752] Fix | Delete
anchor: popoverAnchor,
[48753] Fix | Delete
focusOnMount: false
[48754] Fix | Delete
// Render in the old slot if needed for backward compatibility,
[48755] Fix | Delete
// otherwise render in place (not in the default popover slot).
[48756] Fix | Delete
,
[48757] Fix | Delete
__unstableSlotName: __unstablePopoverSlot,
[48758] Fix | Delete
inline: !__unstablePopoverSlot
[48759] Fix | Delete
// Forces a remount of the popover when its position changes
[48760] Fix | Delete
// This makes sure the popover doesn't animate from its previous position.
[48761] Fix | Delete
,
[48762] Fix | Delete
...props,
[48763] Fix | Delete
className: dist_clsx('block-editor-block-popover', 'block-editor-block-popover__inbetween', props.className),
[48764] Fix | Delete
resize: false,
[48765] Fix | Delete
flip: false,
[48766] Fix | Delete
placement: "overlay",
[48767] Fix | Delete
variant: "unstyled",
[48768] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[48769] Fix | Delete
className: "block-editor-block-popover__inbetween-container",
[48770] Fix | Delete
children: children
[48771] Fix | Delete
})
[48772] Fix | Delete
}, nextClientId + '--' + rootClientId);
[48773] Fix | Delete
/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
[48774] Fix | Delete
}
[48775] Fix | Delete
/* harmony default export */ const inbetween = (BlockPopoverInbetween);
[48776] Fix | Delete
[48777] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-popover/drop-zone.js
[48778] Fix | Delete
/**
[48779] Fix | Delete
* WordPress dependencies
[48780] Fix | Delete
*/
[48781] Fix | Delete
[48782] Fix | Delete
[48783] Fix | Delete
[48784] Fix | Delete
[48785] Fix | Delete
/**
[48786] Fix | Delete
* Internal dependencies
[48787] Fix | Delete
*/
[48788] Fix | Delete
[48789] Fix | Delete
[48790] Fix | Delete
[48791] Fix | Delete
const animateVariants = {
[48792] Fix | Delete
hide: {
[48793] Fix | Delete
opacity: 0,
[48794] Fix | Delete
scaleY: 0.75
[48795] Fix | Delete
},
[48796] Fix | Delete
show: {
[48797] Fix | Delete
opacity: 1,
[48798] Fix | Delete
scaleY: 1
[48799] Fix | Delete
},
[48800] Fix | Delete
exit: {
[48801] Fix | Delete
opacity: 0,
[48802] Fix | Delete
scaleY: 0.9
[48803] Fix | Delete
}
[48804] Fix | Delete
};
[48805] Fix | Delete
function BlockDropZonePopover({
[48806] Fix | Delete
__unstablePopoverSlot,
[48807] Fix | Delete
__unstableContentRef
[48808] Fix | Delete
}) {
[48809] Fix | Delete
const {
[48810] Fix | Delete
clientId
[48811] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[48812] Fix | Delete
const {
[48813] Fix | Delete
getBlockOrder,
[48814] Fix | Delete
getBlockInsertionPoint
[48815] Fix | Delete
} = select(store);
[48816] Fix | Delete
const insertionPoint = getBlockInsertionPoint();
[48817] Fix | Delete
const order = getBlockOrder(insertionPoint.rootClientId);
[48818] Fix | Delete
if (!order.length) {
[48819] Fix | Delete
return {};
[48820] Fix | Delete
}
[48821] Fix | Delete
return {
[48822] Fix | Delete
clientId: order[insertionPoint.index]
[48823] Fix | Delete
};
[48824] Fix | Delete
}, []);
[48825] Fix | Delete
const reducedMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
[48826] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(cover, {
[48827] Fix | Delete
clientId: clientId,
[48828] Fix | Delete
__unstablePopoverSlot: __unstablePopoverSlot,
[48829] Fix | Delete
__unstableContentRef: __unstableContentRef,
[48830] Fix | Delete
className: "block-editor-block-popover__drop-zone",
[48831] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
[48832] Fix | Delete
"data-testid": "block-popover-drop-zone",
[48833] Fix | Delete
initial: reducedMotion ? animateVariants.show : animateVariants.hide,
[48834] Fix | Delete
animate: animateVariants.show,
[48835] Fix | Delete
exit: reducedMotion ? animateVariants.show : animateVariants.exit,
[48836] Fix | Delete
className: "block-editor-block-popover__drop-zone-foreground"
[48837] Fix | Delete
})
[48838] Fix | Delete
});
[48839] Fix | Delete
}
[48840] Fix | Delete
/* harmony default export */ const drop_zone = (BlockDropZonePopover);
[48841] Fix | Delete
[48842] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-tools/insertion-point.js
[48843] Fix | Delete
/**
[48844] Fix | Delete
* External dependencies
[48845] Fix | Delete
*/
[48846] Fix | Delete
[48847] Fix | Delete
[48848] Fix | Delete
/**
[48849] Fix | Delete
* WordPress dependencies
[48850] Fix | Delete
*/
[48851] Fix | Delete
[48852] Fix | Delete
[48853] Fix | Delete
[48854] Fix | Delete
[48855] Fix | Delete
[48856] Fix | Delete
/**
[48857] Fix | Delete
* Internal dependencies
[48858] Fix | Delete
*/
[48859] Fix | Delete
[48860] Fix | Delete
[48861] Fix | Delete
[48862] Fix | Delete
[48863] Fix | Delete
[48864] Fix | Delete
[48865] Fix | Delete
const insertion_point_InsertionPointOpenRef = (0,external_wp_element_namespaceObject.createContext)();
[48866] Fix | Delete
function InbetweenInsertionPointPopover({
[48867] Fix | Delete
__unstablePopoverSlot,
[48868] Fix | Delete
__unstableContentRef,
[48869] Fix | Delete
operation = 'insert',
[48870] Fix | Delete
nearestSide = 'right'
[48871] Fix | Delete
}) {
[48872] Fix | Delete
const {
[48873] Fix | Delete
selectBlock,
[48874] Fix | Delete
hideInsertionPoint
[48875] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[48876] Fix | Delete
const openRef = (0,external_wp_element_namespaceObject.useContext)(insertion_point_InsertionPointOpenRef);
[48877] Fix | Delete
const ref = (0,external_wp_element_namespaceObject.useRef)();
[48878] Fix | Delete
const {
[48879] Fix | Delete
orientation,
[48880] Fix | Delete
previousClientId,
[48881] Fix | Delete
nextClientId,
[48882] Fix | Delete
rootClientId,
[48883] Fix | Delete
isInserterShown,
[48884] Fix | Delete
isDistractionFree,
[48885] Fix | Delete
isNavigationMode
[48886] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
[48887] Fix | Delete
const {
[48888] Fix | Delete
getBlockOrder,
[48889] Fix | Delete
getBlockListSettings,
[48890] Fix | Delete
getBlockInsertionPoint,
[48891] Fix | Delete
isBlockBeingDragged,
[48892] Fix | Delete
getPreviousBlockClientId,
[48893] Fix | Delete
getNextBlockClientId,
[48894] Fix | Delete
getSettings,
[48895] Fix | Delete
isNavigationMode: _isNavigationMode
[48896] Fix | Delete
} = select(store);
[48897] Fix | Delete
const insertionPoint = getBlockInsertionPoint();
[48898] Fix | Delete
const order = getBlockOrder(insertionPoint.rootClientId);
[48899] Fix | Delete
if (!order.length) {
[48900] Fix | Delete
return {};
[48901] Fix | Delete
}
[48902] Fix | Delete
let _previousClientId = order[insertionPoint.index - 1];
[48903] Fix | Delete
let _nextClientId = order[insertionPoint.index];
[48904] Fix | Delete
while (isBlockBeingDragged(_previousClientId)) {
[48905] Fix | Delete
_previousClientId = getPreviousBlockClientId(_previousClientId);
[48906] Fix | Delete
}
[48907] Fix | Delete
while (isBlockBeingDragged(_nextClientId)) {
[48908] Fix | Delete
_nextClientId = getNextBlockClientId(_nextClientId);
[48909] Fix | Delete
}
[48910] Fix | Delete
const settings = getSettings();
[48911] Fix | Delete
return {
[48912] Fix | Delete
previousClientId: _previousClientId,
[48913] Fix | Delete
nextClientId: _nextClientId,
[48914] Fix | Delete
orientation: getBlockListSettings(insertionPoint.rootClientId)?.orientation || 'vertical',
[48915] Fix | Delete
rootClientId: insertionPoint.rootClientId,
[48916] Fix | Delete
isNavigationMode: _isNavigationMode(),
[48917] Fix | Delete
isDistractionFree: settings.isDistractionFree,
[48918] Fix | Delete
isInserterShown: insertionPoint?.__unstableWithInserter
[48919] Fix | Delete
};
[48920] Fix | Delete
}, []);
[48921] Fix | Delete
const {
[48922] Fix | Delete
getBlockEditingMode
[48923] Fix | Delete
} = (0,external_wp_data_namespaceObject.useSelect)(store);
[48924] Fix | Delete
const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
[48925] Fix | Delete
function onClick(event) {
[48926] Fix | Delete
if (event.target === ref.current && nextClientId && getBlockEditingMode(nextClientId) !== 'disabled') {
[48927] Fix | Delete
selectBlock(nextClientId, -1);
[48928] Fix | Delete
}
[48929] Fix | Delete
}
[48930] Fix | Delete
function maybeHideInserterPoint(event) {
[48931] Fix | Delete
// Only hide the inserter if it's triggered on the wrapper,
[48932] Fix | Delete
// and the inserter is not open.
[48933] Fix | Delete
if (event.target === ref.current && !openRef.current) {
[48934] Fix | Delete
hideInsertionPoint();
[48935] Fix | Delete
}
[48936] Fix | Delete
}
[48937] Fix | Delete
function onFocus(event) {
[48938] Fix | Delete
// Only handle click on the wrapper specifically, and not an event
[48939] Fix | Delete
// bubbled from the inserter itself.
[48940] Fix | Delete
if (event.target !== ref.current) {
[48941] Fix | Delete
openRef.current = true;
[48942] Fix | Delete
}
[48943] Fix | Delete
}
[48944] Fix | Delete
const lineVariants = {
[48945] Fix | Delete
// Initial position starts from the center and invisible.
[48946] Fix | Delete
start: {
[48947] Fix | Delete
opacity: 0,
[48948] Fix | Delete
scale: 0
[48949] Fix | Delete
},
[48950] Fix | Delete
// The line expands to fill the container. If the inserter is visible it
[48951] Fix | Delete
// is delayed so it appears orchestrated.
[48952] Fix | Delete
rest: {
[48953] Fix | Delete
opacity: 1,
[48954] Fix | Delete
scale: 1,
[48955] Fix | Delete
transition: {
[48956] Fix | Delete
delay: isInserterShown ? 0.5 : 0,
[48957] Fix | Delete
type: 'tween'
[48958] Fix | Delete
}
[48959] Fix | Delete
},
[48960] Fix | Delete
hover: {
[48961] Fix | Delete
opacity: 1,
[48962] Fix | Delete
scale: 1,
[48963] Fix | Delete
transition: {
[48964] Fix | Delete
delay: 0.5,
[48965] Fix | Delete
type: 'tween'
[48966] Fix | Delete
}
[48967] Fix | Delete
}
[48968] Fix | Delete
};
[48969] Fix | Delete
const inserterVariants = {
[48970] Fix | Delete
start: {
[48971] Fix | Delete
scale: disableMotion ? 1 : 0
[48972] Fix | Delete
},
[48973] Fix | Delete
rest: {
[48974] Fix | Delete
scale: 1,
[48975] Fix | Delete
transition: {
[48976] Fix | Delete
delay: 0.4,
[48977] Fix | Delete
type: 'tween'
[48978] Fix | Delete
}
[48979] Fix | Delete
}
[48980] Fix | Delete
};
[48981] Fix | Delete
if (isDistractionFree && !isNavigationMode) {
[48982] Fix | Delete
return null;
[48983] Fix | Delete
}
[48984] Fix | Delete
const orientationClassname = orientation === 'horizontal' || operation === 'group' ? 'is-horizontal' : 'is-vertical';
[48985] Fix | Delete
const className = dist_clsx('block-editor-block-list__insertion-point', orientationClassname);
[48986] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(inbetween, {
[48987] Fix | Delete
previousClientId: previousClientId,
[48988] Fix | Delete
nextClientId: nextClientId,
[48989] Fix | Delete
__unstablePopoverSlot: __unstablePopoverSlot,
[48990] Fix | Delete
__unstableContentRef: __unstableContentRef,
[48991] Fix | Delete
operation: operation,
[48992] Fix | Delete
nearestSide: nearestSide,
[48993] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__unstableMotion.div, {
[48994] Fix | Delete
layout: !disableMotion,
[48995] Fix | Delete
initial: disableMotion ? 'rest' : 'start',
[48996] Fix | Delete
animate: "rest",
[48997] Fix | Delete
whileHover: "hover",
[48998] Fix | Delete
whileTap: "pressed",
[48999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function