@ohhwells/bridge 0.1.68-next.198 → 0.1.68-next.199

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 CHANGED
@@ -19272,8 +19272,15 @@ function OhhwellsBridge() {
19272
19272
  postToParentRef.current({ type: "ow:brand-value", value });
19273
19273
  };
19274
19274
  window.addEventListener("message", handleGetBrand);
19275
+ const handlePanelDragging = (e) => {
19276
+ if (e.data?.type !== "ow:panel-dragging") return;
19277
+ if (e.data.dragging) document.documentElement.setAttribute("data-ohw-panel-dragging", "");
19278
+ else document.documentElement.removeAttribute("data-ohw-panel-dragging");
19279
+ };
19280
+ window.addEventListener("message", handlePanelDragging);
19275
19281
  const handleDeactivate = (e) => {
19276
19282
  if (e.data?.type !== "ow:deactivate") return;
19283
+ if (document.documentElement.hasAttribute("data-ohw-panel-dragging")) return;
19277
19284
  if (Date.now() < linkPopoverGraceUntilRef.current) return;
19278
19285
  if (document.querySelector("[data-ohw-section-picker]")) return;
19279
19286
  if (linkPopoverOpenRef.current) {
@@ -19955,10 +19962,12 @@ function OhhwellsBridge() {
19955
19962
  window.removeEventListener("message", handleAiSetBrand);
19956
19963
  window.removeEventListener("message", handleAiSetStyles);
19957
19964
  window.removeEventListener("message", handleGetBrand);
19965
+ window.removeEventListener("message", handlePanelDragging);
19958
19966
  window.removeEventListener("message", handleDeactivate);
19959
19967
  window.removeEventListener("message", handleToastAction);
19960
19968
  window.removeEventListener("message", handleFormCount);
19961
19969
  window.removeEventListener("message", handleUiEscape);
19970
+ document.documentElement.removeAttribute("data-ohw-panel-dragging");
19962
19971
  autoSaveTimers.current.forEach(clearTimeout);
19963
19972
  autoSaveTimers.current.clear();
19964
19973
  if (imageUnhoverTimerRef.current) clearTimeout(imageUnhoverTimerRef.current);