@ohhwells/bridge 0.1.52-next.141 → 0.1.52-next.142
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 +36 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +0 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9497,7 +9497,8 @@ function FloatingPanel({
|
|
|
9497
9497
|
role: "dialog",
|
|
9498
9498
|
"aria-label": title,
|
|
9499
9499
|
className: cn(
|
|
9500
|
-
|
|
9500
|
+
// Above MediaOverlay / item chrome (2147483646); link-modal content shares this tier.
|
|
9501
|
+
"fixed z-[2147483647] flex w-64 flex-col overflow-hidden rounded-xl border border-border bg-background font-sans shadow-lg outline-none",
|
|
9501
9502
|
className
|
|
9502
9503
|
),
|
|
9503
9504
|
style: { left: clamped.x, top: clamped.y },
|
|
@@ -11142,6 +11143,10 @@ function isInsideLinkEditor(target) {
|
|
|
11142
11143
|
function isInsideFloatingPanel(target) {
|
|
11143
11144
|
return Boolean(target.closest("[data-ohw-floating-panel]"));
|
|
11144
11145
|
}
|
|
11146
|
+
function isPointOverFloatingPanel(clientX, clientY) {
|
|
11147
|
+
const el = document.elementFromPoint(clientX, clientY);
|
|
11148
|
+
return Boolean(el instanceof Element && el.closest("[data-ohw-floating-panel]"));
|
|
11149
|
+
}
|
|
11145
11150
|
function getHrefKeyFromElement(el) {
|
|
11146
11151
|
if (!el) return null;
|
|
11147
11152
|
const anchor = el.closest("[data-ohw-href-key]");
|
|
@@ -13816,6 +13821,16 @@ function OhhwellsBridge() {
|
|
|
13816
13821
|
setHoveredNavContainerRect(null);
|
|
13817
13822
|
return;
|
|
13818
13823
|
}
|
|
13824
|
+
if (isInsideFloatingPanel(target) || isPointOverFloatingPanel(e.clientX, e.clientY)) {
|
|
13825
|
+
hoveredItemElRef.current = null;
|
|
13826
|
+
setHoveredItemRect(null);
|
|
13827
|
+
hoveredNavContainerRef.current = null;
|
|
13828
|
+
setHoveredNavContainerRect(null);
|
|
13829
|
+
siblingHintElRef.current = null;
|
|
13830
|
+
setSiblingHintRect(null);
|
|
13831
|
+
setSiblingHintRects([]);
|
|
13832
|
+
return;
|
|
13833
|
+
}
|
|
13819
13834
|
{
|
|
13820
13835
|
const selected2 = selectedElRef.current;
|
|
13821
13836
|
const selectedIsFooterColumn = Boolean(selected2) && !isFooterLinksContainer(selected2) && (selected2.hasAttribute("data-ohw-footer-col") || selected2.hasAttribute("data-ohw-footer-column") || Boolean(selected2.closest("footer") && isInferredFooterGroup2(selected2)));
|
|
@@ -14187,7 +14202,7 @@ function OhhwellsBridge() {
|
|
|
14187
14202
|
}
|
|
14188
14203
|
};
|
|
14189
14204
|
const probeImageAt = (clientX, clientY, isDragOver = false, fromParentViewport = false) => {
|
|
14190
|
-
if (linkPopoverOpenRef.current) {
|
|
14205
|
+
if (linkPopoverOpenRef.current || floatingPanelOpenRef.current && isPointOverFloatingPanel(clientX, clientY)) {
|
|
14191
14206
|
if (hoveredImageRef.current) {
|
|
14192
14207
|
hoveredImageRef.current = null;
|
|
14193
14208
|
hoveredImageHasTextOverlapRef.current = false;
|
|
@@ -14441,7 +14456,7 @@ function OhhwellsBridge() {
|
|
|
14441
14456
|
}
|
|
14442
14457
|
};
|
|
14443
14458
|
const probeHoverCardsAt = (clientX, clientY, fromParentViewport = false) => {
|
|
14444
|
-
if (linkPopoverOpenRef.current || document.documentElement.hasAttribute("data-ohw-section-picking")) {
|
|
14459
|
+
if (linkPopoverOpenRef.current || floatingPanelOpenRef.current && isPointOverFloatingPanel(clientX, clientY) || document.documentElement.hasAttribute("data-ohw-section-picking")) {
|
|
14445
14460
|
if (activeStateElRef.current) {
|
|
14446
14461
|
activeStateElRef.current.removeAttribute("data-ohw-state-hovered");
|
|
14447
14462
|
activeStateElRef.current = null;
|
|
@@ -14509,6 +14524,19 @@ function OhhwellsBridge() {
|
|
|
14509
14524
|
};
|
|
14510
14525
|
const handleMouseMove = (e) => {
|
|
14511
14526
|
const { clientX, clientY } = e;
|
|
14527
|
+
if (floatingPanelOpenRef.current && isPointOverFloatingPanel(clientX, clientY)) {
|
|
14528
|
+
hoveredItemElRef.current = null;
|
|
14529
|
+
setHoveredItemRect(null);
|
|
14530
|
+
hoveredNavContainerRef.current = null;
|
|
14531
|
+
setHoveredNavContainerRect(null);
|
|
14532
|
+
siblingHintElRef.current = null;
|
|
14533
|
+
setSiblingHintRect(null);
|
|
14534
|
+
setSiblingHintRects([]);
|
|
14535
|
+
dismissImageHover();
|
|
14536
|
+
clearImageHover();
|
|
14537
|
+
setSectionGap(null);
|
|
14538
|
+
return;
|
|
14539
|
+
}
|
|
14512
14540
|
probeSectionGapAt(clientX, clientY);
|
|
14513
14541
|
probeImageAt(clientX, clientY);
|
|
14514
14542
|
probeHoverCardsAt(clientX, clientY);
|
|
@@ -14517,6 +14545,11 @@ function OhhwellsBridge() {
|
|
|
14517
14545
|
if (e.data?.type !== "ow:pointer-sync") return;
|
|
14518
14546
|
const { clientX, clientY } = e.data;
|
|
14519
14547
|
if (typeof clientX !== "number" || typeof clientY !== "number") return;
|
|
14548
|
+
if (floatingPanelOpenRef.current && isPointOverFloatingPanel(clientX, clientY)) {
|
|
14549
|
+
dismissImageHover();
|
|
14550
|
+
clearImageHover();
|
|
14551
|
+
return;
|
|
14552
|
+
}
|
|
14520
14553
|
probeSectionGapAt(clientX, clientY);
|
|
14521
14554
|
probeImageAt(clientX, clientY);
|
|
14522
14555
|
probeHoverCardsAt(clientX, clientY);
|