@ohhwells/bridge 0.1.38-next.61 → 0.1.38-next.62

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
@@ -4949,6 +4949,7 @@ function parseSectionsFromRoot(root) {
4949
4949
  for (const el of root.querySelectorAll("[data-ohw-section]")) {
4950
4950
  const id = el.getAttribute("data-ohw-section") ?? "";
4951
4951
  if (!id || seen.has(id)) continue;
4952
+ if (el.parentElement?.closest("[data-ohw-section]")) continue;
4952
4953
  seen.add(id);
4953
4954
  const label = el.getAttribute("data-ohw-section-label") ?? titleCaseSectionId(id);
4954
4955
  sections.push({ id, label });
@@ -5783,6 +5784,9 @@ function SectionPickerOverlay({
5783
5784
  document.querySelectorAll("[data-ohw-hovered]").forEach((el) => {
5784
5785
  el.removeAttribute("data-ohw-hovered");
5785
5786
  });
5787
+ document.querySelectorAll("[data-ohw-state-hovered]").forEach((el) => {
5788
+ el.removeAttribute("data-ohw-state-hovered");
5789
+ });
5786
5790
  return () => {
5787
5791
  document.documentElement.removeAttribute("data-ohw-section-picking");
5788
5792
  };
@@ -8490,6 +8494,7 @@ function OhhwellsBridge() {
8490
8494
  });
8491
8495
  };
8492
8496
  const handleMouseOver = (e) => {
8497
+ if (document.documentElement.hasAttribute("data-ohw-section-picking")) return;
8493
8498
  const target = e.target;
8494
8499
  if (toolbarVariantRef.current !== "select-frame") {
8495
8500
  const navContainer = target.closest("[data-ohw-nav-container]");
@@ -8869,6 +8874,14 @@ function OhhwellsBridge() {
8869
8874
  }
8870
8875
  };
8871
8876
  const probeHoverCardsAt = (clientX, clientY, fromParentViewport = false) => {
8877
+ if (linkPopoverOpenRef.current || document.documentElement.hasAttribute("data-ohw-section-picking")) {
8878
+ if (activeStateElRef.current) {
8879
+ activeStateElRef.current.removeAttribute("data-ohw-state-hovered");
8880
+ activeStateElRef.current = null;
8881
+ setToggleState(null);
8882
+ }
8883
+ return;
8884
+ }
8872
8885
  const { x, y } = toProbeCoords(clientX, clientY, fromParentViewport);
8873
8886
  const toggleEl = document.querySelector("[data-ohw-state-toggle]");
8874
8887
  if (toggleEl) {