@ohhwells/bridge 0.1.42-next.101 → 0.1.42-next.103

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
@@ -7407,12 +7407,6 @@ function hitTestNavDropSlot(clientX, clientY, draggedHrefKey) {
7407
7407
  }
7408
7408
  return best?.slot ?? null;
7409
7409
  }
7410
- function siblingRectsForNavDrag(draggedEl, activeParentId) {
7411
- if (activeParentId) {
7412
- return listNavChildren(activeParentId).filter((el) => el !== draggedEl).map((el) => el.getBoundingClientRect());
7413
- }
7414
- return listReorderableNavItems().filter((el) => el !== draggedEl).map((el) => el.getBoundingClientRect());
7415
- }
7416
7410
 
7417
7411
  // src/useNavItemDrag.ts
7418
7412
  var import_react8 = require("react");
@@ -7461,8 +7455,7 @@ function useNavItemDrag({
7461
7455
  session.lastClientY = clientY;
7462
7456
  }
7463
7457
  session.activeSlot = activeSlot;
7464
- const parentId = activeSlot?.parentId ?? null;
7465
- setSiblingHintRects(siblingRectsForNavDrag(session.draggedEl, parentId));
7458
+ setSiblingHintRects([]);
7466
7459
  const slots = buildAllNavDropSlots(session.hrefKey);
7467
7460
  setNavDropSlots(slots);
7468
7461
  const activeIdx = activeSlot ? slots.findIndex(
@@ -9480,21 +9473,11 @@ function OhhwellsBridge() {
9480
9473
  session.lastClientY = clientY;
9481
9474
  }
9482
9475
  session.activeSlot = activeSlot;
9476
+ setSiblingHintRects([]);
9483
9477
  if (session.kind === "link") {
9484
- const columns2 = listFooterColumns();
9485
- const focusCols = /* @__PURE__ */ new Set([session.sourceColumnIndex]);
9486
- if (activeSlot) focusCols.add(activeSlot.columnIndex);
9487
- const siblingRects = [];
9488
- columns2.forEach((col, i) => {
9489
- if (!focusCols.has(i)) return;
9490
- for (const link of listFooterLinksInColumn(col)) {
9491
- if (link === dragged) continue;
9492
- siblingRects.push(link.getBoundingClientRect());
9493
- }
9494
- });
9495
- setSiblingHintRects(siblingRects);
9478
+ const columns = listFooterColumns();
9496
9479
  const slots2 = [];
9497
- columns2.forEach((col, i) => {
9480
+ columns.forEach((col, i) => {
9498
9481
  slots2.push(...buildLinkDropSlots(col, i));
9499
9482
  });
9500
9483
  setFooterDropSlots(slots2);
@@ -9502,8 +9485,6 @@ function OhhwellsBridge() {
9502
9485
  setActiveFooterDropIndex(activeIdx2 >= 0 ? activeIdx2 : null);
9503
9486
  return;
9504
9487
  }
9505
- const columns = listFooterColumns();
9506
- setSiblingHintRects(columns.filter((col) => col !== dragged).map((col) => col.getBoundingClientRect()));
9507
9488
  const slots = buildColumnDropSlots();
9508
9489
  setFooterDropSlots(slots);
9509
9490
  const activeIdx = activeSlot ? slots.findIndex((s) => s.insertIndex === activeSlot.insertIndex) : -1;
@@ -12111,7 +12092,7 @@ function OhhwellsBridge() {
12111
12092
  }
12112
12093
  ),
12113
12094
  siblingHintRect && !linkPopover && !isItemDragging && siblingHintRects.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect: siblingHintRect, state: "sibling-hint" }),
12114
- siblingHintRects.length > 0 && !linkPopover && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
12095
+ siblingHintRects.length > 0 && !linkPopover && !isItemDragging && siblingHintRects.map((rect, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect, state: "sibling-hint" }, `sibling-hint-${i}`)),
12115
12096
  isItemDragging && draggedItemRect && selectedElRef.current !== footerDragRef.current?.draggedEl && selectedElRef.current !== navDragRef.current?.draggedEl && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ItemInteractionLayer, { rect: draggedItemRect, state: "dragging" }),
12116
12097
  isItemDragging && footerDropSlots.map((slot, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
12117
12098
  "div",