@ohhwells/bridge 0.1.38-next.69 → 0.1.38-next.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +37 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +37 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8183,14 +8183,28 @@ function OhhwellsBridge() {
|
|
|
8183
8183
|
const runSectionsPrefetchRef = useRef5(runSectionsPrefetch);
|
|
8184
8184
|
runSectionsPrefetchRef.current = runSectionsPrefetch;
|
|
8185
8185
|
useEffect8(() => {
|
|
8186
|
-
if (!linkPopover)
|
|
8186
|
+
if (!linkPopover) {
|
|
8187
|
+
document.documentElement.removeAttribute("data-ohw-link-popover-open");
|
|
8188
|
+
return;
|
|
8189
|
+
}
|
|
8190
|
+
document.documentElement.setAttribute("data-ohw-link-popover-open", "");
|
|
8187
8191
|
if (hoveredImageRef.current) {
|
|
8188
8192
|
hoveredImageRef.current = null;
|
|
8189
8193
|
hoveredImageHasTextOverlapRef.current = false;
|
|
8190
8194
|
}
|
|
8191
8195
|
hoveredGapRef.current = null;
|
|
8192
8196
|
setSectionGap(null);
|
|
8197
|
+
hoveredItemElRef.current = null;
|
|
8198
|
+
setHoveredItemRect(null);
|
|
8199
|
+
hoveredNavContainerRef.current = null;
|
|
8200
|
+
setHoveredNavContainerRect(null);
|
|
8201
|
+
document.querySelectorAll("[data-ohw-hovered]").forEach((el) => {
|
|
8202
|
+
el.removeAttribute("data-ohw-hovered");
|
|
8203
|
+
});
|
|
8193
8204
|
postToParent2({ type: "ow:image-unhover" });
|
|
8205
|
+
return () => {
|
|
8206
|
+
document.documentElement.removeAttribute("data-ohw-link-popover-open");
|
|
8207
|
+
};
|
|
8194
8208
|
}, [linkPopover, postToParent2]);
|
|
8195
8209
|
useEffect8(() => {
|
|
8196
8210
|
if (!isEditMode) return;
|
|
@@ -8485,12 +8499,18 @@ function OhhwellsBridge() {
|
|
|
8485
8499
|
nodes: [{ key: FOOTER_ORDER_KEY, text: orderJson }]
|
|
8486
8500
|
});
|
|
8487
8501
|
}
|
|
8488
|
-
|
|
8502
|
+
if (!wasSelected) {
|
|
8503
|
+
deselectRef.current();
|
|
8504
|
+
return;
|
|
8505
|
+
}
|
|
8506
|
+
const still = (hrefKey ? document.querySelector(
|
|
8507
|
+
`footer [data-ohw-href-key="${CSS.escape(hrefKey)}"]`
|
|
8508
|
+
) : null) ?? (movedColumnIndex !== null ? listFooterColumns()[movedColumnIndex] ?? null : null) ?? (document.body.contains(draggedEl) ? draggedEl : null);
|
|
8489
8509
|
if (still && isNavigationItem(still)) {
|
|
8490
8510
|
selectRef.current(still);
|
|
8491
8511
|
} else if (still && isNavigationContainer(still)) {
|
|
8492
8512
|
selectFrameRef.current(still);
|
|
8493
|
-
} else
|
|
8513
|
+
} else {
|
|
8494
8514
|
deselectRef.current();
|
|
8495
8515
|
}
|
|
8496
8516
|
},
|
|
@@ -8966,6 +8986,9 @@ function OhhwellsBridge() {
|
|
|
8966
8986
|
outline-offset: 6px;
|
|
8967
8987
|
border-radius: 8px;
|
|
8968
8988
|
}
|
|
8989
|
+
html[data-ohw-link-popover-open] footer [data-ohw-footer-col]:hover {
|
|
8990
|
+
outline: none !important;
|
|
8991
|
+
}
|
|
8969
8992
|
html[data-ohw-footer-press-drag] footer,
|
|
8970
8993
|
html[data-ohw-footer-press-drag] footer * {
|
|
8971
8994
|
user-select: none !important;
|
|
@@ -9198,6 +9221,13 @@ function OhhwellsBridge() {
|
|
|
9198
9221
|
const handleMouseOver = (e) => {
|
|
9199
9222
|
if (document.documentElement.hasAttribute("data-ohw-section-picking")) return;
|
|
9200
9223
|
const target = e.target;
|
|
9224
|
+
if (linkPopoverOpenRef.current) {
|
|
9225
|
+
hoveredItemElRef.current = null;
|
|
9226
|
+
setHoveredItemRect(null);
|
|
9227
|
+
hoveredNavContainerRef.current = null;
|
|
9228
|
+
setHoveredNavContainerRect(null);
|
|
9229
|
+
return;
|
|
9230
|
+
}
|
|
9201
9231
|
if (toolbarVariantRef.current !== "select-frame") {
|
|
9202
9232
|
const navContainer = target.closest("[data-ohw-nav-container]");
|
|
9203
9233
|
if (navContainer && !getNavigationItemAnchor(target)) {
|
|
@@ -10374,6 +10404,9 @@ function OhhwellsBridge() {
|
|
|
10374
10404
|
};
|
|
10375
10405
|
const onPointerDown = (e) => {
|
|
10376
10406
|
if (e.button !== 0) return;
|
|
10407
|
+
if (suppressNextClickRef.current && !footerDragRef.current && !footerPointerDragRef.current?.started) {
|
|
10408
|
+
suppressNextClickRef.current = false;
|
|
10409
|
+
}
|
|
10377
10410
|
if (footerDragRef.current) return;
|
|
10378
10411
|
const target = e.target;
|
|
10379
10412
|
if (!target) return;
|
|
@@ -10760,7 +10793,7 @@ function OhhwellsBridge() {
|
|
|
10760
10793
|
)),
|
|
10761
10794
|
hoveredNavContainerRect && toolbarVariant !== "select-frame" && !linkPopover && !isItemDragging && !siblingHintRect && siblingHintRects.length === 0 && /* @__PURE__ */ jsx25(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
|
|
10762
10795
|
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && /* @__PURE__ */ jsx25(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
|
|
10763
|
-
hoveredItemRect && !hoveredNavContainerRect && !siblingHintRect && siblingHintRects.length === 0 && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ jsx25(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
|
|
10796
|
+
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !siblingHintRect && siblingHintRects.length === 0 && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ jsx25(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
|
|
10764
10797
|
toolbarRect && (toolbarVariant === "link-action" || toolbarVariant === "select-frame") && /* @__PURE__ */ jsx25(ItemInteractionLayer, { rect: isItemDragging && draggedItemRect && footerDragRef.current?.wasSelected ? draggedItemRect : toolbarRect, elRef: glowElRef, state: isItemDragging ? "dragging" : resolveItemInteractionState(toolbarRect, parentScrollRef.current), showHandle: toolbarVariant === "link-action" && Boolean(reorderHrefKey) || toolbarVariant === "select-frame" && isFooterFrameSelection, dragDisabled: reorderDragDisabled, dragHandleLabel: reorderHrefKey ? `Reorder ${reorderHrefKey}` : "Reorder item", onDragHandleDragStart: handleItemDragStart, onDragHandleDragEnd: handleItemDragEnd, onItemPointerDown: handleItemChromePointerDown, onItemClick: handleItemChromeClick, toolbar: toolbarVariant === "link-action" && !isItemDragging ? /* @__PURE__ */ jsx25(ItemActionToolbar, { onEditLink: openLinkPopoverForSelected, addItemDisabled: true, editLinkDisabled: false, moreDisabled: true }) : void 0 }),
|
|
10765
10798
|
toolbarRect && toolbarVariant === "rich-text" && /* @__PURE__ */ jsxs14(Fragment5, { children: [
|
|
10766
10799
|
/* @__PURE__ */ jsx25(EditGlowChrome, { rect: toolbarRect, elRef: glowElRef, reorderHrefKey, dragDisabled: reorderDragDisabled }),
|