@flamingo-stack/openframe-frontend-core 0.0.171 → 0.0.172

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.
@@ -32474,7 +32474,9 @@ import {
32474
32474
  DragOverlay,
32475
32475
  KeyboardSensor,
32476
32476
  PointerSensor,
32477
- closestCenter,
32477
+ closestCorners,
32478
+ pointerWithin,
32479
+ rectIntersection,
32478
32480
  useSensor,
32479
32481
  useSensors
32480
32482
  } from "@dnd-kit/core";
@@ -32495,7 +32497,6 @@ function BoardColumnHeader({
32495
32497
  onToggleCollapse,
32496
32498
  onAddTicket
32497
32499
  }) {
32498
- const textColor = getReadableTextColor(column.color);
32499
32500
  const count = column.total ?? column.tickets.length;
32500
32501
  const useStatusVariant = !!getTicketStatusConfig(column.id).icon;
32501
32502
  if (collapsed) {
@@ -32512,11 +32513,12 @@ function BoardColumnHeader({
32512
32513
  }
32513
32514
  ),
32514
32515
  /* @__PURE__ */ jsx291(
32515
- "div",
32516
+ TicketStatusTag,
32516
32517
  {
32517
- className: "inline-flex items-center justify-center whitespace-nowrap rounded-md p-[var(--spacing-system-xsf)] text-h5 rotate-180",
32518
- style: { backgroundColor: column.color, color: textColor, writingMode: "vertical-rl" },
32519
- children: column.label
32518
+ status: column.id,
32519
+ label: column.label,
32520
+ color: useStatusVariant ? void 0 : column.color,
32521
+ className: "h-auto [writing-mode:vertical-rl]"
32520
32522
  }
32521
32523
  ),
32522
32524
  /* @__PURE__ */ jsx291("span", { className: "text-h5", style: { color: column.color }, children: count })
@@ -32929,6 +32931,30 @@ function Board({
32929
32931
  useSensor(PointerSensor, { activationConstraint: { distance: 6 } }),
32930
32932
  useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates })
32931
32933
  );
32934
+ const collisionDetection = React101.useCallback((args) => {
32935
+ const pointer = pointerWithin(args);
32936
+ const intersections = pointer.length > 0 ? pointer : rectIntersection(args);
32937
+ const ticketHit = intersections.find(
32938
+ (c) => c.data?.droppableContainer?.data?.current?.type === "ticket"
32939
+ );
32940
+ if (ticketHit) return [ticketHit];
32941
+ const columnHit = intersections.find(
32942
+ (c) => c.data?.droppableContainer?.data?.current?.type === "column"
32943
+ );
32944
+ if (columnHit) {
32945
+ const columnId = columnHit.data?.droppableContainer?.data?.current?.columnId;
32946
+ const ticketsInColumn = args.droppableContainers.filter((c) => {
32947
+ const d = c.data.current;
32948
+ return d?.type === "ticket" && d.columnId === columnId;
32949
+ });
32950
+ if (ticketsInColumn.length > 0) {
32951
+ const closest = closestCorners({ ...args, droppableContainers: ticketsInColumn });
32952
+ if (closest.length > 0) return closest;
32953
+ }
32954
+ return [columnHit];
32955
+ }
32956
+ return closestCorners(args);
32957
+ }, []);
32932
32958
  const handleDragStart = (e) => {
32933
32959
  const id = String(e.active.id);
32934
32960
  const located = locate(items, id);
@@ -32966,7 +32992,7 @@ function Board({
32966
32992
  } else {
32967
32993
  const activeRect = active.rect.current.translated;
32968
32994
  const overRect = over.rect;
32969
- const isBelow = !!activeRect && activeRect.top + activeRect.height / 2 > overRect.top + overRect.height / 2;
32995
+ const isBelow = !!activeRect && activeRect.top > overRect.top + overRect.height / 2;
32970
32996
  toIndex = overIndex + (isBelow ? 1 : 0);
32971
32997
  }
32972
32998
  }
@@ -33040,7 +33066,7 @@ function Board({
33040
33066
  DndContext,
33041
33067
  {
33042
33068
  sensors,
33043
- collisionDetection: closestCenter,
33069
+ collisionDetection,
33044
33070
  onDragStart: handleDragStart,
33045
33071
  onDragOver: handleDragOver,
33046
33072
  onDragEnd: handleDragEnd,
@@ -33738,4 +33764,4 @@ export {
33738
33764
  TMCG_SOCIAL_PLATFORMS,
33739
33765
  assets
33740
33766
  };
33741
- //# sourceMappingURL=chunk-HVQIP5MH.js.map
33767
+ //# sourceMappingURL=chunk-FEEPEOW2.js.map