@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.cjs
CHANGED
|
@@ -8245,14 +8245,28 @@ function OhhwellsBridge() {
|
|
|
8245
8245
|
const runSectionsPrefetchRef = (0, import_react9.useRef)(runSectionsPrefetch);
|
|
8246
8246
|
runSectionsPrefetchRef.current = runSectionsPrefetch;
|
|
8247
8247
|
(0, import_react9.useEffect)(() => {
|
|
8248
|
-
if (!linkPopover)
|
|
8248
|
+
if (!linkPopover) {
|
|
8249
|
+
document.documentElement.removeAttribute("data-ohw-link-popover-open");
|
|
8250
|
+
return;
|
|
8251
|
+
}
|
|
8252
|
+
document.documentElement.setAttribute("data-ohw-link-popover-open", "");
|
|
8249
8253
|
if (hoveredImageRef.current) {
|
|
8250
8254
|
hoveredImageRef.current = null;
|
|
8251
8255
|
hoveredImageHasTextOverlapRef.current = false;
|
|
8252
8256
|
}
|
|
8253
8257
|
hoveredGapRef.current = null;
|
|
8254
8258
|
setSectionGap(null);
|
|
8259
|
+
hoveredItemElRef.current = null;
|
|
8260
|
+
setHoveredItemRect(null);
|
|
8261
|
+
hoveredNavContainerRef.current = null;
|
|
8262
|
+
setHoveredNavContainerRect(null);
|
|
8263
|
+
document.querySelectorAll("[data-ohw-hovered]").forEach((el) => {
|
|
8264
|
+
el.removeAttribute("data-ohw-hovered");
|
|
8265
|
+
});
|
|
8255
8266
|
postToParent2({ type: "ow:image-unhover" });
|
|
8267
|
+
return () => {
|
|
8268
|
+
document.documentElement.removeAttribute("data-ohw-link-popover-open");
|
|
8269
|
+
};
|
|
8256
8270
|
}, [linkPopover, postToParent2]);
|
|
8257
8271
|
(0, import_react9.useEffect)(() => {
|
|
8258
8272
|
if (!isEditMode) return;
|
|
@@ -8547,12 +8561,18 @@ function OhhwellsBridge() {
|
|
|
8547
8561
|
nodes: [{ key: FOOTER_ORDER_KEY, text: orderJson }]
|
|
8548
8562
|
});
|
|
8549
8563
|
}
|
|
8550
|
-
|
|
8564
|
+
if (!wasSelected) {
|
|
8565
|
+
deselectRef.current();
|
|
8566
|
+
return;
|
|
8567
|
+
}
|
|
8568
|
+
const still = (hrefKey ? document.querySelector(
|
|
8569
|
+
`footer [data-ohw-href-key="${CSS.escape(hrefKey)}"]`
|
|
8570
|
+
) : null) ?? (movedColumnIndex !== null ? listFooterColumns()[movedColumnIndex] ?? null : null) ?? (document.body.contains(draggedEl) ? draggedEl : null);
|
|
8551
8571
|
if (still && isNavigationItem(still)) {
|
|
8552
8572
|
selectRef.current(still);
|
|
8553
8573
|
} else if (still && isNavigationContainer(still)) {
|
|
8554
8574
|
selectFrameRef.current(still);
|
|
8555
|
-
} else
|
|
8575
|
+
} else {
|
|
8556
8576
|
deselectRef.current();
|
|
8557
8577
|
}
|
|
8558
8578
|
},
|
|
@@ -9028,6 +9048,9 @@ function OhhwellsBridge() {
|
|
|
9028
9048
|
outline-offset: 6px;
|
|
9029
9049
|
border-radius: 8px;
|
|
9030
9050
|
}
|
|
9051
|
+
html[data-ohw-link-popover-open] footer [data-ohw-footer-col]:hover {
|
|
9052
|
+
outline: none !important;
|
|
9053
|
+
}
|
|
9031
9054
|
html[data-ohw-footer-press-drag] footer,
|
|
9032
9055
|
html[data-ohw-footer-press-drag] footer * {
|
|
9033
9056
|
user-select: none !important;
|
|
@@ -9260,6 +9283,13 @@ function OhhwellsBridge() {
|
|
|
9260
9283
|
const handleMouseOver = (e) => {
|
|
9261
9284
|
if (document.documentElement.hasAttribute("data-ohw-section-picking")) return;
|
|
9262
9285
|
const target = e.target;
|
|
9286
|
+
if (linkPopoverOpenRef.current) {
|
|
9287
|
+
hoveredItemElRef.current = null;
|
|
9288
|
+
setHoveredItemRect(null);
|
|
9289
|
+
hoveredNavContainerRef.current = null;
|
|
9290
|
+
setHoveredNavContainerRect(null);
|
|
9291
|
+
return;
|
|
9292
|
+
}
|
|
9263
9293
|
if (toolbarVariantRef.current !== "select-frame") {
|
|
9264
9294
|
const navContainer = target.closest("[data-ohw-nav-container]");
|
|
9265
9295
|
if (navContainer && !getNavigationItemAnchor(target)) {
|
|
@@ -10436,6 +10466,9 @@ function OhhwellsBridge() {
|
|
|
10436
10466
|
};
|
|
10437
10467
|
const onPointerDown = (e) => {
|
|
10438
10468
|
if (e.button !== 0) return;
|
|
10469
|
+
if (suppressNextClickRef.current && !footerDragRef.current && !footerPointerDragRef.current?.started) {
|
|
10470
|
+
suppressNextClickRef.current = false;
|
|
10471
|
+
}
|
|
10439
10472
|
if (footerDragRef.current) return;
|
|
10440
10473
|
const target = e.target;
|
|
10441
10474
|
if (!target) return;
|
|
@@ -10822,7 +10855,7 @@ function OhhwellsBridge() {
|
|
|
10822
10855
|
)),
|
|
10823
10856
|
hoveredNavContainerRect && toolbarVariant !== "select-frame" && !linkPopover && !isItemDragging && !siblingHintRect && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ItemInteractionLayer, { rect: hoveredNavContainerRect, state: "hover" }),
|
|
10824
10857
|
toolbarVariant === "select-frame" && toolbarRect && !linkPopover && !isItemDragging && !isFooterFrameSelection && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(NavbarContainerChrome, { rect: toolbarRect, onAdd: handleAddTopLevelNavItem }),
|
|
10825
|
-
hoveredItemRect && !hoveredNavContainerRect && !siblingHintRect && siblingHintRects.length === 0 && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
|
|
10858
|
+
hoveredItemRect && !linkPopover && !hoveredNavContainerRect && !siblingHintRect && siblingHintRects.length === 0 && !isItemDragging && hoveredItemElRef.current !== selectedElRef.current && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ItemInteractionLayer, { rect: hoveredItemRect, state: "hover" }),
|
|
10826
10859
|
toolbarRect && (toolbarVariant === "link-action" || toolbarVariant === "select-frame") && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(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__ */ (0, import_jsx_runtime25.jsx)(ItemActionToolbar, { onEditLink: openLinkPopoverForSelected, addItemDisabled: true, editLinkDisabled: false, moreDisabled: true }) : void 0 }),
|
|
10827
10860
|
toolbarRect && toolbarVariant === "rich-text" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
10828
10861
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(EditGlowChrome, { rect: toolbarRect, elRef: glowElRef, reorderHrefKey, dragDisabled: reorderDragDisabled }),
|