@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.js CHANGED
@@ -5736,6 +5736,14 @@ function OhhwellsBridge() {
5736
5736
  const bumpLinkPopoverGrace = () => {
5737
5737
  linkPopoverGraceUntilRef.current = Date.now() + 350;
5738
5738
  };
5739
+ useEffect4(() => {
5740
+ if (!linkPopover) return;
5741
+ if (hoveredImageRef.current) {
5742
+ hoveredImageRef.current = null;
5743
+ hoveredImageHasTextOverlapRef.current = false;
5744
+ }
5745
+ postToParent({ type: "ow:image-unhover" });
5746
+ }, [linkPopover, postToParent]);
5739
5747
  useEffect4(() => {
5740
5748
  if (!isEditMode) return;
5741
5749
  const useFixtures = shouldUseDevFixtures();
@@ -6188,6 +6196,15 @@ function OhhwellsBridge() {
6188
6196
  return smallest;
6189
6197
  };
6190
6198
  const probeImageAt = (clientX, clientY, isDragOver = false, fromParentViewport = false) => {
6199
+ if (linkPopoverOpenRef.current) {
6200
+ if (hoveredImageRef.current) {
6201
+ hoveredImageRef.current = null;
6202
+ hoveredImageHasTextOverlapRef.current = false;
6203
+ resumeAnimTracks();
6204
+ postToParentRef.current({ type: "ow:image-unhover" });
6205
+ }
6206
+ return;
6207
+ }
6191
6208
  const toggleEl = document.querySelector("[data-ohw-state-toggle]");
6192
6209
  if (toggleEl) {
6193
6210
  const { x, y } = toProbeCoords(clientX, clientY, fromParentViewport);
@@ -6213,6 +6230,15 @@ function OhhwellsBridge() {
6213
6230
  }
6214
6231
  return;
6215
6232
  }
6233
+ if (topEl?.closest("[data-ohw-link-popover-root]") || topEl?.closest("[data-ohw-link-modal-root]")) {
6234
+ if (hoveredImageRef.current) {
6235
+ hoveredImageRef.current = null;
6236
+ hoveredImageHasTextOverlapRef.current = false;
6237
+ resumeAnimTracks();
6238
+ postToParentRef.current({ type: "ow:image-unhover" });
6239
+ }
6240
+ return;
6241
+ }
6216
6242
  const isStateCardImage = !!imgEl.closest("[data-ohw-editable-state]");
6217
6243
  const textEditable = Array.from(
6218
6244
  document.querySelectorAll('[data-ohw-editable]:not([data-ohw-editable="image"]):not([data-ohw-editable="bg-image"])')