@botiverse/raft-ui 0.35.1 → 0.36.1

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.
@@ -14,13 +14,14 @@ import { ScrollArea } from "@base-ui/react/scroll-area";
14
14
  import { Avatar } from "@base-ui/react";
15
15
  import { Menu } from "@base-ui/react/menu";
16
16
  import { Popover } from "@base-ui/react/popover";
17
- import { PointerSensor, TouchSensor, useSensor } from "@dnd-kit/core";
17
+ import { DragOverlay, KeyboardSensor, PointerSensor, TouchSensor, defaultDropAnimationSideEffects, useDndContext, useSensor, useSensors } from "@dnd-kit/core";
18
18
  import { PreviewCard } from "@base-ui/react/preview-card";
19
19
  import { Input } from "@base-ui/react/input";
20
20
  import { Radio } from "@base-ui/react/radio";
21
21
  import { RadioGroup } from "@base-ui/react/radio-group";
22
22
  import { Toggle } from "@base-ui/react/toggle";
23
23
  import { Toolbar } from "@base-ui/react/toolbar";
24
+ import { sortableKeyboardCoordinates } from "@dnd-kit/sortable";
24
25
  //#region src/lib/decision-width.ts
25
26
  /**
26
27
  * The width of every decision dialog (dialog.md#variants): AlertDialog and a
@@ -2540,6 +2541,42 @@ function MobileNavLabel({ className, render, ...props }) {
2540
2541
  });
2541
2542
  }
2542
2543
  //#endregion
2544
+ //#region src/lib/drag-escape.ts
2545
+ /** The drags in progress in each window, each with its own cancel. */
2546
+ const holds$1 = /* @__PURE__ */ new WeakMap();
2547
+ function onKeydown(event) {
2548
+ if (event.key !== "Escape" && event.code !== "Escape") return;
2549
+ const drags = holds$1.get(this);
2550
+ if (!drags || drags.size === 0) return;
2551
+ event.preventDefault();
2552
+ event.stopImmediatePropagation();
2553
+ for (const cancel of drags.values()) cancel(event);
2554
+ }
2555
+ function guard(win) {
2556
+ let drags = holds$1.get(win);
2557
+ if (!drags) {
2558
+ drags = /* @__PURE__ */ new Map();
2559
+ holds$1.set(win, drags);
2560
+ win.addEventListener("keydown", onKeydown, { capture: true });
2561
+ }
2562
+ return drags;
2563
+ }
2564
+ if (typeof window !== "undefined") guard(window);
2565
+ /** A sensor's drag has started: Escape now cancels it, and only it. */
2566
+ function holdEscape(win, sensor, cancel) {
2567
+ if (!win) return;
2568
+ guard(win).set(sensor, cancel);
2569
+ }
2570
+ /** The sensor's drag is over: Escape behaves as it does everywhere else again. */
2571
+ function releaseEscape(win, sensor) {
2572
+ if (!win) return;
2573
+ holds$1.get(win)?.delete(sensor);
2574
+ }
2575
+ /** The window an event happened in. */
2576
+ function eventWindow(event) {
2577
+ return (event?.target)?.ownerDocument?.defaultView ?? (typeof window === "undefined" ? null : window);
2578
+ }
2579
+ //#endregion
2543
2580
  //#region src/lib/touch-drag.ts
2544
2581
  /**
2545
2582
  * How a finger picks up something that can be dragged
@@ -2563,6 +2600,8 @@ function MobileNavLabel({ className, render, ...props }) {
2563
2600
  * touch on its distance and this sensor would never run.
2564
2601
  */
2565
2602
  const TOUCH_DRAG_HOLD_MS = 500;
2603
+ const TOUCH_DRAG_DISTANCE_PX = 10;
2604
+ const TOUCH_DRAG_TOLERANCE_PX = 10;
2566
2605
  const holds = /* @__PURE__ */ new WeakMap();
2567
2606
  function touchPoint(event) {
2568
2607
  const touch = event.touches?.[0] ?? event.changedTouches?.[0];
@@ -2574,6 +2613,18 @@ function touchPoint(event) {
2574
2613
  function farther(from, to, limit) {
2575
2614
  return Math.hypot(to.x - from.x, to.y - from.y) > limit;
2576
2615
  }
2616
+ /**
2617
+ * Once a pointer sensor's drag has started, Escape cancels it and reaches
2618
+ * nothing else (`drag-escape.ts`): no app handler on the window, the document
2619
+ * or an element hears it.
2620
+ */
2621
+ function holdEscapeOnceActive(sensor) {
2622
+ const self = sensor;
2623
+ if (self.activated) holdEscape(eventWindow(self.props.event), sensor, () => self.handleCancel());
2624
+ }
2625
+ function releaseEscapeOf(sensor) {
2626
+ releaseEscape(eventWindow(sensor.props.event), sensor);
2627
+ }
2577
2628
  var HoldThenMoveTouchSensorImpl = class extends TouchSensor {
2578
2629
  static activators = TouchSensor.activators;
2579
2630
  static setup() {
@@ -2592,6 +2643,10 @@ var HoldThenMoveTouchSensorImpl = class extends TouchSensor {
2592
2643
  };
2593
2644
  holds.set(this, state);
2594
2645
  }
2646
+ handleStart() {
2647
+ super.handleStart();
2648
+ holdEscapeOnceActive(this);
2649
+ }
2595
2650
  handleMove(event) {
2596
2651
  const self = this;
2597
2652
  const state = holds.get(this);
@@ -2619,22 +2674,33 @@ var HoldThenMoveTouchSensorImpl = class extends TouchSensor {
2619
2674
  const state = holds.get(this);
2620
2675
  if (state) clearTimeout(state.timer);
2621
2676
  holds.delete(this);
2677
+ releaseEscapeOf(this);
2622
2678
  super.detach();
2623
2679
  }
2624
2680
  };
2625
2681
  /** A TouchSensor that starts a drag on the first move after a still hold (see above). */
2626
2682
  const HoldThenMoveTouchSensor = HoldThenMoveTouchSensorImpl;
2627
- /**
2628
- * dnd-kit's PointerSensor for a mouse and a pen only: a finger's pointerdown is
2629
- * left to `HoldThenMoveTouchSensor`.
2630
- */
2631
- var MouseOnlyPointerSensor = class extends PointerSensor {
2683
+ var MouseOnlyPointerSensorImpl = class extends PointerSensor {
2632
2684
  static activators = [{
2633
2685
  eventName: "onPointerDown",
2634
2686
  handler: (event, options) => event.nativeEvent.pointerType === "touch" ? false : PointerSensor.activators[0].handler(event, options)
2635
2687
  }];
2688
+ handleStart() {
2689
+ super.handleStart();
2690
+ holdEscapeOnceActive(this);
2691
+ }
2692
+ detach() {
2693
+ releaseEscapeOf(this);
2694
+ super.detach();
2695
+ }
2636
2696
  };
2637
2697
  /**
2698
+ * dnd-kit's PointerSensor for a mouse and a pen only: a finger's pointerdown is
2699
+ * left to `HoldThenMoveTouchSensor`. While it holds a drag, Escape puts the
2700
+ * item back and reaches nothing else.
2701
+ */
2702
+ const MouseOnlyPointerSensor = MouseOnlyPointerSensorImpl;
2703
+ /**
2638
2704
  * `useSensor(HoldThenMoveTouchSensor, …)` with the activation the sensor relies
2639
2705
  * on: no constraint dnd-kit would act on by itself, so only a move after the
2640
2706
  * hold starts the drag.
@@ -5753,6 +5819,728 @@ function MessageListJumpPillDismiss({ className, children, render, nativeButton,
5753
5819
  });
5754
5820
  }
5755
5821
  //#endregion
5822
+ //#region src/components/drag/drag-announcements.ts
5823
+ function at({ place, position, count }) {
5824
+ const where = position == null ? "" : count == null ? `position ${position}` : `position ${position} of ${count}`;
5825
+ if (!place) return where;
5826
+ return where ? `${place}, ${where}` : place;
5827
+ }
5828
+ function sentence(text) {
5829
+ return /[.!?]$/.test(text) ? text : `${text}.`;
5830
+ }
5831
+ const DEFAULT_DRAG_MESSAGES = {
5832
+ instructions: "To pick up an item, press Space. Use the arrow keys to move it, Space to drop it, Escape to cancel.",
5833
+ pickedUp: ({ name, ...place }) => at(place) ? `Picked up ${name}. Over ${at(place)}.` : `Picked up ${name}.`,
5834
+ over: ({ name: _name, ...place }) => `Over ${at(place)}.`,
5835
+ notOver: () => "Not over a place. Dropping now cancels.",
5836
+ refused: ({ name, place, reason }) => `${name} can't go to ${place}. ${reason}`,
5837
+ dropped: ({ name, ...place }) => `Dropped ${name} in ${at(place)}.`,
5838
+ cancelled: ({ name, ...place }) => at(place) ? `Cancelled. ${name} is back in ${at(place)}.` : `Cancelled. ${name} is back.`,
5839
+ refusedDrop: ({ reason, ...rest }) => `${sentence(reason)} ${DEFAULT_DRAG_MESSAGES.cancelled(rest)}`
5840
+ };
5841
+ /** Merges your messages over the English defaults. */
5842
+ function dragMessages(messages) {
5843
+ return messages ? {
5844
+ ...DEFAULT_DRAG_MESSAGES,
5845
+ ...messages
5846
+ } : DEFAULT_DRAG_MESSAGES;
5847
+ }
5848
+ /**
5849
+ * dnd-kit `announcements` that speak by name, from your names and places,
5850
+ * in your language. Pass them with `dragInstructions` as a `DndContext`'s
5851
+ * `accessibility`, or to `TaskDndProvider`'s.
5852
+ */
5853
+ function createDragAnnouncements(source, messages) {
5854
+ const say = dragMessages(messages);
5855
+ let lastPlace = null;
5856
+ const placeKey = (place) => place ? JSON.stringify(place) : null;
5857
+ const describeOver = (name, activeId, overId) => {
5858
+ if (overId == null) {
5859
+ lastPlace = null;
5860
+ return say.notOver({ name });
5861
+ }
5862
+ const refused = source.refusal?.(activeId, overId);
5863
+ if (refused) {
5864
+ lastPlace = null;
5865
+ return say.refused({
5866
+ name,
5867
+ ...refused
5868
+ });
5869
+ }
5870
+ if (!source.place) return void 0;
5871
+ const place = source.place(activeId, overId);
5872
+ if (!place) {
5873
+ lastPlace = null;
5874
+ return say.notOver({ name });
5875
+ }
5876
+ const key = placeKey(place);
5877
+ if (key === lastPlace) return void 0;
5878
+ lastPlace = key;
5879
+ return say.over({
5880
+ name,
5881
+ ...place
5882
+ });
5883
+ };
5884
+ const named = (speak) => (event) => {
5885
+ const name = source.name(event.active.id);
5886
+ return name ? speak(name, event) : void 0;
5887
+ };
5888
+ return {
5889
+ onDragStart: named((name, { active }) => {
5890
+ const home = source.place?.(active.id, null);
5891
+ lastPlace = placeKey(home);
5892
+ return say.pickedUp({
5893
+ name,
5894
+ ...home
5895
+ });
5896
+ }),
5897
+ onDragOver: named((name, { active, over }) => describeOver(name, active.id, over?.id ?? null)),
5898
+ onDragMove: () => void 0,
5899
+ onDragEnd: named((name, { active, over }) => {
5900
+ const refused = over == null ? null : source.refusal?.(active.id, over.id);
5901
+ if (over != null && !refused && !source.place) return void 0;
5902
+ const place = over == null || refused ? null : source.place?.(active.id, over.id);
5903
+ if (place) return say.dropped({
5904
+ name,
5905
+ ...place
5906
+ });
5907
+ const home = source.place?.(active.id, null);
5908
+ return refused ? say.refusedDrop({
5909
+ name,
5910
+ reason: refused.reason,
5911
+ ...home
5912
+ }) : say.cancelled({
5913
+ name,
5914
+ ...home
5915
+ });
5916
+ }),
5917
+ onDragCancel: named((name, { active }) => say.cancelled({
5918
+ name,
5919
+ ...source.place?.(active.id, null)
5920
+ }))
5921
+ };
5922
+ }
5923
+ /** Announcements that say nothing, for a surface that announces on its own or has no names. */
5924
+ const SILENT_DRAG_ANNOUNCEMENTS = {
5925
+ onDragStart: () => void 0,
5926
+ onDragMove: () => void 0,
5927
+ onDragOver: () => void 0,
5928
+ onDragEnd: () => void 0,
5929
+ onDragCancel: () => void 0
5930
+ };
5931
+ /** dnd-kit `screenReaderInstructions`: Space, not Enter, in your language. */
5932
+ function dragInstructions(messages) {
5933
+ return { draggable: dragMessages(messages).instructions };
5934
+ }
5935
+ //#endregion
5936
+ //#region src/components/drag/drag.recipe.ts
5937
+ /**
5938
+ * The lift look, for a copy drawn outside `DragLift`: an opaque popover
5939
+ * surface, `shadow-float` and the `line-seam` ring. No scale, no tilt.
5940
+ */
5941
+ const LIFT_CLASS = "bg-layer-popover shadow-float ring-1 ring-line-seam";
5942
+ const drag = tv$1({
5943
+ slots: {
5944
+ lift: [
5945
+ "pointer-events-none size-full",
5946
+ "rounded-control",
5947
+ LIFT_CLASS
5948
+ ],
5949
+ placeholder: [
5950
+ "pointer-events-none box-border",
5951
+ "rounded-control",
5952
+ "border-[1.5px] border-dashed border-line-strong bg-fill-subtle"
5953
+ ],
5954
+ hint: [
5955
+ "pointer-events-none fixed top-0 left-0 z-70 max-w-80",
5956
+ "rounded-chip px-2 py-1",
5957
+ "font-sans text-caption",
5958
+ "bg-layer-hud text-foreground-on-hud shadow-float ring-1 ring-line-seam"
5959
+ ]
5960
+ },
5961
+ variants: { opaque: { true: { placeholder: ["bg-layer-canvas", "bg-[linear-gradient(var(--fill-subtle),var(--fill-subtle))]"] } } }
5962
+ });
5963
+ //#endregion
5964
+ //#region src/components/drag/drag-lift.tsx
5965
+ /**
5966
+ * A drag settling (motion.md, `motion-drag-settle-*`): the lifted copy
5967
+ * gliding into its place on a drop or back home on a cancel, siblings sliding
5968
+ * apart to open the place, and a layout reflowing on a drop.
5969
+ */
5970
+ const DRAG_SETTLE = {
5971
+ duration: 160,
5972
+ easing: "cubic-bezier(0.25, 1, 0.5, 1)"
5973
+ };
5974
+ /** For `useSortable({ transition })`: siblings slide with the same token. */
5975
+ const DRAG_SIBLING_TRANSITION = {
5976
+ duration: DRAG_SETTLE.duration,
5977
+ easing: DRAG_SETTLE.easing
5978
+ };
5979
+ /** The item a drag came from, while nothing else has taken its place (`data-drag-origin`). */
5980
+ const ORIGIN_OPACITY = .4;
5981
+ /** Auto-scroll starts this close to the edge of anything that scrolls. */
5982
+ const DRAG_AUTO_SCROLL_ZONE_PX = 48;
5983
+ /** How far a keyboard drag sets the copy off its place, so the place's dashed outline shows. */
5984
+ const DRAG_KEYBOARD_OFFSET_PX = 6;
5985
+ const hideActiveWhileGliding = defaultDropAnimationSideEffects({ styles: { active: { opacity: "0" } } });
5986
+ /**
5987
+ * Drop: the copy glides into its place. Cancel: it glides back home. While
5988
+ * it glides, the item it will become stays hidden, then appears there.
5989
+ */
5990
+ const DROP_GLIDE = {
5991
+ duration: DRAG_SETTLE.duration,
5992
+ easing: DRAG_SETTLE.easing,
5993
+ sideEffects: (parameters) => {
5994
+ const restore = hideActiveWhileGliding(parameters);
5995
+ const copy = parameters.dragOverlay.node.querySelector("[data-slot=drag-lift]");
5996
+ if (copy?.style.translate) {
5997
+ copy.style.transition = `translate ${DRAG_SETTLE.duration}ms ${DRAG_SETTLE.easing}`;
5998
+ copy.style.translate = "0px 0px";
5999
+ }
6000
+ return restore;
6001
+ }
6002
+ };
6003
+ const OVERLAY_STYLE = { pointerEvents: "none" };
6004
+ const REDUCED_MOTION = "(prefers-reduced-motion: reduce)";
6005
+ function subscribeReducedMotion(listener) {
6006
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") return () => {};
6007
+ const query = window.matchMedia(REDUCED_MOTION);
6008
+ query.addEventListener("change", listener);
6009
+ return () => query.removeEventListener("change", listener);
6010
+ }
6011
+ function reducedMotion() {
6012
+ return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(REDUCED_MOTION).matches;
6013
+ }
6014
+ /**
6015
+ * The sibling transition for `useSortable({ transition })`: the drag-settle
6016
+ * slide, or none with `prefers-reduced-motion`.
6017
+ */
6018
+ function useDragSiblingTransition() {
6019
+ return useSyncExternalStore(subscribeReducedMotion, reducedMotion, () => false) ? null : DRAG_SIBLING_TRANSITION;
6020
+ }
6021
+ const KEYBOARD_OFFSET = `6px 6px`;
6022
+ function isKeyboardEvent(event) {
6023
+ return typeof KeyboardEvent !== "undefined" && event instanceof KeyboardEvent;
6024
+ }
6025
+ /**
6026
+ * For a compact proxy (a section's head, at most 240px wide): the grab point
6027
+ * is kept, but pulled to within `inset` of the proxy's end, so the hand never
6028
+ * holds empty air beside it. A constant shift: the copy still tracks 1:1.
6029
+ */
6030
+ function keepGrabInside(proxyWidth, inset = 20) {
6031
+ return ({ transform, activatorEvent, activeNodeRect }) => {
6032
+ if (!activeNodeRect || !activatorEvent) return transform;
6033
+ const point = eventPoint(activatorEvent);
6034
+ if (!point) return transform;
6035
+ const grabX = point.x - activeNodeRect.left;
6036
+ const max = proxyWidth - inset;
6037
+ return grabX > max ? {
6038
+ ...transform,
6039
+ x: transform.x + (grabX - max)
6040
+ } : transform;
6041
+ };
6042
+ }
6043
+ function eventPoint(event) {
6044
+ if ("clientX" in event && typeof event.clientX === "number") {
6045
+ const pointerEvent = event;
6046
+ return {
6047
+ x: pointerEvent.clientX,
6048
+ y: pointerEvent.clientY
6049
+ };
6050
+ }
6051
+ const touch = event.touches?.[0] ?? event.changedTouches?.[0];
6052
+ return touch ? {
6053
+ x: touch.clientX,
6054
+ y: touch.clientY
6055
+ } : null;
6056
+ }
6057
+ /**
6058
+ * Cancels the drag in progress, whichever sensor holds it. Every dnd-kit
6059
+ * sensor (and so every sensor of `useDragSensors`) puts the item back when the
6060
+ * window is resized, so this sends the window a `resize`: unlike a synthetic
6061
+ * Escape, no app's own Escape handler (a dialog, a panel, a popover) hears it.
6062
+ */
6063
+ function cancelDrag(win = window) {
6064
+ win.dispatchEvent(new Event("resize"));
6065
+ }
6066
+ /**
6067
+ * Above every raft-ui layer (popovers 50, a stacked dialog 60, toasts and the
6068
+ * lightbox 70) and an app's own top layers: the copy in the hand is always on
6069
+ * top. dnd-kit's own default.
6070
+ */
6071
+ const DRAG_LIFT_Z_INDEX = 999;
6072
+ const noSubscribe = () => () => {};
6073
+ const clientBody = () => document.body;
6074
+ const serverBody = () => null;
6075
+ /**
6076
+ * For a component whose copy goes to `document.body` unless it is told
6077
+ * otherwise: `undefined` is the body (once on the client, so hydration
6078
+ * matches), `null` is in place, and an element is that element.
6079
+ */
6080
+ function useLiftContainer(container) {
6081
+ const body = useSyncExternalStore(noSubscribe, clientBody, serverBody);
6082
+ return container === void 0 ? body : container;
6083
+ }
6084
+ /**
6085
+ * The copy of a dragged item that follows the hand
6086
+ * (design/patterns/drag-and-drop.md#what-follows-the-hand): an opaque popover
6087
+ * surface with `shadow-float` and a `line-seam` ring, no scale and no tilt,
6088
+ * 1:1 with the pointer from the grab point, never clamped to its container and
6089
+ * never held to one axis. On a drop it glides into its place, and on a cancel
6090
+ * back home (160ms, `motion-drag-settle-*`; none with reduced motion).
6091
+ *
6092
+ * While something is lifted it also sets the grabbing cursor, cancels the
6093
+ * drag when the window loses focus or the tab is hidden, and scrolls an area
6094
+ * the pointer is near the edge of. Render it inside the `DndContext`.
6095
+ */
6096
+ function DragLift({ children, className, style, modifiers, autoScroll = true, container, zIndex = 999 }) {
6097
+ const { lift } = drag();
6098
+ const { resolvedMode } = useTheme();
6099
+ const reduced = useSyncExternalStore(subscribeReducedMotion, reducedMotion, () => false);
6100
+ const { activatorEvent } = useDndContext();
6101
+ const liftStyle = useMemo(() => isKeyboardEvent(activatorEvent) ? {
6102
+ translate: KEYBOARD_OFFSET,
6103
+ ...style
6104
+ } : style, [activatorEvent, style]);
6105
+ const overlay = /* @__PURE__ */ jsx(DragOverlay, {
6106
+ dropAnimation: reduced ? null : DROP_GLIDE,
6107
+ modifiers,
6108
+ zIndex,
6109
+ style: OVERLAY_STYLE,
6110
+ children: children == null || children === false ? null : /* @__PURE__ */ jsx("div", {
6111
+ className: "size-full",
6112
+ children: /* @__PURE__ */ jsx("div", {
6113
+ "data-slot": "drag-lift",
6114
+ className: lift({ className }),
6115
+ style: liftStyle,
6116
+ children
6117
+ })
6118
+ })
6119
+ });
6120
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(DragSession, { autoScroll }), container ? createPortal(/* @__PURE__ */ jsx("div", {
6121
+ "data-slot": "drag-lift-portal",
6122
+ className: cn("contents", resolvedMode),
6123
+ children: overlay
6124
+ }), container) : overlay] });
6125
+ }
6126
+ /** Where the pointer is during a drag: auto-scroll and the refusal hint read it. */
6127
+ const pointer = {
6128
+ x: 0,
6129
+ y: 0,
6130
+ known: false
6131
+ };
6132
+ function trackPointer(event) {
6133
+ const point = "touches" in event ? event.touches[0] : event;
6134
+ if (!point) return;
6135
+ pointer.x = point.clientX;
6136
+ pointer.y = point.clientY;
6137
+ pointer.known = true;
6138
+ }
6139
+ /** The pointer's last place, for a hint that follows it. */
6140
+ function dragPointer() {
6141
+ return pointer.known ? {
6142
+ x: pointer.x,
6143
+ y: pointer.y
6144
+ } : null;
6145
+ }
6146
+ function DragSession({ autoScroll }) {
6147
+ const { active, activatorEvent } = useDndContext();
6148
+ const dragging = active != null;
6149
+ const viaKeyboard = isKeyboardEvent(activatorEvent);
6150
+ useEffect(() => {
6151
+ if (!dragging) return;
6152
+ const root = document.documentElement;
6153
+ root.setAttribute("data-dragging", "");
6154
+ if (activatorEvent && !viaKeyboard) trackPointer(activatorEvent);
6155
+ const onMove = (event) => trackPointer(event);
6156
+ const onBlur = () => cancelDrag();
6157
+ const onVisibility = () => {
6158
+ if (document.visibilityState === "hidden") cancelDrag();
6159
+ };
6160
+ window.addEventListener("pointermove", onMove, {
6161
+ capture: true,
6162
+ passive: true
6163
+ });
6164
+ window.addEventListener("touchmove", onMove, {
6165
+ capture: true,
6166
+ passive: true
6167
+ });
6168
+ window.addEventListener("blur", onBlur);
6169
+ document.addEventListener("visibilitychange", onVisibility);
6170
+ let frame = 0;
6171
+ const tick = () => {
6172
+ if (pointer.known) autoScrollAt(pointer.x, pointer.y);
6173
+ frame = requestAnimationFrame(tick);
6174
+ };
6175
+ if (autoScroll && !viaKeyboard) frame = requestAnimationFrame(tick);
6176
+ return () => {
6177
+ root.removeAttribute("data-dragging");
6178
+ pointer.known = false;
6179
+ window.removeEventListener("pointermove", onMove, { capture: true });
6180
+ window.removeEventListener("touchmove", onMove, { capture: true });
6181
+ window.removeEventListener("blur", onBlur);
6182
+ document.removeEventListener("visibilitychange", onVisibility);
6183
+ cancelAnimationFrame(frame);
6184
+ };
6185
+ }, [
6186
+ dragging,
6187
+ viaKeyboard,
6188
+ autoScroll,
6189
+ activatorEvent
6190
+ ]);
6191
+ return null;
6192
+ }
6193
+ function scrollable(element) {
6194
+ const style = getComputedStyle(element);
6195
+ return {
6196
+ x: /(auto|scroll)/.test(style.overflowX) && element.scrollWidth > element.clientWidth,
6197
+ y: /(auto|scroll)/.test(style.overflowY) && element.scrollHeight > element.clientHeight
6198
+ };
6199
+ }
6200
+ /** Faster the nearer the edge: up to 16px a frame at the edge itself. */
6201
+ function speed(depth) {
6202
+ return Math.ceil(16 * Math.min(1, depth / 48) ** 2);
6203
+ }
6204
+ function scrollDelta(start, end, at, position, max) {
6205
+ const zone = 48;
6206
+ if (at < start + zone && position > 0) return -speed(start + zone - at);
6207
+ if (at > end - zone && position < max) return speed(at - (end - zone));
6208
+ return 0;
6209
+ }
6210
+ /** Scrolls the nearest area under the point that can still scroll toward the edge it is near. */
6211
+ function autoScrollAt(x, y) {
6212
+ let element = document.elementFromPoint(x, y);
6213
+ while (element && element !== document.documentElement && element !== document.body) {
6214
+ const can = scrollable(element);
6215
+ if (can.x || can.y) {
6216
+ const rect = element.getBoundingClientRect();
6217
+ const dy = can.y ? scrollDelta(rect.top, rect.bottom, y, element.scrollTop, element.scrollHeight - element.clientHeight - 1) : 0;
6218
+ const dx = can.x ? scrollDelta(rect.left, rect.right, x, element.scrollLeft, element.scrollWidth - element.clientWidth - 1) : 0;
6219
+ if (dx || dy) {
6220
+ element.scrollBy(dx, dy);
6221
+ return;
6222
+ }
6223
+ }
6224
+ element = element.parentElement;
6225
+ }
6226
+ const page = document.scrollingElement ?? document.documentElement;
6227
+ const dy = scrollDelta(0, window.innerHeight, y, page.scrollTop, page.scrollHeight - window.innerHeight - 1);
6228
+ if (dy) window.scrollBy(0, dy);
6229
+ }
6230
+ //#endregion
6231
+ //#region src/components/drag/drag-sensors.ts
6232
+ /**
6233
+ * A mouse or a pen picks an item up once it has moved this far, so a click
6234
+ * never moves anything (design/patterns/drag-and-drop.md#starting-a-drag).
6235
+ */
6236
+ const MOUSE_DRAG_DISTANCE_PX = 6;
6237
+ /**
6238
+ * Space picks up and drops, Escape puts back, the arrow keys move. Enter
6239
+ * never starts a drag: on an item that can also be opened or activated, Enter
6240
+ * does that.
6241
+ */
6242
+ const DRAG_KEYBOARD_CODES = {
6243
+ start: ["Space"],
6244
+ cancel: ["Escape"],
6245
+ end: ["Space"]
6246
+ };
6247
+ var DragKeyboardSensorImpl = class extends KeyboardSensor {
6248
+ static activators = KeyboardSensor.activators;
6249
+ attach() {
6250
+ super.attach();
6251
+ holdEscape(eventWindow(this.props.event), this, (event) => this.handleCancel(event));
6252
+ }
6253
+ detach() {
6254
+ releaseEscape(eventWindow(this.props.event), this);
6255
+ super.detach();
6256
+ }
6257
+ };
6258
+ /**
6259
+ * dnd-kit's KeyboardSensor, but Escape during the drag puts the item back and
6260
+ * reaches nothing else: no dialog, panel or popover that closes on Escape
6261
+ * hears it (`drag-escape.ts`). The pointer sensors of `useDragSensors` do the
6262
+ * same.
6263
+ */
6264
+ const DragKeyboardSensor = DragKeyboardSensorImpl;
6265
+ const NO_TOUCH = {};
6266
+ /**
6267
+ * The one sensor set for everything that can be dragged
6268
+ * (design/patterns/drag-and-drop.md#starting-a-drag):
6269
+ *
6270
+ * - a mouse or a pen: after 6px of movement;
6271
+ * - a finger: hold still 500ms, then move 10px (`useHoldThenMoveTouchSensor`);
6272
+ * - the keyboard: Space picks up, the arrows move, Space drops, Escape puts
6273
+ * back. Enter never starts a drag.
6274
+ *
6275
+ * However the drag started, Escape during it only puts the item back: it is
6276
+ * taken in the capture phase on the window and stopped, so no app handler
6277
+ * (a dialog, a panel, a popover that closes on Escape) hears it. Once the drag
6278
+ * is over, Escape reaches the app again.
6279
+ *
6280
+ * Pass the options, or only the keyboard's `coordinateGetter`.
6281
+ */
6282
+ function useDragSensors(options = {}) {
6283
+ const { coordinateGetter = listKeyboardCoordinates, keyboard = true, touch = NO_TOUCH } = typeof options === "function" ? { coordinateGetter: options } : options;
6284
+ const keyboardOptions = useMemo(() => ({
6285
+ keyboardCodes: DRAG_KEYBOARD_CODES,
6286
+ coordinateGetter
6287
+ }), [coordinateGetter]);
6288
+ const mouse = useMouseOnlyPointerSensor(6);
6289
+ const finger = useHoldThenMoveTouchSensor(touch);
6290
+ const keys = useSensor(DragKeyboardSensor, keyboardOptions);
6291
+ return useSensors(mouse, finger, keyboard ? keys : null);
6292
+ }
6293
+ /**
6294
+ * dnd-kit's sortable keyboard steps, measured from where the item's place
6295
+ * actually is (its own node, slid into the landing spot) rather than from the
6296
+ * lifted copy. After an item moves into another list the two differ, and the
6297
+ * arrows would skip a place. Use it for lists inside one `DndContext`.
6298
+ */
6299
+ const listKeyboardCoordinates = (event, args) => {
6300
+ const { context } = args;
6301
+ const node = context.active == null ? null : context.draggableNodes.get(context.active.id)?.node.current;
6302
+ if (!node) return sortableKeyboardCoordinates(event, args);
6303
+ const rect = node.getBoundingClientRect();
6304
+ const collisionRect = {
6305
+ top: rect.top,
6306
+ left: rect.left,
6307
+ width: rect.width,
6308
+ height: rect.height,
6309
+ bottom: rect.bottom,
6310
+ right: rect.right
6311
+ };
6312
+ return sortableKeyboardCoordinates(event, {
6313
+ ...args,
6314
+ context: {
6315
+ ...context,
6316
+ collisionRect
6317
+ }
6318
+ });
6319
+ };
6320
+ /**
6321
+ * The keyboard fix for an item that moves between lists while it is dragged
6322
+ * (a sidebar's sections, a board's columns). Without it, dnd-kit still counts
6323
+ * the row the item was put next to as the place under it, projects one more
6324
+ * move, and the next arrow skips a place: what is announced and where the item
6325
+ * drops disagree. With it:
6326
+ *
6327
+ * - right after it moves list, the item is over itself (by keyboard until the
6328
+ * next arrow, by pointer for one frame);
6329
+ * - the arrows are measured from the item's real place (`listKeyboardCoordinates`).
6330
+ *
6331
+ * Render `DragRemeasure` too, so the lists are measured again after the move.
6332
+ */
6333
+ function useDragAcrossLists(collisionDetection) {
6334
+ const box = useRef({
6335
+ overSelf: false,
6336
+ justMoved: false,
6337
+ frame: 0
6338
+ });
6339
+ return useMemo(() => {
6340
+ const clearFrame = () => {
6341
+ const state = box.current;
6342
+ if (state.frame && typeof cancelAnimationFrame !== "undefined") cancelAnimationFrame(state.frame);
6343
+ state.frame = 0;
6344
+ };
6345
+ return {
6346
+ collisionDetection: (args) => (box.current.justMoved || box.current.overSelf) && args.active ? [{ id: args.active.id }] : collisionDetection(args),
6347
+ coordinateGetter: (event, args) => {
6348
+ box.current.overSelf = false;
6349
+ return listKeyboardCoordinates(event, args);
6350
+ },
6351
+ moved: (viaKeyboard) => {
6352
+ const state = box.current;
6353
+ state.justMoved = true;
6354
+ if (viaKeyboard) state.overSelf = true;
6355
+ clearFrame();
6356
+ if (typeof requestAnimationFrame === "undefined") {
6357
+ state.justMoved = false;
6358
+ return;
6359
+ }
6360
+ state.frame = requestAnimationFrame(() => {
6361
+ state.frame = requestAnimationFrame(() => {
6362
+ state.justMoved = false;
6363
+ state.frame = 0;
6364
+ });
6365
+ });
6366
+ },
6367
+ reset: () => {
6368
+ clearFrame();
6369
+ box.current.overSelf = false;
6370
+ box.current.justMoved = false;
6371
+ }
6372
+ };
6373
+ }, [collisionDetection]);
6374
+ }
6375
+ /**
6376
+ * Measures every drop target again once an item's move into another list has
6377
+ * rendered. dnd-kit's own observers skip targets whose size didn't change,
6378
+ * even when they moved. Render it inside the `DndContext`.
6379
+ */
6380
+ function DragRemeasure({ version }) {
6381
+ const context = useDndContext();
6382
+ const latest = useRef(context);
6383
+ useLayoutEffect(() => {
6384
+ latest.current = context;
6385
+ });
6386
+ useLayoutEffect(() => {
6387
+ const { active, droppableContainers } = latest.current;
6388
+ if (active) latest.current.measureDroppableContainers([...droppableContainers.keys()]);
6389
+ }, [version]);
6390
+ return null;
6391
+ }
6392
+ //#endregion
6393
+ //#region src/components/drag/drop-placeholder.tsx
6394
+ /**
6395
+ * Where a dragged item will land (design/patterns/drag-and-drop.md#where-it-will-land):
6396
+ * a 1.5px dashed `line-strong` outline on `fill-subtle`, with the item's
6397
+ * radius and size. One look for every place. The control radius is the
6398
+ * default; pass the item's own (`rounded-container` for a card). Hidden from
6399
+ * assistive technology: the announcements say where the item is.
6400
+ */
6401
+ function DropPlaceholder({ opaque = false, className, render, ...props }) {
6402
+ const { placeholder } = drag({ opaque });
6403
+ return useRender({
6404
+ defaultTagName: "div",
6405
+ render,
6406
+ props: mergeProps({
6407
+ "aria-hidden": true,
6408
+ className: placeholder({ className })
6409
+ }, props, { "data-slot": "drop-placeholder" })
6410
+ });
6411
+ }
6412
+ /** The chip sits this far right of and below the pointer. */
6413
+ const HINT_OFFSET = {
6414
+ x: 14,
6415
+ y: 16
6416
+ };
6417
+ /** It stays at least this far inside the window on every side. */
6418
+ const HINT_INSET = 8;
6419
+ /** Pushed off the lifted copy, it keeps this far from it. */
6420
+ const HINT_GAP = 6;
6421
+ function overlaps(a, b) {
6422
+ return a.left < b.right && a.right > b.left && a.top < b.bottom && a.bottom > b.top;
6423
+ }
6424
+ function clamp(value, min, max) {
6425
+ return Math.max(min, Math.min(value, Math.max(min, max)));
6426
+ }
6427
+ /**
6428
+ * Where the refusal chip goes (design/patterns/drag-and-drop.md#refused-places):
6429
+ * right of and below the pointer; left of it (and of the copy) where the
6430
+ * window's right edge would cut it, above it where the bottom edge would; off
6431
+ * the lifted copy, which is drawn over it; and always at least 8px inside the
6432
+ * window.
6433
+ */
6434
+ function placeRefusalHint(point, size, lift, viewport) {
6435
+ const { width, height } = size;
6436
+ const maxX = viewport.width - HINT_INSET - width;
6437
+ const maxY = viewport.height - HINT_INSET - height;
6438
+ const fitsX = (x) => x >= HINT_INSET && x <= maxX;
6439
+ const fitsY = (y) => y >= HINT_INSET && y <= maxY;
6440
+ const right = point.x + HINT_OFFSET.x;
6441
+ const onRight = right <= maxX;
6442
+ let x = onRight ? right : Math.min(point.x, lift?.left ?? point.x) - HINT_OFFSET.x - width;
6443
+ const below = point.y + HINT_OFFSET.y;
6444
+ const onBelow = below <= maxY;
6445
+ let y = onBelow ? below : point.y - HINT_OFFSET.y - height;
6446
+ const box = (bx, by) => ({
6447
+ left: bx,
6448
+ top: by,
6449
+ right: bx + width,
6450
+ bottom: by + height
6451
+ });
6452
+ if (lift && overlaps(box(x, y), lift)) {
6453
+ const clearBelow = lift.bottom + HINT_GAP;
6454
+ const clearAbove = lift.top - HINT_GAP - height;
6455
+ const vertical = (onBelow ? [clearBelow, clearAbove] : [clearAbove, clearBelow]).find(fitsY);
6456
+ if (vertical !== void 0) y = vertical;
6457
+ else {
6458
+ const besideRight = lift.right + HINT_OFFSET.x;
6459
+ const besideLeft = lift.left - HINT_OFFSET.x - width;
6460
+ const beside = (onRight ? [besideRight, besideLeft] : [besideLeft, besideRight]).find(fitsX);
6461
+ if (beside !== void 0) x = beside;
6462
+ }
6463
+ }
6464
+ return {
6465
+ x: Math.round(clamp(x, HINT_INSET, maxX)),
6466
+ y: Math.round(clamp(y, HINT_INSET, maxY))
6467
+ };
6468
+ }
6469
+ /**
6470
+ * Shown while the hand is over a place that refuses the item
6471
+ * (design/patterns/drag-and-drop.md#refused-places): the reason, in a HUD
6472
+ * chip by the pointer (by the lifted copy in a keyboard drag), and the
6473
+ * not-allowed cursor. Render it only while the place is refused, inside the
6474
+ * `DndContext`, with no placeholder anywhere. Announce the reason as well:
6475
+ * the chip is not read out.
6476
+ *
6477
+ * The chip sits right of and below the pointer. Near the window's right edge
6478
+ * it goes left of the pointer and of the lifted copy, near the bottom edge
6479
+ * above the pointer; it never sits under the copy, and always stays 8px inside
6480
+ * the window. Its size is measured when its content changes, not every frame.
6481
+ */
6482
+ function DragRefusalHint({ children, container, className, style, ...props }) {
6483
+ const { hint } = drag();
6484
+ const ref = useRef(null);
6485
+ const { active, activatorEvent } = useDndContext();
6486
+ const dragging = active != null;
6487
+ const viaKeyboard = typeof KeyboardEvent !== "undefined" && activatorEvent instanceof KeyboardEvent;
6488
+ useEffect(() => {
6489
+ if (!dragging) return;
6490
+ const root = document.documentElement;
6491
+ root.setAttribute("data-drag-refused", "");
6492
+ const node = ref.current;
6493
+ const size = {
6494
+ width: node?.offsetWidth ?? 0,
6495
+ height: node?.offsetHeight ?? 0
6496
+ };
6497
+ const observer = node && typeof ResizeObserver !== "undefined" ? new ResizeObserver(() => {
6498
+ size.width = node.offsetWidth;
6499
+ size.height = node.offsetHeight;
6500
+ }) : null;
6501
+ if (node) observer?.observe(node);
6502
+ let frame = 0;
6503
+ const tick = () => {
6504
+ if (node) {
6505
+ const lift = document.querySelector("[data-slot=drag-lift]")?.getBoundingClientRect();
6506
+ let point = dragPointer();
6507
+ if ((viaKeyboard || !point) && lift) point = {
6508
+ x: lift.right,
6509
+ y: lift.top + lift.height / 2
6510
+ };
6511
+ if (point) {
6512
+ const at = placeRefusalHint(point, size, lift ?? null, {
6513
+ width: window.innerWidth,
6514
+ height: window.innerHeight
6515
+ });
6516
+ node.style.transform = `translate(${at.x}px, ${at.y}px)`;
6517
+ node.style.visibility = "visible";
6518
+ }
6519
+ }
6520
+ frame = requestAnimationFrame(tick);
6521
+ };
6522
+ tick();
6523
+ return () => {
6524
+ root.removeAttribute("data-drag-refused");
6525
+ observer?.disconnect();
6526
+ cancelAnimationFrame(frame);
6527
+ };
6528
+ }, [dragging, viaKeyboard]);
6529
+ if (!dragging || typeof document === "undefined") return null;
6530
+ return createPortal(/* @__PURE__ */ jsx("div", {
6531
+ ...props,
6532
+ ref,
6533
+ "data-slot": "drag-refusal-hint",
6534
+ "aria-hidden": true,
6535
+ className: hint({ className }),
6536
+ style: {
6537
+ visibility: "hidden",
6538
+ ...style
6539
+ },
6540
+ children
6541
+ }), container ?? document.body);
6542
+ }
6543
+ //#endregion
5756
6544
  //#region src/components/skeleton/skeleton.tsx
5757
6545
  const skeleton = tv$1({
5758
6546
  slots: { root: [
@@ -6196,4 +6984,4 @@ function InboxItemActions({ className, render, reveal, ...props }) {
6196
6984
  });
6197
6985
  }
6198
6986
  //#endregion
6199
- export { MessageTextSelectionToolbarSeparator as $, controlIconInset as $i, PopoverClose as $n, ListRow as $r, MessageItemSearchMatch as $t, MessageList as A, DialogSheetBack as Ai, PreviewCardHeader as An, DropdownMenuSeparator as Ar, MessageItemBadgeSeparator as At, MessageQuotedPreviewHeader as B, Button$1 as Bi, MobileNavServerPopoverDestination as Bn, PanelHeaderRoot as Br, MessageItemInlineStatus as Bt, MessageListJumpPill as C, DialogDescription as Ci, PreviewCardActions as Cn, DropdownMenuLabel as Cr, MessageReactionTooltipContent as Ct, MessageListEndFade as D, DialogNav as Di, PreviewCardDescription as Dn, DropdownMenuRadioGroup as Dr, MessageReactionTooltipNames as Dt, MessageListDateDivider as E, DialogHeader as Ei, PreviewCardContent as En, DropdownMenuPortal as Er, MessageReactionTooltipNameText as Et, MessageQuotedPreviewAuthorDelegatedBy as F, panelToggleAction as Fi, PreviewCardTitle as Fn, Kbd as Fr, MessageItemDelegatedAvatar as Ft, MessageQuotedPreviewUnavailable as G, useParentOverlayKind as Gi, MobileNavServerPopoverRowBody as Gn, ScrollAreaContent as Gr, MessageItemSenderGroup as Gt, MessageQuotedPreviewText as H, Spinner as Hi, MobileNavServerPopoverGroup as Hn, PanelScrollViewport as Hr, MessageItemSender as Ht, MessageQuotedPreviewAuthorMeta as I, TextLink as Ii, PreviewCardTrigger as In, KbdGroup as Ir, MessageItemDelegatedBy as It, MessageEmbedFooter as J, useTheme as Ji, Popover$1 as Jn, ScrollAreaThumb as Jr, MessageItemBody as Jt, MessageEmbed as K, withOverlayLayer as Ki, MobileNavServerPopoverRowDescription as Kn, ScrollAreaCorner as Kr, MessageItemTime as Kt, MessageQuotedPreviewAuthorName as L, TextLinkExternalIcon as Li, MobileNavServerItem as Ln, Panel as Lr, MessageItemDelegatedByButton as Lt, MessageQuotedPreviewAttachment as M, DialogTitle as Mi, PreviewCardPopup as Mn, DropdownMenuSubmenu as Mr, MessageItemSavedIndicator as Mt, MessageQuotedPreviewAttachments as N, DialogTrigger as Ni, PreviewCardPortal as Nn, DropdownMenuSubmenuTrigger as Nr, MessageItemToolbar as Nt, MessageListHistoryLimited as O, DialogOverlay as Oi, PreviewCardEyebrow as On, DropdownMenuRadioItem as Or, MessageReactionTooltipSeparator as Ot, MessageQuotedPreviewAuthor as P, PanelAction as Pi, PreviewCardSeparator as Pn, DropdownMenuTrigger as Pr, MessageItemToolbarButton as Pt, MessageTextSelectionToolbarButton as Q, useStackedActions as Qi, PopoverBody as Qn, PRESENCE_COLOR as Qr, MessageItemFooter as Qt, MessageQuotedPreviewChannel as R, textLinkVariants as Ri, MobileNavServerPopover as Rn, PanelBody as Rr, MessageItemDelegatedByName as Rt, MessageListJumpControls as S, DialogContent as Si, PreviewCard$1 as Sn, DropdownMenuItemLabel as Sr, MessageReactionQuickRow as St, MessageListJumpPillGroup as T, DialogFooterNote as Ti, PreviewCardBody as Tn, DropdownMenuPopup as Tr, MessageReactionTooltipName as Tt, MessageQuotedPreviewThread as U, defaultNativeButton as Ui, MobileNavServerPopoverList as Un, PanelSection as Ur, MessageItemSenderBadges as Ut, MessageQuotedPreviewLoading as V, buttonVariants as Vi, MobileNavServerPopoverDestinations as Vn, PanelScrollContent as Vr, MessageItemMeta as Vt, MessageQuotedPreviewTimestamp as W, OverlayLayerProvider as Wi, MobileNavServerPopoverRow as Wn, ScrollArea$1 as Wr, MessageItemSenderButton as Wt, messageEmbed as X, tv$1 as Xi, PopoverArrow as Xn, Checkbox$1 as Xr, MessageItemEdited as Xt, MessageEmbedHeader as Y, ThemeStateContext as Yi, PopoverActions as Yn, ScrollAreaViewport as Yr, MessageItemContent as Yt, MessageTextSelectionToolbar as Z, stackedActions as Zi, PopoverBackdrop as Zn, CheckboxIndicator as Zr, MessageItemEmbedded as Zt, InboxItemTrailing as _, DialogSheetContent as _i, useOverflowTitle as _n, DropdownMenuCheckboxItemIndicator as _r, MessageReactionErrorIndicator as _t, InboxItemContext as a, ListRowIcon as ai, Avatar$1 as an, PopoverSeparator as ar, MessageReferenceIcon as at, useLatestRef as b, DialogBody as bi, observeTruncation as bn, DropdownMenuItem as br, MessageReactionPickerStatic as bt, InboxItemLeading as c, ListRowTop as ci, AvatarGroup as cn, PopoverViewport as cr, MessageReferencePending as ct, InboxItemMetadata as d, TooltipContent as di, RadioGroup$1 as dn, useMouseOnlyPointerSensor as dr, MessageReferenceText as dt, headEdgePull as ea, ListRowBody as ei, MessageItemAvatarSlot as en, PopoverContent as er, MessageMultiSelect as et, InboxItemSelection as f, TooltipPortal as fi, RadioGroupIndicator as fn, MobileNavItem as fr, MessageReferenceUnavailable as ft, InboxItemTitle as g, DialogCommit as gi, InputGroupInput as gn, DropdownMenuCheckboxItem as gr, MessageReactionCount as gt, InboxItemTimestamp as h, Badge as hi, InputGroupAddon as hn, DropdownMenu as hr, MessageReactionChip as ht, InboxItemContent as i, ListRowGroup as ii, searchHit as in, PopoverPortal as ir, MessageReferenceChip as it, MessageQuotedPreview as j, DialogSurface as ji, PreviewCardMeta as jn, DropdownMenuShortcut as jr, MessageItemReadReceipt as jt, MessageListNotice as k, DialogPortal as ki, PreviewCardFooter as kn, DropdownMenuRadioItemIndicator as kr, MessageItemBadge as kt, InboxItemMarks as l, ListRowValue as li, AvatarGroupCount as ln, TOUCH_DRAG_HOLD_MS as lr, MessageReferenceReadMark as lt, InboxItemSubtitle as m, TooltipTrigger as mi, InputGroup as mn, MobileNavRoot as mr, MessageReactionAddButton as mt, InboxItemActions as n, decisionWidth as na, ListRowChevron as ni, MessageItemGutter as nn, PopoverHeader as nr, MessageMultiSelectToolbar as nt, InboxItemHeading as o, ListRowMeta as oi, AvatarBadge as on, PopoverTitle as or, MessageReferenceIndicator as ot, InboxItemSender as p, TooltipProvider as pi, RadioGroupItem as pn, MobileNavLabel as pr, inlineChip as pt, MessageEmbedContent as q, useThemeScopeProps as qi, MobileNavServerPopoverRowLabel as qn, ScrollAreaScrollbar as qr, MessageItemAttachments as qt, InboxItemBody as r, ListRowDescription as ri, MessageItem as rn, PopoverPopup as rr, MessageMultiSelectToolbarActions as rt, InboxItemHoverTarget as s, ListRowTitle as si, AvatarFallback as sn, PopoverTrigger as sr, MessageReferenceLabel as st, InboxItem as t, headEdges as ta, ListRowBottom as ti, MessageItemContinuationTime as tn, PopoverDescription as tr, MessageMultiSelectCheckbox as tt, InboxItemMessage as u, Tooltip$1 as ui, AvatarImage as un, useHoldThenMoveTouchSensor as ur, MessageReferenceSuffix as ut, InboxItemTrigger as v, useMobileViewport as vi, measureContent as vn, DropdownMenuContent as vr, MessageReactionGlyph as vt, MessageListJumpPillDismiss as w, DialogFooter as wi, PreviewCardArrow as wn, DropdownMenuLinkItem as wr, MessageReactionTooltipMeta as wt, Skeleton as x, DialogClose as xi, readNow as xn, DropdownMenuItemCount as xr, MessageReactionQuickButton as xt, inboxItem as y, Dialog$1 as yi, measureElement as yn, DropdownMenuFooter as yr, MessageReactionPickerContent as yt, MessageQuotedPreviewContent as z, DialogSheetReset as zi, MobileNavServerPopoverContent as zn, PanelFooter as zr, MessageItemHeader as zt };
6987
+ export { MessageListDateDivider as $, DialogContent as $i, PreviewCardContent as $n, DropdownMenuItemLabel as $r, MessageReactionTooltipNameText as $t, DRAG_AUTO_SCROLL_ZONE_PX as A, controlIconInset as Aa, ListRow as Ai, MessageItem as An, PopoverPopup as Ar, MessageMultiSelectToolbarActions as At, useDragSiblingTransition as B, ListRowValue as Bi, RadioGroupItem as Bn, TOUCH_DRAG_TOLERANCE_PX as Br, inlineChip as Bt, DropPlaceholder as C, withOverlayLayer as Ca, ScrollAreaCorner as Ci, MessageItemEdited as Cn, PopoverArrow as Cr, messageEmbed as Ct, listKeyboardCoordinates as D, tv$1 as Da, Checkbox$1 as Di, MessageItemAvatarSlot as Dn, PopoverContent as Dr, MessageMultiSelect as Dt, MOUSE_DRAG_DISTANCE_PX as E, ThemeStateContext as Ea, ScrollAreaViewport as Ei, MessageItemSearchMatch as En, PopoverClose as Er, MessageTextSelectionToolbarSeparator as Et, DROP_GLIDE as F, ListRowGroup as Fi, AvatarGroup as Fn, PopoverViewport as Fr, MessageReferencePending as Ft, SILENT_DRAG_ANNOUNCEMENTS as G, TooltipTrigger as Gi, measureContent as Gn, MobileNavRoot as Gr, MessageReactionGlyph as Gt, LIFT_CLASS as H, TooltipContent as Hi, InputGroupAddon as Hn, useMouseOnlyPointerSensor as Hr, MessageReactionChip as Ht, DragLift as I, ListRowIcon as Ii, AvatarGroupCount as In, HoldThenMoveTouchSensor as Ir, MessageReferenceReadMark as It, dragMessages as J, DialogSheetContent as Ji, readNow as Jn, DropdownMenuCheckboxItemIndicator as Jr, MessageReactionQuickButton as Jt, createDragAnnouncements as K, Badge as Ki, measureElement as Kn, DropdownMenu as Kr, MessageReactionPickerContent as Kt, ORIGIN_OPACITY as L, ListRowMeta as Li, AvatarImage as Ln, MouseOnlyPointerSensor as Lr, MessageReferenceSuffix as Lt, DRAG_LIFT_Z_INDEX as M, headEdges as Ma, ListRowBottom as Mi, Avatar$1 as Mn, PopoverSeparator as Mr, MessageReferenceIcon as Mt, DRAG_SETTLE as N, decisionWidth as Na, ListRowChevron as Ni, AvatarBadge as Nn, PopoverTitle as Nr, MessageReferenceIndicator as Nt, useDragAcrossLists as O, stackedActions as Oa, CheckboxIndicator as Oi, MessageItemContinuationTime as On, PopoverDescription as Or, MessageMultiSelectCheckbox as Ot, DRAG_SIBLING_TRANSITION as P, ListRowDescription as Pi, AvatarFallback as Pn, PopoverTrigger as Pr, MessageReferenceLabel as Pt, MessageListJumpPillGroup as Q, DialogClose as Qi, PreviewCardBody as Qn, DropdownMenuItemCount as Qr, MessageReactionTooltipName as Qt, cancelDrag as R, ListRowTitle as Ri, RadioGroup$1 as Rn, TOUCH_DRAG_DISTANCE_PX as Rr, MessageReferenceText as Rt, DragRefusalHint as S, useParentOverlayKind as Sa, ScrollAreaContent as Si, MessageItemContent as Sn, PopoverActions as Sr, MessageEmbedHeader as St, DragRemeasure as T, useTheme as Ta, ScrollAreaThumb as Ti, MessageItemFooter as Tn, PopoverBody as Tr, MessageTextSelectionToolbarButton as Tt, drag as U, TooltipPortal as Ui, InputGroupInput as Un, MobileNavItem as Ur, MessageReactionCount as Ut, useLiftContainer as V, Tooltip$1 as Vi, InputGroup as Vn, useHoldThenMoveTouchSensor as Vr, MessageReactionAddButton as Vt, DEFAULT_DRAG_MESSAGES as W, TooltipProvider as Wi, useOverflowTitle as Wn, MobileNavLabel as Wr, MessageReactionErrorIndicator as Wt, MessageListJumpPill as X, Dialog$1 as Xi, PreviewCardActions as Xn, DropdownMenuFooter as Xr, MessageReactionTooltipContent as Xt, MessageListJumpControls as Y, useMobileViewport as Yi, PreviewCard$1 as Yn, DropdownMenuContent as Yr, MessageReactionQuickRow as Yt, MessageListJumpPillDismiss as Z, DialogBody as Zi, PreviewCardArrow as Zn, DropdownMenuItem as Zr, MessageReactionTooltipMeta as Zt, InboxItemTrailing as _, Button$1 as _a, PanelHeaderRoot as _i, MessageItemSenderButton as _n, MobileNavServerPopoverRow as _r, MessageQuotedPreviewTimestamp as _t, InboxItemContext as a, DialogOverlay as aa, DropdownMenuRadioItem as ai, MessageItemSavedIndicator as an, PreviewCardPopup as ar, MessageQuotedPreviewAttachment as at, useLatestRef as b, defaultNativeButton as ba, PanelSection as bi, MessageItemAttachments as bn, MobileNavServerPopoverRowLabel as br, MessageEmbedContent as bt, InboxItemLeading as c, DialogSurface as ca, DropdownMenuShortcut as ci, MessageItemDelegatedAvatar as cn, PreviewCardTitle as cr, MessageQuotedPreviewAuthorDelegatedBy as ct, InboxItemMetadata as d, PanelAction as da, DropdownMenuTrigger as di, MessageItemDelegatedByName as dn, MobileNavServerPopover as dr, MessageQuotedPreviewChannel as dt, DialogDescription as ea, DropdownMenuLabel as ei, MessageReactionTooltipNames as en, PreviewCardDescription as er, MessageListEndFade as et, InboxItemSelection as f, panelToggleAction as fa, Kbd as fi, MessageItemHeader as fn, MobileNavServerPopoverContent as fr, MessageQuotedPreviewContent as ft, InboxItemTitle as g, DialogSheetReset as ga, PanelFooter as gi, MessageItemSenderBadges as gn, MobileNavServerPopoverList as gr, MessageQuotedPreviewThread as gt, InboxItemTimestamp as h, textLinkVariants as ha, PanelBody as hi, MessageItemSender as hn, MobileNavServerPopoverGroup as hr, MessageQuotedPreviewText as ht, InboxItemContent as i, DialogNav as ia, DropdownMenuRadioGroup as ii, MessageItemReadReceipt as in, PreviewCardMeta as ir, MessageQuotedPreview as it, DRAG_KEYBOARD_OFFSET_PX as j, headEdgePull as ja, ListRowBody as ji, searchHit as jn, PopoverPortal as jr, MessageReferenceChip as jt, useDragSensors as k, useStackedActions as ka, PRESENCE_COLOR as ki, MessageItemGutter as kn, PopoverHeader as kr, MessageMultiSelectToolbar as kt, InboxItemMarks as l, DialogTitle as la, DropdownMenuSubmenu as li, MessageItemDelegatedBy as ln, PreviewCardTrigger as lr, MessageQuotedPreviewAuthorMeta as lt, InboxItemSubtitle as m, TextLinkExternalIcon as ma, Panel as mi, MessageItemMeta as mn, MobileNavServerPopoverDestinations as mr, MessageQuotedPreviewLoading as mt, InboxItemActions as n, DialogFooterNote as na, DropdownMenuPopup as ni, MessageItemBadge as nn, PreviewCardFooter as nr, MessageListNotice as nt, InboxItemHeading as o, DialogPortal as oa, DropdownMenuRadioItemIndicator as oi, MessageItemToolbar as on, PreviewCardPortal as or, MessageQuotedPreviewAttachments as ot, InboxItemSender as p, TextLink as pa, KbdGroup as pi, MessageItemInlineStatus as pn, MobileNavServerPopoverDestination as pr, MessageQuotedPreviewHeader as pt, dragInstructions as q, DialogCommit as qi, observeTruncation as qn, DropdownMenuCheckboxItem as qr, MessageReactionPickerStatic as qt, InboxItemBody as r, DialogHeader as ra, DropdownMenuPortal as ri, MessageItemBadgeSeparator as rn, PreviewCardHeader as rr, MessageList as rt, InboxItemHoverTarget as s, DialogSheetBack as sa, DropdownMenuSeparator as si, MessageItemToolbarButton as sn, PreviewCardSeparator as sr, MessageQuotedPreviewAuthor as st, InboxItem as t, DialogFooter as ta, DropdownMenuLinkItem as ti, MessageReactionTooltipSeparator as tn, PreviewCardEyebrow as tr, MessageListHistoryLimited as tt, InboxItemMessage as u, DialogTrigger as ua, DropdownMenuSubmenuTrigger as ui, MessageItemDelegatedByButton as un, MobileNavServerItem as ur, MessageQuotedPreviewAuthorName as ut, InboxItemTrigger as v, buttonVariants as va, PanelScrollContent as vi, MessageItemSenderGroup as vn, MobileNavServerPopoverRowBody as vr, MessageQuotedPreviewUnavailable as vt, DRAG_KEYBOARD_CODES as w, useThemeScopeProps as wa, ScrollAreaScrollbar as wi, MessageItemEmbedded as wn, PopoverBackdrop as wr, MessageTextSelectionToolbar as wt, Skeleton as x, OverlayLayerProvider as xa, ScrollArea$1 as xi, MessageItemBody as xn, Popover$1 as xr, MessageEmbedFooter as xt, inboxItem as y, Spinner as ya, PanelScrollViewport as yi, MessageItemTime as yn, MobileNavServerPopoverRowDescription as yr, MessageEmbed as yt, keepGrabInside as z, ListRowTop as zi, RadioGroupIndicator as zn, TOUCH_DRAG_HOLD_MS as zr, MessageReferenceUnavailable as zt };