@ohhwells/bridge 0.1.25 → 0.1.26
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 +26 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5784,6 +5784,14 @@ function OhhwellsBridge() {
|
|
|
5784
5784
|
const bumpLinkPopoverGrace = () => {
|
|
5785
5785
|
linkPopoverGraceUntilRef.current = Date.now() + 350;
|
|
5786
5786
|
};
|
|
5787
|
+
(0, import_react5.useEffect)(() => {
|
|
5788
|
+
if (!linkPopover) return;
|
|
5789
|
+
if (hoveredImageRef.current) {
|
|
5790
|
+
hoveredImageRef.current = null;
|
|
5791
|
+
hoveredImageHasTextOverlapRef.current = false;
|
|
5792
|
+
}
|
|
5793
|
+
postToParent({ type: "ow:image-unhover" });
|
|
5794
|
+
}, [linkPopover, postToParent]);
|
|
5787
5795
|
(0, import_react5.useEffect)(() => {
|
|
5788
5796
|
if (!isEditMode) return;
|
|
5789
5797
|
const useFixtures = shouldUseDevFixtures();
|
|
@@ -6236,6 +6244,15 @@ function OhhwellsBridge() {
|
|
|
6236
6244
|
return smallest;
|
|
6237
6245
|
};
|
|
6238
6246
|
const probeImageAt = (clientX, clientY, isDragOver = false, fromParentViewport = false) => {
|
|
6247
|
+
if (linkPopoverOpenRef.current) {
|
|
6248
|
+
if (hoveredImageRef.current) {
|
|
6249
|
+
hoveredImageRef.current = null;
|
|
6250
|
+
hoveredImageHasTextOverlapRef.current = false;
|
|
6251
|
+
resumeAnimTracks();
|
|
6252
|
+
postToParentRef.current({ type: "ow:image-unhover" });
|
|
6253
|
+
}
|
|
6254
|
+
return;
|
|
6255
|
+
}
|
|
6239
6256
|
const toggleEl = document.querySelector("[data-ohw-state-toggle]");
|
|
6240
6257
|
if (toggleEl) {
|
|
6241
6258
|
const { x, y } = toProbeCoords(clientX, clientY, fromParentViewport);
|
|
@@ -6261,6 +6278,15 @@ function OhhwellsBridge() {
|
|
|
6261
6278
|
}
|
|
6262
6279
|
return;
|
|
6263
6280
|
}
|
|
6281
|
+
if (topEl?.closest("[data-ohw-link-popover-root]") || topEl?.closest("[data-ohw-link-modal-root]")) {
|
|
6282
|
+
if (hoveredImageRef.current) {
|
|
6283
|
+
hoveredImageRef.current = null;
|
|
6284
|
+
hoveredImageHasTextOverlapRef.current = false;
|
|
6285
|
+
resumeAnimTracks();
|
|
6286
|
+
postToParentRef.current({ type: "ow:image-unhover" });
|
|
6287
|
+
}
|
|
6288
|
+
return;
|
|
6289
|
+
}
|
|
6264
6290
|
const isStateCardImage = !!imgEl.closest("[data-ohw-editable-state]");
|
|
6265
6291
|
const textEditable = Array.from(
|
|
6266
6292
|
document.querySelectorAll('[data-ohw-editable]:not([data-ohw-editable="image"]):not([data-ohw-editable="bg-image"])')
|